verifique se no configuration.lua da lib possui isso
headbutt = {
[25] = {{"Metapod", 2}, {"Kakuna", 2}, {"Pidgey", 3}, {"Ekans", 1}},
[30] = {{"Metapod", 3}, {"Kakuna", 3}, {"Pidgey", 3}, {"Spearow", 2}, {"Ekans", 1}},
[40] = {{"Pidgeotto", 1}, {"Beedrill", 2}, {"Spearow", 3}, {"Ekans", 2}, {"Venonat", 1}},
[55] = {{"Pidgeotto", 2}, {"Beedrill", 2}, {"Spearow", 3}, {"Arbok", 1}},
[60] = {{"Arbok", 1}, {"Beedrill", 3}, {"Pidgeotto", 2}, {"Beedrill", 2}, {"Butterfree", 2}},
[70] = {{"Arbok", 2}, {"Beedrill", 3}, {"Parasect", 1}, {"Pidgeotto", 3}, {"Butterfree", 2}},
[80] = {{"Beedrill", 4}, {"Parasect", 2}, {"Pinsir", 1}, {"Pidgeotto", 4}, {"Venomoth", 1}},
[90] = {{"Beedrill", 4}, {"Parasect", 2}, {"Pinsir", 1}, {"Pidgeotto", 4}, {"Venomoth", 2}},
[120] = {{"Butterfree", 4}, {"Pinsir", 1}, {"Parasect", 2}, {"Pinsir", 2}, {"Venomoth", 1}, {"Parasect", 2}, {"Venomoth", 2}, {"Farfetch'd", 1},},
[150] = {{"Butterfree", 4}, {"Parasect", 2}, {"Scyther", 1}, {"Pinsir", 2}, {"Fearow", 1}, {"Venomoth", 2}, {"Farfetch'd", 1},},
[200] = {{"Butterfree", 5}, {"Parasect", 3}, {"Scyther", 1}, {"Pinsir", 2}, {"Fearow", 1}, {"Venomoth", 3}, {"Farfetch'd", 1},},
[250] = {{"Butterfree", 5}, {"Parasect", 3}, {"Scyther", 1}, {"Pidgeot", 1}, {"Pinsir", 2}, {"Fearow", 2}, {"Venomoth", 3}, {"Farfetch'd", 2},},
[300] = {{"Parasect", 4}, {"Scyther", 2}, {"Pidgeot", 2}, {"Pinsir", 3}, {"Fearow", 3}, {"Venomoth", 4}, {"Farfetch'd", 3},},
[1000] = {{"Parasect", 4}, {"Scyther", 2}, {"Pidgeot", 2}, {"Pinsir", 3}, {"Fearow", 3}, {"Venomoth", 4}, {"Farfetch'd", 3},},
}




info
Grupo: Artesão
Registrado: 22/07/11
Posts: 101
Reputação: +3
Gênero: Masculino
Char no Tibia: Clode
Estou com um bug no sistema de Headbutt system!!!
Quem manja com script puder ajudar no BUG ^^
BUG
[10/01/2020 18:31:24] [Error - Action Interface]
[10/01/2020 18:31:24] In a timer event called from:
[10/01/2020 18:31:24] data/actions/scripts/order.lua:onUse
[10/01/2020 18:31:24] Description:
[10/01/2020 18:31:24] data/lib/order.lua:248: bad argument #1 to 'random' (interval is empty)
[10/01/2020 18:31:24] stack traceback:
[10/01/2020 18:31:24] [C]: in function 'random'
[10/01/2020 18:31:24] data/lib/order.lua:248: in function <data/lib/order.lua:206>
Script (Order Actions)
-------- HEADBUTT -----------
if item2.itemid == 2705 and getPokemonLevel(mysum) >= 15 then --alterado v1.6
doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["headbutt"][math.random(1, #txt["headbutt"])].."", 1)
addEvent(goThere, 500, mysum, topos, "headbutt", isCreature(getCreatureTarget(cid)))
return true
end
-----------------------------
Script (Order Lib)
elseif skill == "headbutt" then --alterado v1.6
local master = getCreatureMaster(sid)
local array = {}
local lvl = {1, 25, 50, 75, 100, 150} --lvls
for i = 1, #lvl do
if getPlayerLevel(master) <= lvl then
array = headbutt[lvl]
break
end
end
local rand = array[math.random(#array)]
for j = 1, rand[2] do
local poke = doCreateMonster(rand[1], getClosestFreeTile(sid, pos))
doSetMonsterPassive(poke)
doWildAttackPlayer(poke, master)
end
local item = getTileItemById(pos, 2705) --id do item arvore normal
doCreatureSay(sid, "HEADBUTT!", TALKTYPE_MONSTER)
markPos(sid, {x=1,y=1,z=7})
doFaceCreature(sid, pos)
doSendMagicEffect(getThingPos(item.uid), 118)
doTransformItem(item.uid, 2704) --id do item arvore quebrada
local function growHead()
doTransformItem(getTileItemById(pos, 2704).uid, 2705) --id do item arvore quebrada, arvore normal
end
addEvent(growHead, choose(5, 10, 15, 20) * 60 * 1000) --o tempo pra arvore voltar ao normal varia de 5-20min
Editado Janeiro 11 por BrunoMaciel