Hello.
I have this script, but not working.
If kill monster with name in table and player have table storage then set storage to...
I have this script, but not working.
If kill monster with name in table and player have table storage then set storage to...
Lua:
local config = {
["The Horned Fox"] = {storage = 91009, value = 1000},
["Necropharus"] = {storage = 91054, value = 1000},
["Tiquandas Revenge"] = {storage = 91029, value = 1000},
["Ron The Ripper"] = {storage = 91053, value = 1000},
["Demodras"] = {storage = 91022, value = 1000}
}
function onKill(cid, target)
local monster = config[getCreatureName(target):lower()]
if isPlayer(target) or not monster or isSummon(target) then
return true
end
if getPlayerStorageValue(cid, monster.storage) == 999 then
setPlayerStorageValue(cid, monster.storage, monster.value)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Congratulations, you have killed a '..getCreatureName(target)..' one of a task boss.')
end
return true
end