Ir para conteúdo

Pvp Team Arena


NatsuMcDonald

Posts Recomendados

PVP TEAM ARENA

 

Tipo de script: Action

Servidor Utilizado: The Forgotten Server

Versão Utilizada: TFS 0.3.6 / 8.54

 

Eae Belesa?

Gostaria de um script de PVP que fosse assim:

No mapa tem 4 tiles de um lado, 4 do outro e uma alavanca entre eles.

Caso tenha 1 player de cada lado, e puxasse a alavanca, eles seriam teleportados pra sala de PvP e Fight!

Caso tivesse 1 player de um lado, e 2 do outro, desse erro.

Se tivesse 2 x 2, todos seriam teleportados, mas os players que estivessem do mesmo lado não poderiam se atacar.

Nao sei se expliquei direito mas deu pra entender? :]

 

Vlw!

Agradeço desde ja!

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

  • 1 month later...

Fiz assim, ele so vai teleporta se os 8 player tiver no tile correto...

 

vai em actions e coloque isso.

 

function onUse(cid, item, frompos, item2, topos)

 

if item.uid == 2217 and item.itemid == 1945 then

player1pos = {x=943, y=500, z=6, stackpos=253}

player1 = getThingfromPos(player1pos)

 

player2pos = {x=965, y=500, z=6, stackpos=253}

player2 = getThingfromPos(player2pos)

 

player3pos = {x=943, y=500, z=6, stackpos=253}

player3 = getThingfromPos(player3pos)

 

player4pos = {x=965, y=500, z=6, stackpos=253}

player4 = getThingfromPos(player4pos)

 

 

player5pos = {x=943, y=500, z=6, stackpos=253}

player5 = getThingfromPos(player5pos)

 

player6pos = {x=965, y=500, z=6, stackpos=253}

player6 = getThingfromPos(player6pos)

 

player7pos = {x=943, y=500, z=6, stackpos=253}

player7 = getThingfromPos(player7pos)

 

player8pos = {x=965, y=500, z=6, stackpos=253}

player8 = getThingfromPos(player8pos)

 

 

 

if player1.itemid > 0 and player2.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 and player5.itemid > 0 and player6.itemid > 0 and player7.itemid > 0 and player2.itemid > 8 then

arenalevel = 50

player1level = getPlayerLevel(player1.uid)

player2level = getPlayerLevel(player2.uid)

 

if player1level >= arenalevel and player2level >= arenalevel and player3level >= arenalevel and player4level >= arenalevel and player5level >= arenalevel and player6level >= arenalevel and player7level >= arenalevel and player8level >= arenalevel then

for arenax = 945,963 do

for arenay = 505,492 do

arenapos = {x=arenax, y=arenay, z=7, stackpos=253}

arenacreature = getThingfromPos(arenapos)

 

if arenacreature.itemid > 0 then

doPlayerSendCancel(cid,"Espere o duelo terminar.")

return 1

end

end

end

 

nplayer1pos = {x=946, y=495, z=7}

nplayer2pos = {x=962, y=504, z=7}

nplayer3pos = {x=946, y=495, z=7}

nplayer4pos = {x=962, y=504, z=7}

nplayer5pos = {x=946, y=495, z=7}

nplayer6pos = {x=962, y=504, z=7}

nplayer7pos = {x=946, y=495, z=7}

nplayer8pos = {x=962, y=504, z=7}

 

 

doSendMagicEffect(player1pos,2)

doSendMagicEffect(player2pos,2)

doSendMagicEffect(player3pos,2)

doSendMagicEffect(player4pos,2)

doSendMagicEffect(player5pos,2)

doSendMagicEffect(player6pos,2)

doSendMagicEffect(player7pos,2)

doSendMagicEffect(player8pos,2)

 

 

doSendMagicEffect(player1pos,2)

doSendMagicEffect(player2pos,2)

doSendMagicEffect(player3pos,2)

doSendMagicEffect(player4pos,2)

doSendMagicEffect(player5pos,2)

doSendMagicEffect(player6pos,2)

doSendMagicEffect(player7pos,2)

doSendMagicEffect(player8pos,2)

 

 

doSendMagicEffect(player1pos,2)

doSendMagicEffect(player2pos,2)

doSendMagicEffect(player3pos,2)

doSendMagicEffect(player4pos,2)

doSendMagicEffect(player5pos,2)

doSendMagicEffect(player6pos,2)

doSendMagicEffect(player7pos,2)

doSendMagicEffect(player8pos,2)

 

 

doTeleportThing(player1.uid,nplayer1pos)

doTeleportThing(player2.uid,nplayer2pos)

doTeleportThing(player3.uid,nplayer1pos)

doTeleportThing(player4.uid,nplayer2pos)

doTeleportThing(player5.uid,nplayer1pos)

doTeleportThing(player6.uid,nplayer2pos)

doTeleportThing(player7.uid,nplayer1pos)

doTeleportThing(player8.uid,nplayer2pos)

 

 

 

doSendMagicEffect(nplayer1pos,10)

doSendMagicEffect(nplayer2pos,10)

doSendMagicEffect(nplayer3pos,10)

doSendMagicEffect(nplayer4pos,10)

doSendMagicEffect(nplayer5pos,10)

doSendMagicEffect(nplayer6pos,10)

doSendMagicEffect(nplayer7pos,10)

doSendMagicEffect(nplayer8pos,10)

 

 

 

doPlayerSendTextMessage(player1.uid,18,"FIGHT!")

doPlayerSendTextMessage(player2.uid,18,"FIGHT!")

doPlayerSendTextMessage(player3.uid,18,"FIGHT!")

doPlayerSendTextMessage(player4.uid,18,"FIGHT!")

doPlayerSendTextMessage(player5.uid,18,"FIGHT!")

doPlayerSendTextMessage(player6.uid,18,"FIGHT!")

doPlayerSendTextMessage(player7.uid,18,"FIGHT!")

doPlayerSendTextMessage(player8.uid,18,"FIGHT!")

else

doPlayerSendCancel(cid,"Os dois lutadores devem ter no minimo level 50.")

end

else

doPlayerSendCancel(cid,"Voce precisa de 2 jogadores para lutar.")

end

else

return 0

end

 

return 1

end

 

flws

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...