• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Mod] Random Item Stats

tfs 0.4
Code:
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
:onKill
Description:
[string "LuaInterface::loadBuffer"]:216: attempt to call global 'isContainer' (a nil value)
stack traceback:
        [string "LuaInterface::loadBuffer"]:216: in function <[string "LuaInterface::loadBuffer"]:212>

When i kill a monster
 
tfs 0.4
Code:
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
:onKill
Description:
[string "LuaInterface::loadBuffer"]:216: attempt to call global 'isContainer' (a nil value)
stack traceback:
        [string "LuaInterface::loadBuffer"]:216: in function <[string "LuaInterface::loadBuffer"]:212>

When i kill a monster

Try adding this to your functions library:
Code:
function isContainer(uid)
    local thing = getThing(uid)
    return thing.uid > 0 and thing.items ~= nil
end
 
where the hell is my functions library?
Check your data/lib folder for a 050-function.lua or shortcut.lua.
If you can't find those just put in your global.lua and restart your server.
 
Check your data/lib folder for a 050-function.lua or shortcut.lua.
If you can't find those just put in your global.lua and restart your server.
i get this error now

Code:
[string "LuaInterface::loadBuffer"]:53: attempt to compare number with nil
stack traceback:
        [string "LuaInterface::loadBuffer"]:53: in function 'createLoot'
        [string "LuaInterface::loadBuffer"]:225: in function <[string "LuaInterface::loadBuffer"]:212>
 
00:06 You see epic plate legs (Arm:9).
It weighs 50.00 oz.
[Armor: +23%]

this mod wont make my armor go up it should be like 9 + 2
 
00:06 You see epic plate legs (Arm:9).
It weighs 50.00 oz.
[Armor: +23%]

this mod wont make my armor go up it should be like 9 + 2

Plate legs are normally arm 7, 7+2 = 9.
 
The thing with containers not being filled could be because of outdated libs (more specifically ITEM_GROUP_CONTAINER missing from 000-constant.lua resulting in faply isContainer)

add name check before this line:
Code:
    for k, v in pairs(tiers) do

ITEM_GROUP_CONTAINER
0.4 rev
I added that and most things work fine, but im still not getting any loot in monster bags, they are empty

ALSO im not getting any upgraded ranged items?
 
added this to my server now my bosses arent dropping any loot in bps, and all monsters that drop bags with loot in them are dropping the bag but no loot
 
this script don't work for tfs 0.4 dev when kill monster no loot and when change monsterlootmsg to 0 no loot and no msg and when kill monster all script appear in consol :S anyone know why ?
 
Back
Top