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
jmasta
Beginner


Joined: 03 Oct 2006
Posts: 11

PostPosted: Tue Oct 17, 2006 6:29 pm   

bagging items and switching bags when one is full
 
Ok, I searched the forums and didn't see anything that looked helpful. If there is something out there, please link it here and I'll check it out, otherwise here's my plan. I'm trying to make an automated bagging system. After I use the corpse, i 'get all'. Then, put all in bag[i]. bag[i] increases in value from 1, to 8 (i only carry 8, but this would be easy to modify if i wanted more or less) and i need something to determine when to switch bags.
When something doesn't fit, it returns whatever the item name is, plus TOO HEAVY. I could just do put all in bag, put all in bag 2, put all in bag 3...put all in bag 8 and #gag TOO HEAVY. But, if I can't pick something up in the first place, it returns TOO HEAVY so i'd like to see when i'm leaving things on the ground. I'm also putting in something to run back to town, head to a shop, sell everything, and come back, but I've got that already. Here's what I have so far, written in good 'ole TF language.

/set shopnum 1
/set bagi 1
/set bagnum 8
/def bags = \
/while ({bagi} <= {bagnum})\
/eval /send put all in [bagi]\
/if ({bagi} > {bagnum})\
/eval /echo SELLING ITEMS%;\
/eval /borg off%;/r 200 /step%;\
/eval /shop[shopnum]%;\
/send sell all%;sellall%;\
/rshop%;\
/set shopnum $[shopnum+1]%;\
/endif%;\
/endwhile
/def bagswitch = \

That takes care of my selling items, and when bag[i] > bagnum it will sell everything. I'm hoping there's a way to come up with this, besides the earlier idea involving gagging TOO HEAVY. Any ideas, thanks alot. This is for 3kingdoms, an lp mud.
Thanks,
-jmasta
Reply with quote
chris-74269
Magician


Joined: 23 Nov 2004
Posts: 364

PostPosted: Wed Oct 18, 2006 6:39 am   
 
ha reading through your post i was thinking this had to be for 3k before even getting to that last line.
i need just more info on what you want to do, when you cant pick up an item anymore you want something like

#tr {dealt the killing} {#if (@picker = 1) {getall}}
#alias {getall} {get all;#if (@bags) {put all in @bag @buse}}
#trigger {There is not room for more~.} {#math buse @buse+1}
#tr {There are no bag *s here~!} {#var bags 0}
#tr {You cannot carry that much~.} {#var picker 0;shopsell}
#alias {shopsell} {your script that stops your bot in spiders and runs to cancer/wayhaven/im not listing my other top secret shops :P}
if you need more just shoot me a pm with your name on 3k, i had to prune down my scripts cause i use a more specific way of grabbing junk.
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