View Single Post
  #8  
Old 08-30-2009, 11:58 PM
realityincarnate
Developer
 
Join Date: Dec 2007
Posts: 122
Default

I haven't done a lot of work with instances, but I can see two issues with the way these scripts are working that are stopping them from giving the desired result.

1.) When you call quest::GetInstanceID, it looks for an instance that matches the zonename, version, and character id of the client. This is why it's making a new instance every time: the instance gets created when the first character uses the script, but since that instance isn't assigned to the second character, quest::GetInstanceID doesn't find it and a new one gets created.

2.) It looks like there's a bit of confusion between instance id and version. Versions are designed for use with things like LDoN level variations and monster missions, where the same zone is populated in multiple different ways. What you want to do is create a new instance of the same version of the zone for each guild, not different versions.

Whenever you call quest::CreateInstance, it returns the instance id of the newly created instance. My recommendation would be to track each new id and the guild it was created for through variables in perl. Then, when a player activates the quest, check to see if an id matches his guild. If it does, add the player to that instance id. If it doesn't, create a new one and add that id and guild to the list.
Reply With Quote