Djivar
AKA Wickedviruz
I need help with make a script that when you kill x monster you can walk thru x door,
rep+ if helping
rep+ if helping
function onDeath(cid, corpse, killer)
local monster = getCreatureName(cid)
local behemoth = getPlayerStorageValue(killer, 5572)
if (monster == 'behemoth') then
doPlayerSendTextMessage(killer,MESSAGE_STATUS_CONSOLE_BLUE,'You can now enter the door.')
setPlayerStorageValue(killer,5572, 1)
else
end
end
what action id should the door have?![]()
[29/03/2010 17:47:50] Lua Script Error: [CreatureScript Interface]
[29/03/2010 17:47:50] data/creaturescripts/scripts/gilderwand.lua:onDeath
[29/03/2010 17:47:50] luaGetPlayerStorageValue(). Player not found
[29/03/2010 17:47:50] Lua Script Error: [CreatureScript Interface]
[29/03/2010 17:47:50] data/creaturescripts/scripts/gilderwand.lua:onDeath
[29/03/2010 17:47:50] luaDoPlayerSendTextMessage(). Player not found
[29/03/2010 17:47:50] Lua Script Error: [CreatureScript Interface]
[29/03/2010 17:47:50] data/creaturescripts/scripts/gilderwand.lua:onDeath
[29/03/2010 17:47:50] luaDoPlayerSetStorageValue(). Player not found
local config = {
monster = 'Behemoth',
storage = 5572,
message = 'You can now enter the door.'
}
function onDeath(cid, corpse, deathList)
if getCreatureName(cid):lower() == config.monster:lower() then
for i = 1, #deathList do
if isPlayer(deathList[i]) and getPlayerStorageValue(deathList[i], config.storage) < 1 then
doPlayerSendTextMessage(deathList[i],MESSAGE_EVENT_ADVANCE, config.message)
setPlayerStorageValue(deathList[i], config.storage, 1)
end
end
end
return true
end