fix problem with strangle regexp, it was picking up objects on the floor

Changed the regexp for strangle it will now capture the persons names and ignore items onn the floor that have leading spaces
pull/1/head
Zafrusteria 4 years ago
parent 15472dc9da
commit c380ab8f34

@ -14,7 +14,7 @@
purpose="Notify to channel PK alert information."
save_state="y"
date_written="2018-10-29 13:37:21"
version="1.5"
version="1.6"
>
<description trim="y">
<![CDATA[
@ -38,24 +38,24 @@ Description Here
sequence="100"
script="recalled"
>
</trigger>
</trigger>
<trigger
enabled="y"
match="^You grab hold of (.*?)\'s neck and choke \w+ to unconsciousness\!$"
match="^You grab hold of (.+?)\'s neck and choke \w+ to unconsciousness\!$"
regexp="y"
sequence="100"
script="sendStrangleAlert"
>
</trigger>
</trigger>
<trigger
enabled="y"
match="^(.*?) looks very uncomfortable\.$"
match="^(?<target>\w[\w\s]+) looks very uncomfortable\."
regexp="y"
sequence="100"
script="sendCursedAlert"
>
</trigger>
<!--You switch targets and direct your attacks at Ralyn.-->
<!--** You can take revenge on Yatzi for 15 minutes-->
<trigger
@ -515,14 +515,15 @@ function sendCursedAlert(name, line, wildcards)
chan = "clan "
end
getRoomInformation()
if(wildcards[1] ~= nil) then
local msg = string.format("@W%s@C CURSED @Win @x202%s @W[@x202%s@W]", wildcards[1], area, roomid)
if(wildcards.target ~= nil and wildcards.target ~= "") then
local msg = string.format("@W%s@C CURSED @Win @x202%s @W[@x202%s@W]", wildcards.target, area, roomid)
msg = addLevelRangeText(msg)
SendNoEcho("clan "..msg)
if ingroup == true then
SendNoEcho("gt "..msg)
end
target = wildcards[1]
target = wildcards.target
end
end
end

Loading…
Cancel
Save