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

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 12-18-2014, 01:52 PM
Adcid
Fire Beetle
 
Join Date: Nov 2014
Location: Idaho
Posts: 23
Default quest::popup with linked response...

Code:
sub EVENT_SAY{
	if($text=~/hail/i){
	my $TextToCenter = plugin::PWAutoCenter("Hail there! Would you like to test your strength against Lady ["..quest::saylink("Vox",false,"Vox").."] or Lord [Nagafen]? Please remember these Dragons will banish you above level 52.  Once you've been ported to your location, you are on your own getting back here!");
	my $TextToCenter2 = plugin::PWAutoCenter("2nd line to be centered");
	my $TextToCenter3 = plugin::PWAutoCenter("3rd line");
	my $TextToCenter4 = plugin::PWAutoCenter("4th line to be centered");
	my $TextToCenter5 = plugin::PWAutoCenter("5th line to be centered, blah, blah, blah, blah, blah");
	my $Indent = plugin::PWIndent();
	my $Yel = plugin::PWColor("Yellow");
	my $Blu = plugin::PWColor("Light Blue");
	my $Red = plugin::PWColor("Red");
	my $grn = plugin::PWColor("Forest Green");
	quest::popup("Stage Zero Raids", "$TextToCenter <br>
	$Yel $TextToCenter2 </c> <br>
	$Blu $TextToCenter3 </c> <br>
	<br><br>
	$Red $TextToCenter4 </c> <br>
	$grn $TextToCenter5 </c> <br><br><br>
	$Indent $Link
	");
	}
}
I've used this as my building block to create a popup. Little has been modified until I can resolve the link issue. What I've created are NPC's that will port you to raid locations allowing people to bypass trash mobs. My example above is an NPC that ports to Lady Vox or Lord Nagafen. In terms of simple code, it works fine without the popup. I've create spells to teleport to safe locations near said mobs. However, I would like the user to hail this NPC, then simply click on the Dragons name to implement the port rather than type in "/say Vox".

in /lua I found this code for going to plane of time without a popup.
Code:
function event_say (e)
	if(e.message:findi("hail")) then
		e.self:Say("Oh, yes, I'm still of one mind, for now. Time, time is all that matters. Would you like to see the [" .. eq.say_link("time",false,"time") .. "]?");
	elseif (e.message:findi("time")) then
		if (e.other:HasZoneFlag(219) == true) then
			--Plane of Time A
			e.other:MovePC(219, 110, 0, 8, 0);
		end
	end
end
I believe what I'm looking for can be done. Any ideas?
Reply With Quote
  #2  
Old 12-22-2014, 02:10 PM
Asylum
Sarnak
 
Join Date: Jun 2013
Posts: 81
Default

I see two ways you can do this:

1. If your goal is simply to avoid the trash mobs, create an instance of the zone within which the dragon resides and populate it with the dragon alone (plus any static adds for the event). The Perl files (or lua) will run the scripts no problem. I will link a short script for you when I get home.

2. If you wish to use the actual static zones, just place the characters, that's even easier, using the movepc function. Again, I'll make and post a short script for you when I get home.
Reply With Quote
  #3  
Old 12-22-2014, 03:57 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

I am pretty sure saylinks are not supported inside the popup window. :(

If you however want fancy popup windows I'd suggest checking out this plugin from Akkadius.. looks very polished when implemented correctly

http://wiki.eqemulator.org/p?The_Dia...ster_Reference
Reply With Quote
  #4  
Old 12-22-2014, 04:02 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,595
Default

Yeah, saylinks are not supported in the popup window. However, there is a EVENT_POPUPRESPONSE you can use based on you hitting 'Yes' on the popup window, use $popupid. Although I believe you have to specify ID in quest::popup(title, text, popupid, buttons, duration) in order to have different outcomes based on different popup windows.
Reply With Quote
  #5  
Old 12-22-2014, 05:24 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

I'm out the door, hoping syntax is correct:
Code:
sub EVENT_ENTERZONE {

	quest::settimer ("dopopup",5);

}


sub EVENT_TIMER {
use Switch;

	switch ($timer) {
		
		case ("dopopup") {
			quest::stoptimer ("dopopup");
			
			my $Indent = plugin::PWIndent();
			my $Yel = plugin::PWColor ("Yellow");
			my $PopupLink = plugin::PWHyperLink ("HERE","http://www.google.com");
			my $PopupLink2 = plugin::PWHyperLink ("HERE","http://www.eqemulator.org");
			my $PopupTextCentered = plugin::PWAutoCenter ("Welcome");
			
			quest::popup ("Popup Window Title", 
			"<br>$Indent $Indent $Indent [$Yel Welcome </c> ]<br> <br>
			If you wish to search Google click $PopupLink<br><br>
			If you wish to go to the EQEMu Site click $PopupLink2<br> <br> <br>
			So do you understand the webz?",1,1,0); 
			
			# usage quest::popup (title,text,popupid,buttons,duration) 
			# 	-- whereas buttons 0 = just ok, 1 = yes (1) and no (0) 
			# 	-- duration in seconds before vanish 0 = wait for click response
		}
	}
}


sub EVENT_POPUPRESPONSE {

	if ($popupid == 1) {
		quest::gmsay ("Hey all $name understands the interwebz!",335,1,0,0);
	}
}
Reply With Quote
  #6  
Old 12-22-2014, 05:26 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by NatedogEZ View Post
I am pretty sure saylinks are not supported inside the popup window. :(

If you however want fancy popup windows I'd suggest checking out this plugin from Akkadius.. looks very polished when implemented correctly

http://wiki.eqemulator.org/p?The_Dia...ster_Reference
The system I created also supports automatic responses with windows, so if you do your research it does everything you want it to do for dialogue
Reply With Quote
  #7  
Old 01-08-2015, 05:35 PM
Adcid
Fire Beetle
 
Join Date: Nov 2014
Location: Idaho
Posts: 23
Default

Its been a while, I've not had a lot of time to work on my server. Back to the grind stone after the holidays I suppose...

I've downloaded "The DiaWind Plugin" and added the needed file to the plug in folder but the problem I'm running into is the global_player file. In my quests\global\ folder global_player is a *.lua file, not a *.pl file. Am i missing something?

I created a global_player.pl file and placed it into the quests\global\ folder but doesn't seem to make a difference when it comes to functionality.
Reply With Quote
  #8  
Old 01-08-2015, 05:40 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

lua has precedence over perl for quest files

So the first check is if a lua exists, if so it wont bother looking for a perl (pl) file.

Curious, what is the global_player.lua (as in mind posting it?)?
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 09:32 PM.


 

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