|
Falcnor Beginner
Joined: 04 Sep 2003 Posts: 14 Location: USA
|
Posted: Thu Sep 04, 2003 5:45 pm
Autokill Script now in Finished Scripts section |
Hey all,
First time posting about scripting. First off wanted to say thanks for such a great product Zuggsoft crew. I've been using it for over 3 years now! Love it!
Well here's the deal. I'm new to the scripting portions (other than simple triggers for message output to new windows and spell captures) and wanted to create a kill script. The script will be running off an LP based MUD of mine. Steps and things needed in script.
1. Follow a specific path created with the pathing portion of zMUD.
2. Kill monsters.
3. Short 'look' (l) at room to check for any more monsters.
4. Move on to next room.
5. Rinse and repeat.
Sample output of the short 'look' command is as follows.
In the forest (ne,e,w).
A Goblin woman
Goblin child
As you can see the monsters short name would be goblin and could start the monster line or be preceded with an adjective or 'a', an'.
Now I realize I'm asking a lot here without having any code of my own, but I pick up quick. And any little tidbits anyone can throw at me I'd greatly appreciate it. As well when I finish this script I will be posting it for all you LP based mud players. :)
Thanks in advance for any help anyone can give. Oh and if someone already has a basic LP based script I'd love to see it. You can get a hold of me at falcnor@hotmail.com as well as here on the forums.
Thanks! |
|
|
|
Falcnor Beginner
Joined: 04 Sep 2003 Posts: 14 Location: USA
|
Posted: Thu Sep 04, 2003 6:25 pm |
Another thing I'd like to add is a list of monsters to kill. Say like goblin|elf|dwarf|deer|rabbit That sorta thing. Been looking at Isyldyr's autokill script trying to figure how I could use pieces of it. (http://www.zuggsoft.com/forum/topic.asp?TOPIC_ID=8229)
|
|
|
|
Falcnor Beginner
Joined: 04 Sep 2003 Posts: 14 Location: USA
|
Posted: Thu Sep 04, 2003 6:31 pm |
The 'scan' command does not work on my mud nor do I want to implement it. So back to picking apart Is's script.
|
|
|
|
Falcnor Beginner
Joined: 04 Sep 2003 Posts: 14 Location: USA
|
Posted: Mon Sep 08, 2003 5:19 pm |
Well I started putzing around a bit with just the auto kill part and I'm running into a rut. Here's what I have so far.
#CLASS {Autokill}
#ALIAS Hunt {#var mobEnemy {} {_nodef} {Autokill};ll;sk <@mobEnemy>}
#VAR mobEnemyList {rabbit|dwarf|elf}
#VAR mobEnemy {elf}
#TRIGGER {is DEAD,} {#t+ MatchEnemy;hunt}
#CLASS 0
#CLASS {Autokill|MatchEnemy}
#TRIGGER {*({@mobEnemyList})*} {#var mobEnemy %lower( {%1}) {_nodef} {Autokill};#t- MatchEnemy}
#CLASS 0
Now when I type hunt manually it spits out all the commands and never actually captures the monsters name. If I manually type 'll' it captures the monster name in the variable, then I can type 'sk <@mobEnemy>' on the command line and it kills. (sk is an alias for an attack)
Any help would be greatly appreciated. And credits to Islydur for the original autohunt script which I'm modifying for my specific needs. |
|
|
|
Falcnor Beginner
Joined: 04 Sep 2003 Posts: 14 Location: USA
|
Posted: Mon Sep 08, 2003 5:48 pm |
Putzed around even more and fixed it. Now it hunts when I type 'hunt' manually but not when moving around. Was missing an if statement. Now to figure out how to make it auto hunt then follow a specific path!
#CLASS {Autokill}
#ALIAS Hunt {
#t+ MatchEnemy
#var mobEnemy {} {_nodef} {Autokill}
ll
#wait 500
#if (@mobEnemy) {
sk @mobEnemy
}
}
#VAR mobEnemyList {rabbit|dwarf|elf}
#VAR mobEnemy {elf}
#TRIGGER {is DEAD,} {#t+ MatchEnemy;hunt}
#CLASS 0
#CLASS {Autokill|MatchEnemy}
#TRIGGER {*({@mobEnemyList})*} {#var mobEnemy %lower( {%1}) {_nodef} {Autokill};#t- MatchEnemy}
#CLASS 0 |
|
|
|
Falcnor Beginner
Joined: 04 Sep 2003 Posts: 14 Location: USA
|
Posted: Mon Sep 08, 2003 7:08 pm |
Well I got the pathing working now but I've got a prob...it skips every other room to kill. Like I go east and it doesn't trigger the mobenemy then goes to the next room. -=shrugs=- Also if there are 2 emenies in the room it doesn't catch them when I do the ll again. I think it might be because I'm not setting #t+ MatchEnemycorrectly.
Well here's the code.
Gonne try and work it out. But at least it's works!
#CLASS {Autokill}
#ALIAS Hunt {
#t+ MatchEnemy
#var mobEnemy {} {_nodef} {Autokill}
ll
#wait 2000
#if (@mobEnemy) {#pause;sk @mobEnemy} {#step;#wait 1000;#ok;hunt}
}
#VAR mobEnemyList {rabbit|dwarf|elf}
#VAR mobEnemy {elf}
#TRIGGER {is DEAD,} {#t+ MatchEnemy;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 |
|
|
|
Falcnor Beginner
Joined: 04 Sep 2003 Posts: 14 Location: USA
|
Posted: Mon Sep 08, 2003 8:37 pm |
Welp, got it tweaked. Here's the finished product. Running a LONG test right now on several machines.
Will post a help and code in Finished scripts soon.
#CLASS {Autokill}
#ALIAS Hunt {
#t+ MatchEnemy
#VAR mobEnemy {} {_nodef} {Autokill}
#pause
ll
#wait 2000
#if (@mobEnemy) {
sk @mobEnemy
} {
ChangeRoom
}
}
#ALIAS ChangeRoom {
#step
#wait 2000
hunt
}
#VAR mobEnemyList {rabbit|dwarf|elf}
#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 |
|
|
|
|
|