Postado Outubro 14, 2024 1 ano .Qual servidor ou website você utiliza como base? Canary + AAC Canary Qual o motivo deste tópico? Solicitar ajuda dos universitário para corrigir/atualizar um creaturescript/revscript. (a função onKill não pode mais ser usada, precisava atualizar para onDeath Está surgindo algum erro? Se sim coloque-o aqui. Citar [warning] [CreatureEvent::executeOnKill - Creature GOD OTServer target Glacius Death event killMonsterCreatePortal] Deprecated use of onKill event. Use registered onDeath events instead for better performance. Você tem o código disponível? Se tiver publique-o aqui: --------------------------------------------------------------------------------------- -- This script creates a portal when a monster dies --------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------- -- Config start (always write creature name in lower case, for ex: "demon" not "Demon") --------------------------------------------------------------------------------------- local portalId, t = 25058, { ["glacius death"] = { message = "You have defeated Glacius Death!", config = { createPos = {}, -- The portal will be created where the monster dies. toPos = {x = 32202, y = 31863, z = 13}, -- Position where the portal will teleport to portalTime = 1, -- Duration of the portal in minutes } }, } --------------------------------------------------------------------------------------- -- Config end --------------------------------------------------------------------------------------- local function spectatorStartCountdown(time, position) local spectators = Game.getSpectators(position, false, false, 5, 5, 5, 5) if #spectators > 0 then for i = 1, #spectators do if time > 1 then spectators:say("" .. time .. "", TALKTYPE_MONSTER_SAY, false, spectators, position) else spectators:say("Time out!", TALKTYPE_MONSTER_SAY, false, spectators, position) break end end end local portal = Tile(position):getItemById(portalId) if portal then addEvent(spectatorStartCountdown, 1000, time - 1, position) end end local function removePortal(position) local portal = Tile(position):getItemById(portalId) if portal then portal:remove() end end local killMonsterCreatePortal = CreatureEvent("killMonsterCreatePortal") function killMonsterCreatePortal.onKill(creature, target) if not target:isMonster() or target:getMaster() then return true end local player = Player(creature:getGuid()) local k = t[target:getName():lower()] if not k then return true end local pos, cPos = target:getPosition() if type(k.config.createPos) == 'table' then if next(k.config.createPos) == nil then cPos = pos else cPos = k.config.createPos end end if Tile(cPos):getItemById(portalId) then return true end local item = Game.createItem(portalId, 1, cPos) if item:isTeleport() then item:setDestination(k.config.toPos) end local pt = k.config.portalTime addEvent(spectatorStartCountdown, 500, pt * 60, cPos) addEvent(removePortal, pt * 60 * 1000, cPos) return true end killMonsterCreatePortal:type("kill") killMonsterCreatePortal:register() --------------------------------------------------------------------------------------- -- Register script onLogin --------------------------------------------------------------------------------------- local monsterKillLogin = CreatureEvent("monsterKillLogin") function monsterKillLogin.onLogin(player) player:registerEvent("killMonsterCreatePortal") return true end monsterKillLogin:type("login") monsterKillLogin:register() Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
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.