Trying to automate a bit more

Post Reply
Argat
Posts: 3
Joined: Sat Apr 04, 2020 2:44 pm

Trying to automate a bit more

Post by Argat »

Hello all! First post here on the forums, fairly new Mudlet user. I'm working on making things a bit more automated.

GOAL
Fully automate the following process (roughly):
  • Check affects list for specific spell(s)
    • If criteria OK, look in room for mob to kill based on pre-approved list per area
      • if no mob, move to new room within existing map
      • Send targeting command to Mud
      • Kill mob
      • Check tank current HP
      • if ok, proceed
        • else send heal command
    • Check affects list
    I currently have triggers set for speedwalks to areas. I still need to work on populating the list of mobs by area, but that's a different project.

    I currently have triggers for targeting across different profiles. Tank behavior starts the fight immediately, support / DPS wait for tank to start, then attack target enemy.
    (\w+) tells the group 'target (\w+)'
    - Tank:
    send ("c 'start fight' " .. matches[3])
    - Support:
    targetEnemy = matches[3]


    I feel like its close, but I'd like to put the finishing touches on things. I'm not very comfortable with the mapping tool either, and would really love to integrate that into the speedwalk triggers i've got wired now as well. Any guidance here would be MUCH appreciated.

    Thanks!

    Then as a subset,
    Pattern: Tank utters the words 'start fight'
    Command: debuff .. targetEnemy

    Once the fight is on in earnest there is basic per-round attacks, no biggie there. Then, mob dies.

    Mob is DEAD!!
    - Check affects

    Affects check

    Code: Select all

      (\d+) hours: Damage_reduction            x 1 : Nothing.
    Command:
    local sancHours = tonumber(matches[2])
    send("gt affect hours: " ..affectHours) --affectHours is an existing variable
    if (sancHours < 2) then
      send("gt Affect low. Hours remaining: " ..matches[2])
      disableTrigger("Autowalk") -- needs dev, not functional
    else 
      enableTrigger("Scan")  -- needs dev, not functional
      send("look")
    end

Argat
Posts: 3
Joined: Sat Apr 04, 2020 2:44 pm

Re: Trying to automate a bit more

Post by Argat »

Started with abstracting my affect check. First function in the script!
Spell is Sanctuary. Reduces damage by 50% so pretty important for my tank!
Code: [show] | [select all] lua
function sanc_check(hours)
	if(hours < 2) then
		send ("gt Sanc low. Hours remaining: " .. hours)
	else
		enableTrigger("Scan")
		send("look")
  end
end

Argat
Posts: 3
Joined: Sat Apr 04, 2020 2:44 pm

Re: Trying to automate a bit more

Post by Argat »

Was attempting to follow steps here:
viewtopic.php?t=21998

But our MUD has different display names within the room versus on a scan of the surrounding area.
In-room Example:
A ' ^-^_^-^Flying Carpet^-^_^-^ floats here.

Scan Example:
Right here you see:
- DragonFly
3 south from here you see:
- Flying Carpet

The desired keywords are "flying" and "carpet" but I'm not sure how these will go into the pattern for a match!

Post Reply