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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 09-12-2004, 01:07 PM
8ball
Fire Beetle
 
Join Date: Sep 2004
Posts: 12
Default movenpc function

i couldnt find a function to move an npc so i decided to make one
there may be a few errors since i only know the basics of C++

parser.cpp
Code:
else if (!strcmp(strlwr(command),"movenpc")) { 
if (other) other->MovePc((atoi(arglist[0])),(atof(arglist[1])),
 (atof(arglist[2])),(atof(arglist[3])));
embparser.cpp
Code:
"sub movenpc{push(@cmd_queue,{func=>'movenpc',args=>join(',',@_)});}"
if there are any errors please post here with a fix. i dont have a server so i dont have a way to test it.
Reply With Quote
  #2  
Old 09-12-2004, 01:09 PM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Um. MovePC moves the Player not an NPC I believe.........

And this is already quest::movepc();

Thats why theres a fourth arg, zoneid.
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #3  
Old 09-12-2004, 01:10 PM
8ball
Fire Beetle
 
Join Date: Sep 2004
Posts: 12
Default

yes.....thats why i made move NPC
Reply With Quote
  #4  
Old 09-12-2004, 01:11 PM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Quote:
Originally Posted by 8ball
yes.....thats why i made move NPC
Um.
Code:
other->MovePC
I believe thats the same command used in movepc(). Let me check...
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #5  
Old 09-12-2004, 01:12 PM
8ball
Fire Beetle
 
Join Date: Sep 2004
Posts: 12
Default

ya sry i just noticed that
like i said i dont know c++ that well hehe...
i changed it to other->movenpc
not sure if that will work tho
Reply With Quote
  #6  
Old 09-12-2004, 01:13 PM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Nevermind, My bad. But will this work crossing over a zone?
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #7  
Old 09-12-2004, 01:16 PM
8ball
Fire Beetle
 
Join Date: Sep 2004
Posts: 12
Default

not sure.
i have no way of testing it so if someone who has a server wants to test it go ahead :P
Reply With Quote
  #8  
Old 09-12-2004, 01:20 PM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

other. Hmm. Im not sure if its MovePC that targets the PC or CastToClient() that does. So I'm not sure if this will work.
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #9  
Old 09-12-2004, 01:38 PM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Err, other->MoveNPC would have to be defined. It wont just 'know' that.
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #10  
Old 09-12-2004, 02:27 PM
8ball
Fire Beetle
 
Join Date: Sep 2004
Posts: 12
Default

how would i go about defining it?
Reply With Quote
  #11  
Old 09-12-2004, 04:38 PM
killspree
Dragon
 
Join Date: Jun 2002
Posts: 776
Default

Well you could always try quest::moveto()...I think that starts the NPC on a path to the loc, but it will at least move them there(if it's working...haven't really tested it). There's no MoveNPC that I know of...you'd also have to take into account the fact that by simply "moving" them, you pretty much summon them. Summoned NPCs return to their spawn point as far as I know.

You'd have to alter their x/y/z above just moving them to the new location, or create a flag that disables the "return to spawn" code for special cases like this.
__________________
Xeldan
Lead Content Designer
Shards of Dalaya
Reply With Quote
  #12  
Old 09-13-2004, 03:17 AM
8ball
Fire Beetle
 
Join Date: Sep 2004
Posts: 12
Default

the reason i decided to make this was so i could temorarily move an npc somewhere.
on live there was a monk quest where you had to fight Grand Master Glock. the quest moved you to an enclosed room that couldnt be accessed except by hailing master glock and then you'd get teleported to a new room. i think it was just an entirely different mob in there tho.
still, i think this could come in handy with certain things.
Reply With Quote
  #13  
Old 09-13-2004, 07:12 AM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Well, it probably didn't move the NPC but it actually did

quest::spawn(samenpcnumber,x,y,z);
quest::movepc($zoneid,x,y,z);
quest::depop();

(but it would be in the format of however Sony does quests )

it just appeared like the npc moved.
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #14  
Old 09-13-2004, 10:57 AM
8ball
Fire Beetle
 
Join Date: Sep 2004
Posts: 12
Default

ya, i realized that when i was spacing out in math class about 3 hours ago lol
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 09:14 AM.


 

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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3