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 { |
GetInstanceID() returns the id of the instance so something like this might work:
Code:
my $instid = quest::GetInstanceID(guildhall, 0); |
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.
|
Code:
my $i_id = quest::CreateInstance("guildhall", 0, 300); |
question: I assume you can make more than 1 instance of the same zone at the same time?
|
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. |
what if you wanted to do something involving qglobals? So like if you were going to do an instance for the first time it would send u to one version, then if you beat that one, it would send u to the second one. Would I need to make a bunch of different versions using GeorgeS's tool and would it let multiple people in if they both had the same qglobal value? Or would it make them wait until the first person finished it?
|
Disregard. Misread question.
|
anyone know why this
Code:
quest::CreateInstance("arena", 1, 360); |
Code:
quest::CreateInstance("arena", 1, 360); |
that worked but now I have another problem. It just sends me to the normal arena instead of version 1 of it
|
Also, it appears that it isn't assigning the instance to the player. It is creating it successfully, but that's pretty much it
|
ok I got it working. I just changed it to
Code:
my $i_id = quest::CreateInstance("arena", 1, 360); |
Does anyone know how I could do something to destroy an instance when the player leaves it? I know there is quest::destroyinstance(), but how would I get it to destroy the instance the player is leaving?
|
Are you only allowing 1 char in the zone per instance? If so, you could probably put that in the player.pl for the zone under an EVENT_ZONE.
|
All times are GMT -4. The time now is 11:23 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.