Hi...
I want a ArenaScript thats allowed till 4 players..
but so thats u can choose how much players,also 2 or 3 or 4...
My script is so thats u can only Fight with 4 players..
Anyone can script thats for me please?
Here's the Script:
-- pvp arena
elseif item.uid == 7001 then
if item.itemid == 1945 then
player1pos = {x=155, y=51, z=5, stackpos=253}
player1 = getThingfromPos(player1pos)
player2pos = {x=155, y=49, z=5, stackpos=253}
player2 = getThingfromPos(player2pos)
if player1.itemid > 0 and player2.itemid > 0 then
arenalevel = 50
player1level = getPlayerLevel(player1.uid)
player2level = getPlayerLevel(player2.uid)
if player1level >= arenalevel and player2level >= arenalevel then
for arenax = 159,164 do
for arenay = 50,56 do
arenapos = {x=arenax, y=arenay, z=5, stackpos=253}
arenacreature = getThingfromPos(arenapos)
if arenacreature.itemid > 0 then
doPlayerSendCancel(cid,"Wait for current duel to end.")
return 1
end
end
end
nplayer1pos = {x=159, y=53, z=5}
nplayer2pos = {x=164, y=53, z=5}
doSendMagicEffect(player1pos,2)
doSendMagicEffect(player2pos,2)
doTeleportThing(player1.uid,nplayer1pos)
doTeleportThing(player2.uid,nplayer2pos)
doSendMagicEffect(nplayer1pos,10)
doSendMagicEffect(nplayer2pos,10)
doPlayerSendTextMessage(player1.uid,18,"FIGHT!")
doPlayerSendTextMessage(player2.uid,18,"FIGHT!")
else
doPlayerSendCancel(cid,"All fighters must have level 50.")
end
else
doPlayerSendCancel(cid,"You need 2 players for a duel.")
return 1
end
end
end
end
I want a ArenaScript thats allowed till 4 players..
but so thats u can choose how much players,also 2 or 3 or 4...
My script is so thats u can only Fight with 4 players..
Anyone can script thats for me please?
Here's the Script:
-- pvp arena
elseif item.uid == 7001 then
if item.itemid == 1945 then
player1pos = {x=155, y=51, z=5, stackpos=253}
player1 = getThingfromPos(player1pos)
player2pos = {x=155, y=49, z=5, stackpos=253}
player2 = getThingfromPos(player2pos)
if player1.itemid > 0 and player2.itemid > 0 then
arenalevel = 50
player1level = getPlayerLevel(player1.uid)
player2level = getPlayerLevel(player2.uid)
if player1level >= arenalevel and player2level >= arenalevel then
for arenax = 159,164 do
for arenay = 50,56 do
arenapos = {x=arenax, y=arenay, z=5, stackpos=253}
arenacreature = getThingfromPos(arenapos)
if arenacreature.itemid > 0 then
doPlayerSendCancel(cid,"Wait for current duel to end.")
return 1
end
end
end
nplayer1pos = {x=159, y=53, z=5}
nplayer2pos = {x=164, y=53, z=5}
doSendMagicEffect(player1pos,2)
doSendMagicEffect(player2pos,2)
doTeleportThing(player1.uid,nplayer1pos)
doTeleportThing(player2.uid,nplayer2pos)
doSendMagicEffect(nplayer1pos,10)
doSendMagicEffect(nplayer2pos,10)
doPlayerSendTextMessage(player1.uid,18,"FIGHT!")
doPlayerSendTextMessage(player2.uid,18,"FIGHT!")
else
doPlayerSendCancel(cid,"All fighters must have level 50.")
end
else
doPlayerSendCancel(cid,"You need 2 players for a duel.")
return 1
end
end
end
end
Last edited: