Postado Abril 27, 2021 4 anos Boa noite, senhores, estou com o problema que diz no título. Ativei o saveGlobalStorage=true, ainda não resolveu. O que eu faço? Está surgindo algum erro? Se sim coloque-o aqui. Citar Você tem o código disponível? Se tiver publique-o aqui: Uso esse script: 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) == getPlayerGuildName(cid) then doSendMagicEffect(getThingPos(cid), 14) doSendAnimatedText(pos, "CoH", math.random(1, 255)) else doSendMagicEffect(getThingPos(cid), 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "Voce nao pertence a guild "..getGlobalStorageValue(COH_STATUS)..".") 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) ~= getPlayerGuildName(cid)) then doPlayerSendTextMessage(cid, 20, "Voce e sua guild estao no comando, os antigos donos ["..tostring(getGlobalStorageValue(COH_STATUS)).."] podem se vingar!") setGlobalStorageValue(COH_PREPARE1, -1) setGlobalStorageValue(COH_PREPARE2, -1) setGlobalStorageValue(COH_STATUS, getPlayerGuildName(cid)) doCastleRemoveEnemies() doBroadcastMessage("O jogador ["..getCreatureName(cid).."] e sua guild ["..getPlayerGuildName(cid).."] estao no comando do castelo, va dominar e impedi-los!") 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, "CoH", math.random(1, 255)) if (getGlobalStorageValue(COH_PREPARE1) ~= getPlayerGuildName(cid)) and ((getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid))) then setGlobalStorageValue(COH_PREPARE1, getPlayerGuildName(cid)) doBroadcastMessage("Atencao! A guild "..getPlayerGuildName(cid).." esta tentando dominar o castelo, preparem-se!") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "Voce nao possui uma guild.") return true end end if item.actionid == 16201 then if not isPlayer(cid) then return true end doSendAnimatedText(pos, "CoH", math.random(1, 255)) if (getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid)) then setGlobalStorageValue(COH_PREPARE2, getPlayerGuildName(cid)) doBroadcastMessage("Atencao! A guild "..getPlayerGuildName(cid).." esta muito proxima do dominio, ataquem!") end end return true end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
Postado Abril 30, 2021 4 anos Em 27/04/2021 em 19:52, stauro disse: Boa noite, senhores, estou com o problema que diz no título. Ativei o saveGlobalStorage=true, ainda não resolveu. O que eu faço? Está surgindo algum erro? Se sim coloque-o aqui. Você tem o código disponível? Se tiver publique-o aqui: Uso esse script: 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) == getPlayerGuildName(cid) then doSendMagicEffect(getThingPos(cid), 14) doSendAnimatedText(pos, "CoH", math.random(1, 255)) else doSendMagicEffect(getThingPos(cid), 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "Voce nao pertence a guild "..getGlobalStorageValue(COH_STATUS)..".") 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) ~= getPlayerGuildName(cid)) then doPlayerSendTextMessage(cid, 20, "Voce e sua guild estao no comando, os antigos donos ["..tostring(getGlobalStorageValue(COH_STATUS)).."] podem se vingar!") setGlobalStorageValue(COH_PREPARE1, -1) setGlobalStorageValue(COH_PREPARE2, -1) setGlobalStorageValue(COH_STATUS, getPlayerGuildName(cid)) doCastleRemoveEnemies() doBroadcastMessage("O jogador ["..getCreatureName(cid).."] e sua guild ["..getPlayerGuildName(cid).."] estao no comando do castelo, va dominar e impedi-los!") 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, "CoH", math.random(1, 255)) if (getGlobalStorageValue(COH_PREPARE1) ~= getPlayerGuildName(cid)) and ((getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid))) then setGlobalStorageValue(COH_PREPARE1, getPlayerGuildName(cid)) doBroadcastMessage("Atencao! A guild "..getPlayerGuildName(cid).." esta tentando dominar o castelo, preparem-se!") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "Voce nao possui uma guild.") return true end end if item.actionid == 16201 then if not isPlayer(cid) then return true end doSendAnimatedText(pos, "CoH", math.random(1, 255)) if (getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid)) then setGlobalStorageValue(COH_PREPARE2, getPlayerGuildName(cid)) doBroadcastMessage("Atencao! A guild "..getPlayerGuildName(cid).." esta muito proxima do dominio, ataquem!") end end return true end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. Mano faz um globalevent (type="shutdown") que zera a globalstorage do vencedor e ta pronto. Contatos: Discord: Marvok#9855
Postado Abril 30, 2021 4 anos Autor 3 minutos atrás, Marvok disse: lstorage do vencedor e ta pronto. 3 minutos atrás, Marvok disse: Mano faz um globalevent (type="shutdown") que zera a globalstorage do vencedor e ta pronto. Sou leigo mano, como executo isso?
Postado Abril 30, 2021 4 anos 1 minuto atrás, stauro disse: Sou leigo mano, como executo isso? Usa qual tfs? Contatos: Discord: Marvok#9855
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.