Postado Junho 18, 2018 7 anos Primeiro erro acontece no evento CTF, vou deixar o script aqui pra darem uma olhada se possível. actions,scripts,events,ctf.lua: local conditionRedx = createConditionObject(CONDITION_OUTFIT) setConditionParam(conditionRedx, CONDITION_PARAM_TICKS, -1) addOutfitCondition(conditionRedx, {lookType = 143, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94, lookTypeEx = 0, lookAddons = 3}) local conditionGreen = createConditionObject(CONDITION_OUTFIT) setConditionParam(conditionGreen, CONDITION_PARAM_TICKS, -1) addOutfitCondition(conditionGreen, {lookType = 134, lookHead = 82, lookBody = 82, lookLegs = 82, lookFeet = 82, lookTypeEx = 0, lookAddons = 3}) local conditionRedf = createConditionObject(CONDITION_OUTFIT) setConditionParam(conditionRedf, CONDITION_PARAM_TICKS, -1) addOutfitCondition(conditionRedf, {lookType = 335, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94, lookTypeEx = 0, lookAddons = 3}) local conditionGreenf = createConditionObject(CONDITION_OUTFIT) setConditionParam(conditionGreenf, CONDITION_PARAM_TICKS, -1) addOutfitCondition(conditionGreenf, {lookType = 335, lookHead = 82, lookBody = 82, lookLegs = 82, lookFeet = 82, lookTypeEx = 0, lookAddons = 3}) function onUse(cid, item, frompos, item2, topos) if item.uid == 2499 and getPlayerStorageValue(cid, 72) == 1 then setPlayerStorageValue(cid, 82, os.time()+120) addEvent(flag, 2000, cid) doRemoveItem(getTileItemById({x = 1352, y = 1000, z = 6}, 1437).uid, 1) addEvent(voltabandeira, 120000, cid) setGlobalStorageValue(11, 1) doAddCondition(cid, conditionRedf) doTeleportThing(cid, {x=1353, y=1000, z=6}) for _, pid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(pid, 71) == 1 or getPlayerStorageValue(pid, 72) == 1 then doPlayerSendTextMessage(pid, MESSAGE_STATUS_WARNING, "[CTF] O " .. getCreatureName(cid) .. " roubou a bandeira do time verde!") end end elseif item.uid == 2500 and getPlayerStorageValue(cid, 71) == 1 then setPlayerStorageValue(cid, 83, os.time()+120) addEvent(flag, 2000, cid) setGlobalStorageValue(12, 1) doRemoveItem(getTileItemById({x = 1404, y = 1000, z = 6}.uid, 1) addEvent(voltabandeira, 120000, cid) doAddCondition(cid, conditionGreenf) doTeleportThing(cid, {x=1403, y=1000, z=6}) for _, pid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(pid, 71) == 1 or getPlayerStorageValue(pid, 72) == 1 then doPlayerSendTextMessage(pid, MESSAGE_STATUS_WARNING, "[CTF] O " .. getCreatureName(cid) .. " roubou a bandeira do time vermelho!") end end end return true end function flag (cid) if getPlayerStorageValue(cid, 82) >= os.time() or getPlayerStorageValue(cid, 83) >= os.time() then doSendAnimatedText(getThingPos(cid), 'FLAG!', COLOR_DARKYELLOW) addEvent(flag, 3000, cid) end return true end function voltabandeira (cid) if getPlayerStorageValue(cid, 72) == 1 and getPlayerStorageValue(cid, 82) == os.time() then setPlayerStorageValue(cid, 82, 0) doAddCondition(cid, conditionRedx) setGlobalStorageValue(11, 0) doItemSetAttribute(doCreateItem(1437, 1, {x = 1351, y = 1000, z = 6, stackpos = 1}), "uid", 2499) for _, pid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(pid, 71) == 1 or getPlayerStorageValue(pid, 72) == 1 then doPlayerSendTextMessage(pid, MESSAGE_STATUS_WARNING, "[CTF] O " .. getCreatureName(cid) .. " ficou muito tempo com a bandeira verde e ela foi devolvida para sua base.") end end elseif getPlayerStorageValue(cid, 71) == 1 and getPlayerStorageValue(cid, 83) == os.time() then doItemSetAttribute(doCreateItem(1435, 1, {x = 1405, y = 1000, z = 6, stackpos = 1}), "uid", 2500) setPlayerStorageValue(cid, 83, 0) setGlobalStorageValue(12, 0) doAddCondition(cid, conditionGreen) for _, pid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(pid, 71) == 1 or getPlayerStorageValue(pid, 72) == 1 then doPlayerSendTextMessage(pid, MESSAGE_STATUS_WARNING, "[CTF] O " .. getCreatureName(cid) .. " ficou muito tempo com a bandeira vermelha e ela foi devolvida para sua base.") end end end return true end Neste segundo erro acontece na script do evento BATTLEFIELD, vou deixar também a script afetada: function onThink(interval, lastExecution) local _Lib_Battle_Days = { ["Monday"] = { ["12:00"] = {players = 10}, ["14:00"] = {players = 14}, ["09:15"] = {players = 18}, ["23:00"] = {players = 26}, }, ["Tuesday"] = { ["12:00"] = {players = 10}, ["14:00"] = {players = 14}, ["09:15"] = {players = 18}, ["23:00"] = {players = 26}, }, ["Thursday"] = { ["12:00"] = {players = 10}, ["14:00"] = {players = 14}, ["09:15"] = {players = 18}, ["23:00"] = {players = 26}, }, ["Friday"] = { ["12:00"] = {players = 10}, ["14:00"] = {players = 14}, ["09:15"] = {players = 18}, ["23:00"] = {players = 26}, }, ["Saturday"] = { ["12:00"] = {players = 10}, ["16:27"] = {players = 14}, ["09:15"] = {players = 18}, ["23:00"] = {players = 26}, }, ["Wednesday"] = { ["12:00"] = {players = 10}, ["13:39"] = {players = 14}, ["09:15"] = {players = 18}, ["23:00"] = {players = 26}, }, ["Sunday"] = { ["12:00"] = {players = 10}, ["14:00"] = {players = 14}, ["09:15"] = {players = 18}, ["23:00"] = {players = 26}, } } if _Lib_Battle_Days[os.date("%A")] then local hours = tostring(os.date("%X")):sub(1, 5) local tb = _Lib_Battle_Days[os.date("%A")][hours] if tb and (tb.players % 2 == 0) then local tp = doCreateItem(1387, 1, _Lib_Battle_Info.tpPos) doItemSetAttribute(tp, "aid", 45000) CheckEvent(_Lib_Battle_Info.limit_Time) doBroadcastMessage("[BattleField Event] was opened and We are waiting "..tb.players.." Players! Team divided into "..((tb.players)/2).." VS "..((tb.players)/2), MESSAGE_EVENT_ADVANCE) setGlobalStorageValue(_Lib_Battle_Info.storage_count, tb.players) return true end end return true end Desde já agradeço.
Postado Junho 18, 2018 7 anos 1° local conditionRedx = createConditionObject(CONDITION_OUTFIT) setConditionParam(conditionRedx, CONDITION_PARAM_TICKS, -1) addOutfitCondition(conditionRedx, {lookType = 143, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94, lookTypeEx = 0, lookAddons = 3}) local conditionGreen = createConditionObject(CONDITION_OUTFIT) setConditionParam(conditionGreen, CONDITION_PARAM_TICKS, -1) addOutfitCondition(conditionGreen, {lookType = 134, lookHead = 82, lookBody = 82, lookLegs = 82, lookFeet = 82, lookTypeEx = 0, lookAddons = 3}) local conditionRedf = createConditionObject(CONDITION_OUTFIT) setConditionParam(conditionRedf, CONDITION_PARAM_TICKS, -1) addOutfitCondition(conditionRedf, {lookType = 335, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94, lookTypeEx = 0, lookAddons = 3}) local conditionGreenf = createConditionObject(CONDITION_OUTFIT) setConditionParam(conditionGreenf, CONDITION_PARAM_TICKS, -1) addOutfitCondition(conditionGreenf, {lookType = 335, lookHead = 82, lookBody = 82, lookLegs = 82, lookFeet = 82, lookTypeEx = 0, lookAddons = 3}) function onUse(cid, item, frompos, item2, topos) if item.uid == 2499 and getPlayerStorageValue(cid, 72) == 1 then setPlayerStorageValue(cid, 82, os.time()+120) addEvent(flag, 2000, cid) doRemoveItem(getTileItemById({x = 1352, y = 1000, z = 6}, 1437).uid, 1) addEvent(voltabandeira, 120000, cid) setGlobalStorageValue(11, 1) doAddCondition(cid, conditionRedf) doTeleportThing(cid, {x=1353, y=1000, z=6}) for _, pid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(pid, 71) == 1 or getPlayerStorageValue(pid, 72) == 1 then doPlayerSendTextMessage(pid, MESSAGE_STATUS_WARNING, "[CTF] O " .. getCreatureName(cid) .. " roubou a bandeira do time verde!") end end elseif item.uid == 2500 and getPlayerStorageValue(cid, 71) == 1 then setPlayerStorageValue(cid, 83, os.time()+120) addEvent(flag, 2000, cid) setGlobalStorageValue(12, 1) doRemoveItem(getTileItemById({x = 1404, y = 1000, z = 6}).uid, 1) addEvent(voltabandeira, 120000, cid) doAddCondition(cid, conditionGreenf) doTeleportThing(cid, {x=1403, y=1000, z=6}) for _, pid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(pid, 71) == 1 or getPlayerStorageValue(pid, 72) == 1 then doPlayerSendTextMessage(pid, MESSAGE_STATUS_WARNING, "[CTF] O " .. getCreatureName(cid) .. " roubou a bandeira do time vermelho!") end end end return true end function flag (cid) if getPlayerStorageValue(cid, 82) >= os.time() or getPlayerStorageValue(cid, 83) >= os.time() then doSendAnimatedText(getThingPos(cid), 'FLAG!', COLOR_DARKYELLOW) addEvent(flag, 3000, cid) end return true end function voltabandeira (cid) if getPlayerStorageValue(cid, 72) == 1 and getPlayerStorageValue(cid, 82) == os.time() then setPlayerStorageValue(cid, 82, 0) doAddCondition(cid, conditionRedx) setGlobalStorageValue(11, 0) doItemSetAttribute(doCreateItem(1437, 1, {x = 1351, y = 1000, z = 6, stackpos = 1}), "uid", 2499) for _, pid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(pid, 71) == 1 or getPlayerStorageValue(pid, 72) == 1 then doPlayerSendTextMessage(pid, MESSAGE_STATUS_WARNING, "[CTF] O " .. getCreatureName(cid) .. " ficou muito tempo com a bandeira verde e ela foi devolvida para sua base.") end end elseif getPlayerStorageValue(cid, 71) == 1 and getPlayerStorageValue(cid, 83) == os.time() then doItemSetAttribute(doCreateItem(1435, 1, {x = 1405, y = 1000, z = 6, stackpos = 1}), "uid", 2500) setPlayerStorageValue(cid, 83, 0) setGlobalStorageValue(12, 0) doAddCondition(cid, conditionGreen) for _, pid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(pid, 71) == 1 or getPlayerStorageValue(pid, 72) == 1 then doPlayerSendTextMessage(pid, MESSAGE_STATUS_WARNING, "[CTF] O " .. getCreatureName(cid) .. " ficou muito tempo com a bandeira vermelha e ela foi devolvida para sua base.") end end end return true end sobre o battlefield, está faltando a LIB dele. [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
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.