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

[Request] Globalevent

GarQet

Own3d!
Joined
Feb 10, 2009
Messages
1,381
Solutions
14
Reaction score
81
Hello!
I need one special script to my War Server.
On my OT is system - "change_map", 2 teams are attacking each other for 20 minutes. After dead we was teleport to our Temple (other map).
Sometimes happens, so that one team kill all from second team and must waiting for change map...
I would like to have someone who wrote me a script, globalevent.
Script must get Result from Database (db.getResult("SELECT `map` FROM `change_map` ORDER by `time` DESC")) based on it, he need to get map name (which is currently on the server) to check whether a given area are two teams. If there are two teams, the script does nothing. Otherwise, it retrieves all the players and teleport their to special positions.

I tried to do this script, but I couldn't do that.
Anyone can do this script?
I would be very grateful.


btw. The beginning of my script...:
function onThink()
local team1 = ?
local team2 = ?
local map1_1 = isInRange(getCreaturePosition(team1.uid), {x=1000, y=1000, z=0}, {x=1025, y=1025, z=15})
local map1_2 = isInRange(getCreaturePosition(team2.uid), {x=1000, y=1000, z=0}, {x=1025, y=1025, z=15})

local Info = db.getResult("SELECT `map` FROM `change_map` ORDER by `time` DESC")
local mapa = Info:getDataString("map")
Info:free()

if(mapa == Ab'dendriel) and (map1_1(team1.uid)) == TRUE and (map1_2(team2.uid)) == TRUE then
else
doteleportThing(..., {x=900, y=900, z=7})
end
return true
end

//Sorry for my English.
 
Back
Top