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

CreatureEvent Boss Reward

So technically, you only want players who aren't in party to get reward? Am i correct?
 
Just wanted to point out that you could technically create an onStatsChange script with a global table, and insert each players damage into it..
This way you don't require a source edit to get the functionality you want.

Then when the onKill event is called, you could iterate through the damage values from the global table, and find out who's done most, second_most, third_most damage.
Then of course give special or tiered loot based on those values.

Although I think this is poor game design, as your not taking into account everyone's contributions to the fight.
Damage Received / Damage Dealt / Damage Mitigated (shields) / Damage Healed

And then, if it's a multi-event boss, you could add in other attributing factors that lead to or end each event.

oh well. xP
 
Last edited by a moderator:
Just wanted to point out that you could technically create an onStatsChange script with a global table, and insert each players damage into it..
Then when the onKill event is called, you could iterate through the damage values from the global table, and find out who's done most, second_most, third_most damage.
Then of course give special or tiered loot based on those values.

Although I think this is poor game design, as your not taking into account everyone's contributions to the fight.
Damage Received / Damage Dealt / Damage Mitigated (shields) / Damage Healed

And then, if it's a multi-event boss, you could add in other attributing factors that lead to or end each event.

oh well. xP
You're gonna miss lots of things..
1-Player attacked then died, you will need a onDeath script, that when any player dies.. you will have to go through the list to remove his name
2-A normal player attacking, you stored his old attack once, the next time you can't add it to the table, you have to go through the table and find his name and change this value
3-You'll have to create a global table for each boss(can be avoided i suppose)
4-A player hit the boss and long time passed,Does it still remain the attack?
It'll be more like hardcoded and hard to debug
 
You're gonna miss lots of things..
1-Player attacked then died, you will need a onDeath script, that when any player dies.. you will have to go through the list to remove his name
2-A normal player attacking, you stored his old attack once, the next time you can't add it to the table, you have to go through the table and find his name and change this value
3-You'll have to create a global table for each boss(can be avoided i suppose)
4-A player hit the boss and long time passed,Does it still remain the attack?
It'll be more like hardcoded and hard to debug
1) when a player dies, they are no longer online and/or not in the boss area any longer. You can simply check to ensure they are within a specific area before distributing rewards
2) table_value = table_value + new_value -- doesn't seem that hard or complicated.
3) global_boss_table = {} -- each creature has a unique cid, more or less.. and yes it can overlap eventually, but when the boss dies, just clear the table of it's values after 30 seconds using an addEvent, so it doesn't interfere with onKill scripts et cetera.
4) You could add a time-stamp to the original attack, and if it's been longer then x minutes, then overwrite the time stamp & attack values to start fresh.


Anyways, I'm not arguing that it'd be a pain in the ass to set-up / think of all situations where it could break, I was just stating that it didn't require a source it.
 
1) when a player dies, they are no longer online and/or not in the boss area any longer. You can simply check to ensure they are within a specific area before distributing rewards
2) table_value = table_value + new_value -- doesn't seem that hard or complicated.
3) global_boss_table = {} -- each creature has a unique cid, more or less.. and yes it can overlap eventually, but when the boss dies, just clear the table of it's values after 30 seconds using an addEvent, so it doesn't interfere with onKill scripts et cetera.
4) You could add a time-stamp to the original attack, and if it's been longer then x minutes, then overwrite the time stamp & attack values to start fresh.


Anyways, I'm not arguing that it'd be a pain in the ass to set-up / think of all situations where it could break, I was just stating that it didn't require a source it.
What you stated above is all true,And could be done..but source edit would just make it 10x easier,just that
 
Do someone know if this script work for tfs 1.2? If not can someone help me to make it work on tfs 1.2?
 
if i need to send the loot to onther thing like reward chest what should i do?
 
received_766988360327220.pngwe alrady test but we have a proplem the loot dosen't send to the depot and i need to change it to reward cheat like nomal chest to get loot from it.
thanks🤗received_545457715921913.png
 

Attachments

  • received_545457715921913.png
    received_545457715921913.png
    56.7 KB · Views: 8 · VirusTotal
Thank you :) Can confirm everything except for the Mailing function working on TFS 1.3
 
Not working in tfs 0.4
No error in console but nothing happens =/
 
not working for me too, tfs 1.3 downgrade to 8.6 by nekiro, no errors in console...
 
I'm trying to use it on othire 0.0.3 7.72 and it doesn't working
I added script in creaturescrpits and also
<event name="bossloot" type="kill" script="bossloot.lua"/>
 
Back
Top