• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Advanced PvP Arena Script - For New Unique Servers.

Eldin

Eldin Projects
Joined
Jun 12, 2008
Messages
1,334
Reaction score
615
Location
Sweden
Greets fellow Scripters and Otians!

I got atleast 2-5 cool Unique Servers that I will create if I get this "One" Script to work perfectly,
might be able to make a couple of them if its not 100% what I need.

What the Script will do:
I want to make it possible for people to play PvP 1vs1, 2vs2, 3vs3 etc just for fun.
(This will both be used with tibia systems and unique vocations/pvp systems)
I don't want to spoil to much as someone else might create the servers once the script is created. ^^

So it "must":
Code:
*Check that all players stands on their tiles so its the right amount of players. (One room with 1vs1, one room with 2vs2 etc...)
*Pull a lever to place everyone at different positions in the PvP Arena. (One XYZ for each player)
*Check the Area so no other players can enter before the "playing" teams are done.
*Teleport all the players out of the arena to temple or XYZ once one team has won. (One team must WIN or they will stay in the arena)
*Make it possible for me to choose if the arena will count deaths or not.
*Reset the area before next team can enter. (Would be good to get rid of fields etc, but this is not 100% neccesary)
*Time to get teleported out once you won a match would be great so the team can "yay" some. (5-10 seconds or what I choose)
*Time from pulling the lever, "Game Begins in 5... 4... 3... 2... 1..." so people can back off and cancel it. (Same here, good but not a must)
*Choose if possible to attack Team Mates or not. (Yes/No - I need it NoN PvP for Team Mates at some servers and some Everything Counts)
*Red? Text when entering arena, "FIGHT!" or something. (To every player)
*Red? Text when game is over , "YOU WON!" or something. (To every player)
*Red? Text at player at death, "YOU FAILED!" or something. (This and the next is probably in the "creaturescripts" scripts)
*Red? Text over player at frag, "KILLING SPREE!" or something. (Would be cool with different text if you kill different amount of people without dying)

The one/s who help me fix this will ofcourse get credit at all those servers for it,
you might also get the entire server/s once its done even if I release it for download later or not.
Feel free to tell me if this could be made in any other better way or if you have any other ideas for it.
Thank You for reading!

Kind Regards,
Eldin.
 
Example:

Im quite supprised, can't find any new versions of this, uhm?

Here is kinda what it used to look like: (Feels kinda long from what it could be...)

Code:
-- pvp arena lever

function onUse(cid, item, frompos, item2, topos)
	if item.uid == 7001 and item.itemid == 1945 then
		player1pos = {x=947, y=1025, z=8, stackpos=253}
		player1 = getThingfromPos(player1pos)

		player2pos = {x=947, y=1027, z=8, 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 = 944, 956 do
					for arenay = 1043, 1057 do
						arenapos = {x=arenax, y=arenay, z=7, 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=946, y=1045, z=7}
				nplayer2pos = {x=954, y=1055, z=7}

				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,"Both fighters must have level 50.")
			end
		else
			doPlayerSendCancel(cid,"You need 2 players for a duel.")
		end
	else
		return 0
   	end

	return 1
end

Maybe something to work from?

Kind Regards,
Eldin.
 
Back
Top