• 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!

random items stats

ConAn Edujawa

Member
Joined
Feb 23, 2015
Messages
457
Reaction score
17
hello guys i use this mod
when when add
<item id="2487;2488;2491" chance="100000"/>
in monster loot give me error in this line
f.stackable and random % i.count + 1 or
and this
local tmp, ret = createLoot(v.loot, ext, cid)

the error
attempt to index local 'f' (a boolean value)
 
try
Lua:
if( random < i.chance )then
    if i.subType == -1 then
        f = getItemInfo(item)
    end

    -- Add this --
    if not f then
        return
    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
 
try
Lua:
if( random < i.chance )then
    if i.subType == -1 then
        f = getItemInfo(item)
    end

    -- Add this --
    if not f then
        return
    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
no error but this items don't drop anymore in monster
<item id="2487;2488;2491" chance="100000"/>
chance 100% but not drop it
 
Back
Top