Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Diga em poucas palavras a base utilizada (Nome do servidor ou nome do website).

Ex. TFS 1.3;

Base: 

 

otx

Qual erro está surgindo/O que você procura?

[3/4/2018 12:35:5] [Error - NpcScript Interface] 
[3/4/2018 12:35:5] data/npc/scripts/simple_task.lua:onCreatureSay
[3/4/2018 12:35:5] Description: 
[3/4/2018 12:35:5] [string "task_sys = {..."]:122: attempt to index local 'i_i' (a number value)
[3/4/2018 12:35:5] stack traceback:
[3/4/2018 12:35:5]     [string "task_sys = {..."]:122: in function 'GiveRewardsTask'
[3/4/2018 12:35:5]     data/npc/scripts/simple_task.lua:58: in function 'callback'
[3/4/2018 12:35:5]     data/npc/lib/npcsystem/npchandler.lua:456: in function 'onCreatureSay'
[3/4/2018 12:35:5]     data/npc/scripts/simple_task.lua:8: in function <data/npc/scripts/simple_task.lua:8>

Você tem o código disponível? Se tiver publique-o aqui:

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 System] Parabens, agora voce 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 voce precisa alcancar level "..task_sys[task].level.." para poder participar da Task dos "..task_sys[task].name.."!", cid)
                end
            else
                npcHandler:say("Desculpe, Mas voce atualmente esta na task "..task_sys[task].name..". Voce pode {entregar} caso ja tenha terminado.", cid)
            end
        else
            npcHandler:say("Desculpe, Mas por enquanto nao tenho mais nenhuma task para voce!", 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, voce 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, voce tem task para {entregar} !", cid) return true
        end
        local r = doRandomDailyTask(cid)
        if r == 0 then
            npcHandler:say("Desculpe, mas voce 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 System] Parabens, agora voce esta participando da Task Diaria do "..dtask.name.." e devera matar "..dtask.count.." monstros desta lista: "..getMonsterFromList(dtask.monsters_list).." até "..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 voce 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.points > 0 then setPlayerStorageValue(cid, task_sys_storages[2], (getTaskPoints(cid)+v.points)) str = str.."".. (str == "" and "" or ", ") .." + "..v.points.."task 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 voce 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, v.exp) rst = rst.."".. (rst == "" and "" or ", ") .." "..k.exp.." de exp" end
                 if k.points > 0 then setPlayerStorageValue(cid, task_sys_storages[2], (getTaskPoints(cid)+k.points)) rst = rst.."".. (rst == "" and "" or ", ") .." + "..k.points.."task 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 voce 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 entao", cid) 
        talkState[talkUser] = 0 
        npcHandler:releaseFocus(cid) 
    end
    return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 

 

Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.

Editado por eder santos (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

se vc usa tfs 1.3 não vai funcionar mesmo porque não existe pasta mods nele kkk

 

essa versão de código foi feita pata 8.6

 

remova o npc e o arquivo lua dele

vodkart_logo.png

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

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites
8 minutos atrás, Vodkart disse:

se vc usa tfs 1.3 não vai funcionar mesmo porque não existe pasta mods nele kkk

 

essa versão de código foi feita pata 8.6

 

remova o npc e o arquivo lua dele

nao eu coloquei errado eu uso otx 0.4 e um baiak8.60 

Editado por eder santos (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
1 hora atrás, eder santos disse:

nao eu coloquei errado eu uso otx 0.4 e um baiak8.60 

 

 

então certifique-se de que o MOD está la na pasta MODS.

 

qualquer coisa só seguir estes passos:

 

 

http://www.tibiaking.com/forum/forums/topic/77489-86-task-system-40-task-system-daily-task-system/

vodkart_logo.png

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

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites
8 minutos atrás, Vodkart disse:

 

então certifique-se de que o MOD está la na pasta MODS.

 

qualquer coisa só seguir estes passos:

 

 

http://www.tibiaking.com/forum/forums/topic/77489-86-task-system-40-task-system-daily-task-system/

o erro e o seguinte quando eu completo a 1 task ele me da o premio e xp blz mais quanto termino a segunda task que vo entrega o npc nao fala nao mais recebo o premio e a xp normal e se eu continua falando [entregar] ele continua me dando o premio e a xp toda veis que falo o erro e esse aqui 

[3/4/2018 12:17:28] [Error - NpcScript Interface] 
[3/4/2018 12:17:28] data/npc/scripts/simple_task.lua:onCreatureSay
[3/4/2018 12:17:28] Description: 
[3/4/2018 12:17:28] [string "task_sys = {..."]:122: attempt to index local 'i_i' (a number value)
[3/4/2018 12:17:28] stack traceback:
[3/4/2018 12:17:28]     [string "task_sys = {..."]:122: in function 'GiveRewardsTask'
[3/4/2018 12:17:28]     data/npc/scripts/simple_task.lua:58: in function 'callback'
[3/4/2018 12:17:28]     data/npc/lib/npcsystem/npchandler.lua:456: in function 'onCreatureSay'
[3/4/2018 12:17:28]     data/npc/scripts/simple_task.lua:8: in function <data/npc/scripts/simple_task.lua:8>

 

https://pastebin.com/S7cGqKHP

https://pastebin.com/fQA5K3rG

https://pastebin.com/37SqJzN6

 

ai esta as script da task por favor me ajuda quero muito esse sistema no meu servidor eu passei muito tempo  editando monstros hunts ate uma cit pra essa task ai fui ver ta com esse erro

Link para o post
Compartilhar em outros sites

entendi onde está o erro, vai ter que arrumar ele todo...

 

sabe onde está essa parte no seu mods:

 

por exemplo ta task [2]

 

[2] = {name = "Dragon", start = 176202, monsters_list = {"Dragon","Dragon Lord","Donate Dragon Lord","Dragon Lord Vip III","Castle Dragon Lord","Wyrm","Undead Dragon"}, level = 100, count = 1, points = 2, items = {}, reward = {7440}, exp = 8000000, money = 60000000},

 

a parte do 'reward' está errada, o certo seria:

 

reward = {{7440,1}},

 

ficando assim:

 

[2] = {name = "Dragon", start = 176202, monsters_list = {"Dragon","Dragon Lord","Donate Dragon Lord","Dragon Lord Vip III","Castle Dragon Lord","Wyrm","Undead Dragon"}, level = 100, count = 1, points = 2, items = {}, reward = {{7440,1}}, exp = 8000000, money = 60000000},

 

 

no link que te passei no tópico está explicando isso nas configurações...

vodkart_logo.png

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

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites

ola agora deu esse erro

[3/4/2018 15:12:6] [Error - CreatureScript Interface] 
[3/4/2018 15:12:6] domodlib('task_func')
[3/4/2018 15:12:6] function onLook(cid, thing, position, lookDistance)
[3/4/2018 15:12:6]     if isPlayer(thing.uid) and getTaskPoints(thing.uid) > 0 then
[3/4/2018 15:12:6]         doPlayerSetSpecialDescription(thing.uid, "\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").. " is a "..GetRankTask(thing.uid))
[3/4/2018 15:12:6]     end    
[3/4/2018 15:12:6]     return true
[3/4/2018 15:12:6] end
[3/4/2018 15:12:6] Description: 
[3/4/2018 15:12:6] [string "task_sys = {..."]:13: '}' expected near 'exp'
 

[3/4/2018 15:32:11] [Error - Action Interface] 
[3/4/2018 15:32:11] domodlib('task_func')
[3/4/2018 15:32:11] function onUse(cid, item, frompos, item2, topos)
[3/4/2018 15:32:11] local t = {[65521] = 50, [65522] = 80, [65523] = 90, [65524] = 100, [65525] = 110, [65526] = 120, [65527] = 130, [65528] = 140, [65529] = 150, [65530] = 160, [65531] = 170, [65532] = 180, [65533] = 190, [65534] = 200}
[3/4/2018 15:32:11] if not t[item.actionid] then return true end
[3/4/2018 15:32:11] if getTaskPoints(cid) < t[item.actionid] then
[3/4/2018 15:32:11] return doPlayerSendTextMessage(cid,22,"Você só pode passar se tiver " .. t[item.actionid] .. " Task Points.") 
[3/4/2018 15:32:11] end
[3/4/2018 15:32:11] doTransformItem(item.uid, item.itemid + 1)
[3/4/2018 15:32:11] doTeleportThing(cid, topos, true)
[3/4/2018 15:32:11] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Welcome, Task Hunter!")
[3/4/2018 15:32:11] return true
[3/4/2018 15:32:11] end
[3/4/2018 15:32:12] Description: 
[3/4/2018 15:32:12] [string "task_sys = {..."]:13: '}' expected near 'exp'
[3/4/2018 15:32:12]  (done).
[3/4/2018 15:32:12] >>> (0) mods were disabled.

Link para o post
Compartilhar em outros sites

<?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 = "Cyclops", start = 176201, monsters_list = {"Cyclops","Cyclops Smith"}, level = 8, count = 1, points = 1, items = {}, reward = {}, exp = 7000000, money = 50000000},
    [2] = {name = "Dragon", start = 176202, monsters_list = {"Dragon","Dragon Lord","Donate Dragon Lord","Dragon Lord Vip III","Castle Dragon Lord","Wyrm","Undead Dragon"}, level = 100, count = 1, points = 2, items = {}, reward = {{7440,1}}, exp = 8000000, money = 60000000},
    [3] = {name = "Hydra", start = 176203, monsters_list = {"Hydra","Hydra Vip","Hydra Vip II"}, level = 150, count = 800, points = 2, items = {}, reward = {{7440,1}}, exp = 8000000, money = 60000000},
    [4] = {name = "Frost Dragon", start = 176204, monsters_list = {"Frost Dragon","Frost Dragon Hatchling","Frost Dragon Vip","Donate Frost Dragon","Castle Frost Dragon"}, level = 150, count = 1, points = 2, items = {}, reward = {{7440,1}}, exp = 8000000, money = 70000000},
    [5] = {name = "Behemoth", start = 176205, monsters_list = {"Behemoth","Hellspawn"}, level = 150, count = 500, points = 2, items = {}, reward = {{7440,1}}, exp = 8000000, money = 70000000},
    [6] = {name = "Demon", start = 176206, monsters_list = {"Demon","Demon Vip","Demon Vip III","Donate Demon","Castle Demon"}, level = 200, count = 1, points = 3, items = {}, reward = {{7440,1}}, exp = 9000000, money = 90000000},
    [7] = {name = "Grim Reaper", start = 176207, monsters_list = {"Castle Grim Reaper","Grim Reaper","Grim Reaper Vip III","Donate Grim Reaper"}, level = 200, count = 1, points = 3, items = {}, reward = {{7440,1}}, exp = 9000000, money = 80000000},
    [8] = {name = "Warlock", start = 176208, monsters_list = {"Warlock","Warlock Vip","Donate Warlock","Castle Warlock"}, level = 200, count = 1, points = 3, items = {}, reward = {{7440,1}}, exp = 9000000, money = 80000000},
    [9] = {name = "Hero", start = 176209, monsters_list = {"Hero"}, level = 200, count = 1, points = 3, items = {}, reward = {{7440,1}}, exp = 9000000, money = 80000000},
    [10] = {name = "Fury", start = 176210, monsters_list = {"Fury","Infernalist"}, level = 200, count = 1, points = 3, items = {}, reward = {{7440,1}}, exp = 9000000, money = 80000000},
    [11] = {name = "Medusa", start = 176211, monsters_list = {"Medusa","Medusa Vip"}, level = 250, count = 1, points = 3, items = {}, reward = {{7440,1}}, exp = 9000000, money = 80000000},
    [12] = {name = "Lizard Dragon Priest", start = 176212, monsters_list = {"Serpent Spawn","Lizard Dragon Priest"}, level = 200, count = 1, points = 3, items = {}, reward = {{7440,1}} exp = 9000000, money = 80000000},
    [13] = {name = "Nightmare" ,start = 176213, monsters_list = {"Nightmare","Lost Soul","Mr. Punish"}, level = 200, count = 1, points = 3, items = {}, reward = {{7440,1}}, exp = 9000000, money = 80000000},
    [14] = {name = "Juggernaut" ,start = 176214, monsters_list = {"Juggernaut","Massacre"}, level = 200, count = 1, points = 3, items = {}, reward = {{7440,1}}, exp = 9000000, money = 80000000},
    [15] = {name = "Ferumbras" ,start = 176215, monsters_list = {"Ferumbras"}, level = 200, count = 1, points = 3, items = {}, reward = {{7440,1}}, exp = 9000000, money = 80000000},
    [16] = {name = "Defiler" ,start = 176216, monsters_list = {"Defiler"}, level = 250, count = 1, points = 3, items = {}, reward = {{7440,1}}, exp = 9000000, money = 80000000},
    [17] = {name = "Fluffy" ,start = 176217, monsters_list = {"Fluffy","Hellhound"}, level = 250, count = 1, points = 3, items = {}, reward = {{7440,1}}, exp = 9000000, money = 90000000},
    [18] = {name = "Hellfire Fighter" ,start = 176218, monsters_list = {"Hellfire Fighter"}, level = 300, count = 1, points = 4, items = {}, reward = {{7440,1}}, exp = 90000000, money = 300000000},
    [19] = {name = "Dark Torturer" ,start = 176219, monsters_list = {"Dark Torturer","Betrayed Wraith"}, level = 250, count = 1, points = 3, items = {}, reward = {{7440,1}}, exp = 20000000, money = 300000000},
    [20] = {name = "Nomad" ,start = 176220, monsters_list = {"Nomad"}, level = 250, count = 1, points = 4, items = {}, reward = {{7440,1}}, exp = 90000000, money = 300000000},
    [21] = {name = "Lethal Lissy" ,start = 176221, monsters_list = {"Lethal Lissy"}, level = 250, count = 1, points = 4, items = {}, reward = {{7440,1}}, exp = 90000000, money = 300000000},
    [22] = {name = "Storm Wolf" ,start = 176222, monsters_list = {"Storm Wolf"}, level = 250, count = 1, points = 5, items = {}, reward = {{7440,1}}, exp = 90000000, money = 400000000},
    [23] = {name = "Deadeye Devious" ,start = 176223, monsters_list = {"Deadeye Devious"}, level = 250, count = 1, points = 5, items = {}, reward = {{7440,1}}, exp = 90000000, money = 500000000},
    [24] = {name = "Gang Member" ,start = 176224, monsters_list = {"Gang Member"}, level = 250, count = 1, points = 5, items = {}, reward = {{7440,1}}, exp = 90000000, money = 600000000},
    [25] = {name = "Draken Abomination" ,start = 176225, monsters_list = {"Draken Abomination"}, level = 250, count = 1, points = 5, items = {}, reward = {{7440,1}}, exp = 90000000, money = 700000000}
}
daily_task = {
    [1] = {name = "Ghastly Dragon" ,monsters_list = {"Ghastly Dragon"}, count = 1, points = 2, reward = {{7440,1}}, exp = 90000000, money = 700000000},
    [2] = {name = "Werewolf" ,monsters_list = {"Werewolf"}, count = 1, points = 2, reward = {{7440,1}}, exp = 90000000, money = 700000000},
    [3] = {name = "Draken Elite" ,monsters_list = {"Draken Elite"}, count = 1, points = 2, reward = {{7440,1}}, exp = 90000000, money = 700000000},
    [4] = {name = "Eternal Guardian" ,monsters_list = {"Eternal Guardian"}, count = 1, points = 3, reward = {{7440,1}}, exp = 90000000, money = 700000000},
    [5] = {name = "Draken Warmaster" ,monsters_list = {"Draken Warmaster"}, count = 1, points = 3, reward = {{7440,1}}, exp = 90000000, money = 700000000},
    [6] = {name = "Morgaroth" ,monsters_list = {"Morgaroth"}, count = 1, points = 3, reward = {{7440,1}}, exp = 90000000, money = 700000000},
    [7] = {name = "Annihilon" ,monsters_list = {"Annihilon"}, count = 1, points = 3, reward = {{7440,1}}, exp = 90000000, money = 700000000},
    [8] = {name = "Ghazbaran" ,monsters_list = {"Ghazbaran"}, count = 1, points = 3, reward = {{7440,1}}, exp = 90000000, money = 700000000},
    [9] = {name = "Dragon" ,monsters_list = {"Dragon","Dragon Lord","Donate Dragon Lord","Dragon Lord Vip III","Castle Dragon Lord","Wyrm","Undead Dragon"}, count = 1, points = 3, reward = {{7440,1}}, exp = 90000000, money = 700000000},
    [10] = {name = "Frost Dragon" ,monsters_list = {"Frost Dragon","Frost Dragon Hatchling","Frost Dragon Vip","Donate Frost Dragon","Castle Frost Dragon"}, count = 1, points = 4, reward = {{12505,1}}, exp = 90000000, money = 700000000},
    [11] = {name = "Grim Reaper" ,monsters_list = {"Castle Grim Reaper","Grim Reaper","Grim Reaper Vip III","Donate Grim Reaper"}, count = 1, points = 4, reward = {{12505,1}}, exp = 90000000, money = 700000000},
    [12] = {name = "Demon" ,monsters_list = {"Demon","Demon Vip","Demon Vip III","Donate Demon","Castle Demon"}, count = 1, points = 4, reward = {{12505,1}}, exp = 90000000, money = 700000000}
}
task_sys_storages = {176601, 176602, 176603, 176604, 176605, 176606, 176607, 176608} -- task, points, 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 = {
        [{150,200}] = {1,3},
        [{201,350}] = {4,6},
        [{351,500}] = {7,9},
        [{501,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}] = "Bronze", 
        [{21, 50}] = "Prata",
        [{51, 100}] = "Ouro",
        [{101, 200}] = "Platina",    
        [{201, 250}] = "Diamante",    
        [{251, 300}] = "Mestre",            
        [{301, math.huge}] = "Challenger"
    }
    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[2] .. ' ' .. getItemNameById(items[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[1]) >= items[2] then
            count = count + 1 end 
        end 
    end
    if count == table.maxn(items) then
        for i = 1, table.maxn(items) do doPlayerRemoveItem(cid,items[1],items[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
            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")
    registerCreatureEvent(cid, "TaskLook")
    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 voce nao esta 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 Voce nao 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].points.."\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, "voce nao esta 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).."\nReward Points: "..task_sys[task].points.."\nRedward Items: "..(#task_sys[task].reward > 0 and getItemsFromList(task_sys[task].reward) or "Nenhum item de recompensa")..".")
]]></talkaction>
<event type="look" name="TaskLook" event="script"><![CDATA[
domodlib('task_func')
function onLook(cid, thing, position, lookDistance)
    if isPlayer(thing.uid) and getTaskPoints(thing.uid) > 0 then
        doPlayerSetSpecialDescription(thing.uid, "\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").. " is a "..GetRankTask(thing.uid))
    end    
    return true
end]]></event> 
<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] Parabens! Voce 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] Parabens! Voce terminou a Task do "..daily.name..", volte ao npc parece receber sua recompensa.")
            end
        end 
    end
    return true
