<globalevent name="NAME" interval="3600" event="script" value="NAME.lua"/>
local pvp = {
worldtype = getWorldType()
msgP = "Server Just change to Pvp Enforced"
msgE = "Server Just change to Pvp Normal"
}
function onThink(interval, lastExecution)
if(pvp.worldtype == 1) then
doBroadcastMessage(' '.. pvp.msgP ..' ')
setWorldType(pvp-enforced)
elseif(pvp.worldtype = 3)
doBroadcastMessage(' '.. pvp.msgE ..' ')
setWorldType(pvp)
end
end
return TRUE
end
[Warning - Event::loadScript] Cannot load script (data/globalevents/scripts/enforce.lua)
[10/09/2009 14:50:20] data/globalevents/scripts/enforce.lua:4: '}' expected (to close '{' at line 1) near 'msgP'
local config = {
worldtype = getWorldType()
}
function onThink(interval, lastExecution)
if(pvp.worldtype == 1) then
doBroadcastMessage("Local GameMaster:Server Just change to Pvp Normal")
setWorldType(pvp-enforced)
elseif(pvp.worldtype = 3)
doBroadcastMessage("Local GameMaster:Server Just change to Pvp Normal")
setWorldType(pvp)
end
end
return TRUE
end
[10/09/2009 21:01:18] [Warning - Event::loadScript] Cannot load script (data/globalevents/scripts/enforce.lua)
[10/09/2009 21:01:18] data/globalevents/scripts/enforce.lua:13: ')' expected near '='
elseif(pvp.worldtype = 3)
elseif(pvp.worldtype == 3)
local pvp = {
worldtype = getWorldType(),
msgP = "Server Just change to Pvp Enforced",
msgE = "Server Just change to Pvp Normal"
}
function onThink(interval, lastExecution)
if(pvp.worldtype == 1) then
doBroadcastMessage(' '.. pvp.msgP ..' ')
setWorldType(pvp-enforced)
elseif(pvp.worldtype == 3) then
doBroadcastMessage(' '.. pvp.msgE ..' ')
setWorldType(pvp)
end
end
return TRUE
end
local config = {
worldtype = getWorldType()
}
function onThink(interval, lastExecution)
if(pvp.worldtype == 1) then
doBroadcastMessage("Local GameMaster:Server Just change to Pvp Normal")
setWorldType(pvp-enforced)
if(pvp.worldtype == 3) then
doBroadcastMessage("Local GameMaster:Server Just change to Pvp Normal")
setWorldType(pvp)
end
end
return TRUE
end
local pvp = {
worldtype = getWorldType(),
msgP = "Server Just change to Pvp Enforced",
msgE = "Server Just change to Pvp Normal"
}
function onThink(interval, lastExecution)
if(pvp.worldtype == WORLD_TYPE_PVP) then
doBroadcastMessage(pvp.msgP)
setWorldType(WORLD_TYPE_PVP_ENFORCED)
elseif(pvp.worldtype == WORLD_TYPE_PVP_ENFORCED) then
doBroadcastMessage(pvp.msgE)
setWorldType(WORLD_TYPE_PVP)
end
return TRUE
end
10:40 Server Just change to Pvp Normal
10:40 World type is currently set to PVP.
10:41 Server Just change to Pvp Enforced
10:41 World type is currently set to PVP-Enforced.
local pvp = {
msgP = "Server Just change to Pvp Enforced",
msgE = "Server Just change to Pvp Normal"
}
function onThink(interval, lastExecution)
if(getWorldType() == 2) then
doBroadcastMessage(pvp.msgP)
setWorldType(3)
elseif(getWorldType() == 3) then
doBroadcastMessage(pvp.msgE)
setWorldType(2)
end
return TRUE
end
lol tested and works..
Code:10:40 Server Just change to Pvp Normal 10:40 World type is currently set to PVP. 10:41 Server Just change to Pvp Enforced 10:41 World type is currently set to PVP-Enforced.LUA:local pvp = { msgP = "Server Just change to Pvp Enforced", msgE = "Server Just change to Pvp Normal" } function onThink(interval, lastExecution) if(getWorldType() == 2) then doBroadcastMessage(pvp.msgP) setWorldType(3) elseif(getWorldType() == 3) then doBroadcastMessage(pvp.msgE) setWorldType(2) end return TRUE end