Postado Janeiro 4, 2016 9 anos Galera vocês podem me ajudar a resolver esse erro? [Error - CreatureScript Interface] In a timer event called from: buffer:onDeath Description: (luaGetCreatureStorage) Creature not found Abaixo o script: <?xml version="1.0" encoding="UTF-8"?> <creaturescripts> <event type="login" name="MutePlayer" event="script" value="mute_check.lua"/> <event type="login" name="fraglook_register" event="script" value="fraglook.lua"/> <event type="look" name="fraglook" event="script" value="fraglook.lua"/> <event type="attack" name="attackguild" script="attackguild.lua"/> <event type="advance" name="recompensa" event="script" value="recompensa.lua"/> <event type="advance" name="recompensa1" event="script" value="recompensa1.lua"/> <event type="advance" name="recompensa2" event="script" value="recompensa2.lua"/> <event type="login" name="firstmessage" script="firstmessage.lua"/> <event type="kill" name="anunciarmorte" event="script" value="anunciar_morte.lua"/> <event type="kill" name="pvpsystem" event="script" value="pvpsystem.lua"/> <event type="death" name="Yalahari" event="script" value="Yalahari.lua"/> <event type="death" name="Magician" script="Magician.lua"/> <event type="kill" name="inquisitionPortals" script="Inquisition.lua"/> <event type="death" name="incendio" script="incendioMonster.lua"/> <event type="login" name="PlayerLogin" event="script" value="login.lua"/> <event type="preparedeath" name="onPrepareDeath" event="script" value="preparedeath.lua"/> <event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/> <event type="receivemail" name="Mail" event="script" value="mail.lua"/> <event type="reportbug" name="SaveReportBug" script="reportbug.lua"/> <event type="preparedeath" name="forever amulet" event="script" value="aol.lua"/> <event type="login" name="TutorLogin" event="script" value="tutoroutfit.lua"/> <event type="think" name="Idle" event="script" value="idle.lua"/> <event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/> <event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/> <event type="login" name="FirstItems" event="script" value="firstitems.lua"/> <event type="PrepareDeath" name="pvparena" script="pvparena.lua"/> </creaturescripts>
Postado Janeiro 5, 2016 9 anos manda o script dessa linha e se possivel manda seu login.lua <event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/> Editado Janeiro 5, 2016 9 anos por di12345di (veja o histórico de edições)
Postado Janeiro 5, 2016 9 anos Autor Olá! playerdeath.lua local config = { deathListEnabled = getBooleanFromString(getConfigInfo('deathListEnabled')), sqlType = getConfigInfo('sqlType'), maxDeathRecords = getConfigInfo('maxDeathRecords') } config.sqlType = config.sqlType == "sqlite" and DATABASE_ENGINE_SQLITE or DATABASE_ENGINE_MYSQL function onDeath(cid, corpse, lastHitKiller, mostDamageKiller) if(config.deathListEnabled ~= TRUE) then return end local hitKillerName = "field item" local damageKillerName = "" if(lastHitKiller ~= FALSE) then if(isPlayer(lastHitKiller) == TRUE) then hitKillerName = getPlayerGUID(lastHitKiller) else hitKillerName = getCreatureName(lastHitKiller) end if(mostDamageKiller ~= FALSE and mostDamageKiller ~= lastHitKiller and getCreatureName(mostDamageKiller) ~= getCreatureName(lastHitKiller)) then if(isPlayer(mostDamageKiller) == TRUE) then damageKillerName = getPlayerGUID(mostDamageKiller) else damageKillerName = getCreatureName(mostDamageKiller) end end end db.executeQuery("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `altkilled_by`) VALUES (" .. getPlayerGUID(cid) .. ", " .. os.time() .. ", " .. getPlayerLevel(cid) .. ", " .. db.escapeString(hitKillerName) .. ", " .. db.escapeString(damageKillerName) .. ");") local rows = db.getResult("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";") if(rows:getID() ~= -1) then local amount = rows:getRows(true) - config.maxDeathRecords if(amount > 0) then if(config.sqlType == DATABASE_ENGINE_SQLITE) then for i = 1, amount do db.executeQuery("DELETE FROM `player_deaths` WHERE `rowid` = (SELECT `rowid` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1);") end else db.executeQuery("DELETE FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT " .. amount .. ";") end end end end e o login.lua local config = { loginMessage = getConfigValue('loginMessage') } 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 .. " Escolha sua roupa." doPlayerSendOutfitWindow(cid) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "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_RED, "Hello, type {account} to manage your account and if you want to start over then type {cancel}.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "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, "killer") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "attackguild") registerCreatureEvent(cid, "advance") registerCreatureEvent(cid, "FimVip") registerCreatureEvent(cid, "forever amulet") registerCreatureEvent(cid, "SkullCheck") registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, VipReceive) registerCreatureEvent(cid, "PlayerKill") registerCreatureEvent(cid, "pvpsystem") registerCreatureEvent(cid, "SaveLogout") registerCreatureEvent(cid, "anunciarmorte") registerCreatureEvent(cid, "TiraBattle") registerCreatureEvent(cid, "recompensa") registerCreatureEvent(cid, "recompensa1") registerCreatureEvent(cid, "recompensa2") registerCreatureEvent(cid, "onPrepareDeath") if (InitArenaScript ~= 0) then InitArenaScript = 1 -- make arena rooms free for i = 42300, 42309 do setGlobalStorageValue(i, 0) setGlobalStorageValue(i+100, 0) end end -- if he did not make full arena 1 he must start from zero if getPlayerStorageValue(cid, 42309) < 1 then for i = 42300, 42309 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 2 he must start from zero if getPlayerStorageValue(cid, 42319) < 1 then for i = 42310, 42319 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 3 he must start from zero if getPlayerStorageValue(cid, 42329) < 1 then for i = 42320, 42329 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42355) == -1 then setPlayerStorageValue(cid, 42355, 0) -- did not arena level end setPlayerStorageValue(cid, 42350, 0) -- time to kick 0 setPlayerStorageValue(cid, 42352, 0) -- is not in arena return true end
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.