fera holy kina
Ubuntu 10.04
- Joined
- Jan 27, 2009
- Messages
- 192
- Reaction score
- 5
Script:
error:
The Castle opens more monsters are not created
Sorry for my bad inglesh
VAR.WOE
PHP:
dofile("./_woe.lua")
local config = woe_config
local reward = 200000 -- 200k
local function EndWoe()
Woe.getInfo()
setGlobalStorageValue(stor.Started, 0)
setGlobalStorageValue(stor.WoeTime, 0)
Woe.expulsar(infoLua[2], Castle.salas.a.fromx, Castle.salas.a.tox, Castle.salas.a.fromy, Castle.salas.a.toy, Castle.salas.a.z, Castle._exit)
Woe.expulsar(infoLua[2], Castle.salas.b.fromx, Castle.salas.b.tox, Castle.salas.b.fromy, Castle.salas.b.toy, Castle.salas.b.z, Castle._exit)
Woe.expulsar(infoLua[2], Castle.salas.c.fromx, Castle.salas.c.tox, Castle.salas.c.fromy, Castle.salas.c.toy, Castle.salas.c.z, Castle._exit)
doBroadcastMessage("WoE is finished", config.bcType)
doBroadcastMessage("The castle " .. Castle.name .. " is owned by ".. Woe.guildName() ..".", config.bcType)
if isCreature(getThingFromPos(Castle.empePos).uid) then
doRemoveCreature(getThingFromPos(Castle.empePos).uid)
end
Woe.removePre()
Woe.removePortals()
doRemoveItem(getThingFromPos(Castle.desde).uid)
Woe.save()
for _, cid in ipairs(getPlayersOnline()) do
if infoLua[2] == getPlayerGuildId(cid) then
doPlayerAddMoney(cid, reward)
end
end
Woe.remove()
setGlobalStorageValue(24503, -1)
end
function onThink(interval, lastExecution)
Woe.getInfo()
if Woe.isTime() then
if not Woe.isStarted() then
doSummonCreature("empe", Castle.empePos)
doSummonCreature("pre1", Castle.PreEmpes[1])
doSummonCreature("pre2", Castle.PreEmpes[2])
doBroadcastMessage("War has started...", config.bcType)
setGlobalStorageValue(stor.Started, 1)
Woe.updateInfo({os.time(), infoLua[2], infoLua[3], infoLua[4]})
doCreateTeleport(1387, Castle.pos, Castle.desde)
addEvent(EndWoe, config.timeToEnd * 60 * 1000)
end
end
return true
end
error:
The Castle opens more monsters are not created
Sorry for my bad inglesh
VAR.WOE
PHP:
Castle, woe_config, stor = {}, {}, {}
--castle name (?)
Castle.name = 'Ruthenburg'
--aid of entry.
Castle.tiles = 3131
--aid for created portals.
Castle.portals = 3132
--aid of flags in castle.
Castle.banderas = 3133
--aid of empes bases.
Castle.bases = 3134
--uids in case you have decorations with info.
Castle.decoraciones = {}
--where you teleported from temple.
Castle.pos = {x = 55, y = 79, z = 7}
--where players are teleported when finished or castle owner change.
Castle._exit = {x = 32369, y = 32241, z = 7}
--where portal appears
Castle.desde = {x = 32374, y = 32239, z = 7, stackpos = 1}
--true / false
default_map = true
--if you will not use default map you should config all the pos.
--main empe pos => with this pos all castle pos will be calculated (default map only)
Castle.empePos = {x = 15, y = 34, z = 5, stackpos = 253}
if default_map then
local pos = Castle.empePos
--entry for guild by using flags.
Castle.guildEntry = {x = pos.x - 9, y = pos.y + 4, z = pos.z}
--each floor should be all floor.
Castle.salas =
{
a = {fromx = pos.x - 18, tox = pos.x + 18, fromy = pos.y - 10, toy = pos.y + 28, z = pos.z + 2},
b = {fromx = pos.x - 18, tox = pos.x + 18, fromy = pos.y - 10, toy = pos.y + 28, z = pos.z + 1},
c = {fromx = pos.x - 18, tox = pos.x + 18, fromy = pos.y - 10, toy = pos.y + 28, z = pos.z}
}
--pre empes pos
Castle.PreEmpes =
{
{x = pos.x - 13, y = pos.y + 3, z = pos.z + 1, stackpos = 253},
{x = pos.x + 13, y = pos.y + 3, z = pos.z + 1, stackpos = 253}
}
--when you kill pre empes new portals appears.
Castle.PrePortalsPos =
{
{x = pos.x - 4, y = pos.y - 6, z = pos.z + 1, stackpos = 1},
{x = pos.x + 4, y = pos.y - 6, z = pos.z + 1, stackpos = 1}
}
Castle.PreToPos =
{
[1] = {x = pos.x - 7, y = pos.y + 26, z = pos.z},
[2] = {x = pos.x + 7, y = pos.y + 26, z = pos.z}
}
else
--edit those if not using default map
--read above to know what is everything.
--break this comment to use [...]
--[[
Castle.guildEntry = {x = 46, y = 38, z = 5}
Castle.salas =
{
a = {fromx=37, tox=73, fromy=24, toy=62, z=7},
b = {fromx=37, tox=73, fromy=24, toy=62, z=6},
c = {fromx=37, tox=73, fromy=24, toy=62, z=5}
}
Castle.PreEmpes =
{
{x=42, y=37, z=6, stackpos=253},
{x=68, y=37, z=6, stackpos=253}
}
Castle.PrePortalsPos =
{
{x=51, y=28, z=6, stackpos=1},
{x=59, y=28, z=6, stackpos=1}
}
Castle.PreToPos =
{
[1] = {x = 48, y = 60, z = 5},
[2] = {x = 62, y = 60, z = 5}
}
]]
end
--duration
woe_config.timeToEnd = 30
--bc type
woe_config.bcType = MESSAGE_EVENT_ADVANCE
--days
woe_config.dias = {"tuesday", "thursday", "saturday"}
--time to start
woe_config.horaPartida = 13
--access to start
woe_config.accessToStar = 4
--recall delay
woe_config.recallTime = 3 * 60
--rewards for winners
woe_config.premios = true
--storage for register players
stor.register = 8589
--recall delay stor
stor.recall = 23155
--global stor started
stor.Started = 7801
--global stor [...]
stor.WoeTime = 7802
Last edited: