Log in

View Full Version : npcid command


bufferofnewbies
12-08-2006, 10:28 AM
currently $mobid returns an entityID (changes each spawn cycle, since its a track of current spawns i believe) instead of NPCID.

Is there a command variable to identify the npcid of a mob for the purpose of effects like quest::castspell(npcid, spell id). I currently have npcs that are requiring a conditional casting, but with the number of them created: I was rather hoping to find a variable instead of making a new pl file for each npc. Adding the spell to their spelllist in hopes they cast it at the proper times isnt a real option due to the nature of the spell's intent.

reason behind it:
Im trying to get an unconscious npc to cast a long duration Feign Death upon spawning and quest::doanim(16) just doesnt seem to work.
(I believe that is due to the emotes currently being bugged on 0.7.0)

John Adams
12-09-2006, 06:12 PM
The only thing I see in the quest*.* code seems to be about globals. As tedious as this may sound, you might try scrounging through the existing quest pl files for events that specifically id a spawned mob in order to do something else. Pretty sure all I've ever seen is entityid tho... might need to make a new quest command.

Cripp
12-11-2006, 02:59 PM
if you want the npc to spawn lying down you can do this..

sub EVENT_SPAWN
{
quest::settimer("L1",1);
}

sub EVENT_TIMER
{
if ($timer eq "L1")
{
$npc->SetAppearance(16);
quest::stoptimer("L1");
}
}

bufferofnewbies
12-11-2006, 03:10 PM
if ($timer eq "L1")

Please dont tell me the only reason I have been going thru all this trouble is the fact that I was using ($timer == instead of ($timer eq in my origional attempt.

The npcid thing came later...

Hmm, looking back over the text before I post:

$npc->SetAppearance(16);

so 'Death Form' isnt an emote, but Appearance. Yet another reason it wasnt working. I don't feel too bad now. Since I was WAY out in left field on my command lines. If I had been closer to having the right code, it would have actually been much worse on my ego.

Many thanks for the coding hand, Cripp!

bufferofnewbies
12-11-2006, 04:09 PM
ok, I did a little experimenting with this:

useing:
sub EVENT_SPAWN {
quest::settimer("L1",10);
quest::say("starting timer.");
}
sub EVENT_TIMER {
if ($timer = "L1") {
$npc->SetAppearance(FILL IN THE NUMBER HERE);
quest::stoptimer("L1");
quest::say("stop timer");
}
}

I was breaking down the effects to see what was allowed and what wasnt.
It appears only 5 appearances are allowed by this command:

0. default/ standing
1. sitting
2. ducked
3. dead
4. kneeling

I didnt test past this, as I was seeking the Death form, so not sure if it continues on further (sorry, i should have thought of that)

Thanks again for the insight, as it was the $npc->SetAppearance() line that I was totally missing, and never would have found it without ya. :)

fathernitwit
03-03-2007, 11:51 AM
please wiki this, else it will be lost over time.

bufferofnewbies
03-05-2007, 01:28 PM
I'm slow, but steady: http://www.eqemulator.net/wiki/wikka.php?wakka=SetAppearance
Not sure how to set it for linking back to other areas yet, unless that is automatic. Will read up more on that later.