|
Radriewyn Newbie
Joined: 12 Jul 2011 Posts: 2
|
Posted: Tue Jul 12, 2011 10:36 pm
Kill bot help |
Hello, I am having trouble with getting a this bot to work the way I want. It will path right, go to each room, kill the npc and so forth. The problems that I am trying to fix is, at the end it just sits and does glance every so many seconds in the last room. I would like to get it to turn off at the end of the path until I start it again (I don't like bots that free run over and over) . And if anyone could help me figure out how to get it to attack all the npcs that I have listed instead of one at a time would be great.
Code: |
#CLASS {Autokill}
#ALIAS Hunt {#t+ MatchEnemy;#VAR mobEnemy {} {_nodef} {Autokill};#pause;l;#wait 2000;#if (@mobEnemy) {sk @mobEnemy} {ChangeRoom}}
#ALIAS ChangeRoom {#step;#pause;#wait 2000;hunt}
#VAR mobEnemy {}
#VAR mobEnemyList {dragon|wolf|cyclops|python}
#PATH Sandsrm2 {k2es2ws5es5wl5e2hw2hn}
#TRIGGER {^You killed %1.} {hunt}
#TRIGGER {Your intended target is not around.} {hunt}
#TRIGGER {Cannot find *({@mobEnemyList})*} {hunt}
#BUTTON 1 {Sandrm2} {#class Autokill 1;#slow Sandrm2;hunt} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} "" {} {} {} {}
#CLASS 0
#CLASS {Autokill|MatchEnemy}
#TRIGGER {*({@mobEnemyList})*} {#var mobEnemy %lower( {%1}) {_nodef} {Autokill};#t- MatchEnemy}
#CLASS 0 |
I used a few different codes on this forum to get it to this point, plus I put in what my mud needed to be able to use it. I am not the best at coding atm since I have been away from playing for years. Thank you again for any help, also before people ask, yes I can use it on the mud I play as long as it doesn't loop itself. Which as I stated before, I don't like to loop these, I want some interaction with it. Forgot to put in that I am using zMud at the moment. |
|
|
|
Scirkhan Apprentice
Joined: 14 Sep 2007 Posts: 167 Location: aztx
|
Posted: Wed Jul 13, 2011 7:33 pm |
This might give you an idea. You might have already seen this:
Quote: |
#CLASS {Kill} {setdef}
#ALIAS kk {#class Kill;#if (@Kill/ToKill != "") {kill %pop( ToKill)} {}}
#VAR ToKill {}
#TRIGGER {A police officer is here.$} {#variable Kill/ToKill %additem( "police", @Kill/ToKill)}
#CLASS 0 |
Maybe you can turn the class off so the triggers (and aliases) stop. #CLASS Autokill 0 |
|
|
|
Radriewyn Newbie
Joined: 12 Jul 2011 Posts: 2
|
Posted: Thu Jul 14, 2011 4:06 pm |
Is there a way to put there a way to put something in the path string at the end to get it to do like the #CLASS Autokill 0 ? I want it to basically reset so its not constantly looping the triggers at the end room of the path. The problem I have run into is that I can't seem to get anything in the path besides directions without it messing up the whole script.
Thanks for the help. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Fri Jul 15, 2011 12:49 am |
you could have the final trigger also check which room you are in, and if its the end room of a given zone, run an alias to get you to the start over point
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|