end]]></event>
<action actionid="65521;65522;65523;65524;65525;65526;65527;65528;65529;65530;65531;65532;65533;65534" event="script"><![CDATA[
domodlib('task_func')
function onUse(cid, item, frompos, item2, topos)
local t = {[65521] = 50, [65522] = 80, [65523] = 90, [65524] = 100, [65525] = 110, [65526] = 120, [65527] = 130, [65528] = 140, [65529] = 150, [65530] = 160, [65531] = 170, [65532] = 180, [65533] = 190, [65534] = 200}
if not t[item.actionid] then return true end
if getTaskPoints(cid) < t[item.actionid] then
return doPlayerSendTextMessage(cid,22,"Você só pode passar se tiver " .. t[item.actionid] .. " Task Points.") 
end
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, topos, true)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Welcome, Task Hunter!")
return true
end]]></action>
</mod>

tbm esta dando um erro no final do mods em action que vc falow que coloca em portas vo te mandar o erro 

[3/4/2018 15:32:11] [Error - Test Interface] 
[3/4/2018 15:32:11] domodlib('task_func')
[3/4/2018 15:32:11] function onUse(cid, item, frompos, item2, topos)
[3/4/2018 15:32:11] local t = {[65521] = 50, [65522] = 80, [65523] = 90, [65524] = 100, [65525] = 110, [65526] = 120, [65527] = 130, [65528] = 140, [65529] = 150, [65530] = 160, [65531] = 170, [65532] = 180, [65533] = 190, [65534] = 200}
[3/4/2018 15:32:11] if not t[item.actionid] then return true end
[3/4/2018 15:32:11] if getTaskPoints(cid) < t[item.actionid] then
[3/4/2018 15:32:11] return doPlayerSendTextMessage(cid,22,"Você só pode passar se tiver " .. t[item.actionid] .. " Task Points.") 
[3/4/2018 15:32:11] end
[3/4/2018 15:32:11] doTransformItem(item.uid, item.itemid + 1)
[3/4/2018 15:32:11] doTeleportThing(cid, topos, true)
[3/4/2018 15:32:11] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Welcome, Task Hunter!")
[3/4/2018 15:32:11] return true
[3/4/2018 15:32:11] end
[3/4/2018 15:32:11] Description: 
[3/4/2018 15:32:11] [string "task_sys = {..."]:13: '}' expected near 'exp'

