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 04-21-2008, 05:31 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default Changing textures with a quest?

Does anyone know if there is a way to change textures via a quest command? I would love to get my Quarm encounter actually working more similar to live. Each #texture you change, he loses a head. I would just set it to change it every 25% of life or so.

On another note; it would be nice if there was a way to change NPC races via a quest. Then, I could set up a loop on a timer that adds +1 to the race every 3 seconds. Then set it to pause the quest by hailing it if I want and resume by saying "resume" or something. That would make it easy to see which races are available in any zone. Just set up 3 NPCs with each one being gender 0, 1 and 2 and then run the quest. Then either pause on the ones that actually show up, or just #npcstats on them when they do. This would mainly be useful in the later expansions that don't have all races listed in the guidebook.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
Old 04-21-2008, 12:33 PM
Mortimus
Fire Beetle
 
Join Date: Jan 2003
Location: P-town
Posts: 18
Thumbs down Same here

I have been trying to accomplish the same thing for quiet some time now, and nothing I seem to do works.
__________________
~Mortimus~
Mortimus
Reply With Quote
  #3  
Old 04-21-2008, 01:08 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

The Quarm event is already setup in PEQ. I know because I wrote it. NPCs 223991-223994 in potimeb.

You do not want to change the texture of a single NPC, you want to use 4 different NPCs each with a different texture. This is how it works on Live, because each time a head is killed, Quarm is stripped of all buffs and debuffs and you have to re-target him.
Reply With Quote
  #4  
Old 04-21-2008, 01:19 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

Also, Each of the 4 heads have a different spellset
Reply With Quote
  #5  
Old 04-21-2008, 01:28 PM
Mortimus
Fire Beetle
 
Join Date: Jan 2003
Location: P-town
Posts: 18
Default Ok

Ok, how bout the changing of an npc's race during a quest? or changing his size? w/o spawning a new npc?
__________________
~Mortimus~
Mortimus
Reply With Quote
  #6  
Old 04-21-2008, 02:51 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Quote:
Originally Posted by Mortimus View Post
Ok, how bout the changing of an npc's race during a quest? or changing his size? w/o spawning a new npc?
This page in the Wiki should help with what you're trying to do.

It doesn't look like you can change the race using a quest, but you should be able to change their size:

Code:
$mob->ChangeSize(in_size)
Just execute that where you want in the script, and it should change the size to in_size (which I think is a float).
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #7  
Old 04-21-2008, 03:42 PM
Striat
Sarnak
 
Join Date: Aug 2006
Posts: 60
Default

Also, can use SendWearChange I believe. I did add these commands to my server. I broke them down to 8 commands to keep things easier. Could also easily do it as one command. But, here is what we have:

Add to perlparser.cpp
Code:
XS(XS__npcrace);
XS(XS__npcrace)
{
	dXSARGS;
	if (items != 1)
		Perl_croak(aTHX_ "Usage: npcrace(race_id)");

	int	race_id = (int)SvIV(ST(0));

	quest_manager.npcrace(race_id);

	XSRETURN_EMPTY;
}

XS(XS__npcgender);
XS(XS__npcgender)
{
	dXSARGS;
	if (items != 1)
		Perl_croak(aTHX_ "Usage: npcgender(gender_id)");

	int	gender_id= (int)SvIV(ST(0));

	quest_manager.npcgender(gender_id);

	XSRETURN_EMPTY;
}

XS(XS__npcsize);
XS(XS__npcsize)
{
	dXSARGS;
	if (items != 1)
		Perl_croak(aTHX_ "Usage: npcsize(newsize)");

	int	newsize = (int)SvIV(ST(0));

	quest_manager.npcsize(newsize);

	XSRETURN_EMPTY;
}

XS(XS__npctexture);
XS(XS__npctexture)
{
	dXSARGS;
	if (items != 1)
		Perl_croak(aTHX_ "Usage: npctexture(newtexture)");

	int	newtexture = (int)SvIV(ST(0));

	quest_manager.npctexture(newtexture);

	XSRETURN_EMPTY;
}

XS(XS__playerrace);
XS(XS__playerrace)
{
	dXSARGS;
	if (items != 1)
		Perl_croak(aTHX_ "Usage: playerrace(race_id)");

	int	race_id = (int)SvIV(ST(0));

	quest_manager.playerrace(race_id);

	XSRETURN_EMPTY;
}

XS(XS__playergender);
XS(XS__playergender)
{
	dXSARGS;
	if (items != 1)
		Perl_croak(aTHX_ "Usage: playergender(gender_id)");

	int	gender_id= (int)SvIV(ST(0));

	quest_manager.playergender(gender_id);

	XSRETURN_EMPTY;
}

XS(XS__playersize);
XS(XS__playersize)
{
	dXSARGS;
	if (items != 1)
		Perl_croak(aTHX_ "Usage: playersize(newsize)");

	int	newsize = (int)SvIV(ST(0));

	quest_manager.playersize(newsize);

	XSRETURN_EMPTY;
}

XS(XS__playertexture);
XS(XS__playertexture)
{
	dXSARGS;
	if (items != 1)
		Perl_croak(aTHX_ "Usage: playertexture(newtexture)");

	int	newtexture = (int)SvIV(ST(0));

	quest_manager.playertexture(newtexture);

	XSRETURN_EMPTY;
}
And also add to perlparser.cpp
Code:
		newXS(strcpy(buf, "npcrace"), XS__npcrace, file);
		newXS(strcpy(buf, "npcgender"), XS__npcgender, file);
		newXS(strcpy(buf, "npcsize"), XS__npcsize, file);
		newXS(strcpy(buf, "npctexture"), XS__npctexture, file);
		newXS(strcpy(buf, "playerrace"), XS__playerrace, file);
		newXS(strcpy(buf, "playergender"), XS__playergender, file);
		newXS(strcpy(buf, "playersize"), XS__playersize, file);
		newXS(strcpy(buf, "playertexture"), XS__playertexture, file);
Now, add to questmgr.cpp
Code:
void QuestManager::npcrace(int race_id)
{
		owner->SendIllusionPacket(race_id);
}

void QuestManager::npcgender(int gender_id)
{
		owner->SendIllusionPacket(owner->GetRace(), gender_id);
}
void QuestManager::npcsize(int newsize)
{
				owner->ChangeSize(newsize, true);
}
void QuestManager::npctexture(int newtexture)
{
			owner->SendIllusionPacket(owner->GetRace(), 0xFF, newtexture);
}

void QuestManager::playerrace(int race_id)
{
			initiator->SendIllusionPacket(race_id);
}

void QuestManager::playergender(int gender_id)
{
			initiator->SendIllusionPacket(initiator->GetRace(), gender_id);
}
void QuestManager::playersize(int newsize)
{
			initiator->ChangeSize(newsize, true);
}
void QuestManager::playertexture(int newtexture)
{
			initiator->SendIllusionPacket(initiator->GetRace(), 0xFF, newtexture);
}
And finally add to questmgr.h
Code:
	void npcrace(int race_id);
	void npcgender(int gender_id);
	void npcsize(int newsize);
	void npctexture(int newtexture);
	void playerrace(int race_id);
	void playergender(int gender_id);
	void playersize(int newsize);
	void playertexture(int newtexture);
Now, usage from our Edone.pl npc:
Code:
sub EVENT_SAY {   
if($text=~/hail/i) {
	quest::say("As you wish!");
}
if($text=~/race/i) {
	quest::say("As you wish!");
	quest::npcrace(217);
	quest::playerrace(217);
}
if($text=~/gender/i) {
	quest::say("As you wish!");
	quest::npcgender(1);
	quest::playergender(1);
}
if($text=~/size/i) {
	quest::say("As you wish!");
	quest::npcsize(20);
	quest::playersize(20);
}
if($text=~/texture/i) {
	quest::say("As you wish!");
	quest::npctexture(22);
	quest::playertexture(15);
}
}
If you do not know how to compile these changes, see http://www.eqemulator.net/wiki/wikka...a=DevVSExpress.
Also, if you have any questions, feel free to PM me or look for me on irc as Striat.
Reply With Quote
  #8  
Old 04-21-2008, 04:16 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Quote:
Originally Posted by cavedude View Post
The Quarm event is already setup in PEQ. I know because I wrote it. NPCs 223991-223994 in potimeb.

You do not want to change the texture of a single NPC, you want to use 4 different NPCs each with a different texture. This is how it works on Live, because each time a head is killed, Quarm is stripped of all buffs and debuffs and you have to re-target him.
I completely respawned all of potimeb from scratch. Mainly because since it isn't an instance in the emu, it wouldn't work quite the same if more than 1 group was in there. So, I had to customize it to allow multiple groups in it at once all in separate areas.

I quite EQ live right before my guild killed Quarm. We had done everything in time accept for Quarm. So, I never actually fought it on live. I will have to look into your quests you have written for there. I had just assumed that it was changing spell sets. Though, it does sound more interesting the other way lol. I must say that the quests for that zone are pretty impressive lol. That must have taken you forever!

I will check out that size changing quest command and see if it works. I was thinking a couple weeks ago that it would be cool to have an event where a boss or a few mobs all "grow" over a few seconds. Using that with a 1 second timer between size changes should have a cool effect.

And Striat, you should submit that code! That would be nice stuff to have in the distro!
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 04-22-2008 at 12:19 AM..
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 06:39 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