
Originally Posted by
Odemis
This is exactly the lua code I was looking for, but it doesn't seem to work when I add it into my script.
Code:
-- Leave after Boss --
local monsterToLeave = 'demodras' -- leave bosses name lowercase
local labelToLeave = 'Leavehunt'
LootMessageProxy.OnReceive('check_kill', function(proxy, message))
if string.match(message, monsterToLeave) then
Walker.Goto(labelToLeave)
end
end
So I'm trying to make it when you receive the message after the kill saying "Your deeds have been noticed...etc..etc.." It jumps the walker waypoint to the 'leave', or 'refil' label..
PS : I even tried placing the two 'locals' with the rest of the locals at the top of my script, and placed the "LootMessageProxy~" at the bottom of the script. Idk, confusing myself. When I try to launch the whole script, it bugs out and it give's an error.
Any help would be awesome, thanks.
You added in an extra parenthesis at the end of message, and didn't add one at the end of the last end 
Code:
-- Leave after Boss --
local monsterToLeave = demodras-- leave bosses name lowercase
local labelToLeave = 'Leavehunt'
LootMessageProxy.OnReceive('check_kill', function(proxy, message)
if string.match(message, monsterToLeave) then
Walker.Goto(labelToLeave)
end
end)