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 07-03-2009, 10:08 PM
Zeice
Sarnak
 
Join Date: Oct 2008
Location: USA
Posts: 92
Default Instancing

Ok, I can do a basic quest to setup an instance, that's easy. My question will be for something a little bit more involved, unless I'm just completely missing something simple. I'm still learning daily in perl, so I have to look at examples for some of the things I want to do, but here is what I've got so far just for testing purposes.

Code:
sub EVENT_SAY {

if ($text =~/Hail/i){
quest::say ("Good day to you, $name. Are you ready for a  [test]?"); }

if ($text =~/test/i){
quest::CreateInstance(guildhall, 0, 300);
quest::GetInstanceID(guildhall, 0);
quest::AssignToInstance(1);
quest::say ("Ok do you want to go now?");
}
if ($text =~/go/i){
quest::MovePCInstance(345, 1, 0, 1, 2.7, 0);
}

}
This is a very simple thing to just load into an instance and I'm obviously assigning them to instance id 1, just because I know that's going to be the next id available. What I want to do is if I set this up to bring someone to a zone, and there might be potentially be more than 1 instance running, how would I use the getinstanceId command to assign that person to their particular instance. I would like to also expand this to allow guilds to have their own guildhall at some point, but my knowledge in perl is lacking on how to do that with these commands. (I know these aren't all the instance commands.) Anyway, any help would be much appreciated!
Reply With Quote
  #2  
Old 07-03-2009, 11:29 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

GetInstanceID() returns the id of the instance so something like this might work:
Code:
my $instid = quest::GetInstanceID(guildhall, 0);
quest::AssignToInstance($instid);
__________________
The Realm
Reply With Quote
  #3  
Old 07-04-2009, 09:40 PM
Zeice
Sarnak
 
Join Date: Oct 2008
Location: USA
Posts: 92
Default

Of course. Doing it like that slipped my mind. I haven't been able to test that yet but I'll see what I can get working once I get to it. Thanks.
Reply With Quote
  #4  
Old 07-04-2009, 10:35 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Code:
my $i_id = quest::CreateInstance("guildhall", 0, 300);
quest::AssignToInstance($i_id);
One less line.
Reply With Quote
  #5  
Old 07-04-2009, 10:43 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

question: I assume you can make more than 1 instance of the same zone at the same time?
Reply With Quote
  #6  
Old 07-05-2009, 02:44 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Yes but if you try creating several instances of the same zone of the same version for one person it's going to cause problems.

For example:
You create an instance version 0 and give it to person A
You create an instance version 1 and give it to person A
You create an instance version 2 and give it to person A
You create an instance version 3 and give it to person A

And they will easily be able to switch between them but if instead you try:

You create an instance version 0 and give it to person A
You create an instance version 1 and give it to person A
You create an instance version 1 and give it to person A
You create an instance version 1 and give it to person A

It will cause problems as the server wont be able to tell which id you really want to be in because the quest::GetInstanceID(name, version) only returns one value.
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:18 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