-- Hello friends, i have a problem with my litle script, i want after you kill a monsters this register one STORAGE VALUE, because this STORAGE make a player to open one DOOR, but on my script do notthing, see my scripts:
-- creaturescript register
-- script named DiseasedDeaths
-- Plx friends help me to solve this... many thx for all...
F@bio
-- creaturescript register
Lua:
<event type="kill" name="DiseasedDeaths" event="script" value="Diseased_Deaths.lua"/>
-- script named DiseasedDeaths
Lua:
function onKill(cid, target)
registerCreatureEvent(cid, "DiseasedDeaths")
local creaturename = getCreatureName(target)
local doEffect = CONST_ME_MAGIC_GREEN
local message = "Você Matou esta praga, procure a próxima."
if isPlayer(cid) == TRUE then
if creaturename == 'Diseased Bill' then
doSendMagicEffect(getPlayerPosition(cid), doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid,72009,1)
elseif creaturename == 'Diseased Fred' then
doSendMagicEffect(getPlayerPosition(cid), doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid,72010,1)
elseif creaturename == 'Diseased Dan' then
doSendMagicEffect(getPlayerPosition(cid), doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid,72011,1)
end
end
return TRUE
end
-- Plx friends help me to solve this... many thx for all...
F@bio
Last edited: