• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[SOLVED] [TFS 1.0] Skull Debuff & LvL Diff Buff/Debuff

Eldin

Eldin Projects
Joined
Jun 12, 2008
Messages
1,334
Reaction score
615
Location
Sweden
Greets!

Im about to request a debuff for Skulls and a LvL Diff Buff/Debuff.
I guess it will be done in CreatureScripts and should be kinda easy, just mixed it up in my mind abit >.<

Skull Debuff:
If Player has White skull, set -10% to ALL skills. (will ofcourse go away once the White skull is gone)
If Player has Red Skull, set -20% to ALL skills. (will ofcourse go away once the White skull is gone)

LvL Diff Debuff:
*If a Player is attacking (no matter how it started) Another Player with 20 lvls HIGHER or MORE, he gain +10% in "ALL" skills.
*If a Player is attacking (no matter how it started) Another Player with 20 lvls LOWER or MORE, he gets -10% in "ALL" skills.

*ALLskills will refer to fist, distance, axe, sword, club, shielding and magic lvl.

I will ofcourse make a better system out of this and then release, in this way, a player will Think twice Before attacking Another lower just for fun.

Kind Regards,
Eldin.
 
So, if I have a white skull (-10%) and attack someone 20 lvl above me (+10%) it's back to zero difference.
Just noticed that because I'm scripting that right now :)
Should I leave it like that?
 
2 things eldin:

1st solution would be to not use percentages, you could use some static values, like +10 skill_fist for example.
The reason is, if you want to script that with conditions (CONDITION_PARAM_SKILL_XXX) then you have to define the value (increasing, decreasing) before the script actually get's executed.
You cannot define the value when the script get's executed (no global variables, no tables, nothing, just static ones)

2nd solution (I'd call it "unhandy")
Database Queries.
At first you do the math to get exactly 10% of every skill, then you kick the player, update the DB, let him login again, Poff Debuff.
I think that this solution would be rather annoying, due to players hitting each other with friends, if one get's a skull he'll get kicked "into safety".
If you update the DB while the player is still online then nothing would change, after he logs in and out he has his normal skills back.

*3rd solution* But this is more of a joke :D
You could script like 20 conditions, every condition has it's different skill increases/decreases, reaching from SKILL +1 to SKILL +20.
Though every skill (fist, club,...) would change at the same value.
You simply do the math to get nearly 10% of his average skills and then choose the right condition afterwards.

What shhould it be?

*If someone knows another way of doing this, be my guest! I HATE to definde conditions at the serverstart since 7.4 -.-
Pointing at devs! DO SOMETHING!
 
Back
Top