![]() |
Adding exp once baddy killed
Well no matter how much I try I can't seem to get this script working! First the baddies join monster_base with their attributes set, then
PHP Code:
|
Unless your damage is negative:
this.hp += damage; should be this.hp -= damage; |
Ah yes well my damage wasn't being set through the triggers or something and dealing -1 so i used +=
|
Well judging by your code you still let them hit the NPC for whatever reason so just do something like...
PHP Code:
|
But how do I send the attacker param in the trigger? Talking about the sword and how do I get the baddy to add the exp to attacker
Edit: The damage system receives player.DoAttack and then triggers onNPCHit to the baddy |
pass player.account as a parameter then.
Here's a little example that might help you understand parameters a bit better. PHP Code:
findplayer(attacker).addEXP(amount); |
| All times are GMT +2. The time now is 12:39 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.