• 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!

PvP Arena For TFS (Function)

StreamSide

Joseluis Gonzalez
Staff member
Support Team
Joined
Aug 31, 2007
Messages
3,608
Solutions
51
Reaction score
1,224
Location
Arica - Chile
Well, this script was made for Sora in e*fans.net, the spanish community:
In scripts iam noob, so i cant create a script for that but i can post it ;D
Code:
-- PVP Area

function makePVPArea(fromp, top, exitpos, canDie, time_in_seconds)

local time = os.time() -- Time in Seconds

for fx = fromp.x, top.x do -- Array of from.x -> to.x
    
for fy = fromp.y, top.y do -- Array of from.y -> to.y
        
for fz = fromp.z, top.z do -- Another array... from.z -> to.z            

local ppos = {x=fx, y=fy, z=fz} -- ppos is the area of fx, fy, and fz    

local players = getThingFromPos(ppos) -- we get the things into the area             

local playersHealth = getPlayerHealth(players) -- we get the health of the players in area            

    while time < time_in_seconds do -- while our clock isn't at time_in_seconds player wanted time...
                
        if canDie == true then -- if canDie option is true (a pvp arena with canDie?)            
        -- ...
            
        end    
            elseif canDie == false then                
    
                while playerHealth > 2 do -- if canDie == false, then we are going to check all the time the hp of the players                
                    --...
                    
                break -- while
                    
            doPlayerAddHealth(players, 5000) -- The player has 1 HP, we heal him    
            doTeleportThing(players, exitpos)  -- and teleport them to the exitpos    
        
            end -- elseif    
            
    break -- while
            
end -- for
    
end -- for

end -- for

end -- function

Can someone create a script, i can test it ;D

Sorry for my ENGLISH ;D - A MODERATOR PLZ DELETE THE DOWN POST :S
 
Last edited:
Soo... it is working on the last tfs?

PHP:
for fx = fromp.x, top.x do -- Array of from.x -> to.x
    
for fy = fromp.y, top.y do -- Array of from.y -> to.y
        
for fz = fromp.z, top.z do -- Another array... from.z -> to.z

And change fromp.x fromp.y and fromp.z?

Explain a little plx
 
You can write script to do the whole arena on the basis of what you wrote?


PL:
Potrafiłbyś zrobić cały skrypt areny na oparciu tego co napisałeś?
 
Back
Top