Jump to content

Scripting Simple Task [ERRO] Ajuda não entrega as recompensas


Recommended Posts

Opa gente pelo amor de deus me ajudem nesse mod, eu coloquei novas task e parou de funcionar, agora não consigo fazer funciona, ele funciona tudo na vdd, porém quando os cara termina as task ele não entrega os itens, alguem pode me ajudar? e da esse erro na distro

Spoiler

Simple Task Mod

 

<?xml version="1.0" encoding="ISO-8859-1"?> 
<mod name="Simple Task" version="4.0" author="Vodkart" contact="tibiaking.com" enabled="yes"> 
<config name="task_func"><![CDATA[
task_sys = {
    [1] = {name = "rat", start = 176201, monsters_list = {"rat","wolf"}, level = 8, count = 60, points = 0, gradrationPoints = 3, items = {}, reward = {11312,1}, exp = 2000, money = 2000},
    [2] = {name = "gamaden", start = 176202, monsters_list = {"gamaden","gamaden","gamaden"}, level = 150, count = 800, points = 0, gradrationPoints = 4, items = {}, reward = {11313,1}, exp = 2500, money = 3000},
    [3] = {name = "mutation", start = 176203, monsters_list = {"mutation creature"}, level = 200, count = 1100, points = 0, gradrationPoints = 5, items = {}, reward = {11314,1}, exp = 3000, money = 3000},
    [4] = {name = "morcego", start = 176204, monsters_list = {"morcego","morcego"}, level = 200, count = 1200, points = 1, gradrationPoints = 6, items = {}, reward = {11315,1}, exp = 10000, money = 5000},
    [5] = {name = "anbu Do Fogo", start = 176205, monsters_list = {"anbu do fogo"}, level = 300, count = 1250, points = 1, gradrationPoints = 7, items = {}, reward = {11316,1}, exp = 10000, money = 5000},
    [6] = {name = "renegade white", start = 176206, monsters_list = {"renegade white"}, level = 350, count = 1280, points = 2, gradrationPoints = 8, items = {}, reward = {11317,1}, exp = 10000, money = 5000},
    [7] = {name = "skeleto", start = 176207, monsters_list = {"skeleto"}, level = 400, count = 1290, points = 3, gradrationPoints = 9, items = {}, reward = {11318,1}, exp = 12000, money = 7000},
    [8] = {name = "orochimaru", start = 176208, monsters_list = {"orochimaru"}, level = 36, count = 1300, points = 3, gradrationPoints = 10, items = {}, reward = {11319,1}, exp = 8000, money = 8000},
    [9] = {name = "raikage Bracelet", start = 176209, monsters_list = {"gamahiro"}, level = 450, count = 1350, points = 2, gradrationPoints = 11, items = {}, reward = {11454,1}, exp = 12000, money = 8200},
    [10] = {name = "samehada", start = 176210, monsters_list = {"gaara sc2"}, level = 500, count = 1380, points = 3, gradrationPoints = 12, items = {}, reward = {2440,1}, exp = 0, money = 0},
    [11] = {name = "skin sasuke", start = 176211, monsters_list = {"great bison"}, level = 550, count = 1400, points = 2, gradrationPoints = 13, items = {}, reward = {11336,1}, exp = 8000, money = 8500},
    [12] = {name = "madara", start = 176212, monsters_list = {"madara","madara"}, level = 560, count = 1500, points = 1, gradrationPoints = 14,  items = {}, reward = {11320,1}, exp = 9000, money = 9000},
    [13] = {name = "gunbai" ,start = 176213, monsters_list = {"madara"}, level = 570, count = 1600, points = 3, gradrationPoints = 15, items = {}, reward = {2511,1}, exp = 20000, money = 15000},
    [14] = {name = "pain boss" ,start = 176214, monsters_list = {"pain boss"}, level = 580, count = 1700, points = 3, gradrationPoints = 16, items = {}, reward = {11454,1}, exp = 25000, money = 11000},
    [15] = {name = "katon element" ,start = 176215, monsters_list = {"skeleto"}, level = 590, count = 1800, points = 0, gradrationPoints = 17, items = {}, reward = {11427,1}, exp = 20000, money = 32000},
    [16] = {name = "suiton element" ,start = 176216, monsters_list = {"renegade"}, level = 600, count = 1900, points = 3, gradrationPoints = 18, items = {}, reward = {11429,1}, exp = 22000, money = 15000},
    [17] = {name = "raiton element" ,start = 176217, monsters_list = {"mutation creature"}, level = 610, count = 2000, points = 3, gradrationPoints = 19, items = {}, reward = {11430}, exp = 25000, money = 18000},
    [17] = {name = "doton element" ,start = 176218, monsters_list = {"electro"}, level = 620, count = 2100, points = 3, gradrationPoints = 20, items = {}, reward = {11430}, exp = 25000, money = 15000}
}
daily_task = {
    [1] = {name = "daily ogres" ,monsters_list = {"ogres"}, count = 900, taskPoints = 1, gradrationPoints = 15, reward = {1960,1}, exp = 5000, money = 10000},
    [2] = {name = "daily suiton element" ,monsters_list = {"tigre"}, count = 1200, taskPoints = 1, gradrationPoints = 15, reward = {11428,1}, exp = 9000, money = 12000},
    [3] = {name = "daily esqueleto" ,monsters_list = {"esqueleto"}, count = 600, taskPoints = 2, gradrationPoints = 15, reward = {11429,1}, exp = 9000, money = 15000},
    [4] = {name = "daily fuuton element" ,monsters_list = {"false zetsu","false zetsu"}, count = 1000, taskPoints = 20, gradrationPoints = 16, reward = {11429,1}, exp = 2000, money = 10000},
    [5] = {name = "daily raiton element" ,monsters_list = {"gamahiro"}, count = 1500, taskPoints = 1, gradrationPoints = 20, reward = {11430,1}, exp = 20000, money = 25000},
    [6] = {name = "daily doton element" ,monsters_list = {"salamandra"}, count = 2000, taskPoints =1, gradrationPoints = 20, reward = {11431,1}, exp = 100000, money = 160000},
    [7] = {name = "daily jya" ,monsters_list = {"jya"}, count = 700, taskPoints = 1, gradrationPoints = 25, reward = {}, exp = 130000, money = 200000},
    [8] = {name = "daily skin kaneki" ,monsters_list = {"demoniac"}, count = 600, taskPoints = 1, gradrationPoints = 25, reward = {11330,1}, exp = 130000, money = 200000},
    [9] = {name = "daily skin zoro" ,monsters_list = {"strong"}, count = 500, taskPoints = 1, gradrationPoints = 25, reward = {11342,1}, exp = 140000, money = 200000},
    [10] = {name = "daily skin natsu" ,monsters_list = {"squartou brock"}, count = 550, taskPoints = 1, gradrationPoints = 30, reward = {11332,1}, exp = 130000, money = 200000},
    [11] = {name = "daily skin lee sin" ,monsters_list = {"squartou hatch"}, count = 500, taskPoints = 1, gradrationPoints = 30, reward = {11334}, exp = 120000, money = 200000},
    [12] = {name = "daily skin luffy" ,monsters_list = {"squartou"}, count = 500, taskPoints = 1, gradrationPoints = 30, reward = {11341,1}, exp = 110000, money = 200000},
    [13] = {name = "daily skin ichigo" ,monsters_list = {"raposa"}, count = 1, taskPoints = 1, gradrationPoints = 35, reward = {11333,1}, exp = 100000, money = 200000},
    [14] = {name = "daily otsutsuki part1" ,monsters_list = {"demoniac"}, count = 1000, taskPoints = 1, gradrationPoints = 35, reward = {11325,1}, exp = 100000, money = 200000},
    [15] = {name = "daily otsutsuki part2" ,monsters_list = {"squartou"}, count = 1100, taskPoints = 1, gradrationPoints = 35, reward = {11326,1}, exp = 100000, money = 200000},
    [16] = {name = "daily otsutsuki part3" ,monsters_list = {"squartou hatch"}, count = 1200, taskPoints = 1, gradrationPoints = 35, reward = {11327,1}, exp = 100000, money = 200000},
    [17] = {name = "daily otsutsuki part4" ,monsters_list = {"squartou brock"}, count = 1300, taskPoints = 1, gradrationPoints = 35, reward = {11328,1}, exp = 100000, money = 200000},
    [18] = {name = "daily otsutsuki part5" ,monsters_list = {"strong"}, count = 1400, taskPoints = 1, gradrationPoints = 35, reward = {11329,1}, exp = 100000, money = 200000}
}
task_sys_storages = {176601, 176602, 176603, 176604, 176605, 176606, 176607, 176608} -- task, taskPoints, count, daily task, daily count, daily time , daily start, contador
function getTaskMission(cid)
    return getPlayerStorageValue(cid,task_sys_storages[1]) < 0 and 1 or getPlayerStorageValue(cid,task_sys_storages[1])
end
function getDailyTaskMission(cid)
    return getPlayerStorageValue(cid,task_sys_storages[4]) < 0 and 1 or getPlayerStorageValue(cid,task_sys_storages[4])
end
function getTaskPoints(cid)
    return getPlayerStorageValue(cid,task_sys_storages[2]) < 0 and 0 or getPlayerStorageValue(cid,task_sys_storages[2])
end
function doRandomDailyTask(cid)
    local t = {
        [{6,49}] = {1,3},
        [{50,79}] = {4,6},
        [{80,129}] = {7,9},
        [{130,math.huge}] = {10,12}
    }
    for a , b in pairs(t) do
        if getPlayerLevel(cid) >= a[1] and getPlayerLevel(cid) <= a[2] then
            return math.random(b[1], b[2])
        end
    end
    return 0
end
function GetRankTask(cid)
    local ranks = {
        [{1, 20}] = "Huntsman",
        [{21, 50}] = "Ranger",
        [{51, 100}] = "Big Game Hunter",
        [{101, 200}] = "Trophy Hunter",    
        [{201, math.huge}] = "Elite Hunter"
    }
    for v , r in pairs(ranks) do
        if getTaskPoints(cid) >= v[1] and getTaskPoints(cid) <= v[2] then
            return r
        end
    end
    return 0
end
function getItemsFromList(items)
    local str = ''
    if table.maxn(items) > 0 then
        for i = 1, table.maxn(items) do
            str = str .. items[i][2] .. ' ' .. getItemNameById(items[i][1])
            if i ~= table.maxn(items) then str = str .. ', '
            end
        end
    end
    return str
end
function doRemoveItemsFromList(cid,items)
    local count = 0
    if table.maxn(items) > 0 then
        for i = 1, table.maxn(items) do
            if getPlayerItemCount(cid,items[i][1]) >= items[i][2] then
            count = count + 1 end
        end
    end
    if count == table.maxn(items) then
        for i = 1, table.maxn(items) do doPlayerRemoveItem(cid,items[i][1],items[i][2]) end
    else
        return false
    end
    return true
end
function getMonsterFromList(monster)
    local str = ''
    if #monster > 0 then
        for i = 1, #monster do
            str = str .. monster[i]
            if i ~= #monster then str = str .. ', ' end
        end
    end
    return str
end
function GiveRewardsTask(cid, items)
    local backpack = doPlayerAddItem(cid, 1999, 1) -- backpackID
    for _, i_i in ipairs(items) do
        local item, amount = i_i[1],i_i[2]
        if isItemStackable(item) or amount == 1 then
            doAddContainerItem(backpack, item, amount)
        else
            for i = 1, amount do
                doAddContainerItem(backpack, item, 1)
            end
        end
    end
end
function isSummon(cid)
    if(not isCreature(cid)) then
        return false
    end
    return getCreatureMaster(cid) ~= cid
end
]]></config>
<event type="login" name="TaskLogin" event="script"><![CDATA[
function onLogin(cid)
    registerCreatureEvent(cid, "KillTask")
    return true
end]]></event>
<talkaction words="/task;!task" event="buffer"><![CDATA[
domodlib('task_func')
param,task,daily = param:lower(), getTaskMission(cid), getDailyTaskMission(cid)
if isInArray({"counter","contador"},param) then
    setPlayerStorageValue(cid, task_sys_storages[8], getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and 1 or 0)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Task System] O contador foi "..(getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and "ativado" or "desativado")..".") return true
elseif isInArray({"daily","diaria"},param) then
    if not daily_task[daily] or getPlayerStorageValue(cid, task_sys_storages[7]) <= 0 then
        doPlayerSendCancel(cid, "Desculpe, Mas você não está em nenhuma Daily Task.") return true
    elseif getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() <= 0 and getPlayerStorageValue(cid, task_sys_storages[5]) < daily_task[daily].count then
        doPlayerSendCancel(cid,"Desculpe, Mas Você não terminou a Daily Task a tempo! Por favor volte ao npc e comece uma nova Daily Task!") return true
    end
    return doShowTextDialog(cid, 8983, "[->] CURRENT DAILY TASK INFO [<-]\n\nNome: "..daily_task[daily].name.."\nProgresso: ["..(getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and 0 or getPlayerStorageValue(cid, task_sys_storages[5])).."/"..daily_task[daily].count.."]\nPrazo para entrega: "..os.date("%d %B %Y %X ", getPlayerStorageValue(cid,task_sys_storages[6])).."\nMonstros para caçar: "..getMonsterFromList(daily_task[daily].monsters_list).."\n\n[->] CURRENT TASK REWARDS [<-]\n\nMoney: "..(daily_task[daily].money > 0 and daily_task[daily].money or 0).."\nExperiencia: "..(daily_task[daily].exp > 0 and daily_task[daily].exp or 0).."\nTask Points: "..daily_task[daily].taskPoints.. "\nGraduação Points: " ..daily_task[daily].gradrationPoints .."\nItems: "..(#daily_task[daily].reward > 0 and getItemsFromList(daily_task[daily].reward) or "Nenhum item de recompensa")..".")
end
if not task_sys[task] or getPlayerStorageValue(cid, task_sys[task].start) <= 0 then
    doPlayerSendCancel(cid, "você não está em nenhuma task.") return true
end
return doShowTextDialog(cid, 8983, "-> CURRENT TASK ["..getTaskMission(cid).."/"..#task_sys.."] <-\n\nTask Name: "..task_sys[task].name.."\nTask Level: "..task_sys[task].level.."\nTask Progress: ["..(getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and 0 or getPlayerStorageValue(cid, task_sys_storages[3])).."/"..task_sys[task].count.."]\nMonster To Hunt: "..getMonsterFromList(task_sys[task].monsters_list)..".\nItens Para Entrega: "..(#task_sys[task].items > 0 and getItemsFromList(task_sys[task].items) or "Nenhum")..".\n\n[->] CURRENT TASK REWARDS [<-]\n\nReward Money: "..(task_sys[task].money > 0 and task_sys[task].money or 0).."\nReward Experiencia: "..(task_sys[task].exp > 0 and task_sys[task].exp or 0).."\nTask Points: "..task_sys[task].taskPoints.."\nGraduação Points: " ..task_sys[task].gradrationPoints .."\nRedward Items: "..(#task_sys[task].reward > 0 and getItemsFromList(task_sys[task].reward) or "Nenhum item de recompensa")..".")
]]></talkaction>
<event type="kill" name="KillTask" event="script"><![CDATA[
domodlib('task_func')
function onKill(cid, target)
    if isPlayer(cid) and isMonster(target) then
        local t,daily = task_sys[getTaskMission(cid)], daily_task[getDailyTaskMission(cid)]
        if t and getPlayerStorageValue(cid, t.start) > 0 and isInArray(t.monsters_list, getCreatureName(target):lower()) and getPlayerStorageValue(cid, task_sys_storages[3]) < t.count then
            setPlayerStorageValue(cid, task_sys_storages[3], getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and 1 or (getPlayerStorageValue(cid, task_sys_storages[3])+1))
            if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and getPlayerStorageValue(cid, task_sys_storages[3]) < t.count then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] defeated Total [" .. getPlayerStorageValue(cid, task_sys_storages[3]) .. "/" .. t.count .. "] da Task do " .. t.name .. ".")
            end
            if getPlayerStorageValue(cid, task_sys_storages[3]) >= t.count then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] Parabéns! Você terminou a Task do "..t.name..", volte ao npc parece receber sua recompensa.")
            end
        end
        if daily and getPlayerStorageValue(cid, task_sys_storages[7]) > 0 and getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() >= 0 and isInArray(daily.monsters_list, getCreatureName(target):lower()) and getPlayerStorageValue(cid, task_sys_storages[5]) < daily.count then
            setPlayerStorageValue(cid, task_sys_storages[5], getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and 1 or (getPlayerStorageValue(cid, task_sys_storages[5])+1))
            if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and getPlayerStorageValue(cid, task_sys_storages[5]) < daily.count then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Daily Task System] defeated Total [" .. getPlayerStorageValue(cid, task_sys_storages[5]) .. "/" .. daily.count .. "] da Task do " .. daily.name .. ".")
            end
            if getPlayerStorageValue(cid, task_sys_storages[5]) >= daily.count then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Daily Task System] Parabéns! Você terminou a Task do "..daily.name..", volte ao npc parece receber sua recompensa.")
            end
        end
    end
    return true
