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


Joined: 23 Jun 2002
Posts: 13

PostPosted: Tue Jul 02, 2002 1:35 am   

Autotrain Trigger
 
I'm trying to make a small script that will automatically train my spells (in order to get more proficient in them). It should be able to sleep when I am out of mana, but before I do sleep, it will eat and drink first. After the mana is at its max, I will wake up and continue casting that spell. Once I am out again, the process will repeat. Here's what I have:

#VAR ManaVar
#TRIGGER {MANA: (%d)} {ManaVar=%1}
#TRIGGER {You don't have enough mana.} {dr barrel;sleep;#UNTIL (@ManaVar==566) {#WA 500;#CR};wake}

My prompt looks like "MANA: ###". OK...my problem. Once my mana is full (at 566), I wake up. Let's say I have an invisibility spell that costs 15 mana/cast. I was thinking that I could use a while loop to cast the spell while @ManaVar>14. The problem is, since @ManaVar is 566 (obviously above 15), the loop will spam the screen with "cast invisibility" until the MUD boots me off for spamming. Ya follow me? Another approach I tried was to make a loop that casted the spell around 40 times. The problem here is that if all the mana is not used up and the "You don't have enough mana." trigger is not set off, the process will not start over again. Also, if "You don't have enough mana." is displayed more than once, things will be getting out of hand (chances are, I will get booted of for spamming again...don't want to find out if you know what I mean). One last problem. You'll notice that in my script I do not eat anything before I sleep. That is because in order to get an unlimited supply of food, I create a mushroom with the "cast create" spell. In order for my trigger to start, I will have to have run out of mana...can't make any food without any mana. I could always put the "cast create" spell after I sleep, but then I won't regain mana as quickly when I sleep. Jeesh, a bundle of problems and I only have a clue how to fix one of them. Help would be great. Thanks.
Reply with quote
SpiritWolf
Wanderer


Joined: 02 Jul 2002
Posts: 74
Location: USA

PostPosted: Tue Jul 02, 2002 1:50 am   
 
If there is a message when you complete your spell, trigger off that to cast the spell again.
When you don't have enough mana to cast the spell, you set off your not enough mana trigger.
The not enough mana message shouldn't be sent more then once, so that shouldn't be a problem.
As for the food, could make a whole bunch before hand and leave on the ground I suppose.
Reply with quote
seamer
Magician


Joined: 26 Feb 2001
Posts: 358
Location: Australia

PostPosted: Tue Jul 02, 2002 2:38 am   
 
dont use the prompt as a trigger...use a timer
read #help alarm, use it to set the spells off every 6 minutes. using the prompt is a bad idea, cos you'll loop the spells X amount of times till the mana starts being used.

Why oh WHY did I have pass door on...
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Jul 02, 2002 2:52 am   
 
First track how many mushroom you have. Stock pile a bunch then when you get low make more.
Second ROM/DIKU muds have thier spam code easily bypassed by sending 2 commands per thing you really want. Cadt your spell and emote "Now for something completely different."
Third, now that you emote something after each spell is done irregardless of success/failure trigger off it, it is your easiest response!
Forth make seperate systems for eating and drinking, they should be continous and capable of waking you and returning you to sleep.
Fifth don't bother trying to run out of mana, estimate a number of time that your mana is capable of under the best circumstance and sleep after that even if you got the worst circumstances. Mana regen is the same if you sleep when you have 0% as when you sleep at 70%.
Sixth read the help file I bruned my brain out alpha testing and can't think where anything is now.
Reply with quote
mudman
Beginner


Joined: 23 Jun 2002
Posts: 13

PostPosted: Tue Jul 02, 2002 3:31 am   
 
Thanks guys. While reading all your responses, I came up with the ultimate training system. The idea of emoting after each cast is so simple yet so brilliant. Eek...my fingers are shaking...gotta go.
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