Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 12-22-2013, 08:54 PM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default Using Qglobals for Turn in

Basically my objective is;
1. Turn in item, be assigned a qglobal with a value ie 1
2. NPC then, based on qglobal value, offers you a list of items via varlink
3. I would like for you to click on item, it summons it for you and deducts the value of your qglobal almost as in alternate currency. so setting you back to 0.

My question is, is this an efficient way to do this? If not what other alternatives do I have? Could I use radiant crystals instead and how would they deduct them? And is it possible to quest::summonitem based on the click of the varlink?

Code:
sub EVENT_SAY {

	my $varlink = quest::saylink("Let me see a varlink, please.", 0, "varlink");
	my $itemlink = quest::saylink("Let me see an itemlink, please.", 0, "itemlink");
	my $artifact = quest::varlink(1119);
	my $artifact1 = quest::varlink(1261);
	my $artifact2 = quest::varlink(5532);
	my $artifact3 = quest::varlink(8495);
	my $NPCName = $npc->GetCleanName();

	if ($text=~/Hail/i && $epic1 == undef)
	{
		$client->Message(315, "$NPCName whispers to you, 'Hello $name, I can show you an Artifact using $varlink or $itemlink if you are interested in it.'");

	}
	if ($text =~/varlink/i && $qglobals{epic1 == 1})
	{
		$client->Message(315, "$NPCName whispers to you, 'Great job! To claim your reward say the number... $artifact (0), $artifact1 (1), $artifact2 (2), $artifact3 (3).'");}
	
	if ($text =~/0/i && $epic1 == 1){
		
	  	quest::summonitem(1119);
	  	$client->SetGlobal("epic1", 0, 5, "F");}
	
	if ($text =~/1/i && $epic1 == 1){
	  	quest::summonitem(1261);
	  	$client->SetGlobal("epic1", 0, 5, "F");
	}
}
sub EVENT_ITEM {
  #Handin: cipher of veeshan sets your qglobal for epic selection
  if(plugin::check_handin(\%itemcount, 69311 => 1)){
	quest::setglobal("epic1", 1, 5, "F");
	quest::say("this worked");}
}
Its incomplete and does not function as intended bc of my qglobals. I was in the middle of tinkering with it when I decided to ask for help.
Reply With Quote
  #2  
Old 12-23-2013, 10:43 AM
nenelan
Hill Giant
 
Join Date: Feb 2008
Posts: 116
Default

This can work, I've mocked up something in the past, but I think I'd have to dig it off of my old HD.

I think there actually may be a post around here with an example somewhere that someone else has done, but I CBA to look it up. But yeah, qglobal as a currency can work well. You could do radiants or ebons or LDoN points as well, end result should be similar, but with LDoN and Radiant/Ebon, you get that nice interface to work with rather than text in your chat box (which can be spammed, but can be worked around with popups).
Reply With Quote
  #3  
Old 12-23-2013, 04:21 PM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default

Thanks Nen would you mind sharing a sample of how to give and take away from the globals?
Reply With Quote
  #4  
Old 12-23-2013, 05:56 PM
nenelan
Hill Giant
 
Join Date: Feb 2008
Posts: 116
Default

I'll see what I can dig up when I get home in ~1hr or so. I can't promise anything, since that HD more or less kicked it, but I'll try to recover what I can.
Reply With Quote
  #5  
Old 12-23-2013, 05:59 PM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default

np bro if ya cant thats fine lol KingKrab got me up and running thanks man!
Reply With Quote
  #6  
Old 12-23-2013, 07:35 PM
nenelan
Hill Giant
 
Join Date: Feb 2008
Posts: 116
Default

Perfect, glad he could. That thing ain't booting, and I don't have any old backups. Glad to hear it worked!
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:59 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3