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

Lua Problems with zone

nevix

Tunzodus.net
Joined
Mar 31, 2010
Messages
356
Reaction score
62
Location
Lithuanian
What script i need change when player died in pvp area?

Eg: i need execute this: playerdeath.lua but not working in pvpzone? what lua i should change?

Code:
if (getGlobalStorageValue(25003) == 1) then
setGlobalStorageValue(25002, 0)

for _, pid in ipairs(getOnlinePlayers()) do
    if getPlayerStorageValue(pid, 25001) == 1 then
local playerids = getPlayerByName(pid)
local center = {x = 32346, y = 32224, z = 7}

doTeleportThing(playerids,center)
doSendMagicEffect(center, CONST_ME_TELEPORT)

broadcastMessage("Last Man Standing event ended. Winner is: "..pid..", hes got 2 shop points!", MESSAGE_STATUS_WARNING)

    end
end

B
 
What script i need change when player died in pvp area?

Eg: i need execute this: playerdeath.lua but not working in pvpzone? what lua i should change?

Code:
if (getGlobalStorageValue(25003) == 1) then
setGlobalStorageValue(25002, 0)

for _, pid in ipairs(getOnlinePlayers()) do
    if getPlayerStorageValue(pid, 25001) == 1 then
local playerids = getPlayerByName(pid)
local center = {x = 32346, y = 32224, z = 7}

doTeleportThing(playerids,center)
doSendMagicEffect(center, CONST_ME_TELEPORT)

broadcastMessage("Last Man Standing event ended. Winner is: "..pid..", hes got 2 shop points!", MESSAGE_STATUS_WARNING)

    end
end

B
do you want people to get automatlic teleported to temple after death? in the arena, if thats the case just put pvp zoon through map editor.
 
do you want people to get automatlic teleported to temple after death? in the arena, if thats the case just put pvp zoon through map editor.

No, i want when player died in pvp zone this script will be executed:.

Code:
if (getGlobalStorageValue(25003) == 1) then
setGlobalStorageValue(25002, 0)

for _, pid in ipairs(getOnlinePlayers()) do
    if getPlayerStorageValue(pid, 25001) == 1 then
local playerids = getPlayerByName(pid)
local center = {x = 32346, y = 32224, z = 7}

doTeleportThing(playerids,center)
doSendMagicEffect(center, CONST_ME_TELEPORT)

broadcastMessage("Last Man Standing event ended. Winner is: "..pid..", hes got 2 shop points!", MESSAGE_STATUS_WARNING)

    end
end

Eg: player died in pvp arena he will instanly teleported in town, and then my this script will be executed
 
Back
Top