esta dando o mesmo erro ainda apos eu ter colocado como vc falow 

[3/4/2018 15:41:3] [Error - NpcScript Interface] 
[3/4/2018 15:41:3] data/npc/scripts/simple_task.lua:onCreatureSay
[3/4/2018 15:41:3] Description: 
[3/4/2018 15:41:3] [string "task_sys = {..."]:122: attempt to index local 'i_i' (a number value)
[3/4/2018 15:41:3] stack traceback:
[3/4/2018 15:41:3]     [string "task_sys = {..."]:122: in function 'GiveRewardsTask'
[3/4/2018 15:41:3]     data/npc/scripts/simple_task.lua:58: in function 'callback'
[3/4/2018 15:41:3]     data/npc/lib/npcsystem/npchandler.lua:456: in function 'onCreatureSay'
[3/4/2018 15:41:3]     data/npc/scripts/simple_task.lua:8: in function <data/npc/scripts/simple_task.lua:8>
 

Link para o post
Compartilhar em outros sites

no task [12] faltou uma virgula

[12] = {name = "Lizard Dragon Priest", start = 176212, monsters_list = {"Serpent Spawn","Lizard Dragon Priest"}, level = 200, count = 1, points = 3, items = {}, reward = {{7440,1}} exp = 9000000, money = 80000000},

