EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   How do I make an NPC my pet? (https://www.eqemulator.org/forums/showthread.php?t=26662)

thepoetwarrior 10-29-2008 12:24 PM

How do I make an NPC my pet?
 
I want to put NPC's in some zones that a user can hail them, and make them their pet for that zone as a charmed mob and/or pet. These will be non-aggro NPC's at zoneline with level and stats appropriate for the current zone.

An easy way that I dont want, is to put Dire Charm (actually, Spell ID 2761 Dominating Gaze) onto an item as a clickie to perminately charm an NPC.

So Im trying to use quest code. The stuff I've tried already are

Code:

quest::selfcast($mobid,2761);
quest::castspell($mobid,2761);
$client->UseDiscipline(2761,$mobid);
$client->castspell($mobid,2761);
$mob->SetOwnerID($userid);
$npc->SetOwnerID($userid);

Im running out of ideas. I tried running bots before, but users were using 5 bots per box in all the zones. I'd like to limit which zones, and to 1 pet/bot/npc per user. Figured it could be done in quest code, but its just not working. Any ideas how it can be done? I've check all the QuestObjects in the wiki's and the tutorial, etc. Please help.

kayen85 10-30-2008 02:29 AM

Here is a way I came up with a while ago and it works for what you want.

Here is how to do it. You need to add a new pet to the pet dbase, just do it in Navcat. Make sure to create the pet as an NPC in your dbase. Then use the following...

$client->MakePet(null, DBPetName, "Pet Name");
DBPetName is the pet dbase name for the new pet
"Pet Name" is the of the pet the player will get.

Code:

sub EVENT_SAY {

if ($text=~/hail/i) {
quest::say ("I will be your pet");
$client->MakePet(null, TestPet, "Light Elemental");
}
}

This summons a pet called "Light Elemental"

Kayen
GM Stormhaven

thepoetwarrior 10-30-2008 09:27 AM

Your a life saver! Thanks! (Will test soon)

thepoetwarrior 10-30-2008 11:28 AM

Update: Users are happy

kayen85 10-30-2008 03:48 PM

Glad I could help!

Kayen
GM Stormhaven


All times are GMT -4. The time now is 01:02 AM.

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