GetRace issue
Basically, I have some guards I'm messing with.
When they spawn I have them randomly set to choose between different textures (different guards from different zones.. Qeynos, Freeport, Kelethin, etc..) The issue I'm having right now is that Qeynos guards are race 71, but texture 1.. so I'm trying to make it so that when they spawn my script checks to see if it is race 71, and if it is race 71 it will change the texture to 1. What I have right now isn't working, and when I added a say event to see what the race was returning as I get nothing, can someone please tell me what I'm doing wrong? Code:
sub EVENT_SPAWN { |
I can not see anything wrong with what you have and I do not have time right now to test it. Here is what I do with my guards.
Code:
sub EVENT_SPAWN { |
There isn't a variable named $mob that is exported. You will want to use $npc instead and it should work fine.
Change both instances that you have of this: Code:
$mob->GetRace(); Code:
$npc->GetRace(); |
your logs should tell you what the issue is. $mob is not defined anywhere in your script. you want to use $npc.
edit: what trevius said. |
It's working now, I guess I got a bit confused when it said "Mob" in the wiki page.. Thanks guys!
|
those are interfaces to functions which are defined for mob objects in C++. both npcs and clients are derived from the mob class, so they are listed there instead of in each individual category. functions that are listed specifically for the client or npc objects are generally unique to the type of object they are listed in.
|
All times are GMT -4. The time now is 04:06 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.