|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Quests::Custom Custom Quests here |

08-31-2009, 03:07 PM
|
Dragon
|
|
Join Date: Feb 2007
Posts: 659
|
|
qglobals are not necessarily character based. They are pretty generic so you can do much with them. In this case you would simply check when a character clicks the door to the guild hall if an instance exists for their guild. If not, create an instance then populate a qglobal with the zone instanceID in a variable with the guild name as the var name and off you go.
NOTE: You might have to mess with the guild name if the guild name has special characters in it like '. SQL will let you put most stuff in but sometimes you might have to escape it.
I haven't tried this but it shouldn't be too tough.
|

08-31-2009, 06:00 PM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
Here is a working script for doing this.
Code:
sub EVENT_SAY {
if ($text =~/hail/i)
{
quest::say("Let me see...");
if($uguild_id > 0)
{
if (defined($qglobals{"GuildInstance_$uguild_id"}))
{
my $QGlobalValue = $qglobals{"GuildInstance_$uguild_id"};
quest::AssignToInstance($qglobals{"GuildInstance_$uguild_id"});
quest::MovePCInstance(345, $QGlobalValue, 0, 0, 0);
quest::say("Moving you to the instance now");
}
else
{
quest::say("No instance existed, so creating one");
my $instanceID = quest::CreateInstance("guildhall", 0, -1);
quest::AssignToInstance($instanceID);
quest::setglobal("GuildInstance_$uguild_id",$instanceID,7,"M60");
quest::MovePCInstance(345, $instanceID, 0, 0, 0);
quest::say("Moving you to the instance now");
}
}
else
{
quest::say("I am sorry but you are not part of a guild");
}
}
}
|
 |
|
 |

08-31-2009, 10:01 PM
|
Dragon
|
|
Join Date: Oct 2003
Posts: 511
|
|
Was about to do it myself but you beat me to the punch, Thank you Trevius
__________________
How about the power to kill a yak from 200 yards away...WITH MIND BULLETS! thats telekinesis kyle.
|
 |
|
 |

09-03-2009, 10:14 AM
|
Fire Beetle
|
|
Join Date: Jun 2009
Location: Michigan
Posts: 17
|
|
On this script as soon as you hail him he transferes you. I added a little bit to the top just so that it wouldnt instantly transfer if you accidentally hail him/her.
Code:
sub EVENT_SAY {
if ($text =~/hail/i)
{
quest::say("Hello $name, would you like to be transfered to your [GuildHall]?");
}
if($text =~/Guildhall/i)
{
quest::say("Let me see...");
if($uguild_id > 0)
{
if (defined($qglobals{"GuildInstance_$uguild_id"}))
{
my $QGlobalValue = $qglobals{"GuildInstance_$uguild_id"};
quest::AssignToInstance($qglobals{"GuildInstance_$uguild_id"});
quest::MovePCInstance(345, $QGlobalValue, 0, 0, 0);
quest::say("Moving you to the instance now");
}
else
{
quest::say("No instance existed, so creating one");
my $instanceID = quest::CreateInstance("guildhall", 0, -1);
quest::AssignToInstance($instanceID);
quest::setglobal("GuildInstance_$uguild_id",$instanceID,7,"M60");
quest::MovePCInstance(345, $instanceID, 0, 0, 0);
quest::say("Moving you to the instance now");
}
}
else
{
quest::say("I am sorry but you are not part of a guild");
}
}
}
|
 |
|
 |

09-16-2009, 05:03 PM
|
Fire Beetle
|
|
Join Date: Oct 2008
Location: Washington
Posts: 23
|
|
This will make the doors in the Guild Lobby and Guild Hall functional. The global and instance are set for 18 hours.
\quests\guildlobby\player.pl
Code:
sub EVENT_CLICKDOOR {
if($doorid == 258 || $doorid == 260) {
if($uguild_id > 0)
{
if (defined($qglobals{"GuildInstance_$uguild_id"}))
{
my $QGlobalValue = $qglobals{"GuildInstance_$uguild_id"};
quest::AssignToInstance($qglobals{"GuildInstance_$uguild_id"});
quest::MovePCInstance(345, $QGlobalValue, 0, 0, 0);
}
else
{
my $instanceID = quest::CreateInstance("guildhall", 0, 64800);
quest::AssignToInstance($instanceID);
quest::setglobal("GuildInstance_$uguild_id",$instanceID,7,"H18");
quest::MovePCInstance(345, $instanceID, 0, 0, 0);
}
}
}
}
\quests\guildhall\player.pl
Code:
sub EVENT_CLICKDOOR {
if($doorid == 258) {
quest::movepc(344,0,590,0,128);
}
}
It could use some tweaking to remove the global on server reset or if the Guild Hall is empty.
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 04:48 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |