Postado Março 9, 2021 4 anos 1 minuto atrás, knepperzik disse: Ao reiniciar o servidor ainda permanece o mesmo erro, como segue a imagem. O erro é que vc ta setando valor de texto em storage, ja vou corrigir aqui function onStepIn(cid, item, pos, fromPosition) local pos = getThingPos(cid) if item.actionid == 16203 then if not isPlayer(cid) then return true end if getGlobalStorageValue("COH_STATUS") == 1 then doSendMagicEffect(getThingPos(cid), 14) doSendAnimatedText(pos, "", math.random(1, 255)) doPlayerSendTextMessage(cid, 20, "Seja Bem Vindo Guild ["..getPlayerGuildName(cid).."]!") else doSendMagicEffect(getThingPos(cid), 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "Voce nao pertence a Guild dominante.") end return true end if item.actionid == 16202 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then if (getGlobalStorageValue("COH_STATUS") ~= -1 then setGlobalStorageValue("COH_PREPARE1", -1) setGlobalStorageValue("COH_PREPARE2", -1) setGlobalStorageValue("COH_STATUS", 1) doBroadcastMessage("[Vilarejo] O jogador ["..getCreatureName(cid).."] e sua Guild ["..getPlayerGuildName(cid).."] estao Dominando o Vilarejo , va impedir isso!") doCastleRemoveEnemies() doPlayerSendTextMessage(cid, 20, "[Vilarejo] Voce e sua Guild estao Dominando["..getPlayerGuildName(cid).."] !") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "Voce nao possui uma Guild.") end return true end if item.actionid == 16200 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then doSendAnimatedText(pos, "", math.random(1, 255)) if (getGlobalStorageValue("COH_PREPARE1") ~= 0 then setGlobalStorageValue("COH_PREPARE1", 1) doBroadcastMessage("[Vilarejo] Atencao! A Guild "..getPlayerGuildName(cid).." esta tentando Dominar Vilarejo, preparem-se!") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, " Você nao possui uma guild.") return true end end if item.actionid == 16201 then if not isPlayer(cid) then return true end doSendAnimatedText(pos, "", math.random(1, 255)) end return true end
Postado Março 9, 2021 4 anos Autor 10 minutos atrás, FlameArcixt disse: O erro é que vc ta setando valor de texto em storage, ja vou corrigir aqui function onStepIn(cid, item, pos, fromPosition) local pos = getThingPos(cid) if item.actionid == 16203 then if not isPlayer(cid) then return true end if getGlobalStorageValue("COH_STATUS") == 1 then doSendMagicEffect(getThingPos(cid), 14) doSendAnimatedText(pos, "", math.random(1, 255)) doPlayerSendTextMessage(cid, 20, "Seja Bem Vindo Guild ["..getPlayerGuildName(cid).."]!") else doSendMagicEffect(getThingPos(cid), 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "Voce nao pertence a Guild dominante.") end return true end if item.actionid == 16202 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then if (getGlobalStorageValue("COH_STATUS") ~= -1 then setGlobalStorageValue("COH_PREPARE1", -1) setGlobalStorageValue("COH_PREPARE2", -1) setGlobalStorageValue("COH_STATUS", 1) doBroadcastMessage("[Vilarejo] O jogador ["..getCreatureName(cid).."] e sua Guild ["..getPlayerGuildName(cid).."] estao Dominando o Vilarejo , va impedir isso!") doCastleRemoveEnemies() doPlayerSendTextMessage(cid, 20, "[Vilarejo] Voce e sua Guild estao Dominando["..getPlayerGuildName(cid).."] !") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "Voce nao possui uma Guild.") end return true end if item.actionid == 16200 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then doSendAnimatedText(pos, "", math.random(1, 255)) if (getGlobalStorageValue("COH_PREPARE1") ~= 0 then setGlobalStorageValue("COH_PREPARE1", 1) doBroadcastMessage("[Vilarejo] Atencao! A Guild "..getPlayerGuildName(cid).." esta tentando Dominar Vilarejo, preparem-se!") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, " Você nao possui uma guild.") return true end end if item.actionid == 16201 then if not isPlayer(cid) then return true end doSendAnimatedText(pos, "", math.random(1, 255)) end return true end Coloquei a script, e ocorreu o seguinte erro, não deixa nem passar em cima da tile.
Postado Março 9, 2021 4 anos 11 minutos atrás, knepperzik disse: Coloquei a script, e ocorreu o seguinte erro, não deixa nem passar em cima da tile. Erro meu, deixei alguns parenteses abertos. function onStepIn(cid, item, pos, fromPosition) local pos = getThingPos(cid) if item.actionid == 16203 then if not isPlayer(cid) then return true end if getGlobalStorageValue("COH_STATUS") == 1 then doSendMagicEffect(getThingPos(cid), 14) doSendAnimatedText(pos, "", math.random(1, 255)) doPlayerSendTextMessage(cid, 20, "Seja Bem Vindo Guild ["..getPlayerGuildName(cid).."]!") else doSendMagicEffect(getThingPos(cid), 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "Voce nao pertence a Guild dominante.") end return true end if item.actionid == 16202 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then if (getGlobalStorageValue("COH_STATUS")) ~= -1 then setGlobalStorageValue("COH_PREPARE1", -1) setGlobalStorageValue("COH_PREPARE2", -1) setGlobalStorageValue("COH_STATUS", 1) doBroadcastMessage("[Vilarejo] O jogador ["..getCreatureName(cid).."] e sua Guild ["..getPlayerGuildName(cid).."] estao Dominando o Vilarejo , va impedir isso!") doCastleRemoveEnemies() doPlayerSendTextMessage(cid, 20, "[Vilarejo] Voce e sua Guild estao Dominando["..getPlayerGuildName(cid).."] !") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "Voce nao possui uma Guild.") end return true end if item.actionid == 16200 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then doSendAnimatedText(pos, "", math.random(1, 255)) if (getGlobalStorageValue("COH_PREPARE1")) ~= 0 then setGlobalStorageValue("COH_PREPARE1", 1) doBroadcastMessage("[Vilarejo] Atencao! A Guild "..getPlayerGuildName(cid).." esta tentando Dominar Vilarejo, preparem-se!") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, " Você nao possui uma guild.") return true end end if item.actionid == 16201 then if not isPlayer(cid) then return true end doSendAnimatedText(pos, "", math.random(1, 255)) end return true end
Postado Março 9, 2021 4 anos Autor 15 minutos atrás, FlameArcixt disse: Erro meu, deixei alguns parenteses abertos. function onStepIn(cid, item, pos, fromPosition) local pos = getThingPos(cid) if item.actionid == 16203 then if not isPlayer(cid) then return true end if getGlobalStorageValue("COH_STATUS") == 1 then doSendMagicEffect(getThingPos(cid), 14) doSendAnimatedText(pos, "", math.random(1, 255)) doPlayerSendTextMessage(cid, 20, "Seja Bem Vindo Guild ["..getPlayerGuildName(cid).."]!") else doSendMagicEffect(getThingPos(cid), 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "Voce nao pertence a Guild dominante.") end return true end if item.actionid == 16202 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then if (getGlobalStorageValue("COH_STATUS")) ~= -1 then setGlobalStorageValue("COH_PREPARE1", -1) setGlobalStorageValue("COH_PREPARE2", -1) setGlobalStorageValue("COH_STATUS", 1) doBroadcastMessage("[Vilarejo] O jogador ["..getCreatureName(cid).."] e sua Guild ["..getPlayerGuildName(cid).."] estao Dominando o Vilarejo , va impedir isso!") doCastleRemoveEnemies() doPlayerSendTextMessage(cid, 20, "[Vilarejo] Voce e sua Guild estao Dominando["..getPlayerGuildName(cid).."] !") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "Voce nao possui uma Guild.") end return true end if item.actionid == 16200 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then doSendAnimatedText(pos, "", math.random(1, 255)) if (getGlobalStorageValue("COH_PREPARE1")) ~= 0 then setGlobalStorageValue("COH_PREPARE1", 1) doBroadcastMessage("[Vilarejo] Atencao! A Guild "..getPlayerGuildName(cid).." esta tentando Dominar Vilarejo, preparem-se!") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, " Você nao possui uma guild.") return true end end if item.actionid == 16201 then if not isPlayer(cid) then return true end doSendAnimatedText(pos, "", math.random(1, 255)) end return true end Ao passar no tile que domina o castle, não esta ativando a action. "16202" Editado Março 9, 2021 4 anos por knepperzik (veja o histórico de edições)
Postado Março 9, 2021 4 anos 4 minutos atrás, knepperzik disse: Ao passar no tile que domina o castle, não esta ativando a action. "16202" function onStepIn(cid, item, pos, fromPosition) local pos = getThingPos(cid) if item.actionid == 16203 then if not isPlayer(cid) then return true end if getGlobalStorageValue("COH_STATUS") == 1 then doSendMagicEffect(getThingPos(cid), 14) doSendAnimatedText(pos, "", math.random(1, 255)) doPlayerSendTextMessage(cid, 20, "Seja Bem Vindo Guild ["..getPlayerGuildName(cid).."]!") else doSendMagicEffect(getThingPos(cid), 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "Voce nao pertence a Guild dominante.") end return true end if item.actionid == 16202 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then if (getGlobalStorageValue("COH_STATUS")) == -1 then setGlobalStorageValue("COH_PREPARE1", -1) setGlobalStorageValue("COH_PREPARE2", -1) setGlobalStorageValue("COH_STATUS", 1) doBroadcastMessage("[Vilarejo] O jogador ["..getCreatureName(cid).."] e sua Guild ["..getPlayerGuildName(cid).."] estao Dominando o Vilarejo , va impedir isso!") doCastleRemoveEnemies() doPlayerSendTextMessage(cid, 20, "[Vilarejo] Voce e sua Guild estao Dominando["..getPlayerGuildName(cid).."] !") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "Voce nao possui uma Guild.") end return true end if item.actionid == 16200 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then doSendAnimatedText(pos, "", math.random(1, 255)) if (getGlobalStorageValue("COH_PREPARE1")) ~= 0 then setGlobalStorageValue("COH_PREPARE1", 1) doBroadcastMessage("[Vilarejo] Atencao! A Guild "..getPlayerGuildName(cid).." esta tentando Dominar Vilarejo, preparem-se!") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, " Você nao possui uma guild.") return true end end if item.actionid == 16201 then if not isPlayer(cid) then return true end doSendAnimatedText(pos, "", math.random(1, 255)) end 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.