|
1. How do I check the vnum of a mobile?
|
|
Sun Sep 25, 2005 [8:38 PM]
|
JgzofTBW
tbwadmin@dune.net
member since: Sep 20, 2005
|
Reply
|
|
I know this is probably incredibly simple, but I'm fairly retarded. I'm trying to make a function act differently in the case of a specific mob, so I need a way to check the vnum.
I'm using a godwars codebase. Right now I have this going
if (IS_NPC && (ch->MOB_INDEX_DATA->vnum > 44999) && (ch->MOB_INDEX_DATA->vnum < 45001))
and its a complete failure. =[
Help!
TYIA
|
|
|
|
|
2. RE: How do I check the vnum of a mobile?
|
|
Sun Sep 25, 2005 [9:06 PM]
|
JgzofTBW
Email not supplied
member since: Sep 20, 2005
|
In Reply To
Reply
|
|
I seem to have gotten past the compiler blocks, and this is what I have now:
if (!IS_NPC(ch)) { if (max_dam > 30000) max_dam = 30000; if (ch->level == MAX_LEVEL) max_dam = 30000; } // else if (pMobIndex->vnum = 45000) // max_dam = 29000; else max_dam = 30000; ch->damcap[DAM_CAP] = max_dam; ch->damcap[DAM_CHANGE] = 0;
The thing is, if I remove those //'s, the mud crashes whenever the mob tries to hit me.
Whats wrong? =/
|
|
|
|
|
3. RE: How do I check the vnum of a mobile?
|
|
Sun Sep 25, 2005 [9:22 PM]
|
Sigma_
Email not supplied
member since: Dec 29, 2004
|
In Reply To
Reply
|
|
Based on what you have pasted there, you only have one equal sign in the commented-out else/if check. You need two. I.e: else if (pMobIndex->vnum == 45000)
|
|
|
"I'll say it right to your face. I swear to god I will." - Donny Baker, Bob & Tom Show
|
|
4. RE: How do I check the vnum of a mobile?
|
|
Mon Sep 26, 2005 [10:52 AM]
|
Drey
Email not supplied
member since: Mar 19, 2000
|
In Reply To
Reply
|
|
|
|
|
|