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 06-28-2009, 06:12 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

hmm Trev, does all measurment done in "copper" ?

for example npc wants "10" - I assume 10 in copper?
so player can give npc 1 silver or 10 copper and both will work?

if yes - then you have just solved entire cash return problem
Reply With Quote
  #2  
Old 06-28-2009, 06:39 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

No, each coin type has it's own variable. If you want to be able to use all coin types, you could do this:

Code:
sub EVENT_ITEM {


	if($platinum == 10 || $gold == 100 || $silver == 1000 || $copper == 10000)
	{
		quest::summonitem(1001);
		$platinum = undef;
		$gold = undef;
		$silver = undef;
		$copper = undef;
	}
	else
	{
		if($platinum || $gold  || $silver || $copper) {
			$client->AddMoneyToPP($copper, $silver, $gold, $platinum, updateclient);
			quest::say ("That is not the required amount!");
			$platinum = undef;
			$gold = undef;
			$silver = undef;
			$copper = undef;
		}
	}

}
I haven't tested that yet, but it should work fine I think.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 06-28-2009, 06:59 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

I see, I can try this out
but it would be MUCH easier if it would have read value of ANY coins given as "copper"
Reply With Quote
  #4  
Old 06-28-2009, 07:33 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

You could do conversions if you want, but you might have to play with it a bit to make sure they work properly.
Code:
sub EVENT_ITEM {

#Convert all coin turn-ins to copper and add them up
my $totalcoin = $platinum * 1000;
my $totalcoin = $totalcoin + $gold * 100;
my $totalcoin = $totalcoin + $silver * 10;
my $totalcoin = $totalcoin + $copper;

	if($totalcoin == 10000) # 10 platinum
	{
		quest::summonitem(1001);
		$platinum = undef;
		$gold = undef;
		$silver = undef;
		$copper = undef;
	}
	else
	{
		if($platinum || $gold  || $silver || $copper) {
			$client->AddMoneyToPP($copper, $silver, $gold, $platinum, updateclient);
			quest::say ("That is not the required amount!");
			$platinum = undef;
			$gold = undef;
			$silver = undef;
			$copper = undef;
		}
	}

}
Again, I haven't tested this yet, but it should work almost perfectly for what you are wanting to do.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 06-29-2009 at 03:37 AM..
Reply With Quote
  #5  
Old 06-28-2009, 08:13 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

we should post this as example into Custom Quest section before it gets lost =P
Reply With Quote
  #6  
Old 06-30-2009, 12:51 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

Shendare, I am still interested in the plugin version of your code when you get a chance to clean it up
Reply With Quote
  #7  
Old 06-30-2009, 02:20 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Yep, working on it. There's a bit of ground to cover.
Reply With Quote
Reply

Thread Tools
Display Modes

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