• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Problems with corps

blazeradis

http://luminera.zapto.org
Joined
Apr 7, 2010
Messages
105
Reaction score
2
When someone dies at the server the corps dosent appear on the floor...
It says:
[07/02/2012 10:48:05] [Warning - Event::loadScript] Event onDeath not found (data/creaturescripts/scripts/waldek.lua)

Please help me.
REGARDS
blazeR
 
this is my login.lua


local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
end

local accountManager = getPlayerAccountManager(cid)
if(accountManager == MANAGER_NONE) then
local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
if(lastLogin > 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
else
str = str .. " Please choose your outfit."
doPlayerSendOutfitWindow(cid)
end

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
elseif(accountManager == MANAGER_NAMELOCK) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
elseif(accountManager == MANAGER_ACCOUNT) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
end

if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end

registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")

registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end

registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "Advance")
registerCreatureEvent(cid, "demonOakLogout")
registerCreatureEvent(cid, "demonOakDeath")
registerCreatureEvent(cid, "demonOakAttack")
registerCreatureEvent(cid, "inquisitionPortals")
registerCreatureEvent(cid, "MonsterCounter")
registerCreatureEvent(cid, "kingus")
registerCreatureEvent(cid, "demonQuest")
registerCreatureEvent(cid, "waldek")
registerCreatureEvent(cid, "tirecz")
return true
end

and this is waldek.lua

function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "waldek")
local creaturename = getCreatureName(cid)
--- miejsce gdzie tp zostanie utworzone
local pos1 = {x=33161, y=31400, z=7, stackpos=2}
--- gdzie teleport Cie teleportuje:
local pos2 = {x=33152, y=31403, z=7, stackpos=1}
local time_to_pass = 60 -- czas po jakim zniknie tp w sekundach
local tpID = 5023
local doEffect = CONST_ME_ENERGYHIT
local message = "Well done! Teleport appeared in the middle of room. You got one minuts to get into or it will dissapear!."
if creaturename == 'Orc Waldek' then
teleport = doCreateTeleport(tpID, pos2, pos1)
doSendMagicEffect(pos1, doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInBossWard, (1000*time_to_pass))
end
end
function removeTeleportInBossWard()
--- miejsce gdzie tp zostanie utworzone
if getThingfromPos({x=33161, y=31400, z=7, stackpos=1}).itemid == 5023 then
--- miejsce gdzie tp zostanie utworzone
doRemoveItem(getThingfromPos({x=33161, y=31400, z=7, stackpos=1}).uid,1)
--- miejsce gdzie tp zostanie utworzone
doSendMagicEffect({x=33161, y=31400, z=7, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
 
Please guys I need help with this...

The problem is when someone dies the corp dosnt appear on the floor..
Someone knows the problem ?
 
use this script waldek.lua
LUA:
function onDeath(cid, corpse, deathList)
registerCreatureEvent(cid, "waldek")
local creaturename = getCreatureName(cid)
local pos1 = {x=33161, y=31400, z=7, stackpos=2}
local pos2 = {x=33152, y=31403, z=7, stackpos=1}
local time_to_pass = 60 
local tpID = 5023
local doEffect = CONST_ME_ENERGYHIT
local message = "Well done! Teleport appeared in the middle of room. You got one minuts to get into or it will dissapear!."
if creaturename == 'Orc Waldek' then
teleport = doCreateTeleport(tpID, pos2, pos1)
doSendMagicEffect(pos1, doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInBossWard, (1000*time_to_pass))
end
end

function removeTeleportInBossWard()
if getThingfromPos({x=33161, y=31400, z=7, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=33161, y=31400, z=7, stackpos=1}).uid,1)
doSendMagicEffect({x=33161, y=31400, z=7, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
 
I tried the script you sended and I didnt get any error on waldek.lua this time.
But I still got the bug with corpse...

Sorry, double post
 
Back
Top