EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Changing a NPC race in Perl, please help (https://www.eqemulator.org/forums/showthread.php?t=37437)

rixcraven 10-27-2013 12:24 PM

Changing a NPC race in Perl, please help
 
ub EVENT_SPAWN {
#Set a random timer between 5 and 30
my $StartMove = int(rand(25)) + 5;
quest::settimer("roam", $StartMove);
}

sub EVENT_TIMER {
if ($timer eq "roam") {
quest::stoptimer("roam");
plugin::RandomRoam(100, 100);
my $NextMove = int(rand(25)) + 5;
quest::settimer("roam", $NextMove);
}
sub EVENT_COMBAT {
quest::npcfeature("race", 454);


}
sub EVENT_SLAY {
quest::npcfeature("race", 1);
}
}

This script is supposed to change an NPC, from human female into a Werewolf when she is attacked..
Could anyone shed any light on why it isn't working???
What happens is, she changes into a human female??? not a werewolf..
please help :)

NatedogEZ 10-27-2013 12:40 PM

Guessing you need to change Gender to 2 when she turns into a werewolf, then back to 1 for female when she dies.

rixcraven 10-27-2013 01:12 PM

Quote:

Originally Posted by NatedogEZ (Post 225326)
Guessing you need to change Gender to 2 when she turns into a werewolf, then back to 1 for female when she dies.

I got the first change to work :)
I used quest::npcrace(454) and she turns into a lovely werewolf :)

However, she won't change back after she's killed whatever attacked her,
Any ideas????

I'm halfway there!!

Kingly_Krab 10-27-2013 01:20 PM

You could use quest::npcrace(1); and quest::npcgender(1); to possibly solve your issue.

rixcraven 10-27-2013 01:38 PM

Solved!!!
 
Quote:

Originally Posted by Kingly_Krab (Post 225328)
You could use quest::npcrace(1); and quest::npcgender(1); to possibly solve your issue.

THANKS :) :)
Got it....
She's working beautifully!

knowom 10-29-2013 02:08 AM

This was a cool idea btw rixcraven defiantly gives me ideas heck you could devote a entire zone like Kithicor Forrest to a Human vs Lycan vs Vampire scenario of sorts or maybe a couple of zones even so the Lycans and Vampires would retreat to some tunnel dwellings free from daylight then come out at night again.

rixcraven 10-31-2013 03:26 PM

I know!!! lol if only I had the ability :)
The npc is Angua (from Discworld), and it looks really great when players see her change into a werewolf and back..
I too would love to use the day/night cycles, how are you at using them?

Akkadius 10-31-2013 03:50 PM

The excitement that you guys are sharing with eachother reminds me of...



All times are GMT -4. The time now is 04:56 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.