|
mrperson13 Newbie
Joined: 21 May 2002 Posts: 2
|
Posted: Tue Apr 23, 2002 6:00 pm
Help with making a BOT |
I am looking to make a bot, that will read mobs from a moblist, walk to them, check thier health, and if they are in excellent health, attack and kill them. The bot will need to include weapon chaning, as well as reading my stats and knowing when to heal.
If you could help me with this it would be much appreciated.
AIM SN: Harmless Midget
Thanks.
"Its only after you've lost everything, that you are truley happy" |
|
|
|
mrperson13 Newbie
Joined: 21 May 2002 Posts: 2
|
Posted: Wed Apr 24, 2002 3:34 pm |
Can noone help me. Im a total newbie to zmud programing. Please lend me a hand.
"Its only after you've lost everything, that you are truley happy" |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Apr 24, 2002 4:26 pm |
Good bots require complex scripts. They are difficult and time-consuming to write. They are highly individualistic since each player, mud, race, and class have different requirements that need to be met.
You admit to being a "total newbie". Nonetheless, with no effort on your part, you'd like to have one of these marvels of creativity. That's wonderful, but you should plan on making your own. The people who respond to questions here are all volunteers and are seldom interested in taking on such a huge task for someone else's benefit.
Bots are a frequent topic here. If you read all the posts every day, you should soon get some idea of what you will need to do to develop your own. We'll be happy to assist when you have questions that show you are putting forth some effort of your own.
LightBulb
Vague questions get vague answers |
|
|
|
mrperson13 Newbie
Joined: 21 May 2002 Posts: 2
|
Posted: Wed Apr 24, 2002 7:08 pm |
Is there any manuals I can read to learn triggers and scripting?
"Its only after you've lost everything, that you are truley happy" |
|
|
|
Tarn GURU
Joined: 10 Oct 2000 Posts: 873 Location: USA
|
Posted: Wed Apr 24, 2002 7:46 pm |
quote:
Is there any manuals I can read to learn triggers and scripting?
In the support library, there are a series of articles of varying topics and complexity. It's accessible from the Support menu bar. The help file also has some good explanations available from the table of contents, in addidion to the detailed information on each command/function.
The other problem with your post was that you supplied virtually no information:
What mud it is, what type of codebase, the details of commands and responses to them, etc.
Unless one of us happens to know you in-mud, your question could apply to virtually any mud out there.
Try to break the task down into smaller items first, and ask about/understand the solutions before moving to more complex topics. Example: Figure out autohealing first, and then start adding pieces until you have your bot.
Directed, specific questions generally get the quickest and most effective answers. See Lightbulb's sig
-Tarn |
|
|
|
mrperson13 Newbie
Joined: 21 May 2002 Posts: 2
|
Posted: Wed Apr 24, 2002 8:29 pm |
okay, thanks for the advice, can someone help me set up an autohealer that also vitalizes mana, I play on crimson mud2, which is Diku. If you could help me with this I would be your best friend forever.
"Its only after you've lost everything, that you are truley happy" |
|
|
|
mrperson13 Newbie
Joined: 21 May 2002 Posts: 2
|
Posted: Wed Apr 24, 2002 8:54 pm |
heres my prompt
<Azaroth> [H1600 M1500 V1400] those are also my maxes..
I want the trigger to heal me when I drop lower than 1000 HP.. please help me
"Its only after you've lost everything, that you are truley happy" |
|
|
|
Tarn GURU
Joined: 10 Oct 2000 Posts: 873 Location: USA
|
Posted: Wed Apr 24, 2002 9:42 pm |
quote:
heres my prompt
<Azaroth> [H1600 M1500 V1400] those are also my maxes..
I want the trigger to heal me when I drop lower than 1000 HP.. please help me
You're still not supplying a lot of necessary information: How the healing is done for instance. Best is to supply a complete list: Here's my prompt when I need a heal, here's how I heal (drink green potion, cast 'selfheal', whatever), here's what it looks like when it works, etc.
Ok, you want a prompt trigger. The pattern will be:
~<Azaroth~> [H(%d) M(%d) V(%d)]
The script will be:
#IF (%1 < 1000) {cast 'heal'} {#NOOP}
(Replace "cast 'heal'" with whatever's appropriate to your mud/class/desires.)
The %d's will match numbers in the prompt. The ()'s around them means to keep the values for use in the script. The %1 is the first kept variable in the trigger text, the HP value. The tildes tell ZMud that the next character is to be taken literally; I tend to use it for any unusual characters in patterns.
Note that this will try to heal every time it sees a prompt below 1000HP, but that's all the information we have so far about how healing works there.
You can also use the forum search; a search for 'autoheal' yields:
http://www.zuggsoft.com/forum/topic.asp?TOPIC_ID=4163&FORUM_ID=7&CAT_ID=1&Topic_Title=autohealing&Forum_Title=zMUD+General+Discussion
-Tarn |
|
|
|
mrperson13 Newbie
Joined: 21 May 2002 Posts: 2
|
Posted: Wed Apr 24, 2002 10:04 pm |
that helps tons thanks, but the way spells work on the mud I play it would heal twice each time a spell is cast, either by mob, or player it throws up another prompt.
is there a way to get it so that it only casts once per?
"Its only after you've lost everything, that you are truley happy" |
|
|
|
mrperson13 Newbie
Joined: 21 May 2002 Posts: 2
|
Posted: Wed Apr 24, 2002 11:58 pm |
Also, I would like it to vitalie mana when my mana drops below 300 but It has to check the amount of moves I have, and they have to be higher than 1300. Also, if the moves are gone and the mana drops below 300 I want it to recite a scroll of recall and teleport to the healer.. please help me with this.. I have it set up now to heal and Vitalize if I drop too low.. but It doesnt read the moves.. here is the script
#IF (%2 < 300 and %3 > 1300) {cast vitalize} {#NOOP}<-- also what does that last command do?
"Its only after you've lost everything, that you are truley happy" |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Apr 25, 2002 1:42 am |
quote: {#NOOP}<-- also what does that last command do?
Nothing. #NOOP is used when you need a command but don't want to do anything. The #IF command has two commands, one for when it passes the test and one for when it doesn't. The second one is optional, so you can leave out the #NOOP if you want.
You've run into the first major problem, actions that don't have immediate results, causing your triggers to continue firing. The solution Troubadour suggested is to create a variable, @curePending, and use it to prevent additional casting until the spell was finished.
#VAR curePending 0
#TR {~<Azaroth~> ~[H(%d) M(%d) V(%d)~]} {#IF ((%1 > 1000) AND (@curePending = 0)) {#VAR curePending 1;cast 'heal'}} {} {prompt}
#TR {Your spell succeeds and your wounds heal.} {#VAR curePending 0}
#TR {You lost your concentration and your spell fails.} {#VAR curePending 0}
Appropriate modifications should be made to match the text used by your MUD.
I'll have a look at the mana/movement/recall later if nobody beats me to it.
LightBulb
Vague questions get vague answers |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Apr 25, 2002 3:02 am |
The trigger phrase on this is the same as the healing trigger, so you can just add more commands to that trigger.
#VAR vitalizePending 0
#VAR recalling 0
#TR {~<Azaroth~> ~[H(%d) M(%d) V(%d)~]} {#IF ((%1 > 1000) AND (@curePending = 0)) {#VAR curePending 1;cast 'heal'};#IF ((%2 < 300) AND {%3 > 1300) AND (@vitalizePending = 0)) {#VAR vitalizePending 1;cast vitalize};#IF ((%2 < 300) AND (%3 < 1301) AND (@recalling = 0)) {#VAR recalling 1;recite recall}} {} {prompt}
#TR {You feel revitalized as your spell succeeds} {#VAR vitalizePending 0}
#TR {You lost your concentration and your spell fails.} {#VAR curePending 0;#VAR vitalizePending 1}
Don't forget to return @recalling to 0 after you've recovered enough mana.
LightBulb
Vague questions get vague answers |
|
|
|
mrperson13 Newbie
Joined: 21 May 2002 Posts: 2
|
Posted: Thu Apr 25, 2002 3:28 am |
I get this error from Zmud when I copy and paste that
#IF ((%2 < 300) AND {%3 > 1300) AND (@vitalizePending = 0)) {#VAR vitalizePending 1;cast vitalize}
^ syntax error
"Its only after you've lost everything, that you are truley happy" |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Apr 25, 2002 5:49 am |
One of the { should be a (. Find the one that's out of place and change it.
LightBulb
Vague questions get vague answers |
|
|
|
mrperson13 Newbie
Joined: 21 May 2002 Posts: 2
|
Posted: Thu Apr 25, 2002 6:08 am |
okay, I put it in how you had it.. but it started healing so I swaped the > with < so It would heal under 1000 hp and it doesnt heal when I drop below 1000 hp..
Here is the line
#IF ((%1 < 1000) AND (@curePending = 0)) {
#VAR curePending 1
cast 77
}
"Its only after you've lost everything, that you are truley happy" |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Apr 25, 2002 6:46 am |
Typos fixed (the ones that have been caught)
#TR {~<Azaroth~> ~[H(%d) M(%d) V(%d)~]} {#IF ((%1 < 1000) AND (@curePending = 0)) {#VAR curePending 1;cast 'heal'};#IF ((%2 < 300) AND {%3 > 1300) AND (@vitalizePending = 0)) {#VAR vitalizePending 1;cast vitalize};#IF ((%2 < 300) AND (%3 < 1301) AND (@recalling = 0)) {#VAR recalling 1;recite recall}} {} {prompt}
You're right, I did have the > backwards. Make sure @curePending = 0. If it doesn't, it won't heal.
cast 77? Is that the heal spell?
LightBulb
Vague questions get vague answers |
|
|
|
mrperson13 Newbie
Joined: 21 May 2002 Posts: 2
|
Posted: Thu Apr 25, 2002 4:39 pm |
yes, 77 is heal major. :)
thanks for all the help so far!
"Its only after you've lost everything, that you are truley happy" |
|
|
|
|
|