 |
complex Apprentice
Joined: 12 Apr 2004 Posts: 134 Location: USA
|
Posted: Sat Apr 17, 2004 9:15 pm
Problems with a Script, Little help please! |
Im preaty new to Scripting, I have been usen this following script (or tryen to) on adesa mud. It was working fine, then just stoped. This is basicly falcnor's Autokill script with a few changes, I will highlight in red what I changed. Now the problem The second time the script tryes to kill it a mob, it does not stop hunting, it just keeps tryen to move to the next room on the past, and looking in that room. Im Sorta at a loss here. If anyone can give it a shot that would be very cool. Thanks (by the way, It is legeal to bot on this mud.)
he output from my mud is
The Empty Grave
[Exits: north west]
As you glance into this empty grave, you wonder where it's most recent
occupant might be...
(Clear) (White) A Constant Reminder is here haunting you.<--- This is the Mob
CLOAK: REFLECT
SHIELD: SHOCK
(Oh also Thanks fot Falcnor For the great script.
#ALIAS Hunt {
#t+ MatchEnemy
#VAR mobEnemy {} {_nodef} {Autokill}
#pause
l
#wait 2000
#if (@mobEnemy) {
k @mobEnemy
} {
ChangeRoom
}
}
#ALIAS ChangeRoom {
#step
#pause <--- added to stop the script when you change rooms
#wait 2000
hunt
}
#VAR mobEnemyList {Reminder|Archer}
#VAR mobEnemy {} {_nodef} {Autokill}
#TRIGGER {is DEAD} {hunt}
#TRIGGER {No *({@mobEnemyList})* here!} {hunt}
#TRIGGER {Target is not present.} {hunt}
#CLASS 0
#CLASS {Autokill|MatchEnemy}
#TRIGGER {*({@mobEnemyList})*} {#var mobEnemy %lower( {%1}) {_nodef} {Autokill};#t- MatchEnemy}
#CLASS 0
#BUTTON 14 {Start-H} {#class Autokill 1;#slow archer;hunt} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} "" {} {} {}
So you can see I did not change much, just the one line. Thanks for the the help! |
|
|
 |
complex Apprentice
Joined: 12 Apr 2004 Posts: 134 Location: USA
|
Posted: Tue Apr 20, 2004 3:34 am |
Wow, Not a singal person can help? Thats unreal?? Have I forgot to include some peice of information onto the first post that is needed to debug the problem? Or no one cares? Hmmmm
|
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Apr 20, 2004 5:05 am |
I didn't answer before because I've never had much expertise with the mapper.
If the script works without your change and doesn't work with it -- change it back to the way it works until you figured out how you broke it.
At a guess, you are probably having trouble because you are using #WAIT with triggers (read Zugg's article in the Support Library). Even though the WAIT command is actually in ALIASes, you have TRIGGERs which call those ALIASes. That makes the script from the ALIAS part of the TRIGGER script, so the warning still applies.
The script works the first time because you called the alias from a button. It doesn't work after that because after the first time you are calling the alias from one of your triggers.
Since you didn't include a reference to wherever you found the script, I have no idea how old it is. In earlier versions, #WAIT was the only method available for slowing scripts down. That's no longer the case. In addition, the mapper and commands associated with it have gone through many changes in order to improve the mapper. It's quite possible that a script which had no problems a few versions ago will need considerable revision now. |
|
|
 |
nexela Wizard

Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Tue Apr 20, 2004 5:49 am |
After a #PAUSE you need a #STEP somewhere to get going again currently all I am seeing is this
#STEP //Sends the next dir in que
#PAUSE //Then Pause it again
and nothing to continue stepping show some mud output of you doing it manually and someone might be able to chuck something together |
|
|
 |
complex Apprentice
Joined: 12 Apr 2004 Posts: 134 Location: USA
|
Posted: Wed Apr 21, 2004 4:16 am |
Thank you for the reply! I did take a look at all the feedback intrestingly enough it did not help, and infact it was my own stupidity that was causing the error. Turns out that for some reason when you copy past into ver list section of the code in the String List view it does not paste correct and shows wrong. Hmm that confuses even me... ok so What I mean is if the Strings list should be archer|soldier|cats|dog|whatever (these are the names of the mobs that i want the script to kill) well when i would just add the mobs as copy paste from the zmud screen it looked ok, but realy it was broken. So last night i looked at every trigger alias var, everything. When I got to the @mobEnemyList and clicked on the text view the list was as follows archer||Soldier||ect. When I fixed this the script worked perfectly! (It does not make sence why it worked sence the problem was the the script not stoping when it saw the mob but what ever. Oh and to address the other comments it does tell the the script to re-step Or at least the way i read it it does.
First it starts the hunt with the Cangeroom alias,( moves on the path, then stops)waits 2000 millaseconds then refers to the hunt alias.
In the hunt alias it trys to match the room description to the and of the mobs in the the moblist ver. If the mob is there then it kills the mob, if not back to the change room where it takes anouth step. also if the mob moves I places all the descriptions for mob is not here to trigger the changeroom. When the mob dies i have that display triggered to changeroom also. But now that its working i have one other issue, and im not sure if anything can be done to help this issue.
In the display it says Kings archer (as the mob name) its matched and then triggered to k kings archer. But to kill the mob you have k archer. for the time being they are the only mobs in that area so i just changes the k @mobEnemy to k archer when the string is matched. but in the future the zones i will be scripting have more then one mob, and i may have this issue again. So the question is is there a way to leave it as k @mobEnemy, and have some trigger ect to make it
understand that the display of kings archer is still just archer?
Thanks for the help and replys!
Complex |
|
|
 |
|
|
|
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
|
|