Getting a player's PVP status.
Hi Everyone,
In the interest of keeping things brief i'll cut out a snippet of what i'd like to do overall. I'm interested in having the perl quest return SOMETHING that shows if a player is PVP flagged or if they are NON PVP flagged. Be it a 1 or a 0, true/false no matter. Here is some super basic code to get an npc to tell you if you are PVP flagged or not. I searched to see what I could find with SetPVP but couldn't find anything and found some GetPVP references in the cpp code. Not sure if this is the right direction or not but would appreciate any help. Code:
sub EVENT_SPAWN { |
Pretty sure you can't use $client in a spawn event as there are no clients to pull info from as the mob spawns. If you put it in the say event then it will be able to properly identify the client that initiates the event.
|
hah you rock and i'll tell you why.
changing it to Code:
sub EVENT_SAY { But don't worry, if you are PKable it WILL return 1. My problem was that I was testing it in a "pvp safe" area I have coded in. Thanks for pointing that out - it's the little things that wind up fixing it. |
All times are GMT -4. The time now is 02:09 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.