end]]></event>

<action actionid="45250" event="script"><![CDATA[
domodlib('task_func')
function onUse(cid, item, frompos, item2, topos)
local amount = 100
if GRADRATION.getPoints (cid) < amount then
return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"Você só pode passar se tiver " .. amount .. " Graduação Points.") 
end
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, topos, true)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Welcome, a Jinchuuriki Florest!")
return true
end]]></action>
</mod>

 

Spoiler

NPC

 

domodlib('task_func')
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
function creatureSayCallback(cid, type, msg)
    if(not npcHandler:isFocused(cid)) then
        return false
    end
    local talkUser,msg, str,rst = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid, msg:lower(),"",""
    local task,daily, hours = getTaskMission(cid),getDailyTaskMission(cid), 24
    if isInArray({"task","tasks","missao","mission"}, msg) then
        if task_sys[task] then
            if getPlayerStorageValue(cid, task_sys[task].start) <= 0 then
                if getPlayerLevel(cid) >= task_sys[task].level then
                    setPlayerStorageValue(cid, task_sys[task].start, 1)
                    npcHandler:say("[Task Avus] Parabéns, agora você esta participando da Task do "..task_sys[task].name.." e devera matar "..task_sys[task].count.." desta lista: "..getMonsterFromList(task_sys[task].monsters_list)..". "..(#task_sys[task].items > 0 and "Ah e por favor me traga "..getItemsFromList(task_sys[task].items).." para mim." or "").."" , cid)
                else
                    npcHandler:say("Desculpe, Mas você precisa alcançar level "..task_sys[task].level.." para poder participar da Task dos "..task_sys[task].name.."!", cid)
                end
            else
                npcHandler:say("Desculpe, Mas você atualmente esta na task "..task_sys[task].name..". você pode {entregar} caso já tenha terminado.", cid)
            end
        else
            npcHandler:say("Desculpe, Mas por enquanto nao tenho mais nenhuma task para você!", cid)
        end
    elseif isInArray({"diaria","daili","daily","dayli","diario"}, msg) then
        if getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() > 0 then
            npcHandler:say("Desculpe, você deve esperar ate "..os.date("%d %B %Y %X ", getPlayerStorageValue(cid,task_sys_storages[6])).." para iniciar uma nova task diaria!", cid) return true
        elseif daily_task[daily] and getPlayerStorageValue(cid, task_sys_storages[5]) >= daily_task[daily].count then
            npcHandler:say("Desculpe, você tem task para {entregar} !", cid) return true
        end
        local r = doRandomDailyTask(cid)
        if r == 0 then
            npcHandler:say("Desculpe, mas você nao tem level para completar nenhuma Task diaria.", cid) return true
        end
        setPlayerStorageValue(cid, task_sys_storages[4], r)
        setPlayerStorageValue(cid, task_sys_storages[6], os.time()+hours*3600)
        setPlayerStorageValue(cid, task_sys_storages[7], 1)
        setPlayerStorageValue(cid, task_sys_storages[5], 0)
       local dtask = daily_task[r]
        npcHandler:say("[Daily Task Avus] Parabéns, agora você esta participando da Task Diaria do "..dtask.name.." e devera matar "..dtask.count.." monstros desta lista: "..getMonsterFromList(dtask.monsters_list).." ate "..os.date("%d %B %Y %X ", getPlayerStorageValue(cid,task_sys_storages[6]))..". Boa sorte!" , cid)
    elseif isInArray({"receber","reward","recompensa","report","reportar","entregar","entrega"}, msg) then
        local v, k = task_sys[task], daily_task[daily] 
        if v then -- original task
            if getPlayerStorageValue(cid, v.start) > 0 then
                if getPlayerStorageValue(cid,task_sys_storages[3]) >= v.count then
                    if #v.items > 0 and not doRemoveItemsFromList(cid, v.items) then
                        npcHandler:say("Desculpe, Mas você tambem precisa entregar os itens desta lista: "..getItemsFromList(v.items), cid) return true
                    end
             if v.exp > 0 then doPlayerAddExp(cid, v.exp) str = str.."".. (str == "" and "" or ", ") .." "..v.exp.." de exp" end
                 if v.taskPoints > 0 then setPlayerStorageValue(cid, task_sys_storages[2], (getTaskPoints(cid)+v.taskPoints)) str = str.."".. (str == "" and "" or ", ") .." + "..v.taskPoints.."task points" end
                 if v.gradrationPoints > 0 then GRADRATION.addPoints(cid, v.gradrationPoints) str = str.."".. (str == "" and "" or ", ") .." + "..v.gradrationPoints.."Graduação points" end
                 if v.money > 0 then doPlayerAddMoney(cid, v.money) str = str.."".. (str == "" and "" or ", ") ..""..v.money.." gps" end
                 if table.maxn(v.reward) > 0 then GiveRewardsTask(cid, v.reward) str = str.."".. (str == "" and "" or ", ") ..""..getItemsFromList(v.reward) end
                    npcHandler:say("Obrigado pela sua ajuda Recompensas: "..(str == "" and "nenhuma" or ""..str.."").." por ter completado a task do "..v.name, cid)
                    setPlayerStorageValue(cid, task_sys_storages[3], 0)
                    setPlayerStorageValue(cid, task_sys_storages[1], (task+1))
                else
                    npcHandler:say("Desculpe, Mas você ainda nao terminou a sua task do "..v.name..". Preciso que mate mais "..(getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and v.count or -(getPlayerStorageValue(cid,task_sys_storages[3])-v.count)).." Destes monstros terriveis!", cid)
                end
            end
        end 
        if k then -- daily task
            if getPlayerStorageValue(cid, task_sys_storages[7]) > 0 then
                if getPlayerStorageValue(cid, task_sys_storages[5]) >= k.count then
                if k.exp > 0 then doPlayerAddExp(cid, k.exp) rst = rst.."".. (rst == "" and "" or ", ") .." "..k.exp.." de exp" end
                 if k.taskPoints > 0 then setPlayerStorageValue(cid, task_sys_storages[2], (getTaskPoints(cid)+k.taskPoints)) rst = rst.."".. (rst == "" and "" or ", ") .." + "..k.taskPoints.."task points" end
                 if v.gradrationPoints > 0 then GRADRATION.addPoints(cid, v.gradrationPoints) str = str.."".. (str == "" and "" or ", ") .." + "..v.gradrationPoints.."Gradration points" end
                 if k.money > 0 then doPlayerAddMoney(cid, k.money) rst = rst.."".. (rst == "" and "" or ", ") ..""..k.money.." gps" end
                 if table.maxn(k.reward) > 0 then GiveRewardsTask(cid, k.reward) rst = rst.."".. (rst == "" and "" or ", ") ..""..getItemsFromList(k.reward) end
                    npcHandler:say("Obrigado pela sua ajuda! Recompensas: "..(rst == "" and "nenhuma" or ""..rst.."").." por ter completado a task do "..k.name, cid)
                    setPlayerStorageValue(cid, task_sys_storages[4], 0)
                    setPlayerStorageValue(cid, task_sys_storages[5], 0)
                    setPlayerStorageValue(cid, task_sys_storages[7], 0)
                    else
                    npcHandler:say("Desculpe, Mas você ainda nao terminou a sua task diaria do "..k.name..". Preciso que mate mais "..(getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and k.count or -(getPlayerStorageValue(cid,task_sys_storages[5])-k.count)).." Destes monstros!", cid)
                end
            end
        end
    elseif msg == "no" then 
        selfSay("Tudo bem então", cid) 
        talkState[talkUser] = 0 
        npcHandler:releaseFocus(cid) 
    end
    return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

erro.png

Link to post
Share on other sites

muito comum... 

 

errado:

reward = {11316,1}

correto:

reward = {{11316,1}}

 

 

sua tabela refeita:

 

task_sys = {
	[1] = {name = "rat", start = 176201, monsters_list = {"rat","wolf"}, level = 8, count = 60, points = 0, gradrationPoints = 3, items = {}, reward = {{11312,1}}, exp = 2000, money = 2000},
	[2] = {name = "gamaden", start = 176202, monsters_list = {"gamaden","gamaden","gamaden"}, level = 150, count = 800, points = 0, gradrationPoints = 4, items = {}, reward = {{11313,1}}, exp = 2500, money = 3000},
	[3] = {name = "mutation", start = 176203, monsters_list = {"mutation creature"}, level = 200, count = 1100, points = 0, gradrationPoints = 5, items = {}, reward = {{11314,1}}, exp = 3000, money = 3000},
	[4] = {name = "morcego", start = 176204, monsters_list = {"morcego","morcego"}, level = 200, count = 1200, points = 1, gradrationPoints = 6, items = {}, reward = {{11315,1}}, exp = 10000, money = 5000},
	[5] = {name = "anbu Do Fogo", start = 176205, monsters_list = {"anbu do fogo"}, level = 300, count = 1250, points = 1, gradrationPoints = 7, items = {}, reward = {{11316,1}}, exp = 10000, money = 5000},
	[6] = {name = "renegade white", start = 176206, monsters_list = {"renegade white"}, level = 350, count = 1280, points = 2, gradrationPoints = 8, items = {}, reward = {{11317,1}}, exp = 10000, money = 5000},
	[7] = {name = "skeleto", start = 176207, monsters_list = {"skeleto"}, level = 400, count = 1290, points = 3, gradrationPoints = 9, items = {}, reward = {{11318,1}}, exp = 12000, money = 7000},
	[8] = {name = "orochimaru", start = 176208, monsters_list = {"orochimaru"}, level = 36, count = 1300, points = 3, gradrationPoints = 10, items = {}, reward = {{11319,1}}, exp = 8000, money = 8000},
	[9] = {name = "raikage Bracelet", start = 176209, monsters_list = {"gamahiro"}, level = 450, count = 1350, points = 2, gradrationPoints = 11, items = {}, reward = {{11454,1}}, exp = 12000, money = 8200},
	[10] = {name = "samehada", start = 176210, monsters_list = {"gaara sc2"}, level = 500, count = 1380, points = 3, gradrationPoints = 12, items = {}, reward = {{2440,1}}, exp = 0, money = 0},
	[11] = {name = "skin sasuke", start = 176211, monsters_list = {"great bison"}, level = 550, count = 1400, points = 2, gradrationPoints = 13, items = {}, reward = {{11336,1}}, exp = 8000, money = 8500},
	[12] = {name = "madara", start = 176212, monsters_list = {"madara","madara"}, level = 560, count = 1500, points = 1, gradrationPoints = 14, items = {}, reward = {{11320,1}}, exp = 9000, money = 9000},
	[13] = {name = "gunbai" ,start = 176213, monsters_list = {"madara"}, level = 570, count = 1600, points = 3, gradrationPoints = 15, items = {}, reward = {{2511,1}}, exp = 20000, money = 15000},
	[14] = {name = "pain boss" ,start = 176214, monsters_list = {"pain boss"}, level = 580, count = 1700, points = 3, gradrationPoints = 16, items = {}, reward = {{11454,1}}, exp = 25000, money = 11000},
	[15] = {name = "katon element" ,start = 176215, monsters_list = {"skeleto"}, level = 590, count = 1800, points = 0, gradrationPoints = 17, items = {}, reward = {{11427,1}}, exp = 20000, money = 32000},
	[16] = {name = "suiton element" ,start = 176216, monsters_list = {"renegade"}, level = 600, count = 1900, points = 3, gradrationPoints = 18, items = {}, reward = {{11429,1}}, exp = 22000, money = 15000},
	[17] = {name = "raiton element" ,start = 176217, monsters_list = {"mutation creature"}, level = 610, count = 2000, points = 3, gradrationPoints = 19, items = {}, reward = {{11430,1}}, exp = 25000, money = 18000},
	[17] = {name = "doton element" ,start = 176218, monsters_list = {"electro"}, level = 620, count = 2100, points = 3, gradrationPoints = 20, items = {}, reward = {{11430,1}}, exp = 25000, money = 15000}
}
daily_task = {
	[1] = {name = "daily ogres" ,monsters_list = {"ogres"}, count = 900, taskPoints = 1, gradrationPoints = 15, reward = {{1960,1}}, exp = 5000, money = 10000},
	[2] = {name = "daily suiton element" ,monsters_list = {"tigre"}, count = 1200, taskPoints = 1, gradrationPoints = 15, reward = {{11428,1}}, exp = 9000, money = 12000},
	[3] = {name = "daily esqueleto" ,monsters_list = {"esqueleto"}, count = 600, taskPoints = 2, gradrationPoints = 15, reward = {{11429,1}}, exp = 9000, money = 15000},
	[4] = {name = "daily fuuton element" ,monsters_list = {"false zetsu","false zetsu"}, count = 1000, taskPoints = 20, gradrationPoints = 16, reward = {{11429,1}}, exp = 2000, money = 10000},
	[5] = {name = "daily raiton element" ,monsters_list = {"gamahiro"}, count = 1500, taskPoints = 1, gradrationPoints = 20, reward = {{11430,1}}, exp = 20000, money = 25000},
	[6] = {name = "daily doton element" ,monsters_list = {"salamandra"}, count = 2000, taskPoints =1, gradrationPoints = 20, reward = {{11431,1}}, exp = 100000, money = 160000},
	[7] = {name = "daily jya" ,monsters_list = {"jya"}, count = 700, taskPoints = 1, gradrationPoints = 25, reward = {}, exp = 130000, money = 200000},
	[8] = {name = "daily skin kaneki" ,monsters_list = {"demoniac"}, count = 600, taskPoints = 1, gradrationPoints = 25, reward = {{11330,1}}, exp = 130000, money = 200000},
	[9] = {name = "daily skin zoro" ,monsters_list = {"strong"}, count = 500, taskPoints = 1, gradrationPoints = 25, reward = {{11342,1}}, exp = 140000, money = 200000},
	[10] = {name = "daily skin natsu" ,monsters_list = {"squartou brock"}, count = 550, taskPoints = 1, gradrationPoints = 30, reward = {{11332,1}}, exp = 130000, money = 200000},
	[11] = {name = "daily skin lee sin" ,monsters_list = {"squartou hatch"}, count = 500, taskPoints = 1, gradrationPoints = 30, reward = {{11334,1}}, exp = 120000, money = 200000},
	[12] = {name = "daily skin luffy" ,monsters_list = {"squartou"}, count = 500, taskPoints = 1, gradrationPoints = 30, reward = {{11341,1}}, exp = 110000, money = 200000},
	[13] = {name = "daily skin ichigo" ,monsters_list = {"raposa"}, count = 1, taskPoints = 1, gradrationPoints = 35, reward = {{11333,1}}, exp = 100000, money = 200000},
	[14] = {name = "daily otsutsuki part1" ,monsters_list = {"demoniac"}, count = 1000, taskPoints = 1, gradrationPoints = 35, reward = {{11325,1}}, exp = 100000, money = 200000},
	[15] = {name = "daily otsutsuki part2" ,monsters_list = {"squartou"}, count = 1100, taskPoints = 1, gradrationPoints = 35, reward = {{11326,1}}, exp = 100000, money = 200000},
	[16] = {name = "daily otsutsuki part3" ,monsters_list = {"squartou hatch"}, count = 1200, taskPoints = 1, gradrationPoints = 35, reward = {{11327,1}}, exp = 100000, money = 200000},
	[17] = {name = "daily otsutsuki part4" ,monsters_list = {"squartou brock"}, count = 1300, taskPoints = 1, gradrationPoints = 35, reward = {{11328,1}}, exp = 100000, money = 200000},
	[18] = {name = "daily otsutsuki part5" ,monsters_list = {"strong"}, count = 1400, taskPoints = 1, gradrationPoints = 35, reward = {{11329,1}}, exp = 100000, money = 200000}
}

 

Edited by Vodkart (see edit history)

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

Dota System 8.6 Com Buffs Automáticos + MAPA (100%) - PVP

Link para Downloadhttps://www.4shared.com/rar/SMta8CQ8fi/Dota_Venda.html?

 

[+]--------------------------------------[+]-------------------------------------------[+]

 

DISCORDvodkart#6090

 

Link to post
Share on other sites

Em 24/03/2021 em 10:15, Vodkart disse:

muito comum... 

 

errado:


reward = {11316,1}

correto:


reward = {{11316,1}}

 

 

sua tabela refeita:

 


task_sys = {
	[1] = {name = "rat", start = 176201, monsters_list = {"rat","wolf"}, level = 8, count = 60, points = 0, gradrationPoints = 3, items = {}, reward = {{11312,1}}, exp = 2000, money = 2000},
	[2] = {name = "gamaden", start = 176202, monsters_list = {"gamaden","gamaden","gamaden"}, level = 150, count = 800, points = 0, gradrationPoints = 4, items = {}, reward = {{11313,1}}, exp = 2500, money = 3000},
	[3] = {name = "mutation", start = 176203, monsters_list = {"mutation creature"}, level = 200, count = 1100, points = 0, gradrationPoints = 5, items = {}, reward = {{11314,1}}, exp = 3000, money = 3000},
	[4] = {name = "morcego", start = 176204, monsters_list = {"morcego","morcego"}, level = 200, count = 1200, points = 1, gradrationPoints = 6, items = {}, reward = {{11315,1}}, exp = 10000, money = 5000},
	[5] = {name = "anbu Do Fogo", start = 176205, monsters_list = {"anbu do fogo"}, level = 300, count = 1250, points = 1, gradrationPoints = 7, items = {}, reward = {{11316,1}}, exp = 10000, money = 5000},
	[6] = {name = "renegade white", start = 176206, monsters_list = {"renegade white"}, level = 350, count = 1280, points = 2, gradrationPoints = 8, items = {}, reward = {{11317,1}}, exp = 10000, money = 5000},
	[7] = {name = "skeleto", start = 176207, monsters_list = {"skeleto"}, level = 400, count = 1290, points = 3, gradrationPoints = 9, items = {}, reward = {{11318,1}}, exp = 12000, money = 7000},
	[8] = {name = "orochimaru", start = 176208, monsters_list = {"orochimaru"}, level = 36, count = 1300, points = 3, gradrationPoints = 10, items = {}, reward = {{11319,1}}, exp = 8000, money = 8000},
	[9] = {name = "raikage Bracelet", start = 176209, monsters_list = {"gamahiro"}, level = 450, count = 1350, points = 2, gradrationPoints = 11, items = {}, reward = {{11454,1}}, exp = 12000, money = 8200},
	[10] = {name = "samehada", start = 176210, monsters_list = {"gaara sc2"}, level = 500, count = 1380, points = 3, gradrationPoints = 12, items = {}, reward = {{2440,1}}, exp = 0, money = 0},
	[11] = {name = "skin sasuke", start = 176211, monsters_list = {"great bison"}, level = 550, count = 1400, points = 2, gradrationPoints = 13, items = {}, reward = {{11336,1}}, exp = 8000, money = 8500},
	[12] = {name = "madara", start = 176212, monsters_list = {"madara","madara"}, level = 560, count = 1500, points = 1, gradrationPoints = 14, items = {}, reward = {{11320,1}}, exp = 9000, money = 9000},
	[13] = {name = "gunbai" ,start = 176213, monsters_list = {"madara"}, level = 570, count = 1600, points = 3, gradrationPoints = 15, items = {}, reward = {{2511,1}}, exp = 20000, money = 15000},
	[14] = {name = "pain boss" ,start = 176214, monsters_list = {"pain boss"}, level = 580, count = 1700, points = 3, gradrationPoints = 16, items = {}, reward = {{11454,1}}, exp = 25000, money = 11000},
	[15] = {name = "katon element" ,start = 176215, monsters_list = {"skeleto"}, level = 590, count = 1800, points = 0, gradrationPoints = 17, items = {}, reward = {{11427,1}}, exp = 20000, money = 32000},
	[16] = {name = "suiton element" ,start = 176216, monsters_list = {"renegade"}, level = 600, count = 1900, points = 3, gradrationPoints = 18, items = {}, reward = {{11429,1}}, exp = 22000, money = 15000},
	[17] = {name = "raiton element" ,start = 176217, monsters_list = {"mutation creature"}, level = 610, count = 2000, points = 3, gradrationPoints = 19, items = {}, reward = {{11430,1}}, exp = 25000, money = 18000},
	[17] = {name = "doton element" ,start = 176218, monsters_list = {"electro"}, level = 620, count = 2100, points = 3, gradrationPoints = 20, items = {}, reward = {{11430,1}}, exp = 25000, money = 15000}
}
daily_task = {
	[1] = {name = "daily ogres" ,monsters_list = {"ogres"}, count = 900, taskPoints = 1, gradrationPoints = 15, reward = {{1960,1}}, exp = 5000, money = 10000},
	[2] = {name = "daily suiton element" ,monsters_list = {"tigre"}, count = 1200, taskPoints = 1, gradrationPoints = 15, reward = {{11428,1}}, exp = 9000, money = 12000},
	[3] = {name = "daily esqueleto" ,monsters_list = {"esqueleto"}, count = 600, taskPoints = 2, gradrationPoints = 15, reward = {{11429,1}}, exp = 9000, money = 15000},
	[4] = {name = "daily fuuton element" ,monsters_list = {"false zetsu","false zetsu"}, count = 1000, taskPoints = 20, gradrationPoints = 16, reward = {{11429,1}}, exp = 2000, money = 10000},
	[5] = {name = "daily raiton element" ,monsters_list = {"gamahiro"}, count = 1500, taskPoints = 1, gradrationPoints = 20, reward = {{11430,1}}, exp = 20000, money = 25000},
	[6] = {name = "daily doton element" ,monsters_list = {"salamandra"}, count = 2000, taskPoints =1, gradrationPoints = 20, reward = {{11431,1}}, exp = 100000, money = 160000},
	[7] = {name = "daily jya" ,monsters_list = {"jya"}, count = 700, taskPoints = 1, gradrationPoints = 25, reward = {}, exp = 130000, money = 200000},
	[8] = {name = "daily skin kaneki" ,monsters_list = {"demoniac"}, count = 600, taskPoints = 1, gradrationPoints = 25, reward = {{11330,1}}, exp = 130000, money = 200000},
	[9] = {name = "daily skin zoro" ,monsters_list = {"strong"}, count = 500, taskPoints = 1, gradrationPoints = 25, reward = {{11342,1}}, exp = 140000, money = 200000},
	[10] = {name = "daily skin natsu" ,monsters_list = {"squartou brock"}, count = 550, taskPoints = 1, gradrationPoints = 30, reward = {{11332,1}}, exp = 130000, money = 200000},
	[11] = {name = "daily skin lee sin" ,monsters_list = {"squartou hatch"}, count = 500, taskPoints = 1, gradrationPoints = 30, reward = {{11334,1}}, exp = 120000, money = 200000},
	[12] = {name = "daily skin luffy" ,monsters_list = {"squartou"}, count = 500, taskPoints = 1, gradrationPoints = 30, reward = {{11341,1}}, exp = 110000, money = 200000},
	[13] = {name = "daily skin ichigo" ,monsters_list = {"raposa"}, count = 1, taskPoints = 1, gradrationPoints = 35, reward = {{11333,1}}, exp = 100000, money = 200000},
	[14] = {name = "daily otsutsuki part1" ,monsters_list = {"demoniac"}, count = 1000, taskPoints = 1, gradrationPoints = 35, reward = {{11325,1}}, exp = 100000, money = 200000},
	[15] = {name = "daily otsutsuki part2" ,monsters_list = {"squartou"}, count = 1100, taskPoints = 1, gradrationPoints = 35, reward = {{11326,1}}, exp = 100000, money = 200000},
	[16] = {name = "daily otsutsuki part3" ,monsters_list = {"squartou hatch"}, count = 1200, taskPoints = 1, gradrationPoints = 35, reward = {{11327,1}}, exp = 100000, money = 200000},
	[17] = {name = "daily otsutsuki part4" ,monsters_list = {"squartou brock"}, count = 1300, taskPoints = 1, gradrationPoints = 35, reward = {{11328,1}}, exp = 100000, money = 200000},
	[18] = {name = "daily otsutsuki part5" ,monsters_list = {"strong"}, count = 1400, taskPoints = 1, gradrationPoints = 35, reward = {{11329,1}}, exp = 100000, money = 200000}
}

 

 

 

DEU ERRO DNOVO COLOQUEI AS TAG Q VC PASSOU MANO, SERÁ QUE NÃO É ESSE GRADRATIOB POINTS? Q TA BUGANDO? TIPO ELA ANTES TAVA FUNCIONANDO DAI CHEGO NA TASK NUMERO 9 PAIN BOSS PARO DE FUNCIONAR DESDE ENTÃO NÃO PEGA, MAIS ESSE GRAD POINTS FOI COLOCADO POR UM AMIGO MEU NÃO TINHA NO SEU SISTEMA GRADRATION É POINTS NO MEU JOGO TENDEU.

 

 

 

 

5151.png

Link to post
Share on other sites

2 horas atrás, KR33 disse:

 

 

DEU ERRO DNOVO COLOQUEI AS TAG Q VC PASSOU MANO, SERÁ QUE NÃO É ESSE GRADRATIOB POINTS? Q TA BUGANDO? TIPO ELA ANTES TAVA FUNCIONANDO DAI CHEGO NA TASK NUMERO 9 PAIN BOSS PARO DE FUNCIONAR DESDE ENTÃO NÃO PEGA, MAIS ESSE GRAD POINTS FOI COLOCADO POR UM AMIGO MEU NÃO TINHA NO SEU SISTEMA GRADRATION É POINTS NO MEU JOGO TENDEU.

 

 

 

 

5151.png

rapaz nem vi esse graduation points é vdd kkkk vc que alterou o sistema?

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

Dota System 8.6 Com Buffs Automáticos + MAPA (100%) - PVP

Link para Downloadhttps://www.4shared.com/rar/SMta8CQ8fi/Dota_Venda.html?

 

[+]--------------------------------------[+]-------------------------------------------[+]

 

DISCORDvodkart#6090

 

Link to post
Share on other sites

2 horas atrás, Vodkart disse:

rapaz nem vi esse graduation points é vdd kkkk vc que alterou o sistema?

 nn foi um amigo que fez pra mim, agora começo bugar não consigo colocar novas task antes funcionava somente 8 agr nenhuma, tipo tem como alterar esse task points por pontos grad?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By Apache
      TFS 0.4
      Bom tenho esse sistema de castle, esta funciona bem, o único defeito é que ele não entrega os 30% de exp a mais
      para os membros da guild dominante, vou postar o script se alguém conseguir ajuda a resolver agradeço.
       
      action alavanca: 
       
      creaturescripts login.lua
       
       
      globalevents
       
      não achei necessario postar pois só o open e o close do sistema
       
      Lib
       
       
       
       
       
    • By MIzakinha
      Salve senhoras e senhores!

      Estou com um script no meu servidor de tasks diarias, ele funciona normalmente. Só que ele da a mesma task para TODOS os players do server. Tem uma tabela com várias opções de monstros para o player matar, ele pega dentro dessa tabela, 2 monstros aleatórios e da para o player escolher um deles. Só que ele da as MESMAS opções para TODOS os players. Alguém pode me ajudar a identificar o local para fazer com que seja aleatório para cada player diferente? Vou deixar o script aqui.

       
       
    • By Bruce Pereira
      Eu quero colocar uma storage nesse jutsu de dash, para poder criar outros jutsus, eu criei 3 dashs em meu servidor mas ta bugando. exemplo: uso o dash 1 aparece o efeito do dash 2, uso dash 2 e aparece o efeito do dash 3, eu tentei colocar uma storage mas não consegui.
       
      script sem edição minha \/
       
       
    • By stauro
      Alguém poderia me ajudar a colocar bonus exp no meu cast system?
       
       
       
       
       
       
       
       function onSay(cid, words, param, channel) local tmp = param:explode(" ") if not(tmp[1]) then return doPlayerSendCancel(cid, "Parameters needed") end if tmp[1] == "on" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast has started.") doPlayerSetCastState(cid, true) doPlayerSave(cid) elseif getPlayerCast(cid).status == false then return doPlayerSendCancel(cid, "Your cast has to be running for this action.") elseif tmp[1] == "off" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast has ended.") doPlayerSetCastState(cid, false) doPlayerSave(cid) elseif isInArray({"pass", "password", "p"}, tmp[1]) then if not(tmp[2]) then return doPlayerSendCancel(cid, "You need to set a password") end if tmp[2]:len() > 10 then return doPlayerSendCancel(cid, "The password is too long. (Max.: 10 letters)") end if tmp[2] == "off" then doPlayerSetCastPassword(cid, "") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast password has been removed.") else doPlayerSetCastPassword(cid, tmp[2]) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast password was set to: " .. tmp[2]) end elseif isInArray({"desc", "description", "d"}, tmp[1]) then local d = param:gsub(tmp[1]..(tmp[2] and " " or ""), "") if not(d) or d:len() == 0 then return doPlayerSendCancel(cid, "You need to specify a description.") end if d:len() > 50 then return doPlayerSendCancel(cid, "The description is too long. (Max.: 50 letters)") end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast description was set to: ") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, d) doPlayerSetCastDescription(cid, d) elseif tmp[1] == "ban" then if not(tmp[2]) then return doPlayerSendCancel(cid, "Specify a spectator that you want to ban.") end if doPlayerAddCastBan(cid, tmp[2]) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' has been banned.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' could not be banned.") end elseif tmp[1] == "unban" then if not(tmp[2]) then return doPlayerSendCancel(cid, "Specify the person you want to unban.") end if doPlayerRemoveCastBan(cid, tmp[2]) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' has been unbanned.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' could not be unbanned.") end elseif param == "bans" then local t = getCastBans(cid) local text = "Cast Bans:\n\n" for k, v in pairs(t) do text = text .. "*" .. v.name .. "\n" end if text == "Cast Bans:\n\n" then text = text .. "No bans." end doShowTextDialog(cid, 5958, text) elseif tmp[1] == "mute" then if not(tmp[2]) then return doPlayerSendCancel(cid, "Specify a spectator that you want to mute.") end if doPlayerAddCastMute(cid, tmp[2]) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' has been muted.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' could not be muted.") end elseif tmp[1] == "unmute" then if not(tmp[2]) then return doPlayerSendCancel(cid, "Specify the person you want to unmute.") end if doPlayerRemoveCastMute(cid, tmp[2]) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' has been unmuted.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' could not be unmuted.") end elseif param == "mutes" then local t = getCastMutes(cid) local text = "Cast Mutes:\n\n" for k, v in pairs(t) do text = text .. "*" .. v.name .. "\n" end if text == "Cast Bans:\n\n" then text = text .. "No mutes." end doShowTextDialog(cid, 5958, text) elseif param == "viewers" then local t = getCastViewers(cid) local text, count = "Cast Viewers:\n#Viewers: |COUNT|\n\n", 0 for _,v in pairs(t) do count = count + 1 text = text .. "*" .. v.name .."\n" end if text == "Cast Viewers:\n#Viewers: |COUNT|\n\n" then text = "Cast Viewers:\n\nNo viewers." end text = text:gsub("|COUNT|", count) doShowTextDialog(cid, 5958, text) elseif param == "status" then local t, c = getCastViewers(cid), getPlayerCast(cid) local count = 0 for _,v in pairs(t) do count = count + 1 end doShowTextDialog(cid, 5958, "Cast Status:\n\n*Viewers:\n " .. count .. "\n*Description:\n "..(c.description == "" and "Not set" or c.description).."\n*Password:\n " .. (c.password == "" and "Not set" or "Set - '"..c.password.."'")) elseif param == "update" then if getPlayerStorageValue(cid, 656544) > os.time() then return doPlayerSendCancel(cid, "You used this command lately. Wait: " .. (getPlayerStorageValue(cid, 656544)-os.time()) .. " sec.") end doPlayerSave(cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The cast settings have been updated.") doPlayerSetStorageValue(cid, 656544, os.time()+60) end return true end  
       
       
    • By stauro
      Alguém sabe como adicionar atributo de sorte no item? Tipo  "Luck + 2%"
      Não consigo achar nenhum item que tenha pra eu copiar, os itens que eu sei não estão com esse atributo
       
       
       
       
         
       
       
      Resolvido.
  • Recently Browsing   0 members

    No registered users viewing this page.


×
×
  • Create New...

Important Information

Confirmação de Termo