PDA

View Full Version : Loot alarm



Andrzejuuuuu
10-20-2016, 09:06 PM
Hello.

I need some help.
I would like to be informed with an alarm (sound, like when "Player detected") when a spicified item loots.
Is there a possibility to create that kind of script?

It's a Silkweaver Bow that loots from Orc Marauder (corpse id="10334").

I tried to use this one: Link (http://forums.xenobot.net/showthread.php?6214-Update-Loot-Watcher/page2) - post by Jakob Miller (2nd) - but it didn't work for me (added Orcish Axe, looted few, didn't alarm anything).

Thanks in advance.

HjugO
10-21-2016, 10:51 AM
Hello.

I need some help.
I would like to be informed with an alarm (sound, like when "Player detected") when a spicified item loots.
Is there a possibility to create that kind of script?

It's a Silkweaver Bow that loots from Orc Marauder (corpse id="10334").

I tried to use this one: Link (http://forums.xenobot.net/showthread.php?6214-Update-Loot-Watcher/page2) - post by Jakob Miller (2nd) - but it didn't work for me (added Orcish Axe, looted few, didn't alarm anything).

Thanks in advance.

Andrzeju nie denerwuj się, zaraz się to wszystko zrobi i będzie git. Szkoda, że jedziesz na nieoficjalnej wersji XenoBota, ale kij z tym.


local items = {"fire sword", "golden armor"}

function lootProxy(proxy, message)
local creature = string.match(message, "(.+):")
local loot = string.match(message, ": (.+)")

local itemfound = false

for _, item in ipairs(items) do
if (loot:lower():match(item:lower())) then
itemfound = true
break
end
end

if (itemfound) then
alert()
end
end

LootMessageProxy.OnReceive("lootProxy", lootProxy)


Elo benc :D