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


Joined: 06 Nov 2000
Posts: 80
Location: USA

PostPosted: Tue Nov 13, 2001 3:34 am   

Last (hopefully) bot question.
 
Ok, thought about it, got it working in my head, started to write it out, then got lost.
What I know so far:

I need to start at room 0, #ADD 1 to @roomto (it now becomes 1), then #WALK 1
When I enter room 1, #ADD 1 to @roomto (it now becomes 2), then #WALK 2
Keep repeating that.

I also need to be able to pause all that walking, and attack the monkey with a trigger like #TR {Monkey Man} {kill monkey}
After I kill the monkey, then I need to "look", if theres another monkey, attack him, if not, start walking again.

Also, I need to trigger on
"A big brown bag [100% Full]"
I need to save @roomto (which should be the room I'm currently in) as something like @gobackto. Then I can #WALK 0, and then run an alias that will go to town and sell all my stuff, and come back to room 0. Then I can #WALK @gobackto (which should be the room I left from), check if there's something to kill (if there is something, kill it), then #ADD 1 @roomto, and start the walking and killing part again.

And last (I think) I need a counter that will
count how many healing potions I have, and when I get down to 1, then I can do something like how I do when I need to sell stuff, but instead of running an alias to sell my stuff, I run an alias to go buy more healing potions, add them in to how many I have, run back to room 0, and #WALK @gobackto, and proceed with the rest.

Stuff that I've already done:
@gosell - The alias that runs from room 0 to town, sells all my stuff, and runs back to room 0
@gopotions - The alias that runs from room 0 to town, buys 10 healing potions (sets @potions to 11, since I should have done this when I got down to 1 potion), and runs back to room 0

As always, I'm sure this doesn't make sense, so ask if you need something clarified.

Master, seventh circle of idling
Reply with quote
einar
Wanderer


Joined: 06 Nov 2000
Posts: 80
Location: USA

PostPosted: Tue Nov 13, 2001 4:57 am   
 
btw I have zmud 6.22 if anyone wants to take advantage of the new trigger types

Master, seventh circle of idling
Reply with quote
einar
Wanderer


Joined: 06 Nov 2000
Posts: 80
Location: USA

PostPosted: Wed Nov 14, 2001 1:48 am   
 
nobody can figure out how to make this work?
though I provided enough info, I hope someone can make it work :)

EDIT: I can't believe nobody know how (or is willing to tell me how) to do this.

Master, seventh circle of idling
Reply with quote
decantor
Apprentice


Joined: 14 Nov 2001
Posts: 100

PostPosted: Fri Nov 16, 2001 8:05 am   
 
I'm going to reply to this on saturday or sunday after I've had a bit more time to play around with the new trigger states(they will make it a lot easier to code, and will give me a great script to learn them from).
Reply with quote
einar
Wanderer


Joined: 06 Nov 2000
Posts: 80
Location: USA

PostPosted: Wed Nov 21, 2001 2:39 am   
 
anybody else gotten the hang of the new trigger types?

Master, seventh circle of idling
Reply with quote
einar
Wanderer


Joined: 06 Nov 2000
Posts: 80
Location: USA

PostPosted: Thu Nov 22, 2001 9:24 pm   
 
Guess not, cause nobody can seem to get it (or tell me if they did)

Master, seventh circle of idling
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Fri Nov 23, 2001 1:41 pm   
 
I could help you with the new trigger states. What do you need to know?

Also, looking over what you need, I don't see any place where it would be necessary to use the tirgger states. Basically, what you need is a trigger that fires on your prompt or something that is guaranteed to come after the room description and mob list. This trigger will #ADD 1 to @roomto and #WALK @roomto like you need.

Another tirgger, like you said, would be looking for Monkey Man, and when it sees that, it turns off the moving trigger (this can be done by giving the moving trigger an ID and using #T-) and it then sends kill monkey. In here I do find a use for the trigger states where it could be set to look for when you kill the Monkey Man. Example:
#TRIGGER {Monkey Man} {#T- walker;kill monkey}
#COND {Monkey Man is DEAD!!!} {#T+ walker;look}

So, when you kill the Monkey Man, it re-enables the walking trigger and sends the look command. If there is another Monkey Man in the room, this trigger will kick in again and will not let you move, but if there are no more Monkey Mands, the walking trigger will see the prompt and continue walking.

For the bag thing, I would need more info like when do you see this line? Do you need to send a command to see it? If you do not have to send a command, is it displayed when you enter a room or send look? If so, where does it appear, after mob list, before it, after prompt, before it, etc.? How does your bag get full, by getting items from the dead Monkey Man? Is it possible that the bag gets full in the middle of a fight?

Finally, for the potion thing, this would all be done in the trigger that checks for when you need to drink a potion. I'm guessing that this trigger looks at your health from the prompt or something like that. If it does check the health from your prompt, and the walking trigger is also going to check your prompt, be sure that these are separate triggers. Anyway, in this trigger, you would drink a potion, #ADD -1 to the potion counter, perform an #IF to see if @potions is one, if the check is true, reset the Monkey killing trigger by doing #STATE IDOfTrigger 0, turn off the Monkey killing trigger, turn off the walking trigger, send flee, do #WALK 0 or perhaps send recall, execute the gopotions alias. In this alias you will, like you said, go buy the potions, reset the @potions counter that what it should be, go back to room 0, but you will also send #WALK @roomto, re-enable the Monkey killing trigger, and re-enable the walking trigger.

Kjata
Reply with quote
Acaila
Apprentice


Joined: 30 Aug 2001
Posts: 187
Location: Netherlands

PostPosted: Fri Nov 23, 2001 3:43 pm   
 
See, as simple as that....:)

Okay, I've had a really long day, and my mind is working at about 10% of usual efficiency.

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