Postado Maio 13, 2021 4 anos O Único erro que dá na distro é quando usa o trap no monstro e mensagem que envia ao player tagert nao tem como ir pq é um monstro. Citar local function voltar(cid, pos, target) local storage = 666 setPlayerStorageValue(target, storage, getPlayerStorageValue(target, storage) == -1 ) doCreatureSetNoMove(target, getPlayerStorageValue(target, storage) == 1 and false) end function onCastSpell(cid, var) local stor = 099 local waittime = 60 if exhaustion.check(cid, stor) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Aguarde " .. exhaustion.get(cid, stor) .. " segundos para usar Ittouryuu: Daishinkan.") return false end local sayP = 'O Player foi Preso durante 4 segundos.' local sayT = 'Voce foi Preso durante 4 segundos.Aguarde e voce voltara a se mover.' local pos = getCreaturePosition(cid) local target = getCreatureTarget(cid) local postarget = getCreaturePosition(target) doPlayerSendTextMessage(cid, 27, sayP) doPlayerSendTextMessage(target, 27, sayT) doCreatureSetNoMove(target, true) local postarget = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} doSendMagicEffect(postarget, 273) addEvent(voltar, 4*1000, cid, pos, target) exhaustion.set(cid, stor, waittime) return true end Quem puder me ajudar Rep+ e fico muito agradecido.
Postado Maio 13, 2021 4 anos Solução @Bruce Pereira Cara, tu quer que não possa ser usado em monstro, ou que só conserte o erro do console? Se for a segunda opção, testa isso: local function voltar(cid, pos, target) local storage = 666 setPlayerStorageValue(target, storage, getPlayerStorageValue(target, storage) == -1 ) doCreatureSetNoMove(target, getPlayerStorageValue(target, storage) == 1 and false) end function onCastSpell(cid, var) local stor = 099 local waittime = 10 if exhaustion.check(cid, stor) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Aguarde " .. exhaustion.get(cid, stor) .. " segundos para usar Ittouryuu: Daishinkan.") return false end local sayP = 'O Player foi Preso durante 4 segundos.' local sayT = 'Voce foi Preso durante 4 segundos.Aguarde e voce voltara a se mover.' local pos = getCreaturePosition(cid) local target = getCreatureTarget(cid) local postarget = getCreaturePosition(target) doPlayerSendTextMessage(cid, 27, sayP) if isMonster(target) == true then return true else doPlayerSendTextMessage(target, 27, sayT) end doCreatureSetNoMove(target, true) local postarget = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} doSendMagicEffect(postarget, 273) addEvent(voltar, 4*1000, cid, pos, target) exhaustion.set(cid, stor, waittime) return true end
Postado Maio 14, 2021 4 anos Autor 14 horas atrás, Zazeros disse: @Bruce Pereira Cara, tu quer que não possa ser usado em monstro, ou que só conserte o erro do console? Se for a segunda opção, testa isso: local function voltar(cid, pos, target) local storage = 666 setPlayerStorageValue(target, storage, getPlayerStorageValue(target, storage) == -1 ) doCreatureSetNoMove(target, getPlayerStorageValue(target, storage) == 1 and false) end function onCastSpell(cid, var) local stor = 099 local waittime = 10 if exhaustion.check(cid, stor) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Aguarde " .. exhaustion.get(cid, stor) .. " segundos para usar Ittouryuu: Daishinkan.") return false end local sayP = 'O Player foi Preso durante 4 segundos.' local sayT = 'Voce foi Preso durante 4 segundos.Aguarde e voce voltara a se mover.' local pos = getCreaturePosition(cid) local target = getCreatureTarget(cid) local postarget = getCreaturePosition(target) doPlayerSendTextMessage(cid, 27, sayP) if isMonster(target) == true then return true else doPlayerSendTextMessage(target, 27, sayT) end doCreatureSetNoMove(target, true) local postarget = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} doSendMagicEffect(postarget, 273) addEvent(voltar, 4*1000, cid, pos, target) exhaustion.set(cid, stor, waittime) return true end Vllw, resolveu o meu problema, era isso mesmo
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.