Postado Janeiro 15, 2015 10 anos Boa tarde galera, tudo certo? Agora quero ver quem é ator e quem é dublê hahah Vasculhando o forum Otland notei um scrip que foi desenvolvido pelo Cykotitan com ideia do gênio scripter devianceone. O MOD consiste em dropar randomicamente dos monstros itens raros contendo bonus em attackspeed, ml, skill e etc. Esse script foi distribuído de forma gratuita pelo Cykotitan. Porem todo o mod foi escrito e desenvolvido a alguns anos atras, então não houve a atualização e concertos de erros. Em alguns servidores o mod funciona tranquilamente, em outros não. No meu server, por exemplo, ele não funciona. Rodo um servidor Global 10.10 Tfs 0.3.7. Eis a foto do script e como funciona: O MOD: Citar <?xml version="1.0" encoding="UTF-8"?> <mod name="Random Item Stats" enabled="1"> <config name="itemstats_conf"><![CDATA[ -- // extra_loot_key = 123 --: optional storage for higher loot rate vocation_base_attackspeed = getVocationInfo(1).attackSpeed --: used for attackSpeed stat -- // tiers, attr = {}, {} tiers['rare'] = { color = 66, -- color of 'RARE' text extra = {0, 0}, attrNames = true, -- show attribute names instead of rare chance = { [1] = 10000, [2] = 5000 -- chance for 2nd stat } } tiers['epic'] = { color = 35, extra = {7, 20}, -- additional percent bonus chance = { [1] = 3333, [2] = 25000 } } tiers['legendary'] = { color = 149, extra = {20, 35}, chance = { [1] = 1000, [2] = 100000 -- 2 bonuses always } } MELEE = 0 DISTANCE = 1 ARMOR = 2 SHIELD = 3 WAND = 4 DURATION_RING = 5 CHARGES = 6 --! attributes attr['quick'] = { attr = 'attackSpeed', name = 'Attack Speed', percent = {6, 20}, types = {MELEE, DISTANCE, WAND} } attr['fortified'] = { attr = 'extraDefense', base = 'defense', name = 'Defense', percent = {7, 25}, types = {MELEE, SHIELD} } attr['deadly'] = { attr = 'extraAttack', base = 'attack', name = 'Attack', types = {MELEE}, percent = {7, 25} } attr['strong'] = { attr = 'armor', name = 'Armor', percent = {7, 20}, types = {ARMOR} } attr['hawkeye\'s'] = { attr = 'hitChance', name = 'Hit Chance', percent = {10, 25}, types = {DISTANCE} } --[[ // not available without source edit attr['farsight'] = { attr = 'shootRange', name = 'Shoot Range', percent = {17, 34}, types = {DISTANCE, WAND} } ]] attr['charged'] = { attr = 'charges', name = 'Charges', percent = {30, 45}, types = {CHARGES} } attr['divine'] = { attr = 'duration', name = 'Duration', percent = {35, 50}, types = {DURATION_RING} } --/ attributes rate = getConfigInfo('rateLoot') if( getConfigInfo('monsterLootMessage') ~= 0 )then print('[Notice] Set monsterLootMessage = 0 to prevent duplicate loot messages') end ]]></config> <event type="kill" name="itemstats" event="script"><![CDATA[ domodlib('itemstats_conf') function round(n, s) return tonumber(('%.' .. (s or 0) .. 'f'):format(n)) end function getContentDescription(uid, sep) local ret, i, containers = '', 0, {} while( i < getContainerSize(uid) )do local v, s = getContainerItem(uid, i), '' local k = getItemInfo(v.itemid) k.name = getItemAttribute(v.uid, 'name') or k.name if( k.name ~= '' )then if( v.type > 1 and k.stackable and k.showCount )then s = v.type .. ' ' .. k.plural else local article = getItemAttribute(v.uid, 'article') or k.article s = (article == '' and '' or article .. ' ') .. k.name end ret = ret .. (i == 0 and not sep and '' or ', ') .. s if( isContainer(v.uid) and getContainerSize(v.uid) ~= 0 )then table.insert(containers, v.uid) end else ret = ret .. (i == 0 and not sep and '' or ', ') .. 'an item of type ' .. v.itemid .. ', please report it to gamemaster' end i = i + 1 end for i = 1, #containers do ret = ret .. getContentDescription(containers, true) end return ret end local function send(cid, corpse, monster) if( isPlayer(cid) )then local ret = corpse and isContainer(corpse) and getContentDescription(corpse) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Loot of ' .. monster .. ': ' .. (ret ~= '' and ret or 'nothing')) local party = getPlayerParty(cid) if( party )then for _, pid in ipairs(getPartyMembers(party)) do doPlayerSendChannelMessage(pid, '', 'Loot of ' .. monster .. ': ' .. (ret ~= '' and ret or 'nothing'), TALKTYPE_CHANNEL_W, CHANNEL_PARTY) end end end end local function createLoot(i, ext) local item = type(i.id) == 'table' and i.id[math.random(#i.id)] or i.id local random = math.ceil(math.random(100000) / ext) local tmpItem, f if( random < i.chance )then if i.subType == -1 then f = getItemInfo(item) end tmpItem = doCreateItemEx(item, i.subType ~= -1 and i.subType or f.stackable and random % i.count + 1 or f.charges ~= 0 and f.charges or 1 ) end if( not tmpItem )then return end if( i.actionId ~= -1 )then doItemSetAttribute(tmpItem, 'aid', i.actionId) end if( i.uniqueId ~= -1 )then doItemSetAttribute(tmpItem, 'uid', i.uniqueId) end if( i.text ~= '' )then doItemSetAttribute(tmpItem, 'text', i.text) end local ret, done for k, v in pairs(tiers) do local cur, used = {}, {} for i = 1, #v.chance do if( math.random(100000) <= v.chance )then if( f )then f = getItemInfo(item) end if( not f.stackable )then for m, n in pairs(attr) do if( not table.find(used, m) and ( ( table.find(n.types, MELEE) and table.find({WEAPON_SWORD, WEAPON_CLUB, WEAPON_AXE}, f.weaponType) ) or ( table.find(n.types, DISTANCE) and f.weaponType == WEAPON_DIST and f.ammoType ~= 0 ) or ( table.find(n.types, ARMOR) and f.armor ~= 0 and f.wieldPosition ~= CONST_SLOT_NECKLACE ) or ( table.find(n.types, SHIELD) and f.defense ~= 0 and f.weaponType == WEAPON_SHIELD ) or ( table.find(n.types, WAND) and f.weaponType == WEAPON_WAND ) or ( table.find(n.types, DURATION_RING) and f.wieldPosition == CONST_SLOT_RING and f.transformEquipTo ~= 0 ) or ( table.find(n.types, CHARGES) and table.find({CONST_SLOT_RING, CONST_SLOT_NECKLACE}, f.wieldPosition) and f.charges ~= 0 ) ) )then table.insert(cur, m) end end if( #cur ~= 0 )then local n = cur[math.random(#cur)] table.insert(used, n) n = attr[n] local percent, new, tmp = math.random(n.percent[1] + (v.extra[1] or 0), n.percent[2] + (v.extra[2] or 0)) -- hacks if( n.attr == 'duration' )then tmp = getItemInfo(f.transformEquipTo) if tmp.transformDeEquipTo ~= item then break end new = round( tmp.decayTime * (1 + percent / 100) * 1000 ) elseif( n.attr == 'attackSpeed' )then new = round( vocation_base_attackspeed / (1 + percent / 100) ) elseif( n.attr == 'hitChance' ) then new = round( f.hitChance == -1 and percent or f.hitChance * (1 + percent / 100) ) else new = round( n.base and f[n['attr']] + f[n['base']] * (percent / 100) or f[n['attr']] * (1 + percent / 100) ) if( new == f[n[n.base and 'base' or 'attr']] )then -- no improvement break end end doItemSetAttribute(tmpItem, n.attr:lower(), new) local name = getItemAttribute(tmpItem, 'name') if( v.attrNames or not name )then local name = (v.attrNames and used[#used] or k) .. ' ' .. (name or f.name) doItemSetAttribute(tmpItem, 'name', name) if( f.article ~= '' )then local article = getArticle(name) if( article ~= f.article )then doItemSetAttribute(tmpItem, 'article', article) end end end local desc = getItemAttribute(tmpItem, 'description') or f.description doItemSetAttribute(tmpItem, 'description', '[' .. n.name .. ': +' .. percent .. '%]' .. (desc == '' and '' or '\n' .. desc)) ret = k end cur = {} if( #v.chance == i )then done = true end end else done = i ~= 1 break end end if( done )then break end end return tmpItem, ret end local function createChildLoot(parent, i, ext, pos) if( not i or #i == 0 )then return true end local size, cap = 0, getContainerCap(parent) for k = 1, #i do if( size == cap )then break end local tmp, ret = createLoot(i[k], ext) if( tmp )then if( isContainer(tmp) )then if( createChildLoot(tmp, i[k].child, ext, pos) )then doAddContainerItemEx(parent, tmp) size = size + 1 else doRemoveItem(tmp) end else if( ret )then doSendMagicEffect(pos, CONST_ME_MAGIC_GREEN) doSendAnimatedText(pos, ret:upper(), tiers[ret].color) end doAddContainerItemEx(parent, tmp) size = size + 1 end end end return size > 0 end local function dropLoot(pos, v, ext, master, cid, target) local corpse if( not master or master == target )then -- 0.3/4 corpse = getTileItemById(pos, v.lookCorpse).uid if( isContainer(corpse) )then for i = 1, getContainerSize(corpse) do doRemoveItem(getContainerItem(corpse, 0).uid) end local size, cap = 0, getContainerCap(corpse) for i = 1, #v.loot do if( size == cap )then break end local tmp, ret = createLoot(v.loot, ext) if( tmp )then if( isContainer(tmp) )then if( createChildLoot(tmp, v.loot.child, ext, pos) )then doAddContainerItemEx(corpse, tmp) size = size + 1 else doRemoveItem(tmp) end else if( ret )then doSendMagicEffect(pos, CONST_ME_MAGIC_GREEN) doSendAnimatedText(pos, ret:upper(), tiers[ret].color) end doAddContainerItemEx(corpse, tmp) size = size + 1 end end end end end send(cid, corpse, v.description) end function onKill(cid, target, damage, flags) if( (damage == true or bit.band(flags, 1) == 1) and isMonster(target) )then -- 0.3/4 local v = getMonsterInfo(getCreatureName(target)) if( v and v.lookCorpse ~= 0 )then local s = getCreatureStorage(cid, extra_loot_key) addEvent(dropLoot, 0, getThingPos(target), v, s == -1 and rate or s, getCreatureMaster(target), cid, target) end end return true end ]]></event> <event type="login" name="itemstats_login" event="buffer"><![CDATA[ registerCreatureEvent(cid, 'itemstats') ]]></event> </mod> Fotos do erro: Os erros são: quedas no servidor, as vezes os servidor não inicia, os monstros NÃO contém loot e o lag é insuportável! Técnicos na área, qual a senteça? hahaha Abraços!
Postado Janeiro 15, 2015 10 anos seria muito legal se seu console mostrasse o erro ao invés de mostrar o script kkkk pra que versão esse script foi feito, vc saberia informar?
Postado Janeiro 15, 2015 10 anos Autor Em 15/01/2015 em 15:39, xWhiteWolf disse: seria muito legal se seu console mostrasse o erro ao invés de mostrar o script kkkk pra que versão esse script foi feito, vc saberia informar? Vou ver se encontro pelo menos algum log aqui contendo os erros... O criador do script citou que pode não funcionar no TFS 0.2, 0.3 e 0.4. Porém alguns usuarios, ao longo do topico, informaram que em alguns servidores 0.4 chegou a funcionar normalmente. Por isso que eu disse, MASSACRANTE! kkk Citar ... "Rest is fine and running perfectly on 0.4" ... Editado Janeiro 15, 2015 10 anos por huuumberto (veja o histórico de edições)
Postado Janeiro 15, 2015 10 anos qnd eu voltar pra casa +- dia 3 de fevereiro eu vou fazer umas coisas aqui do TK que eu já havia marcado e juntamente baixo um server 1.0 pra tentar ver qual é o problema, conforme for eu adapto pra uma versão mais atual, se bem que esse script tá bem mal feito, talvez compensaria mais fazer um do 0 doque tentar entender essas variaveis "ret" "k" "s", gosto de nomes que são intuitivos
Postado Janeiro 15, 2015 10 anos Autor Em 15/01/2015 em 16:02, xWhiteWolf disse: qnd eu voltar pra casa +- dia 3 de fevereiro eu vou fazer umas coisas aqui do TK que eu já havia marcado e juntamente baixo um server 1.0 pra tentar ver qual é o problema, conforme for eu adapto pra uma versão mais atual, se bem que esse script tá bem mal feito, talvez compensaria mais fazer um do 0 doque tentar entender essas variaveis "ret" "k" "s", gosto de nomes que são intuitivos pra se ter uma ideia, esse script foi criado em 2010, entao é e um pouco velho, kkkk. Mas enfim, peguei todo o log do console, nao sei se e o que voces programadores precisam... mas enfim, segue Citar 0 AND "end" < 1421338679;) [14:17:59.062] sqlite3_step(): SQLITE ERROR: database table is locked [14:17:59.062] > ERROR: Failed to save account: tibia! [14:17:59.062] sqlite3_step(): SQLITE ERROR: database table is locked [14:17:59.077] > ERROR: Failed to save account: 1111111! [14:17:59.077] > Global IP address(es): 127.0.0.1 [14:17:59.109] > Bound ports: 7171 7172 [14:17:59.109] >> Everything smells good, server is starting up... [14:18:00.123] >> Tibia server Online! [14:20:14.977] Server Manager has logged in. [14:20:27.979] [Error - CreatureScript Interface] [14:20:27.980] In a timer event called from: [14:20:27.980] domodlib('itemstats_conf') [14:20:27.981] function round(n, s) [14:20:27.982] return tonumber(('%.' .. (s or 0) .. 'f'):format(n)) [14:20:27.983] end [14:20:27.984] function getContentDescription(uid, sep) [14:20:27.985] local ret, i, containers = '', 0, {} [14:20:27.987] while( i < getContainerSize(uid) )do [14:20:27.988] local v, s = getContainerItem(uid, i), '' [14:20:27.989] local k = getItemInfo(v.itemid) [14:20:27.990] k.name = getItemAttribute(v.uid, 'name') or k.name [14:20:27.991] if( k.name ~= '' )then [14:20:27.992] if( v.type > 1 and k.stackable and k.showCount )then [14:20:27.994] s = v.type .. ' ' .. k.plural [14:20:27.995] else [14:20:27.996] local article = getItemAttribute(v.uid, 'article') or k.article [14:20:27.997] s = (article == '' and '' or article .. ' ') .. k.name [14:20:27.998] end [14:20:28.000] ret = ret .. (i == 0 and not sep and '' or ', ') .. s [14:20:28.001] if( isContainer(v.uid) and getContainerSize(v.uid) ~= 0 )then [14:20:28.002] table.insert(containers, v.uid) [14:20:28.003] end [14:20:28.004] else [14:20:28.006] ret = ret .. (i == 0 and not sep and '' or ', ') .. 'an item of t ype ' .. v.itemid .. ', please report it to gamemaster' [14:20:28.006] end [14:20:28.008] i = i + 1 [14:20:28.009] end [14:20:28.010] for i = 1, #containers do [14:20:28.011] ret = ret .. getContentDescription(containers, true) [14:20:28.012] end [14:20:28.012] return ret [14:20:28.013] end [14:20:28.014] local function send(cid, corpse, monster) [14:20:28.015] if( isPlayer(cid) )then [14:20:28.016] local ret = corpse and isContainer(corpse) and getContentDescript ion(corpse) [14:20:28.016] doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Loot of ' .. mo nster .. ': ' .. (ret ~= '' and ret or 'nothing')) [14:20:28.017] local party = getPlayerParty(cid) [14:20:28.018] if( party )then [14:20:28.019] for _, pid in ipairs(getPartyMembers(party)) do [14:20:28.019] doPlayerSendChannelMessage(pid, '', 'Loot of ' .. monster .. ': ' .. (ret ~= '' and ret or 'nothing'), TALKTYPE_CHANNEL_W, CHANNEL_PARTY) [14:20:28.020] end [14:20:28.021] end [14:20:28.022] end [14:20:28.023] end [14:20:28.025] local function createLoot(i, ext) [14:20:28.026] local item = type(i.id) == 'table' and i.id[math.random(#i.id)] o r i.id [14:20:28.027] local random = math.ceil(math.random(100000) / ext) [14:20:28.029] local tmpItem, f [14:20:28.030] if( random < i.chance )then [14:20:28.032] if i.subType == -1 then [14:20:28.033] f = getItemInfo(item) [14:20:28.034] end [14:20:28.035] tmpItem = doCreateItemEx(item, [14:20:28.035] i.subType ~= -1 and i.subType or [14:20:28.036] f.stackable and random % i.count + 1 or [14:20:28.037] f.charges ~= 0 and f.charges or [14:20:28.037] 1 [14:20:28.038] ) [14:20:28.039] end [14:20:28.040] if( not tmpItem )then [14:20:28.040] return [14:20:28.041] end [14:20:28.042] if( i.actionId ~= -1 )then [14:20:28.042] doItemSetAttribute(tmpItem, 'aid', i.actionId) [14:20:28.043] end [14:20:28.044] if( i.uniqueId ~= -1 )then [14:20:28.044] doItemSetAttribute(tmpItem, 'uid', i.uniqueId) [14:20:28.045] end [14:20:28.046] if( i.text ~= '' )then [14:20:28.046] doItemSetAttribute(tmpItem, 'text', i.text) [14:20:28.047] end [14:20:28.048] local ret, done [14:20:28.049] for k, v in pairs(tiers) do [14:20:28.049] local cur, used = {}, {} [14:20:28.050] for i = 1, #v.chance do [14:20:28.050] if( math.random(100000) <= v.chance )then [14:20:28.051] if( f )then [14:20:28.051] f = getItemInfo(item) [14:20:28.052] end [14:20:28.052] if( not f.stackable )then [14:20:28.053] for m, n in pairs(attr) do [14:20:28.053] if( not table.find(used, m) and [14:20:28.054] ( [14:20:28.055] ( table.find(n.types, MELEE) and table.find({WEAPON_SWORD, WEAPON _CLUB, WEAPON_AXE}, f.weaponType) ) or [14:20:28.055] ( table.find(n.types, DISTANCE) and f.weaponType == WEAPON_DIST a nd f.ammoType ~= 0 ) or [14:20:28.056] ( table.find(n.types, ARMOR) and f.armor ~= 0 and f.wieldPosition ~= CONST_SLOT_NECKLACE ) or [14:20:28.057] ( table.find(n.types, SHIELD) and f.defense ~= 0 and f.weaponType == WEAPON_SHIELD ) or [14:20:28.057] ( table.find(n.types, WAND) and f.weaponType == WEAPON_WAND ) or [14:20:28.058] ( table.find(n.types, DURATION_RING) and f.wieldPosition == CONST _SLOT_RING and f.transformEquipTo ~= 0 ) or [14:20:28.058] ( table.find(n.types, CHARGES) and table.find({CONST_SLOT_RING, C ONST_SLOT_NECKLACE}, f.wieldPosition) and f.charges ~= 0 ) [14:20:28.059] ) )then [14:20:28.060] table.insert(cur, m) [14:20:28.060] end [14:20:28.060] end [14:20:28.061] if( #cur ~= 0 )then [14:20:28.061] local n = cur[math.random(#cur)] [14:20:28.062] table.insert(used, n) [14:20:28.062] n = attr[n] [14:20:28.063] local percent, new, tmp = math.random(n.percent[1] + (v.extra[1] or 0), n.percent[2] + (v.extra[2] or 0)) [14:20:28.063] -- hacks [14:20:28.064] if( n.attr == 'duration' )then [14:20:28.064] tmp = getItemInfo(f.transformEquipTo) [14:20:28.064] if tmp.transformDeEquipTo ~= item then [14:20:28.065] break [14:20:28.065] end [14:20:28.066] new = round( tmp.decayTime * (1 + percent / 100) * 1000 ) [14:20:28.066] elseif( n.attr == 'attackSpeed' )then [14:20:28.067] new = round( vocation_base_attackspeed / (1 + percent / 100) ) [14:20:28.067] elseif( n.attr == 'hitChance' ) then [14:20:28.068] new = round( [14:20:28.068] f.hitChance == -1 and [14:20:28.068] percent [14:20:28.069] or [14:20:28.069] f.hitChance * (1 + percent / 100) [14:20:28.070] ) [14:20:28.070] else [14:20:28.070] new = round( [14:20:28.071] n.base and [14:20:28.071] f[n['attr']] + f[n['base']] * (percent / 100) [14:20:28.072] or [14:20:28.072] f[n['attr']] * (1 + percent / 100) [14:20:28.072] ) [14:20:28.073] if( new == f[n[n.base and 'base' or 'attr']] )then -- no improvem ent [14:20:28.074] break [14:20:28.074] end [14:20:28.074] end [14:20:28.075] doItemSetAttribute(tmpItem, n.attr:lower(), new) [14:20:28.076] local name = getItemAttribute(tmpItem, 'name') [14:20:28.077] if( v.attrNames or not name )then [14:20:28.077] local name = (v.attrNames and used[#used] or k) .. ' ' .. (name o r f.name) [14:20:28.078] doItemSetAttribute(tmpItem, 'name', name) [14:20:28.079] if( f.article ~= '' )then [14:20:28.079] local article = getArticle(name) [14:20:28.080] if( article ~= f.article )then [14:20:28.080] doItemSetAttribute(tmpItem, 'article', article) [14:20:28.081] end [14:20:28.081] end [14:20:28.081] end [14:20:28.082] local desc = getItemAttribute(tmpItem, 'description') or f.descri ption [14:20:28.082] doItemSetAttribute(tmpItem, 'description', '[' .. n.name .. ': +' .. percent .. '%]' .. (desc == '' and '' or '\n' .. desc)) [14:20:28.083] ret = k [14:20:28.083] end [14:20:28.084] cur = {} [14:20:28.084] if( #v.chance == i )then [14:20:28.084] done = true [14:20:28.085] end [14:20:28.085] end [14:20:28.086] else [14:20:28.086] done = i ~= 1 [14:20:28.086] break [14:20:28.087] end [14:20:28.087] end [14:20:28.088] if( done )then [14:20:28.088] break [14:20:28.089] end [14:20:28.089] end [14:20:28.090] return tmpItem, ret [14:20:28.090] end [14:20:28.091] local function createChildLoot(parent, i, ext, pos) [14:20:28.091] if( not i or #i == 0 )then [14:20:28.092] return true [14:20:28.092] end [14:20:28.093] local size, cap = 0, getContainerCap(parent) [14:20:28.093] for k = 1, #i do [14:20:28.093] if( size == cap )then [14:20:28.094] break [14:20:28.094] end [14:20:28.095] local tmp, ret = createLoot(i[k], ext) [14:20:28.095] if( tmp )then [14:20:28.096] if( isContainer(tmp) )then [14:20:28.096] if( createChildLoot(tmp, i[k].child, ext, pos) )then [14:20:28.097] doAddContainerItemEx(parent, tmp) [14:20:28.097] size = size + 1 [14:20:28.098] else [14:20:28.098] doRemoveItem(tmp) [14:20:28.099] end [14:20:28.099] else [14:20:28.100] if( ret )then [14:20:28.100] doSendMagicEffect(pos, CONST_ME_MAGIC_GREEN) [14:20:28.100] doSendAnimatedText(pos, ret:upper(), tiers[ret].color) [14:20:28.100] end [14:20:28.101] doAddContainerItemEx(parent, tmp) [14:20:28.101] size = size + 1 [14:20:28.101] end [14:20:28.102] end [14:20:28.102] end [14:20:28.102] return size > 0 [14:20:28.102] end [14:20:28.103] local function dropLoot(pos, v, ext, master, cid, target) [14:20:28.103] local corpse [14:20:28.103] if( not master or master == target )then -- 0.3/4 [14:20:28.103] corpse = getTileItemById(pos, v.lookCorpse).uid [14:20:28.104] if( isContainer(corpse) )then [14:20:28.104] for i = 1, getContainerSize(corpse) do [14:20:28.104] doRemoveItem(getContainerItem(corpse, 0).uid) [14:20:28.105] end [14:20:28.105] local size, cap = 0, getContainerCap(corpse) [14:20:28.105] for i = 1, #v.loot do [14:20:28.105] if( size == cap )then [14:20:28.106] break [14:20:28.106] end [14:20:28.106] local tmp, ret = createLoot(v.loot, ext) [14:20:28.106] if( tmp )then [14:20:28.107] if( isContainer(tmp) )then [14:20:28.107] if( createChildLoot(tmp, v.loot.child, ext, pos) )then [14:20:28.107] doAddContainerItemEx(corpse, tmp) [14:20:28.108] size = size + 1 [14:20:28.108] else [14:20:28.108] doRemoveItem(tmp) [14:20:28.108] end [14:20:28.109] else [14:20:28.109] if( ret )then [14:20:28.109] doSendMagicEffect(pos, CONST_ME_MAGIC_GREEN) [14:20:28.109] doSendAnimatedText(pos, ret:upper(), tiers[ret].color) [14:20:28.110] end [14:20:28.110] doAddContainerItemEx(corpse, tmp) [14:20:28.110] size = size + 1 [14:20:28.110] end [14:20:28.111] end [14:20:28.111] end [14:20:28.111] end [14:20:28.111] end [14:20:28.112] send(cid, corpse, v.description) [14:20:28.112] end [14:20:28.112] function onKill(cid, target, damage, flags) [14:20:28.113] if( (damage == true or bit.band(flags, 1) == 1) and isMonster(tar get) )then -- 0.3/4 [14:20:28.113] local v = getMonsterInfo(getCreatureName(target)) [14:20:28.113] if( v and v.lookCorpse ~= 0 )then [14:20:28.113] local s = getCreatureStorage(cid, extra_loot_key) [14:20:28.114] addEvent(dropLoot, 0, getThingPos(target), v, s == -1 and rate or s, getCreatureMaster(target), cid, target) [14:20:28.114] end [14:20:28.114] end [14:20:28.114] return true [14:20:28.115] end [14:20:28.115] :onKill [14:20:28.115] Description: [14:20:28.116] [string "LuaInterface::loadBuffer"]:53: attempt to compare number with nil [14:20:28.116] stack traceback: [14:20:28.116] [string "LuaInterface::loadBuffer"]:53: in function 'createLoot' [14:20:28.117] [string "LuaInterface::loadBuffer"]:225: in function <[string "L uaInterface::loadBuffer"]:212>
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.