Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 03-12-2016, 09:44 PM
Tabasco's Avatar
Tabasco
Discordant
 
Join Date: Sep 2009
Posts: 269
Default

This comes from intercepting a command like !petname <name>. I was flowing those through a universal world script at the time so that a player could just type it in chat without needing an NPC receiver, but these days I gather there are more convenient ways to do it.

Code:
    if($text =~/^!petname/i)
    {
        my $pid = $client->GetPetID();
        my $pet = $entity_list->GetMobByID($pid);

        if($pet)
        {
            ($cm, $petname) = split(/\ /, $text, 2);
            $pet->TempName($petname);
            $client->Message(315, "Your pet name has been changed.");
            $client->Message(315, "This is a family friendly server.  Please be considerate when choosing a pet name.");
        }
    }
While we're at this, I also see I had a pet size function.

Code:
    if($text =~/^!petsize/i)
    {
	my $pid = $client->GetPetID();
        my $pet = $entity_list->GetMobByID($pid);
        if($pet)
        {
  	    my $cursize = $pet->GetSize();
            ($cm, $petsize) = split(/\ /, $text, 2);
			if ($petsize > 9)
			{
				$petsize = 9;  ## Not abnormally large
			}
			if ($petsize < 1)
			{
				$petsize = 1;  ## Not abnormally small
			}
			$newsize = $petsize - $cursize;
            $pet->ChangeSize($petsize);
            $client->Message(315, "Your pet's size has been changed.");
            $client->Message(315, "Please do not abuse this function.  Extremely large pets can lag the zone and cause issues for other people.");
        }
    }
__________________
http://dungeoncrawl.us.to
Reply With Quote
  #2  
Old 03-12-2016, 10:50 PM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 506
Default

Doesn't stay after zoning I assume, nor does it retain after relogging, right?
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:13 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3