trigger help

Post Reply
zho
Posts: 2
Joined: Fri Nov 28, 2014 4:54 pm

trigger help

Post by zho »

hi im new to mudlet and am trying to make a trigger so i auto backstab my target when i enter a room and turn target to nil after

my current trigger looks like
..target [perl regex]
. [substring] (just because mobs have a . at the end while chat does not)
matches all
send("backstab " ..target)
target = "nil"

my current problem is it fires off my command and doesnt wait until i enter a room to backstab
target mobname and only fires once even if i take out target = "nil"

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

Re: trigger help

Post by Belgarath »

Can you explain your issue a bit more?

IF you want to match off your target in room, just trigger with this:
Code: [show] | [select all] lua
if line:find(target) and doRoomAttack then
  send("backstab " .. target)
  doRoomAttack = false
end
An alias can set doRoomAttack to true.

zho
Posts: 2
Joined: Fri Nov 28, 2014 4:54 pm

Re: trigger help

Post by zho »

this works thank you

Post Reply