|
thucar Beginner
Joined: 06 Jan 2009 Posts: 20
|
Posted: Thu Jan 08, 2009 10:34 am
Building a bot |
Is there a way to make my bot follow my map? I mean lets say he is in room A.
I want him to move to the other side of the area, to room B. And kill every mob he comes across.
The mob killing part works fine, but making it move one room at a time towards his destination, that is a problem for me.
Ofcourse I could hard code the path into it's triggers, but there is always danger that at some point something happens and a trigger misfires, which would mess up the entire path and my bot would be lost. |
|
Last edited by thucar on Thu Jan 08, 2009 1:01 pm; edited 1 time in total |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Jan 08, 2009 11:16 am |
Use zMUD's path system with #slow to build a path that you can pause and resume at any time - no triggers, no getting lost, just make sure it doesn't resume when it can't walk for some reason.
Or you can use #walk with the mapper, but most people prefer #slow. |
|
|
|
thucar Beginner
Joined: 06 Jan 2009 Posts: 20
|
Posted: Thu Jan 08, 2009 1:05 pm |
Ok, now that this problem is sorted, I have another.
i am capturing mob names in room and using %addkey to add them into my HitList. And once they are dead, they are removed from the list. But now I need to find some way to determine if an entry has been made into the HitList. I thought of using a simple binary solution, like adding @intIterrupt=1 to the trigger that adds mob names.
But now I need a way to just stop in every room and determine if there were any mobs there that got noted in the Hit list. If there was, the @intInterrupt would be 1 now, but what would I trigger this check upon?
Is there a way to monitor a variable real time? |
|
|
|
Scirkhan Apprentice
Joined: 14 Sep 2007 Posts: 167 Location: aztx
|
Posted: Thu Jan 08, 2009 2:51 pm |
#var Hitlist ""
hmm either your prompt or the blank line after all the mob names? and have it turn on after obvious exits?
Code: |
#TRIGGER "target_scan" {$} {#if (@target > 0) {kk} {#step};#t- "target_scan"} "" {disable} |
$ = blankline
I'm hoping this is atleast close to what you asked.
I'm not sure how you would check. But I've used variables to add 1 everytime it saw that mob etc. {mob is here} {#add targets 1} |
|
|
|
Leitia Adept
Joined: 04 May 2007 Posts: 292 Location: Boston
|
Posted: Thu Jan 08, 2009 3:55 pm |
I think what you especially want is called the 'expression' trigger state. Those check the condition of a variable.
I really despise bots in multiplayer, hope you are not cheating |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Thu Jan 08, 2009 7:40 pm |
Leitia wrote: |
I think what you especially want is called the 'expression' trigger state. Those check the condition of a variable.
I really despise bots in multiplayer, hope you are not cheating |
Expression triggers would probably be the best way to do this, yep.
I don't know of a MUD that allows bots such as these, and it sickens me that people do build bots like this. Games are meant to be played, not automated. But if you want to earn power instead of knowledge, whatever floats your boat. Power without knowledge is useless.
Charneus |
|
|
|
Rorso Wizard
Joined: 14 Oct 2000 Posts: 1368
|
Posted: Thu Jan 08, 2009 8:21 pm |
charneus wrote: |
I don't know of a MUD that allows bots such as these, and it sickens me that people do build bots like this. Games are meant to be played, not automated. But if you want to earn power instead of knowledge, whatever floats your boat. Power without knowledge is useless.
|
The MUD I play on currently allow bots. You could probably write an entire essay on the subject if bots should be allowed or not. Combat in many MUDs are so limited that you really do not learn much when it comes to knowledge after level 20. Take a look at for example Progress Quest which basically make fun of this. On MUD forums there have been discussions on time vs money where the idea is that either people have a lot of time to play MUDs, or they have a job where they get an income but very little time to actually play. For example some people might be able to play almost entire day, while others might only get 1-2 hours on the evening. Clearly they can't compete.
Writing a bot does give you quite useful knowledge. AI is not easy and there are many challenges in a MUD. What knowledge do you get from the MUD as a game? |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Thu Jan 08, 2009 9:47 pm |
The knowledge I refer to is not "programming knowledge." Ask a bot where the ultimate sword is in the game. "Derrrrrr, I don't know..." is a likely answer. Ask a bot about certain aspects of the MUD. Most won't even know what you're talking about.
It is true that you could write an essay on botting. I personally think it is despicable and rude to the Imms/Admin of a MUD. I guess it boils down to opinion. But allowing a bot to do everything for you? Why even join a MUD then?
Maybe I should go into the business of writing bots. :p
Charneus |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Jan 08, 2009 9:53 pm |
I don't think this thread is the place to discuss the merits versus pitfalls of bot-writing in general. Keep on-topic, please.
Personally, if it were me, I'd use a trigger that fired after all the mobs had been put into the variable (if there were any) on something like the room's exit line. But an expression trigger will work too. |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Fri Jan 09, 2009 12:27 am |
Actually, now that I think about it, why not have it based off a consider or something (if your MUD has considers).
If so, then you can do something similar to the following:
#TRIGGER {is DEAD! You receive %d experience points.} {#IF @HitList {kill %pop(HitList)} {#STEP;consider all}
#TRIGGER {No monsters here!} {#STEP;consider all}
Then make your %additem trigger based off consider. Each time you kill the mob, the HitList would delete the first item while killing it. Of course, on your consider scan, you'd have to do something like:
#TRIGGER "ConsiderScan" {(*) is here!} {HitList=%additem(@HitList, %1;#T+ "EndConsider}
#TRIGGER {$} {#T- "ConsiderScan";kill %pop(HitList);#T- "EndConsider}
Just some thoughts. :p
Charneus |
|
|
|
thucar Beginner
Joined: 06 Jan 2009 Posts: 20
|
Posted: Fri Jan 09, 2009 6:48 am |
Thank you all for your answers. I eventually set the trigger off on room exits, together with #OK So it enters a room, waits for couple of seconds so any mobs in the room get added to the Hitlist. Then it checks the variable to see if any mobs had been added, if yes, start killing, if no, #STEP
|
|
|
|
rea Newbie
Joined: 20 Aug 2010 Posts: 4
|
Posted: Fri Aug 20, 2010 12:26 pm |
Hey, sorry to open this old post up again
ive been trying to make a bot similar to the one speaking about here
what ive done is:
trigger pattern: obvious exit
trigger command: if(combat = off) {#ok}
trigger pattern: you killed
trigger command: combat == off ; bury ; loot ground ; look ; #step
and then i have made a list of killtargets so if theres a mob in the room it does
#if (@combat == off & @hp > 200) {#pause ; kill @target ; combat = on}
The walking part seems to go fine, until my target comes, then it also attack the target, and sets the #pause, but after a second or two, it aborts the slowwalk.
anyone can see what i did wrong ?
Regards from Rea |
|
|
|
|
|