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
complex
Apprentice


Joined: 12 Apr 2004
Posts: 134
Location: USA

PostPosted: Sun Jun 19, 2005 8:31 am   

Seller script
 
ok so im maken a script to auto sell what i have looted at the end of the day.

It all goes into my inventory so bags ect does not matter. I have a trigger that tracks and logs what I get, but it only trys to sell the first item in my var, and not even that works. Oh yah, and when its sells an item in the var I would like it to be removed. I realy hope this is not to hard. Here is what i have so far


#TRIGGER You get {a|an|some} %1 from the corpse
#IF %iskey( @item, "%1") {#ADDK item {%1} {%eval( %db( @item, "%1") + 1)}} {#ADDK item {%1} {1}}

this does a great job getting the data, then to sell i try to just sell @item.

thanks for the help.
_________________
<Clever text here>
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Sun Jun 19, 2005 8:49 am   
 
This should work in case the selling syntax is "sell quantity item", I think :D
Code:

#LOOPDB @Item {sell %val %key}
Reply with quote
complex
Apprentice


Joined: 12 Apr 2004
Posts: 134
Location: USA

PostPosted: Sun Jun 19, 2005 8:57 am   
 
I have to sell each item by itself :(

however #LOOPDB @Item {sell %key} works, but does not take it out of the @item var
_________________
<Clever text here>
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Sun Jun 19, 2005 9:03 am   
 
Maybe this would work
Code:

#LOOPDB @ITEM {#LOOP %val {sell %key};#DELKEY item %key}


Last edited by DeReP on Sun Jun 19, 2005 9:13 am; edited 1 time in total
Reply with quote
complex
Apprentice


Joined: 12 Apr 2004
Posts: 134
Location: USA

PostPosted: Sun Jun 19, 2005 9:11 am   
 
you are so friggen sexy!!

thanks
_________________
<Clever text here>
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Sun Jun 19, 2005 9:12 am   
 
Ahahaha, no problem.
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