• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.
[TFS 1.4.2] Reward Chest System with Common, Uncommon, Rare, Very Rare, Always Available Rarities

[TFS 1.4.2] Reward Chest System with Common, Uncommon, Rare, Very Rare, Always Available Rarities

Mateus Robeerto

Legendary OT User
Joined
Jun 5, 2016
Messages
1,744
Solutions
92
Reaction score
1,256
Location
ლ(ಠ益ಠლ)
Mateus Robeerto submitted a new resource:

[TFS 1.4.2] Reward Chest System with Common, Uncommon, Rare, Very Rare, Always Available Rarities - reward chest

With this system developed by TFS 0.4 8.60 by @Luan Luciano Brasileiro, I took it and adapted it for TFS 1x

Basically, the system works as follows:

  • You determine the creatures that will work with this system (usually bosses).
  • During the battle with the creature, the system awards points to players for attacking, blocking, and supporting (healing) those in battle.
  • When the creature is killed, the system creates loot based on the...

Read more about this resource...
 
da error

Lua Script Error: [Scripts Interface]
C:\Users\Martin\Downloads\ProjectoKabo\Server Baiak-Kabo\baiakthunder-master\data\scripts\BossRoom.lua:callback
...Baiak-Kabo\baiakthunder-master\data\scripts\BossRoom.lua:135: attempt to perform arithmetic on field 'suport' (a nil value)
stack traceback:
[C]: in function '__div'
...Baiak-Kabo\baiakthunder-master\data\scripts\BossRoom.lua:135: in function <...Baiak-Kabo\baiakthunder-master\data\scripts\BossRoom.lua:121>
[C]: at 0x7ff6afde5a20
 
if you hit monster with single hit it doesnt register reward
Post automatically merged:

da error

Lua Script Error: [Scripts Interface]
C:\Users\Martin\Downloads\ProjectoKabo\Server Baiak-Kabo\baiakthunder-master\data\scripts\BossRoom.lua:callback
...Baiak-Kabo\baiakthunder-master\data\scripts\BossRoom.lua:135: attempt to perform arithmetic on field 'suport' (a nil value)
stack traceback:
[C]: in function '__div'
...Baiak-Kabo\baiakthunder-master\data\scripts\BossRoom.lua:135: in function <...Baiak-Kabo\baiakthunder-master\data\scripts\BossRoom.lua:121>
[C]: at 0x7ff6afde5a20
remove line 134 "suport"


local newPoints = currentPoints + math.ceil(add / REWARDCHEST.formula.suport)
[[ \/ to admins when copying from resources this pastes ]]
<span>local</span> newPoints <span>=</span> currentPoints <span>+</span> math<span>.</span><span>ceil</span><span>(</span>add <span>/</span> REWARDCHEST<span>.</span>formula<span>.</span>suport<span>)</span>
 
Code:
2024-08-23_20-51-13.035175 Lua Script Error: [Scripts Interface]
2024-08-23_20-51-13.035191 /var/www/tfs_old/data/scripts/custom/others/boss_reward.lua:callback
2024-08-23_20-51-13.035204 /var/www/tfs_old/data/scripts/custom/others/boss_reward.lua:134: attempt to perform arithmetic on field 'suport' (a nil value)
2024-08-23_20-51-13.035216 stack traceback:
2024-08-23_20-51-13.035228     [C]: in function '__div'
2024-08-23_20-51-13.035240     /var/www/tfs_old/data/scripts/custom/others/boss_reward.lua:134: in function </var/www/tfs_old/data/scripts/custom/others/boss_reward.lua:120>
2024-08-23_20-51-13.035254     [C]: at 0x556a386baab6
 
Code:
2024-08-23_20-51-13.035175 Lua Script Error: [Scripts Interface]
2024-08-23_20-51-13.035191 /var/www/tfs_old/data/scripts/custom/others/boss_reward.lua:callback
2024-08-23_20-51-13.035204 /var/www/tfs_old/data/scripts/custom/others/boss_reward.lua:134: attempt to perform arithmetic on field 'suport' (a nil value)
2024-08-23_20-51-13.035216 stack traceback:
2024-08-23_20-51-13.035228     [C]: in function '__div'
2024-08-23_20-51-13.035240     /var/www/tfs_old/data/scripts/custom/others/boss_reward.lua:134: in function </var/www/tfs_old/data/scripts/custom/others/boss_reward.lua:120>
2024-08-23_20-51-13.035254     [C]: at 0x556a386baab6
read my message above
 
read my message above
Why should I remove it? After all, it's responsible for something.
I also checked the old system for TFS 0.4 and there is such a line there too.

It seems to me , the problem occurs when a support player hits a few times and falls , then is offline.
Then he can not set a value for support?
 
ok well friend using it he removed the line and its working but you go be smart
nerd-nerd-emoji.gif

ah just glanced at code just add extra p
not suport
but support

ttempt to perform arithmetic on field 'suport' (a nil value)

this here says there is no such thing as suport but i looked and there is "suPPort"
 

Attachments

Hello, I added this system and it doesn't work. loot is not in the depot.
I changed the line.
Yes, everything is fine, but it doesn't give me deposit rewards.
Do you know why? TFS 1.5 Downgrade 8.6
----
I managed to solve it.
Everything works fine!

LUA:
local townId = player:getTown():getId()   
local depotChest = player:getDepotChest(townId, true)   
chest:moveTo(depotChest)
 
Last edited:
Everything works fine!
Glad you managed to do it! I've already updated the topic. Thanks!!
Post automatically merged:

Code:
2024-08-23_20-51-13.035175 Lua Script Error: [Scripts Interface]
2024-08-23_20-51-13.035191 /var/www/tfs_old/data/scripts/custom/others/boss_reward.lua:callback
2024-08-23_20-51-13.035204 /var/www/tfs_old/data/scripts/custom/others/boss_reward.lua:134: attempt to perform arithmetic on field 'suport' (a nil value)
2024-08-23_20-51-13.035216 stack traceback:
2024-08-23_20-51-13.035228     [C]: in function '__div'
2024-08-23_20-51-13.035240     /var/www/tfs_old/data/scripts/custom/others/boss_reward.lua:134: in function </var/www/tfs_old/data/scripts/custom/others/boss_reward.lua:120>
2024-08-23_20-51-13.035254     [C]: at 0x556a386baab6
It’s better if you use the reward boss system by Blacktek; I heard he made it in C++.
 
Glad you managed to do it! I've already updated the topic. Thanks!!
Post automatically merged:


It’s better if you use the reward boss system by Blacktek; I heard he made it in C++.
Hi!
BlackTek code have many changes on sources.
I try add BT Reward Boss System to TFS 1.4.3 but have errors.
 
Back
Top