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 10-21-2009, 02:46 PM
nightsta69
Hill Giant
 
Join Date: May 2005
Posts: 134
Default quest::setanim bug, known or not?

somethin I found out while working on my tutorial zone,
Code:
quest::setanim(npcID,3);
causes zone.exe crashes if it is placed in an NPC pl. is this known, and is there a fix for it? I have it placed in sub EVENT_SPAWN. so when the NPC spawns, its spawns lying down, like its passed out, but as soon as it spawns, zone crashes.
__________________
Server Op of Bonds of Strength(custom-Legit)
Reply With Quote
  #2  
Old 10-21-2009, 04:09 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Previously, you had to set a timer before changing the animation to make them lay down like this:

Code:
sub EVENT_SPAWN {

	quest::settimer("sleep",5);

}

sub EVENT_TIMER {

	if ($timer eq "sleep") {
		quest::stoptimer("sleep");
		$npc->SetAppearance(0);
		$npc->SetAppearance(3);
		quest::settimer("sleep",300);
	}

}
But, I think this should work for it now:

Code:
sub EVENT_SPAWN {

	$npc->SetAppearance(3);

}
I am not aware of any crashes like you explained, but maybe there was something you did wrong, I dunno. At least one of these ways should work out for you. The reason the timer one is set to repeat is because we previously did not send out appearance packets for animations for new people zoning in, so you would have to set the appearance repeatedly so new players zoning in could see it.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 10-21-2009, 04:31 PM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 506
Default

Hmm.
void QuestManager::setanim(int npc_type, int animnum) {
//Cisyouc: adds appearance changes
Mob* thenpc = entity_list.GetMobByNpcTypeID(npc_type);
if(animnum < 0 || animnum >= _eaMaxAppearance)
return;
thenpc->SetAppearance(EmuAppearance(animnum));
}
There's no checking to ensure the mob is valid before setting the appearance.
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote
Reply


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 05:27 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