Olá pessoal, estou com um pequeno probleminha em um script, é o seguinte, ele funciona normalmente, mais depois de um tempo ele começa a levar os players para a posição x=0, y=0, z=0 do mapa (Fica tudo escuro).
O script é o seguinte.
Você passa no piso , ele te leva pro Trade Center (Centro para trocas) ai ele registra uma storage de acordo com o piso que você pisou , se for na cidade de Saffron, ele registra x storage , se for em cerulean ele registra outra storage, ai quando você sai de lá ele zera a storage e te leva pra cidade que você tava.
Mais depois de um tempo que o server fica online, O script começa a levar os players para o escuro.
Alguem me ajuda por favor ?
Segue o script :
pvpgo.lua
s = {
--[actionID do piso] = {storage}[7843] = {7834}, -- Cinnabar[7844] = {7835}, -- pewter[7845] = {7836}, -- cerulean[7846] = {7837}, -- saffron[7847] = {7838}, -- vermillion[7848] = {7839}, -- fuchsia[7849] = {7840}, -- viridian[7850] = {7841}, -- celadon[7851] = {7842}, -- Lavender-- outro continente[7852] = {7843}, -- canavale[7853] = {7844}, -- larosse[7854] = {7845}, -- orre}local posi = {x=1048, y=1020, z=11} --posiçao do PvP...function onStepIn(cid, item, pos)if isSummon(cid) thenreturn falseendif #getCreatureSummons(cid) >= 1 thendoTeleportThing(getCreatureSummons(cid)[1], {x=posi.x - 1, y=posi.y, z=posi.z}, false)doTeleportThing(cid, {x=posi.x, y=posi.y, z=posi.z}, false)setPlayerStorageValue(cid, s[item.actionid][1], 1)elsedoTeleportThing(cid, {x=posi.x, y=posi.y, z=posi.z}, false)setPlayerStorageValue(cid, s[item.actionid][1], 1)endreturn trueend
citys = {
--[storage da city] = {posiçao do CP das citys}[7834] = {x=740,y=1329,z=7}, -- Cinnabar[7835] = {x=702,y=837,z=6}, -- pewter[7836] = {x=1042,y=885,z=7}, -- cerulean[7837] = {x=1038,y=1035,z=7}, -- saffron[7838] = {x=735,y=1166,z=7}, -- vermillion[7839] = {x=1196,y=1481,z=7}, -- fuchsia[7840] = {x=690,y=1068,z=7}, -- viridian[7841] = {x=849,y=1015,z=6}, -- Celadon[7842] = {x=1189, y=1024, z= 7}, -- Lavenderfunction onStepIn(cid, item, pos)if isSummon(cid) thenreturn falseendfor i = 7834, 7845 doif getPlayerStorageValue(cid, i) == 1 thenif #getCreatureSummons(cid) >= 1 thendoTeleportThing(getCreatureSummons(cid)[1], {x=citys.x - 1, y=citys.y, z=citys.z})doTeleportThing(cid, {x=citys.x, y=citys.y, z=citys.z})setPlayerStorageValue(cid, i, 0)doSendMagicEffect(getThingPos(cid), 21)doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 21)elsedoTeleportThing(cid, {x=citys.x, y=citys.y, z=citys.z})setPlayerStorageValue(cid, i, 0)doSendMagicEffect(getThingPos(cid), 21)endendendreturn trueend
no movements.xml
<movevent type="StepIn" actionid="7843-7854" event="script" value="pvpgo.lua"/><movevent type="StepIn" actionid="7855" event="script" value="pvpback.lua"/>
Obrigado pessoal.