![]() |
giveweapon help?
Alright so i got this script NPC i want it to give the player that killed the NPC a weapon, but have no idea how i'd start this, or even make it any suggestions?
Will be appreciated. |
I suggest that when the NPC is slashed by way of the onWa****() event, it will add the weapon to the player like so:
PHP Code:
|
Quote:
remove the . |
Your baddy should have an event that is called when it dies.
If you're using a classic system track the last person who hit the baddy using was hit (no space). PHP Code:
findplayer(this.last_attacker).addweapon("SomeWeap onName"); |
PHP Code:
I believe that should be the final script, or something around there. =) Also, remember rule one of posting in the scripting section of the Graal Forums. Quote:
|
Quote:
1. You can only loop at the speed of 0.1 seconds on the server-side. 2. Your "solution" would constantly add the weapon to the player while it's dead. 3. A properly scripted baddy would have a onBaddyDies event or similar making your timeout pointless. 4. See Quote. Quote:
|
[QUOTE=BboyEatsbacon;1658989]
PHP Code:
Quote:
PHP Code:
|
Quote:
No that's not what I want to say at all. My posts indicate that the weapon should be added when the baddy dies not when it's hit and it's health is 0. |
I'm curious as to whether this is supposed to be something happening with every baddy of that type, or just one specific baddy.
If it's a one-off baddy then within the class script it might be a good idea to do something like: PHP Code:
PHP Code:
|
| All times are GMT +2. The time now is 11:19 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.