Postado Agosto 28, 2013 11 anos Entao galera do tibiaking, estou apavorado aqui ...estou acordado ja faz mais de 24h e ainda não consegui resolve o problema da woe, são 2 problemas que ainda nao cosegui resolver os outros bus do mapa ja forao tirados, gente preciso da ajuda de voces quero deixa o server prontinho ate amanha, porque comprei dedicado pela lvghosta vps 2 + 50gb, mais nao to conseguindo deixar o woe funcionando, então depois de passa tanto tempo e nada, resolvi pedi ajuda para voceis apavoradamente, vou postar meus meus scripts xml e lua. Citar Data / Actions / Actions.xml <!-- Woe --> <action actionid="3133" event="script" value="woe.lua"/> <action uniqueid="3134" event="script" value="woe.lua"/> Citar Data / Actions / Scripts / woe.lua dofile("./_woe.lua") local delays = 60 local guards_price = 30000 --30k function onUse(cid, item, fromPosition, itemEx, toPosition) Woe.getInfo() if item.actionid == Castle.banderas then if Woe.isTime() then if Woe.isStarted() then if infoLua[2] == getPlayerGuildId(cid) then doTeleportThing(cid, Castle.guildEntry, false) else doPlayerSendCancel(cid, "You are not member of ".. Woe.guildName() ..".") end end else if infoLua[2] == getPlayerGuildId(cid) then doTeleportThing(cid, Castle.guildEntry, false) else doPlayerSendCancel(cid, "You are not member of ".. Woe.guildName() ..".") end end elseif (item.uid == 3134) then if not Woe.isStarted() or (infoLua[2] ~= getPlayerGuildId(cid)) or (getPlayerGuildLevel(cid) ~= GUILDLEVEL_LEADER) then return true end if (getPlayerMoney(cid) < guards_price) then return doPlayerSendCancel(cid, "Not enough money.") end local varDelay = getGlobalStorageValue(24503) if (varDelay < 0) or ((os.time() - varDelay) >= delays) then if Woe.check() then Woe.summon() doPlayerRemoveMoney(cid, guards_price) else doPlayerSendCancel(cid, "There are still guards alive.") end else doPlayerSendCancel(cid, "Delay no listo.") end end return true end Citar Data / Creaturescripts / creaturescripts.xml <!-- WoE --> <event type="death" name="empe_broken" event="script" value="empe_broken.lua"/> <event type="death" name="pre_empes" event="script" value="pre_empes.lua"/> <event type="statschange" name="empe_dmg" event="script" value="empe_dmg.lua"/> <event type="login" name="reg_vs_guard" event="script" value="vs_guard.lua"/> <event type="statschange" name="vs_guard" event="script" value="vs_guard.lua"/> Citar Data / Creaturescripts / Actions / empe_broken.lua dofile("./_woe.lua") local config = woe_config function onDeath(cid, corpse, deathList) local killer = deathList[1] Woe.getInfo() if Woe.isTime() then if isPlayer(killer) == true then if Woe.isRegistered(killer) then local Guild_ID = getPlayerGuildId(killer) Woe.updateInfo({infoLua[1], Guild_ID, getPlayerGUID(killer), os.time()}) doBroadcastMessage("The Castle " .. Castle.name .. " has been conquest by " .. getCreatureName(killer) .. " for " .. getPlayerGuildName(killer) .. ".", config.bcType) Woe.deco("Actually the castle " .. Castle.name .. " is owned by " .. getPlayerGuildName(killer) .. ".") Woe.expulsar(Guild_ID, Castle.salas.a.fromx, Castle.salas.a.tox, Castle.salas.a.fromy, Castle.salas.a.toy, Castle.salas.a.z, Castle._exit) Woe.expulsar(Guild_ID, Castle.salas.b.fromx, Castle.salas.b.tox, Castle.salas.b.fromy, Castle.salas.b.toy, Castle.salas.b.z, Castle._exit) Woe.expulsar(Guild_ID, Castle.salas.c.fromx, Castle.salas.c.tox, Castle.salas.c.fromy, Castle.salas.c.toy, Castle.salas.c.z, Castle._exit) end end if isCreature(cid) == true then doRemoveCreature(cid) end Woe.removePre() Woe.removePortals() Woe.remove() setGlobalStorageValue(24503, -1) doSummonCreature("empe", Castle.empePos) doSummonCreature("pre1", Castle.PreEmpes[1]) doSummonCreature("pre2", Castle.PreEmpes[2]) end return true end Citar Data / Creaturescripts / Scripts / empe_dmg.lua dofile("./_woe.lua") local formulas = { [1] = {level = 5, ml = 2}, [2] = {level = 5, ml = 2}, [3] = {level = 5, ml = 1}, [4] = {level = 5, ml = 3} } --add more vocs. function formulilla(cid) local tmp = formulas[getPlayerVocation(cid)] if not tmp then return 100 --default else return (getPlayerLevel(cid) / tmp.level) + (getPlayerMagLevel(cid) * tmp.ml) end end function onStatsChange(cid, attacker, type, combat, value) Woe.getInfo() if not isPlayer(attacker) then return true end if not Woe.isRegistered(attacker) then return false end if (type == STATSCHANGE_HEALTHGAIN) then doCreatureAddHealth(cid, formulilla(attacker), true) return false end if (type == STATSCHANGE_HEALTHLOSS) then if getPlayerGuildId(attacker) == infoLua[2] then doPlayerSendCancel(attacker, "You can not atack your empe.") return false end end return true end Citar Data / Creaturescripts / Scripts / pre_empes.lua dofile("./_woe.lua") local config = woe_config function onDeath(cid, corpse, killer) if isCreature(cid) == true then doRemoveCreature(cid) end if Woe.isTime() then if Woe.checkPre() then doSetItemActionId(doCreateItem(1387, 1, Castle.PrePortalsPos[1]), Castle.portals) doSetItemActionId(doCreateItem(1387, 1, Castle.PrePortalsPos[2]), Castle.portals) doBroadcastMessage("Both Pre-Empes have been broken, portals opened.", config.bcType) else doBroadcastMessage("one of Pre-Empes have been broken...", config.bcType) end end return true end Citar Data / Creaturescripts / Scripts / vs_guard.lua dofile("./_woe.lua") function onLogin(cid) registerCreatureEvent(cid, "vs_guard") return true end function onStatsChange(cid, attacker, type, combat, value) if not isCreature(attacker) or isPlayer(attacker) then return true end Woe.getInfo() if (type == STATSCHANGE_HEALTHLOSS) then if (getCreatureName(attacker):lower() == "guard") then if (infoLua[2] == getPlayerGuildId(cid)) then doMonsterChangeTarget(attacker) return false end end end return true end Citar Data / Globalevents / globalevents.xml <globalevent name="WoE" interval="30000" event="script" value="woe.lua"/> <globalevent name="start_woe" interval="30000" event="script" value="start_woe.lua"/> <globalevent name="Guardias" interval="1000" event="script" value="guardias.lua"/> <!-- for 0.3.6 <globalevent name="WoE" interval="30" event="script" value="woe.lua"/> <globalevent name="start_woe" interval="30" event="script" value="start_woe.lua"/> <globalevent name="Guardias" interval="2" event="script" value="guardias.lua"/> Citar Data / Globalevents / Scripts / Guardians.lua dofile("./_woe.lua") local config = woe_config local done = 1 function onThink(interval, lastExecution) if not Woe.isStarted() then return true end Woe.getInfo() if Woe.check() then if (done == -1) then setGlobalStorageValue(24503, os.time()) doBroadcastMessage("OOH NOES !!! se murieron los guardias.", config.bcType) done = 1 end return true end done = -1 for storage = 24504, 24511 do local pid = getGlobalStorageValue(storage) if isCreature(pid) then local target = getCreatureTarget(pid) if (target ~= 0) and isPlayer(target) then if (getPlayerGuildId(target) == infoLua[2] ) then local newTarget = 0 for _, i in ipairs(getMonsterTargetList(pid)) do if isPlayer(i) and (getPlayerGuildId(i) ~= infoLua[2]) then newTarget = i end end if (newTarget ~= 0) then doMonsterSetTarget(pid, newTarget) end end end end end return true end Citar Data / Globalevents / Scripts / start_woe.lua dofile("./_woe.lua") local config = woe_config function isInTable(t, val) if (type(t) == "table") then for k, v in ipairs(t) do if v == val then return true end end end return false end local lastDay = false function onThink(interval, lastExecution) local day = string.lower(os.date("%A", os.time())) if isInTable(config.dias, day) == true and lastday ~= day then local Hora = tonumber(os.date("%H", os.time())) if Hora == config.horaPartida then if not Woe.isTime() then doBroadcastMessage("War of Emperium will start in next 5 minutes...", config.bcType) doBroadcastMessage("will have a duration of " .. config.timeToEnd .. " minutes.", config.bcType) setGlobalStorageValue(stor.WoeTime, 1) lastDay = day end end end return true end Citar Data / Globalevents / Scripts / woe.lua 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 Citar Data / Monster / pre2.xml <?xml version="1.0" encoding="UTF-8"?> <monster name="Emperium" nameDescription="a emperiume" race="fire" experience="0" speed="0" manacost="0"> <health now="25000" max="25000"/> <look typeex="8634"/> <targetchange interval="5000" chance="8"/> <strategy attack="100" defense="0"/> <script> <event name="pre_empes"/> </script> <flags> <flag summonable="1"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="0"/> <flag canpushcreatures="0"/> <flag targetdistance="0"/> <flag staticattack="90"/> <flag runonhealth="10"/> </flags> <attacks> </attacks> <defenses armor="10" defense="10"/> <elements> <element icePercent="100"/> <element firePercent="100"/> <element holyPercent="-100"/> <element deathPercent="-100"/> <element physicalPercent="-25"/> <element earthpercent="-100"/> <element energyPercent="100"/> </elements> <immunities> <immunity lifedrain="0"/> <immunity paralyze="0"/> <immunity outfit="0"/> <immunity drunk="0"/> <immunity invisible="0"/> </immunities> <voices interval="5000" chance="10"> </voices> <loot> </loot> </monster> Citar Data / Monster / pre1.xml <?xml version="1.0" encoding="UTF-8"?> <monster name="Emperium" nameDescription="a emperiume" race="fire" experience="0" speed="0" manacost="0"> <health now="25000" max="25000"/> <look typeex="8635"/> <targetchange interval="5000" chance="8"/> <strategy attack="100" defense="0"/> <script> <event name="pre_empes"/> </script> <flags> <flag summonable="1"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="0"/> <flag canpushcreatures="0"/> <flag targetdistance="0"/> <flag staticattack="90"/> <flag runonhealth="10"/> </flags> <attacks> </attacks> <defenses armor="10" defense="10"/> <elements> <element icePercent="-100"/> <element firePercent="100"/> <element holyPercent="100"/> <element deathPercent="100"/> <element physicalPercent="-25"/> <element earthpercent="100"/> <element energyPercent="-50"/> </elements> <immunities> <immunity lifedrain="0"/> <immunity paralyze="0"/> <immunity outfit="0"/> <immunity drunk="0"/> <immunity invisible="0"/> </immunities> <voices interval="5000" chance="10"> </voices> <loot> </loot> </monster> Citar Data / Monster / guard.xml <?xml version="1.0" encoding="UTF-8"?> <monster name="Guard" nameDescription="a guard" race="blood" experience="0" speed="220" manacost="0"> <health now="240000" max="240000"/> <look type="57" corpse="6080"/> <targetchange interval="10000" chance="1"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="2000" skill="30" attack="70"/> </attacks> <defenses armor="20" defense="22"> <defense name="healing" interval="1000" chance="17" min="30" max="50"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="speed" interval="1000" chance="10" speedchange="300" duration="3000"> <attribute key="areaEffect" value="redshimmer"/> </defense> </defenses> <elements> <element holyPercent="50"/> <element deathPercent="50"/> <element physicalPercent="-15"/> </elements> <immunities> <immunity invisible="1"/> </immunities> <voices interval="5000" chance="10"> </voices> </monster> Citar Data / Monster / empe.xml <?xml version="1.0" encoding="UTF-8"?> <monster name="Emperium" nameDescription="a emperiume" race="undead" experience="0" speed="0" manacost="0"> <health now="50000" max="50000"/> <look typeex="8636"/> <targetchange interval="5000" chance="8"/> <strategy attack="100" defense="0"/> <script> <event name="empe_broken"/> <event name="empe_dmg"/> </script> <flags> <flag summonable="1"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="0"/> <flag canpushcreatures="0"/> <flag targetdistance="0"/> <flag staticattack="90"/> <flag runonhealth="10"/> </flags> <attacks> </attacks> <defenses armor="100" defense="100"/> <elements> <element icePercent="100"/> <element firePercent="100"/> <element holyPercent="100"/> <element deathPercent="100"/> <element physicalPercent="-50"/> </elements> <immunities> <immunity lifedrain="0"/> <immunity paralyze="0"/> <immunity outfit="0"/> <immunity drunk="0"/> <immunity invisible="0"/> </immunities> <voices interval="5000" chance="10"> </voices> <loot> </loot> </monster> Citar Data / Monster.xml <monster name="empe" file="empe.xml"/> <monster name="pre1" file="pre1.xml"/> <monster name="pre2" file="pre2.xml"/> <monster name="guard" file="guard.xml"/> Citar Data / Movements / movements.xml <!--War of Emperium--> <movevent type="StepIn" actionid="3131" event="script" value="woe_tiles.lua"/> <movevent type="StepIn" actionid="3132" event="script" value="woe_tiles.lua"/> <movevent type="StepIn" actionid="3134" event="script" value="woe_tiles.lua"/> <movevent type="AddItem" tileitem="1" actionid="3134" event="script" value="woe_tiles.lua"/> Citar Data / Movements / Scripts / woe_tiles.lua dofile("./_woe.lua") function onStepIn(cid, item, position, fromPosition) if item.actionid == Castle.tiles then Woe.getInfo() if isPlayer(cid) then if Woe.isTime() then if getPlayerGuildId(cid) ~= 0 then if Woe.isRegistered(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Good Luck ".. getCreatureName(cid) .."!.") else Woe.moveBack(cid, fromPosition, "you are not registered use !guild") end else Woe.moveBack(cid, fromPosition, "only players with guild can enter.") end elseif getPlayerGuildId(cid) == infoLua[2] then if Woe.isRegistered(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "wellcome ".. getCreatureName(cid) ..".") else Woe.moveBack(cid, fromPosition, "you are not registered use !guild") end else Woe.moveBack(cid, fromPosition, "its not woe time and you are not member of ".. Woe.guildName() ..".") end end elseif item.actionid == Castle.portals then doTeleportThing(cid, Castle.PreToPos[math.random(1, 2)], false) elseif item.actionid == Castle.bases then if isPlayer(cid) then Woe.moveBack(cid, fromPosition, "you cant step there.") end end return true end function onAddItem(moveitem, tileitem, position) doRemoveItem(moveitem.uid, moveitem.type > 0 and moveitem.type or 1) return true end Citar Data / Talkactions / talkactions.xml <!-- WoE --> <talkaction words="/woe" event="script" value="woe.lua"/> <talkaction words="!recall" event="script" value="woe.lua"/> <talkaction words="!guild" event="script" value="register_woe.lua"/> Citar Data / Talkactions / Scripts / register_woe.lua dofile("./_woe.lua") function onSay(cid, words, param) if not Woe.isRegistered(cid) then if getPlayerGuildId(cid) > 0 then setPlayerStorageValue(cid, stor.register, 1) else doPlayerSendCancel(cid, "no guild.") end else doPlayerSendCancel(cid, "already registered.") end return true end Citar Data / Talkactions / Scripts / woe.lua dofile("./_woe.lua") local config = woe_config function onSay(cid, words, param) if words == "/woe" and param == "/!/SETUP" then Woe.setup() return true end Woe.getInfo() local myTable = {} for _, i in ipairs({"%d", "%B", "%Y", "%X"}) do table.insert(myTable, os.date(i, infoLua[4])) end if Woe.isStarted() then text = "time left = " .. Woe.timeToEnd().mins .. ":" .. Woe.timeToEnd().secs .. "\nActually the castle " .. Castle.name .. " is owned by " .. Woe.guildName() .. ".\n" .. Woe.breakerName() .. " broke the empe at "..myTable[1].." / "..myTable[2].." / "..myTable[3].." at time "..myTable[4].."." else text = "the last woe was won by " .. Woe.guildName() .. ".\n" .. Woe.breakerName() .. " broke the empe at "..myTable[1].." / "..myTable[2].." / "..myTable[3].." at time "..myTable[4].."." end if words == "/woe" then if getPlayerAccess(cid) >= config.accessToStar then if param == "on" then if Woe.isTime() ~= true then doBroadcastMessage("War of Emperium will start in next 5 minutes...", config.bcType) doBroadcastMessage("will have a duration of " .. config.timeToEnd .. " Minutes.", config.bcType) setGlobalStorageValue(stor.WoeTime, 1) else doPlayerSendCancel(cid, "WoE is already running.") end elseif param == "off" then if Woe.isTime() == true then doBroadcastMessage("WoE was canceled...", config.bcType) setGlobalStorageValue(stor.WoeTime, 0) setGlobalStorageValue(stor.Started, 0) if isCreature(getThingFromPos(Castle.empePos).uid) == TRUE then doRemoveCreature(getThingFromPos(Castle.empePos).uid) end if getThingFromPos(Castle.desde).itemid > 0 then doRemoveItem(getThingFromPos(Castle.desde).uid) end Woe.removePre() Woe.removePortals() else doPlayerSendCancel(cid, "WoE is not running.") end elseif param == "empe" then doSummonCreature("empe", Castle.empePos) elseif param == "go" then local newPos = Castle.empePos newPos.y = newPos.y + 1 doTeleportThing(cid, newPos, FALSE) elseif param == "info" then doPlayerPopupFYI(cid, text) else doPlayerSendCancel(cid, "not valid param.") end elseif getPlayerAccess(cid) < config.accessToStar then if param == "info" then doPlayerPopupFYI(cid, text) end else doPlayerSendCancel(cid, "not possible.") end elseif words == "!recall" then if Woe.isStarted() == true then if getPlayerGuildLevel(cid) == GUILDLEVEL_LEADER then if Woe.isInCastle(cid) == true then local members = Woe.getGuildMembers(getPlayerGuildId(cid)) if #members > 1 then if(exhaust(cid, stor.recall, config.recallTime) == 1) then for _, i in ipairs(members) do if getPlayerGuildLevel(i) ~= GUILDLEVEL_LEADER then local pos = getClosestFreeTile(cid, getCreaturePosition(cid), FALSE, TRUE) doTeleportThing(i, pos, FALSE) end end doCreatureSay(cid, "Emergency Recall", TALKTYPE_SAY) else doPlayerSendCancel(cid, "you can only use this every " .. config.recallTime / 60 .. " minutes.") end else doPlayerSendCancel(cid, "no members online.") end else doPlayerSendCancel(cid, "only can be used in the castle.") end else doPlayerSendCancel(cid, "you are not the leader.") end else doPlayerSendCancel(cid, "woe is not running.") end end return true end Enfim Galera Quero que os emperium apereça, porque não estão aparecendo, me ajudem porfavor precisando de voces mais que nunca "TibiaKing"...Enfim tambem tem um erro que percebo quando falo /woe off ou /woe on, mais acho que é quando falo /woe off O erro que apareçe é esse aqui Citar [28/08/2013 18:59:52] > Broadcasted message: "WoE was canceled...". [28/08/2013 18:59:52] [Error - TalkAction Interface] [28/08/2013 18:59:52] data/talkactions/scripts/woe.lua:onSay [28/08/2013 18:59:52] Description: [28/08/2013 18:59:52] (luaGetThingFromPos) Tile not found [28/08/2013 18:59:52] [Error - TalkAction Interface] [28/08/2013 18:59:52] data/talkactions/scripts/woe.lua:onSay [28/08/2013 18:59:52] Description: [28/08/2013 18:59:52] (luaGetThingFromPos) Tile not found [28/08/2013 18:59:53] [Error - TalkAction Interface] [28/08/2013 18:59:53] data/talkactions/scripts/woe.lua:onSay [28/08/2013 18:59:53] Description: [28/08/2013 18:59:53] (luaGetThingFromPos) Tile not found [28/08/2013 18:59:53] [Error - TalkAction Interface] [28/08/2013 18:59:53] data/talkactions/scripts/woe.lua:onSay [28/08/2013 18:59:53] Description: [28/08/2013 18:59:53] (luaGetThingFromPos) Tile not found [28/08/2013 18:59:53] [Error - TalkAction Interface] [28/08/2013 18:59:53] data/talkactions/scripts/woe.lua:onSay [28/08/2013 18:59:53] Description: [28/08/2013 18:59:53] (luaGetThingFromPos) Tile not found [28/08/2013 18:59:53] [Error - TalkAction Interface] [28/08/2013 18:59:53] data/talkactions/scripts/woe.lua:onSay [28/08/2013 18:59:53] Description: [28/08/2013 18:59:53] (luaGetThingFromPos) Tile not found Bom Meu Mapa é 8.6 Baiak Barao obs: se é que isso importa. Só que eu to reformulando todo o mapa , tentando muda os baiak de hoje parecem ser os mesmo, mais enfim galera vou dedicar amanha e pesso a ajuda de vcs pra mim conseguir lança meu 1 ot online, e quem sabe depois lanço o baiak aqui para voces ve como ta ficando ?!?! GENTE VO AGREDEÇE DESDE JÁ CONTO COM TODOS VCS MSM DE VDD, OBG. Att, Rodrigo
Postado Agosto 28, 2013 11 anos Está faltando um arquivo ! _woe.lua Esse aquivo é para esta na pasta do config.lua junto ao distro. 愛"A alma permanece em suas criações" 平(Não dou suporte por mensagem privada.)
Postado Agosto 29, 2013 11 anos Autor Jamison Collins , voce poderia me passa o arquivo _woe.lua, me explicando o que faze com detalhes porfavor? Ou onde consigo achar esse arquivo, agradeço. Eu tenho um arquivo _woe.lua que fica na mesma pasta de executar do ot, olha. Citar PASTA DO SERVER / _woe.lua dofile("./var.woe") local config = woe_config fileStore = true infoFile = 'tmp.woe' infoLua = {} Woe = {} Woe.__index = Woe function Woe.setup() db.query("DROP TABLE IF EXISTS `woe`;") db.query("CREATE TABLE `woe` (`id` INT( 11 ) NOT NULL AUTO_INCREMENT ,`started` INT( 11 ) NOT NULL ,`guild` INT( 11 ) NOT NULL ,`breaker` INT( 11 ) NOT NULL ,`time` INT( 11 ) NOT NULL ,PRIMARY KEY ( `id` ) ,UNIQUE (`id`)) ENGINE = MYISAM") doBroadcastMessage("DB Added [...]", config.bcType) if fileStore then local newFile = io.open(infoFile, "w") for _, i in ipairs({'started', 'guild', 'breaker', 'time'}) do newFile:write(i .. ' = 0 ;end;\n') end newFile:close() else db.query("DROP TABLE IF EXISTS `tmpwoe`;") db.query("CREATE TABLE `tmpwoe` (`started` INT( 11 ) NOT NULL ,`guild` INT( 11 ) NOT NULL ,`breaker` INT( 111 ) NOT NULL ,`time` INT( 1 ) NOT NULL) ENGINE = MYISAM ;") db.query("ALTER TABLE `tmpwoe` ADD `indexer` INT NOT NULL ") db.query("INSERT INTO `tmpwoe` (`started` ,`guild` ,`breaker` ,`time`, `indexer`)VALUES ('0', '0', '0', '0', '1');") end end function Woe.getInfo() if fileStore then local open = io.open(infoFile, "r") if open then for i in io.lines(infoFile) do for v, k in ipairs({'started', 'guild', 'breaker', 'time'}) do if (i:find(k)) then n = i:match(k .. '.*') infoLua[v] = tonumber(n:sub(n:find('=') + 2, n:find(';end;') - 2)) end end end open:close() end else for v, k in ipairs({'started', 'guild', 'breaker', 'time'}) do local tmp = db.getResult("SELECT " .. k .. " FROM `tmpwoe` WHERE `indexer` = '1';") infoLua[v] = tmp:getDataInt(k) tmp:free() end end end function Woe.updateInfo(tab) if fileStore then local open = io.open(infoFile, "w") if open then for k, i in ipairs({'started', 'guild', 'breaker', 'time'}) do open:write(i .. ' = ' .. tab[k] .. ' ;end;\n') end open:close() end else for v, k in ipairs({'started', 'guild', 'breaker', 'time'}) do db.query("UPDATE `tmpwoe` SET " .. k .. " = " .. tab[v] .. " WHERE `indexer` = 1;") end end end function Woe.save() Woe.getInfo() db.query("INSERT INTO `woe` (`started`, `guild`, `breaker`, `time`) VALUES (" .. infoLua[1] .. ", " .. infoLua[2] .. ", " .. infoLua[3] .. ", " .. infoLua[4] .. ");") end function Woe.getGuildName(id) local res = db.getResult("SELECT `name` FROM `guilds` WHERE `id` = " .. id .. ";") if (res:getID() ~= -1) then ret = res:getDataString('name') res:free() end return ret end function Woe.breakerName() Woe.getInfo() return infoLua[3] ~= 0 and getPlayerNameByGUID(infoLua[3]) or 'None' end function Woe.guildName() Woe.getInfo() return infoLua[2] ~= 0 and Woe.getGuildName(infoLua[2]) or 'Nones' end function Woe.startTime() Woe.getInfo() return os.date("%d %B %Y %X ", infoLua[1]) end function Woe.breakTime() Woe.getInfo() return os.date("%d %B %Y %X ", infoLua[4]) end function Woe.timeToEnd() Woe.getInfo() local myTable = {} for k, i in ipairs({"%M", "%S"}) do myTable[k] = os.date(i, os.difftime(os.time(), infoLua[1])) end return {mins = ((config.timeToEnd - 1) - myTable[1]), secs = (60 - myTable[2])} end function Woe.moveBack(cid, fromPosition, text) doTeleportThing(cid, fromPosition, TRUE) doPlayerSendCancel(cid, text) end function Woe.getGuildMembers(id) local members = {} for _, i in ipairs(getPlayersOnline()) do if id == getPlayerGuildId(i) then table.insert(members, i) end end return members end function Woe.deco(text) for _, i in ipairs(Castle.decoraciones) do doItemSetAttribute(i, "description", text) end end function Woe.removePortals() for _, i in ipairs(Castle.PrePortalsPos) do if (getThingFromPos(i).itemid > 0) then doRemoveItem(getThingFromPos(i).uid) end end end function Woe.removePre() for _, i in ipairs(Castle.PreEmpes) do if (isCreature(getThingFromPos(i).uid) == true) then doRemoveCreature(getThingFromPos(i).uid) end end end function Woe.checkPre() local Count = 0 for _, i in ipairs(Castle.PreEmpes) do if (isCreature(getThingFromPos(i).uid) == false) then Count = Count + 1 end end return (Count == #Castle.PreEmpes) end function Woe.isTime() return (getGlobalStorageValue(stor.WoeTime) == 1) end function Woe.isStarted() return (getGlobalStorageValue(stor.Started) == 1) end function Woe.isRegistered(cid) return (getPlayerStorageValue(cid, stor.register) == 1) end function Woe.isInCastle(cid) local myPos = getCreaturePosition(cid) if (myPos.x >= Castle.salas.a.fromx and myPos.x <= Castle.salas.a.tox) then if (myPos.y >= Castle.salas.a.fromy and myPos.y <= Castle.salas.a.toy) then if isInArray({Castle.salas.a.z, Castle.salas.b.z, Castle.salas.c.z}, myPos.z) then return true end end end return false end function Woe.expulsar(guild, fromx, tox, fromy, toy, z, outpos) for _x = fromx, tox do for _y = fromy, toy do local player = getThingFromPos({x = _x, y = _y, z = z, stackpos = 253}).uid if (isPlayer(player) == true) then if (getPlayerGuildId(player) ~= guild) then doTeleportThing(player, outpos, false) end end end end end -- extras function doSetItemActionId(uid, action) doItemSetAttribute(uid, "aid", action) end function exhaust(cid, storevalue, exhausttime) -- Exhaustion function by Alreth, v1.1 2006-06-24 01:31 -- Returns 1 if not exhausted and 0 if exhausted newExhaust = os.time() oldExhaust = getPlayerStorageValue(cid, storevalue) if (oldExhaust == nil or oldExhaust < 0) then oldExhaust = 0 end if (exhausttime == nil or exhausttime < 0) then exhausttime = 1 end diffTime = os.difftime(newExhaust, oldExhaust) if (diffTime >= exhausttime or diffTime < 0) then setPlayerStorageValue(cid, storevalue, newExhaust) return 1 else return 0 end end --new guard_pos = { {x = 55, y = 31, z = 5}, {x = 55, y = 30, z = 5}, {x = 55, y = 29, z = 5}, {x = 55, y = 28, z = 5}, {x = 55, y = 27, z = 5}, {x = 55, y = 26, z = 5}, {x = 55, y = 25, z = 5} } function Woe.check() for storage = 24504, 24511 do local pid = getGlobalStorageValue(storage) if isCreature(pid) then return false end end return true end function Woe.summon() for k, i in ipairs(guard_pos) do local pid = doSummonCreature("guard", i) setGlobalStorageValue(24503 + k, pid) end end function Woe.remove() for storage = 24504, 24511 do local pid = getGlobalStorageValue(storage) if isCreature(pid) then doRemoveCreature(pid) end end end Editado Agosto 29, 2013 11 anos por Rodrigo0lg (veja o histórico de edições)
Postado Agosto 29, 2013 11 anos Autor Em 29/08/2013 em 08:04, Meu Ovo disse: DOWNLODER Meu Ovo , testei o que voce me mando mesmo assim os emperium não estão aparecendo, mais eu consigo sumonalos com o comando /m empe...so que eles aparecem com o nome empe, pre1 e pre2, alem de emperium, me ajudem pfv pesso que de uma olhadinha na onde pode ta o erro nos meus arquivos, e o erro quando fala /woe off ta mesma coisa olha. Citar [29/08/2013 05:21:42] > Broadcasted message: "WoE was canceled...". [29/08/2013 05:21:42] [Error - TalkAction Interface] [29/08/2013 05:21:42] data/talkactions/scripts/woe.lua:onSay [29/08/2013 05:21:42] Description: [29/08/2013 05:21:42] (luaGetThingFromPos) Tile not found [29/08/2013 05:21:42] [Error - TalkAction Interface] [29/08/2013 05:21:42] data/talkactions/scripts/woe.lua:onSay [29/08/2013 05:21:43] Description: [29/08/2013 05:21:43] (luaGetThingFromPos) Tile not found [29/08/2013 05:21:43] [Error - TalkAction Interface] [29/08/2013 05:21:43] data/talkactions/scripts/woe.lua:onSay [29/08/2013 05:21:43] Description: [29/08/2013 05:21:43] (luaGetThingFromPos) Tile not found [29/08/2013 05:21:43] [Error - TalkAction Interface] [29/08/2013 05:21:43] data/talkactions/scripts/woe.lua:onSay [29/08/2013 05:21:43] Description: [29/08/2013 05:21:43] (luaGetThingFromPos) Tile not found [29/08/2013 05:21:43] [Error - TalkAction Interface] [29/08/2013 05:21:43] data/talkactions/scripts/woe.lua:onSay [29/08/2013 05:21:43] Description: [29/08/2013 05:21:43] (luaGetThingFromPos) Tile not found Editado Agosto 29, 2013 11 anos por Rodrigo0lg (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.