HELP PLEASE! Simple DIKU Mud BOT based on timer and triggers

Post Reply
twou6871
Posts: 2
Joined: Thu Oct 22, 2015 1:05 am

HELP PLEASE! Simple DIKU Mud BOT based on timer and triggers

Post by twou6871 »

Hi there - I am super new to muds and I absolutely love them. The mud I am playing accepts bots but they do not support it - so they won't help you to build one.

As a new mudder I was hoping someone could help me make a timer, trigger, variable bot that basically rests in an area, and when the timer goes off, it walks to the zone, kills the NPCs that aid first and then kills the levelling NPCs after. Finishes killing in the area and goes back to the resting zone for the timer to reset again. The mud is a DIKUMUD and input is simple like {say hi, e, n, s, kill dinosaur,} etc. I was originally going to make a timer and have a bunch of actions running off it but it then would screw with my triggers to heal me etc. If you could help me I would eternally be in your debt. :D :D

Criteria:
- when timer fires - walk a path (the zone)
- kill mobs that aid first (pixies and bodyguards) before killing levelling mob (dinosaur)
- Continue the zone path
- if health drops below 200 then heal
- finish killing area and go back to resting area


PATH of Zone
Area is simple layout 20 rooms 5 (running east and west) and 4 deep (north and south) current path to levelling area from rest zone is u,e,e, south (in the zone now) then the levelling area walked is - e,e,e,e,e,s,w,w,w,w,w,s,e,e,e,e,e,s,w,w,w,w,w

Zone Repop time
Timer - every 45 minutes the zone repops

Walk the above path killing the Bodyguard and Pixies before killing the Dinosaur (levelling NPC)

Example room:
A dinosaur stands here.
A Bodyguard stands here protecting the dinosaur.
A small pixie is here hovering above the ground.

There could be multiple Bodyguards or Pixies in the room and they need to be killed before the Dinosaur is killed.

Health
Health bar looks like this < 265h 149m 189v >
Ideally when health drops below 200h then cast 'heal'

That's pretty much it. Rather simple I think but I am a n00b and I would really appreciate any help you can offer.

Thanks so much guys!!

User avatar
Belgarath
Posts: 232
Joined: Fri Jul 26, 2013 7:19 am
Discord: macjabeth#7149

Re: HELP PLEASE! Simple DIKU Mud BOT based on timer and trig

Post by Belgarath »

It'd require a bit of time to code something like that. Until (or if) someone else has time to help you with this, I can give you some tips which you could use for working on this yourself. After all, coding and learning through practice is what makes it fun.

The 45min timer resets a few tables and sends you into the zone. Upon entering the zone and a new room, you'll trigger the bodyguards and pixies and add them to a target table. You can capture your balance off the prompt (I presume you keep track of your balance somehow, haven't played a DIKU in forever) and act there, choosing to attack if health is above 200 or heal if it is below. As your targets are slain you remove them from the target table. Once the table is empty, you move onto the next room and repeat the process. You can store your room moves inside another table, and remove them one by one as you switch to a new room. When all your rooms have been completed, you can speedwalk back out of the zone or wherever it is you need to be waiting. Good luck!

twou6871
Posts: 2
Joined: Thu Oct 22, 2015 1:05 am

Re: HELP PLEASE! Simple DIKU Mud BOT based on timer and trig

Post by twou6871 »

Hi Belgarath,

Wonderful - I private messaged you as well. Thanks so much for the response and also in advance for taking the time to build the code for me.

There's no getting balance with Dikumud - after combat the "balance" would simply be a lag between when you enter the next skill and when the mud lets your execute it. For example - when I dismount a pony, there is a 1second delay before anything I type will actually be executed.

Imagine that I am where you were maybe when you first started Mudding (possibly even less informed) lol - my only use of triggers are simple wildcards and string match triggers. If you could possibly give me a list of topics to research as a starting point I can go ahead and start researching target tables, tables etc while you're making the code - so that I actually learn from the whole experience, rather than just get code that works and I have no idea why it works. Thanks so much and I look forward to hearing from you!!

Godric
Posts: 2
Joined: Fri Oct 30, 2020 5:07 pm

Re: HELP PLEASE! Simple DIKU Mud BOT based on timer and triggers

Post by Godric »

Is there any way I could be sent a copy of that code? I am looking to do something similar and believe this could be a nice framework for it.

I am basically looking to walk through an area at a specified route and when a mob is in a room then:
kill <mob>
skin corpse
sac corpse

Then go back to a predetermined location.

Thanks!
Last edited by Godric on Fri Oct 30, 2020 5:19 pm, edited 1 time in total.

Post Reply