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

Tfs 1.2 Reward Chest

oualid6496

Well-Known Member
Joined
Aug 24, 2014
Messages
408
Solutions
4
Reaction score
78
Location
Dordrecht, The Netherlands
So im using this reward chest https://github.com/otland/forgottenserver/pull/1641 and everything seems to be working fine. It goes to the reward chest, unique drops drop only once (like ferumbrass hat) but I tested the script with 2 players kill ferumbras and it seems that the loot of ferumbras get doubled. They both get all the items except for the hat. So the unique drop (ferumbras hat) is working but other items like furious frock all get doubled. Does anyone else have or had this problem and does anyone know how to fix it?
 
Lower the chance of drop so it will have less chance to get doubled. Btw. it works like that on global, you can get multiple rewards of the very same item, unless it's feru hat like u've mentioned.
 
Lower the chance of drop so it will have less chance to get doubled. Btw. it works like that on global, you can get multiple rewards of the very same item, unless it's feru hat like u've mentioned.
Yes but let's say 2 people kill ferumbras both players will get exactlly the same items so also all the rares except for the ferumbras hat. Items that can stack like gold coins aren't the same. I am using a global monster pack but is it because my loot rate is 2x?
 
Well, that might be a bug. Please go to your data/lib/reward folder and open reward.lua(of course if it's placed there).
Search for
Code:
configManager.getNumber("rateLoot")
and change to
Code:
configManager.getNumber(configKeys.RATE_LOOT)
Restart server or reload global and tell me if it worked.
 
Well, that might be a bug. Please go to your data/lib/reward folder and open reward.lua(of course if it's placed there).
Search for
Code:
configManager.getNumber("rateLoot")
and change to
Code:
configManager.getNumber(configKeys.RATE_LOOT)
Restart server or reload global and tell me if it worked.
So I have to change
Code:
    local randvalue = math.random(0, 100000) / (configManager.getNumber("rateLoot") * chance)

to
Code:
    local randvalue = math.random(0, 100000) / (configManager.getNumber(configKeys.RATE_LOOT) * chance)

and
Code:
    if configManager.getNumber("rateLoot") > 0 then

to
Code:
    if configManager.getNumber(configKeys.RATE_LOOT) > 0 then

but that seems to fuck up the script :p
 
Back
Top