para

 

   

 [12] = {name = "Lizard Dragon Priest", start = 176212, monsters_list = {"Serpent Spawn","Lizard Dragon Priest"}, level = 200, count = 1, points = 3, items = {}, reward = {{7440,1}}, exp = 9000000, money = 80000000},

 

vodkart_logo.png

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

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites

sim arumei agora so fico esse erro como antes quando vo entregar a task 

[3/4/2018 15:55:23] [Error - NpcScript Interface] 
[3/4/2018 15:55:23] data/npc/scripts/simple_task.lua:onCreatureSay
[3/4/2018 15:55:23] Description: 
[3/4/2018 15:55:24] [string "task_sys = {..."]:122: attempt to index local 'i_i' (a number value)
[3/4/2018 15:55:24] stack traceback:
[3/4/2018 15:55:24]     [string "task_sys = {..."]:122: in function 'GiveRewardsTask'
[3/4/2018 15:55:24]     data/npc/scripts/simple_task.lua:58: in function 'callback'
[3/4/2018 15:55:24]     data/npc/lib/npcsystem/npchandler.lua:456: in function 'onCreatureSay'
[3/4/2018 15:55:24]     data/npc/scripts/simple_task.lua:8: in function <data/npc/scripts/simple_task.lua:8>

problema resolvido pode fechar 

