I messed around with this script for a little while this evening and came up with a version, that I
think will work, seems to atleast.
Give this a try:
Code:
sub EVENT_SAY
{
if (($text =~/Guild/i) && ($uguild_id > 0))
{
quest::say("Just a moment...");
quest::say(quest::GetInstanceID("guildhall", $uguild_id));
if($uguild_id > 0)
{
$instid = quest::GetInstanceID("guildhall", $uguild_id);
if($instid > 0){
quest::say("sending to existing instance");
quest::AssignToInstance($instid);
quest::MovePCInstance(345, $instid, 0, 0, 0);
}
elsif($instid < 1){
quest::say("sending to New instance");
quest::CreateInstance("guildhall", $uguild_id, 300);
$instid1 = quest::GetInstanceID("guildhall", $uguild_id);
quest::AssignToInstance($instid1);
quest::MovePCInstance(345, $instid1, 0, 0, 0);
}
}
if($uguild_id < 1)
{
quest::say("I am sorry but you are not part of a guild");
}
}
}
Hope this helps. It should be noted that in testing I found that the instances were empty meaning each will have to be spawned manually for each guild. Perhaps one of the developers will come up with a way to spawn the instances from the main spawn table without having them "Versioned" like they are now?
EDIT: I think I may have left some code in there that doesnt need to be, blah it's getting late