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
peewee
Wanderer


Joined: 22 Oct 2000
Posts: 90
Location: Sweden

PostPosted: Thu Dec 20, 2001 2:59 am   

Yet another alias
 
On my MUD, sometimes a killer spell results in several kills at once. Unfortunately, you cannot use
get weapons from corpses 
or else I would do that. Anyway, I have the "gc"-alias to start from, but if I want to do like this:
gcc weapons, armours
to result in
get weapons from corpse

get armours from corpse
but
gcc 2 weapons, armours
to result in
get weapons from second corpse

get armours from second corpse
and so forth..?


"May the Force be with you"
[url]peewee@mars11.net[/url]
Reply with quote
Acaila
Apprentice


Joined: 30 Aug 2001
Posts: 187
Location: Netherlands

PostPosted: Thu Dec 20, 2001 10:22 am   
 
#CLASS {CorpseLooting}
#ALIAS gcc {#VAR Item %replace(%replace("%-1", ",", ""), " ", "|");#FORALL @Item {#IF (%i =~ %d) {CorpseNumber = %db(@Number,%i)};#IF (%i =~ %w) {#IF (%null(@CorpseNumber)) {Get %i from corpse} {Get %i from @CorpseNumber corpse}}};Item = %null;CorpseNumber = %null}
#VAR CorpseNumber {}
#VAR Item {}
#VAR Number {1=first|2=second|3=third|4=fourth|5=fifth|6=sixth|7=seventh|8=eighth|9=ninth}
#CLASS 0

I'm having some difficulties getting the @Number variable in properly, if cut&paste doesn't work, then just create it as a database variable manually.

Acaila
Reply with quote
Acaila
Apprentice


Joined: 30 Aug 2001
Posts: 187
Location: Netherlands

PostPosted: Thu Dec 20, 2001 1:50 pm   
 
Well, what do you know, my previous post actually came through. Did the forum go down between then and now or was that just me?

Acaila
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