Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Kyote
Novice


Joined: 13 Jan 2002
Posts: 36
Location: USA

PostPosted: Mon Jun 03, 2002 4:07 am   

String list or #additem help?
 
I'm trying to make a spell queue to keep track of running spells and whether they've been successful or not then recast if not... Thats not the important thing nor what I'm having trouble with... yet!!!

What I'm needing is to know how to use the items in a string list. I do this..
Here's the pattern;
cast (*)
Here's the value;
#additem spellq "%1"
Now, say I do this; cast 'armor';cast 'shield';cast 'sanc';cast 'stone skin';cast 'gate' nabil

That makes the var
'armor'
'shield'
'sanc'
'stone skin'
'gate' nabil
Now, how do I use an item from this list? I know I can remove items from the list once they are used but I can't seem to remember HOW to use the items listed... Can anyone please help? TIA

---------------------
Kyote

Happiness isn't a destination. It's a way of life!!! In other words... Don't live until you can be happy... Be happy while you live!!!!
Reply with quote
Kyote
Novice


Joined: 13 Jan 2002
Posts: 36
Location: USA

PostPosted: Mon Jun 03, 2002 5:36 am   
 
What I mainly need, is to know which commands to look up in the help file for using items from the string list.

---------------------
Kyote

Happiness isn't a destination. It's a way of life!!! In other words... Don't live until you can be happy... Be happy while you live!!!!
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Mon Jun 03, 2002 5:36 am   
 
%item(list,item number)
Reply with quote
Kyote
Novice


Joined: 13 Jan 2002
Posts: 36
Location: USA

PostPosted: Mon Jun 03, 2002 5:42 am   
 
quote:

%item(list,item number)




Ahhh... So I do it like this then?
#var spell %item(spellq,1)
This gives me the first item from the list in the variable spell. Thanks V!!!

---------------------
Kyote

Happiness isn't a destination. It's a way of life!!! In other words... Don't live until you can be happy... Be happy while you live!!!!
Reply with quote
bdragon125
Beginner


Joined: 05 Nov 2001
Posts: 12
Location: United Kingdom

PostPosted: Thu Jun 06, 2002 11:47 am   
 
no It'd give you the second item on the list arrays are numbered from 0.

~(,,,,)'>
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Jun 06, 2002 12:32 pm   
 
No, Kyote is using a stringlist, which start from 1, not an array.

Kjata
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net