Link para o post
Compartilhar em outros sites

end:onKill
Description:
[string "LuaInterface::loadBuffer"]:5: attempt to compare string with number
stack traceback:
        [string "LuaInterface::loadBuffer"]:5: in function <[string "LuaInterface::loadBuffer"]:2>

[Error - CreatureScript Interface]
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] Parabens! Voce 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] Parabens! Voce terminou a Task do "..daily.name..", volte ao npc parece receber sua recompensa.")
                        end
                end
        end
        return true
end:onKill
Description:
[string "LuaInterface::loadBuffer"]:5: attempt to compare string with number
stack traceback:
        [string "LuaInterface::loadBuffer"]:5: in function <[string "LuaInterface::loadBuffer"]:2>

 


olha o tanto de erro vc poderia me ajudar nisso 

Link para o post
Compartilhar em outros sites

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por cloudrun2023
      CloudRun - Sua Melhor Escolha para Hospedagem de OTServer!
      Você está procurando a solução definitiva para hospedar seu OTServer com desempenho imbatível e segurança inigualável? Não procure mais! Apresentamos a CloudRun, sua parceira confiável em serviços de hospedagem na nuvem.
       
      Recursos Exclusivos - Proteção DDoS Avançada:
      Mantenha seu OTServer online e seguro com nossa robusta proteção DDoS, garantindo uma experiência de jogo ininterrupta para seus jogadores.
       
      Servidores Ryzen 7 Poderosos: Desfrute do poder de processamento superior dos servidores Ryzen 7 para garantir um desempenho excepcional do seu OTServer. Velocidade e estabilidade garantidas!
       
      Armazenamento NVMe de Alta Velocidade:
      Reduza o tempo de carregamento do jogo com nosso armazenamento NVMe ultrarrápido. Seus jogadores vão adorar a rapidez com que podem explorar o mundo do seu OTServer.
       
      Uplink de até 1GB:
      Oferecemos uma conexão de alta velocidade com até 1GB de largura de banda, garantindo uma experiência de jogo suave e livre de lag para todos os seus jogadores, mesmo nos momentos de pico.
       
      Suporte 24 Horas:
      Estamos sempre aqui para você! Nossa equipe de suporte está disponível 24 horas por dia, 7 dias por semana, para resolver qualquer problema ou responder a qualquer pergunta que você possa ter. Sua satisfação é a nossa prioridade.
       
      Fácil e Rápido de Começar:
      Configurar seu OTServer na CloudRun é simples e rápido. Concentre-se no desenvolvimento do seu jogo enquanto cuidamos da hospedagem.
       
      Entre em Contato Agora!
      Website: https://central.cloudrun.com.br/index.php?rp=/store/cloud-ryzen-brasil
      Email: [email protected]
      Telefone: (47) 99902-5147

      Não comprometa a qualidade da hospedagem do seu OTServer. Escolha a CloudRun e ofereça aos seus jogadores a melhor experiência de jogo possível. Visite nosso site hoje mesmo para conhecer nossos planos e começar!
       
      https://central.cloudrun.com.br/index.php?rp=/store/cloud-ryzen-brasil
       
      CloudRun - Onde a Velocidade Encontra a Confiabilidade!
       

    • Por FeeTads
      SALVE rapaziada do TK, esses dias vim pensando em novos scripts pro meu OT, e em um deles eu precisava que determinada area não contasse frag pro player que matasse outros, PORÉM eu precisava que os players que morressem nessa area ainda assim tivessem as penalidades da sua morte, procurei por ai, achei alguns scripts que apenas tiravam o SKULL e não realmente o FRAG do player.

      **script atualizado 22/10/2023** - melhorado e otimizado, levei o script pra puxar as infos por .lua / creatureScripts

      vou disponibilizar o code aqui, e o que fazer pra determinada area não contar frag.

      SOURCE OTX 2 / TFS 0.x, Funciona em TFS 1.x mudando as tags e ajeitando as sintaxes.

      vá em creatureevent.cpp

      procure por:
      else if(type == "preparedeath") _type = CREATURE_EVENT_PREPAREDEATH;
      Adiciona abaixo:
      else if(type == "nocountfrag") _type = CREATURE_EVENT_NOCOUNTFRAG;

      procure por:
      case CREATURE_EVENT_PREPAREDEATH: return "onPrepareDeath";  
      Adicione abaixo: 
      case CREATURE_EVENT_NOCOUNTFRAG: return "noCountFragArea";

      procure por:
      case CREATURE_EVENT_PREPAREDEATH: return "cid, deathList";
      Adicione abaixo:
      case CREATURE_EVENT_NOCOUNTFRAG: return "cid, target";

      agora no mesmo arquivo, vá até o final do arquivo e adicione essa função:
      uint32_t CreatureEvent::executeNoCountFragArea(Creature* creature, Creature* target) { //noCountFragArea(cid, target) if(m_interface->reserveEnv()) { ScriptEnviroment* env = m_interface->getEnv(); if(m_scripted == EVENT_SCRIPT_BUFFER) { env->setRealPos(creature->getPosition()); std::ostringstream scriptstream; scriptstream << "local cid = " << env->addThing(creature) << std::endl; scriptstream << "local target = " << env->addThing(target) << std::endl; if(m_scriptData) scriptstream << *m_scriptData; bool result = true; if(m_interface->loadBuffer(scriptstream.str())) { lua_State* L = m_interface->getState(); result = m_interface->getGlobalBool(L, "_result", true); } m_interface->releaseEnv(); return result; } else { #ifdef __DEBUG_LUASCRIPTS__ std::ostringstream desc; desc << creature->getName(); env->setEvent(desc.str()); #endif env->setScriptId(m_scriptId, m_interface); env->setRealPos(creature->getPosition()); lua_State* L = m_interface->getState(); m_interface->pushFunction(m_scriptId); lua_pushnumber(L, env->addThing(creature)); lua_pushnumber(L, env->addThing(target)); bool result = m_interface->callFunction(2); m_interface->releaseEnv(); return result; } } else { std::clog << "[Error - CreatureEvent::noCountFragArea] Call stack overflow." << std::endl; return 0; } }

      agora vá em creatureevent.h

      procure por:
      CREATURE_EVENT_PREPAREDEATH
      adicione abaixo:
      CREATURE_EVENT_NOCOUNTFRAG

      procure por:
      uint32_t executePrepareDeath(Creature* creature, DeathList deathList);
      Adicione abaixo:
      uint32_t executeNoCountFragArea(Creature* creature, Creature* target);

      agora vá em player.cpp

      procure por:
      bool Player::onKilledCreature(Creature* target, DeathEntry& entry)
      abaixo de:
      War_t enemy; if(targetPlayer->getEnemy(this, enemy)) { if(entry.isLast()) IOGuild::getInstance()->updateWar(enemy); entry.setWar(enemy); }
      Adicione o seguinte código:
      if (targetPlayer){ CreatureEventList killEvents = getCreatureEvents(CREATURE_EVENT_NOCOUNTFRAG); for (const auto &event : killEvents) { if (!event->executeNoCountFragArea(this, target)) { return true; } } }

      //

      Feito isso, tudo completo na sua source, agora é necessário adicionar o creaturescript dentro do servidor

      vá até creaturescripts/scripts
      crie um arquivo chamado, "noCountFragInArea.lua"
      e dentro dele cole o código:
       
      --[[ script feito por feetads / TibiaKing ]]-- --[[ discord: feetads / FeeTads#0246 ]]-- -- Add positions here for which you do not want to count frags local areas = { [1] = {from = {x = 91, y = 122, z = 7}, to = {x = 98, y = 127, z = 7}}, -- from = area superior esquerda / to = area inferior direita (formando um quadrado) } local onlyKillerInArea = false -- only killer need to be in area? function noCountFragArea(cid, target) if not isCreature(cid) or not isCreature(target) then return true end local posKiller = getPlayerPosition(cid) local posTarget = getPlayerPosition(target) for i = 1, #areas do local area = areas[i] if isInArea(posKiller, area.from, area.to) then if onlyKillerInArea then return false elseif isInArea(posTarget, area.from, area.to) then return false end end end return true end
      agora em creaturescripts.xml
      <event type="nocountfrag" name="fragarea" event="script" value="noCountFragInArea.lua"/>
      agora em creaturescripts/scripts/login.lua
       procure por OU semelhante a esse:
      registerCreatureEvent(cid, "AdvanceSave")
      e abaixo adicione:
      registerCreatureEvent(cid, "fragarea")

      //


      Agora tudo certo, quando quiser adiciona uma area que não pega frag, vá até o script e apenas coloque a area, igual o demonstrado no script

      Exemplo:
      local areas = { [1] = {from = {x = 91, y = 122, z = 7}, to = {x = 98, y = 127, z = 7}}, [2] = {from = {x = 1000, y = 1000, z = 7}, to = {x = 1100, y = 1100, z = 7}}, }
      assim somente colocando a area no script e abrindo o server ou dando /reload, já funcionará a area como não pegar frag.
      Esse sistema pode ser bom pra areas de pvp ativo, onde você ainda quer que o player que morrer perca os atributos, como se fosse uma morte normal, porém não conta frag pra quem matar.
      Bom pra sistemas tipo castle 48h (guild war), onde há diversas mortes e risco de pegar red, atrapalhando a war.

      Façam bom proveito dos scripts, e deixem os créditos no script rsrs

      **Eu fiz as alterações e o simples código por isso vim disponibilizar, créditos meus**
    • Por Muvuka
      Abri canal a força creaturescript acho que funcione no creaturescript cria script creaturescript
       
      <channel id="9" name="HELP" logged="yes"/>
      <channel id="12" name="Report Bugs" logged="yes"/>
      <channel id="13" name="Loot" logged="yes"/>
      <channel id="14" name="Report Character Rules Tibia Rules" logged="yes"/>
      <channel id="15" name="Death Channel"/>
      <channel id="6548" name="DexSoft" level="1"/>
      <channel id="7" name="Reports" logged="yes"/>
       
      antes de 
              if(lastLogin > 0) then adicione isso:
                      doPlayerOpenChannel(cid, CHANNEL_HELP) doPlayerOpenChannel(cid, 1,  2, 3) = 1,2 ,3 Channels, entendeu? NÃO FUNCIONA EU QUERO UM MEIO DE ABRI SEM USA A SOURCE
       
      EU NÃO CONSEGUI ABRI EU NÃO TENHO SOURCE
       
       
    • Por bolachapancao
      Rapaziada seguinte preciso de um script que ao utilizar uma alavanca para até 4 jogadores.
      Os jogadores serão teleportados para hunt durante uma hora e depois de uma hora os jogadores serão teleportados de volta para o templo.
       
      Observação: caso o jogador morra ou saia da hunt o evento hunt é cancelado.

      Estou a base canary
      GitHub - opentibiabr/canary: Canary Server 13.x for OpenTibia community.
       
    • Por RAJADAO
      .Qual servidor ou website você utiliza como base? 
      Sabrehaven 8.0
      Qual o motivo deste tópico? 
      Ajuda com novos efeitos
       
      Olá amigos, gostaria de ajuda para introduzir os seguintes efeitos no meu servidor (usando o Sabrehaven 8.0 como base), adicionei algumas runas novas (avalanche, icicle, míssil sagrado, stoneshower & Thunderstorm) e alguns novos feitiços (exevo mas san, exori san, exori tera, exori frigo, exevo gran mas frigo, exevo gran mas tera, exevo tera hur, exevo frigo hur) mas nenhum dos efeitos dessas magias parece existir no servidor, alguém tem um link para um tutorial ou algo assim para que eu possa fazer isso funcionar?
      Desculpe pelo mau inglês, sou brasileiro.

      Obrigado!


      AVALANCHE RUNE id:3161 \/
      (COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)

      STONESHOWER RUNE id:3175 \/
      (COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_STONES)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH)

      THUNDERSTORM RUNE id:3202 \/
      (COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_E NERGYHIT)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)

      ICICLE RUNE id:3158 \/
      COMBAT_ICEDAMAGE
      CONST_ME_ICEAREA
      CONST_ANI_ICE

      SANTO MÍSSIL RUNA id:3182 \/
      (COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)

      CONST_ME_PLANTATTACK (exevo gran mas tera)
      CONST_ME_ICETORNADO (exevo gran mas frigo)
      CONST_ME_SMALLPLANTS (exevo tera hur)
      CONST_ME_ICEAREA (exevo frigo hur)
      CONST_ME_ICEATTACK (exori frigo)
      CONST_ME_CARNIPHILA (exori tera)

      EXORI SAN \/
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
      CONST_ME_HOLYDAM IDADE

      EXEVO MAS SAN \/
      CONST_ME_HOLYAREA
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo