Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 04-25-2002, 03:25 PM
Malevolent
Hill Giant
 
Join Date: Mar 2002
Posts: 171
Default new mods for wesquests: Move a NPC to a new location and ani

This is my script (has some of the other tweaks, remove as needed)

NPC_SCRIPT 4721{
TRIGGER_TEXT:Hail:{
NAME: Human who thinks himself a snow leopard
EMOTE: hisses at you
DO_ANIMATION: 3
}
}


NPC_SCRIPT 4723{
TRIGGER_TEXT:Hail:{
NAME: ORC SNOW TROOPER
EMOTE: grunts, and then takes a big whiff of the air.
SAY: By an elven mother, you stink! I'm outta here!
MOVE_TO_NEW_HOME 3.00 4.00 3.00 1.00
}
}

Code:
		else if (strstr(strupr(command),"DO_ANIMATION") != NULL) {
			if (tt2 || ti2 || td) {
				if (target!=0){
					target->DoAnim(atoi(sep.arg[1]));
				}							
			}
		}
		/**************************************************************
		requires org_x,y,z to be exposed in npc.h in public OR
		there to be a method to SetX() -- it simply fools the npc into 
		moving to the new location
		Usage:  MOVE_TO_NEW_HOME x y z heading 
		**************************************************************/
		else if (strstr(strupr(command), "MOVE_TO_NEW_HOME") != NULL) {
				if (tt2 || ti2 || td) {
				if (target!=0 && target->IsNPC()){
				
				if (!sep.IsNumber(1))
					sprintf(sep.arg[1],"1"); 
				if (!sep.IsNumber(2))
					sprintf(sep.arg[2],"1"); 
				if (!sep.IsNumber(3))
					sprintf(sep.arg[3],"1"); 
				if (!sep.IsNumber(4))
					sprintf(sep.arg[4],"0");		
					
					target->CastToNPC()->org_x=atof(sep.arg[1]);
					target->CastToNPC()->org_y=atof(sep.arg[2]);
					target->CastToNPC()->org_z=atof(sep.arg[3]);
					target->CastToNPC()->org_heading=atof(sep.arg[4]);
					target->CastToNPC()->SetIsMovingHome(true);
				}							
			}
		}

Quest changes are active on "Malevolent's Lab" on public server network. You can try these out in Rivervale. That location happens to be the mouth of the entrance to misty.

--MV
Reply With Quote
  #2  
Old 04-29-2002, 11:45 AM
strychn
Hill Giant
 
Join Date: Feb 2002
Posts: 129
Default

why not just move [new set of x, y, z] :p
Reply With Quote
  #3  
Old 04-29-2002, 12:29 PM
Malevolent
Hill Giant
 
Join Date: Mar 2002
Posts: 171
Default

If I understand what you are saying right, it would only move the npc to x,yz as the SendTo() doesn't always work (esp. if you don't have maps). I've found playing off of the ismovinghome works out pretty well, as it sets up a new vector to move to and the mob actually slowly moves that way.

This code also serves well as a basis for setting up waypoints via the scripting engine. Just have to add a step counter to it. Works pretty well for me. :)
Reply With Quote
  #4  
Old 04-29-2002, 04:38 PM
strychn
Hill Giant
 
Join Date: Feb 2002
Posts: 129
Default

ahh...makes sense now. i didn't quite understand from what you posted before. was just wondering why it was so dang long...
hehe
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 08:11 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