Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #16  
Old 08-31-2009, 10:33 PM
Shadow-Wolf
Dragon
 
Join Date: Oct 2003
Posts: 511
Default

Well there again I went speaking before confirming, using globals does appear to work with this, it seems it's ignoring the fact that the global exists cause it's still creating new instances.
__________________
How about the power to kill a yak from 200 yards away...WITH MIND BULLETS! thats telekinesis kyle.
Reply With Quote
  #17  
Old 08-31-2009, 10:45 PM
realityincarnate
Developer
 
Join Date: Dec 2007
Posts: 122
Default

Make sure that the npc you're using the script with has qglobals enabled in the database (set qglobal to 1 in the npc_types table).
Reply With Quote
  #18  
Old 08-31-2009, 11:29 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Also keep in mind that the script I posted is a complete script for making the guild hall function exactly the way that it should. It is just an example of how to handle creating guild instances in the first place. It would definitely require more work to make it function perfectly in all scenarios. For example; with that script, if you do a server restart, the global will still exist, but the instance will not as far as I know. So, you would need a way to remove the qglobal when the server is restarted or when no one is in the zone anymore.

It wouldn't be too hard to achieve that by using the player.pl to count all players in the zone when they zone out (EVENT_ZONE) and if none are left, have it delete the qglobal. Then, you would just need to also have a way to delete the qglobal after a server restart. You could do that by having a static zone on your server and having one of the spawns in there delete the qglobal in an EVENT_SPAWN. Or, you could just use durations on the qglobals or something like that.

I think probably the easier way would be to add a couple more quest commands for instances such as:

quest::AssignGuildToInstance(instanceid) Assigns a guild to an instance.
quest::IsInstance("zonename", instanceid) Boolean to check if a certain instance exists for a certain zone.

Also, it might not be bad to have an array list of all instances for any particular zone. Even better, might be just to have a way to create instanceIDs as whatever number you want. Then, you could just assign your guild to instanceID of $uguild_id, and then use quest::IsInstance to check if it exists before sending them there or creating a new one.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #19  
Old 09-03-2009, 10:14 AM
rizzen
Fire Beetle
 
Join Date: Jun 2009
Location: Michigan
Posts: 17
Default

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");
		}
	}


}
__________________
Rizzen
Destroyed Lands Private Server
Semi-Legit
www.destroyedlands.com
Reply With Quote
  #20  
Old 09-16-2009, 05:03 PM
Domel
Fire Beetle
 
Join Date: Oct 2008
Location: Washington
Posts: 23
Default

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.
Reply With Quote
  #21  
Old 10-08-2009, 09:56 AM
Oaric
Sarnak
 
Join Date: Aug 2009
Location: SC
Posts: 35
Default

While were talking about Guild Hall Instances and Guild Lobby zone doors,how about the recruitment boards and the non-fading buffs in guildlobby. I haven't been there in awhile but last time I went it seemed that when you clicked on one of the recruitment boards it would LD you. And Buffs wore off,in Live they actually have the same time the whole time you are in the zone. If you enter with 2 minutes and 5 seconds on a buff,the timer will not start decreasing until after you leave zone. And Ive seen people get the old message boards working on Original EQ projects,so I imagine it won't be to bad to get the recruitment boards workin. Anyone know if these things are still broken? If not I'll shut up lol.
Reply With Quote
  #22  
Old 10-08-2009, 10:09 AM
nightsta69
Hill Giant
 
Join Date: May 2005
Posts: 134
Default

Quote:
Originally Posted by Oaric View Post
While were talking about Guild Hall Instances and Guild Lobby zone doors,how about the recruitment boards and the non-fading buffs in guildlobby. I haven't been there in awhile but last time I went it seemed that when you clicked on one of the recruitment boards it would LD you. And Buffs wore off,in Live they actually have the same time the whole time you are in the zone. If you enter with 2 minutes and 5 seconds on a buff,the timer will not start decreasing until after you leave zone. And Ive seen people get the old message boards working on Original EQ projects,so I imagine it won't be to bad to get the recruitment boards workin. Anyone know if these things are still broken? If not I'll shut up lol.
as far as I know of, these things still don't work. I made a invis npc to apply a buff, in the little pool area inside the guild hall. but thats about as far I can go coding wise. hopefully with the coming of college, with my major being computer programming, maybe i'll be able to help contribute to this community alot better.
Reply With Quote
  #23  
Old 10-08-2009, 11:23 AM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 506
Default

non-fading buffs is probably easiest done with a source modification when it does tic update event, have a condition to check for the zone and don't decrease timers if the zone matches. There are some spells that were excempt from this status though, would likely need a list of those.

I know, so helpful, I was going to look but busy with some other stuff.
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote
  #24  
Old 02-03-2010, 02:59 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Removing Tic calculation based on the zone ID under a table would be definitely cool, especially for those who'd like them in their own hub zones.
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 11:30 AM.


 

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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3