Ir para conteúdo

Remover Tp


Menoxcide

Posts Recomendados

Ta td certo no script menos na hora de remover os tp...olha só:

 

 

local storage = 1755

local emGuerra = 1756

local War = {

fromPos={x=1349, y=1101, z=7, stackpos=253},

toPos={x=1359, y=1111, z=0, stackpos=253},

rewardRoom = {x=518,y=840,z=7,stackpos=1}}

local config = {

empe = {x=55, y=34, z=5},

pre1 = {x=68, y=37, z=6},

pre2 = {x=42, y=37, z=6}

}

local tp = {

pos1 = {x=51, y=28, z=6},

pos2 = {x=59, y=28, z=6}

}

function onSay(cid, words, param)

if param == "open" then

setGlobalStorageValue(emGuerra,1)

doBroadcastMessage("The war for domination the castle began!",22)

doSummonCreature("Emperium",config.empe,false)

doSummonCreature("Emperium Guard",config.pre1,false)

doSummonCreature("Emperium Guardian",config.pre2,false)

return true

elseif param == "close" then

for _, pid in ipairs(getPlayersOnline()) do

if isInArea(getPlayerPosition(pid), War.fromPos, War.toPos) then

if getGlobalStorageValue(storage) ~= getPlayerGuildId(pid) then

doTeleportThing(pid, War.rewardRoom, false)

doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_BLUE,"Sorry, your guild not win the war!")

else

doPlayerSendTextMessage(pid,MESSAGE_STATUS_CONSOLE_BLUE,"Your guild has domation the castle. Congratulations to help her!")

end

end

end

setGlobalStorageValue(emGuerra,0)

doRemoveItem(1387, tp.pos1)

doRemoveItem(1387, tp.pos2)

doBroadcastMessage("The war for the castle has ended!",22)

else

return doPlayerSendCancel(cid,"Talk /war open[for begin the wr] or /war close[for end the war]")

end

return true

end

 

 

Link para o comentário
Compartilhar em outros sites

Tenta assim!

 

local storage = 1755
local emGuerra = 1756
local War = {
fromPos={x=1349, y=1101, z=7, stackpos=253},
toPos={x=1359, y=1111, z=0, stackpos=253},
rewardRoom = {x=518,y=840,z=7,stackpos=1}}
local config = {
empe = {x=55, y=34, z=5},
pre1 = {x=68, y=37, z=6},
pre2 = {x=42, y=37, z=6}
}
local tp = {
pos1 = {x=51, y=28, z=6},
pos2 = {x=59, y=28, z=6}
}
function onSay(cid, words, param)
if param == "open" then
setGlobalStorageValue(emGuerra,1)
doBroadcastMessage("The war for domination the castle began!",22)
doSummonCreature("Emperium",config.empe,false)
doSummonCreature("Emperium Guard",config.pre1,false)
doSummonCreature("Emperium Guardian",config.pre2,false)
return true
elseif param == "close" then
for _, pid in ipairs(getPlayersOnline()) do
if isInArea(getPlayerPosition(pid), War.fromPos, War.toPos) then
if getGlobalStorageValue(storage) ~= getPlayerGuildId(pid) then
doTeleportThing(pid, War.rewardRoom, false)
doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_BLUE,"Sorry, your guild not win the war!")
else
doPlayerSendTextMessage(pid,MESSAGE_STATUS_CONSOLE_BLUE,"Your guild has domation the castle. Congratulations to help her!")
end
end
end
setGlobalStorageValue(emGuerra,0)
doRemoveItem(getThingfromPos(tp.pos1).uid,1)
doRemoveItem(getThingfromPos(tp.pos2).uid,1)
doBroadcastMessage("The war for the castle has ended!",22)
else
return doPlayerSendCancel(cid,"Talk /war open[for begin the wr] or /war close[for end the war]")
end
return true
end

Editado por mulizeu
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...