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
ebolisay
Newbie


Joined: 17 Dec 2002
Posts: 7
Location: USA

PostPosted: Wed Feb 12, 2003 5:08 am   

Cycling through weapons.
 
Let's say I have 5 weapons. Dagger, sword, mace, spear, and bardiche.

With a touch of a button, the f3 key.
I start out wielding the sword, but f3 remove sword and wields dagger, f3 again removes dagger, and wields mace, ect.. until it's back to sword.

Does anyone know how to do this using variables? I can do this but it's through a ton of trigs.

Thanks
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Feb 12, 2003 5:34 am   
 
#VAR weapons {dagger|sword|mace|spear|bardiche}
#VAR weapon dagger
#KEY F3 {#IF %ismember( @weapon, @weapons) {remove @weapon; wield %item( @weapons, ((%ismember( @weapon, @weapons)%numitems( @weapons)) + 1));#VAR weapon {%item( @weapons, ((%ismember( @weapon, @weapons)%numitems( @weapons)) + 1))}}}

LightBulb
Advanced Member
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Feb 12, 2003 5:48 am   
 
Nice and elegant!

Ton Diening
Reply with quote
ebolisay
Newbie


Joined: 17 Dec 2002
Posts: 7
Location: USA

PostPosted: Wed Feb 12, 2003 10:30 pm   
 
Wow this is great!

Thanks so much.
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