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

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 10-29-2010, 05:44 AM
Gregk
Sarnak
 
Join Date: Mar 2010
Posts: 41
Default

Would it also be possible to Tweak the range the npc would have for casting? As it is now, you need to stand very close to the npc for the quest/spell to work. Doubling the range would make it Ideal...

Thank you.
Reply With Quote
  #2  
Old 10-29-2010, 09:16 AM
lich2594
Sarnak
 
Join Date: Jun 2006
Location: Tennessee, USA
Posts: 77
Default

Quote:
Originally Posted by Gregk View Post
Would it also be possible to Tweak the range the npc would have for casting? As it is now, you need to stand very close to the npc for the quest/spell to work. Doubling the range would make it Ideal...

Thank you.
The quest::cast uses a self-cast type script that triggers if you are within speaking range to the NPC. So you have to be within a certain distance to trigger the event. Just like if you are too far away, you can't speak to NPC's. I am sure it can be changed, if you wanted to modify the source code.

Almost anything can be changed, if you had the knowledge to do so. (Except client side, of course.)
__________________
Reply With Quote
  #3  
Old 10-29-2010, 09:26 AM
lich2594
Sarnak
 
Join Date: Jun 2006
Location: Tennessee, USA
Posts: 77
Default

Actually, here is my exact script to charge money on the user level for buffs. I don't have a feature to automatically shout or anything (as I have the tag "buffs" under it's name). But this is how my script works:

Code:
sub EVENT_SAY{

	$client->Message(7, " ");
	my $NPCName = $npc->GetCleanName();

	if($text=~/Hail/i) {
		if ($ulevel <= 10) {
			quest::selfcast(5415);
			quest::selfcast(5312);
			quest::selfcast(5405);
			quest::selfcast(5409);
			quest::selfcast(5521);
			quest::selfcast(5365);
			quest::selfcast(278);
			quest::selfcast(939);
			quest::selfcast(3391);
			quest::selfcast(5390);
			$client->Message(315, "$NPCName whispers to you, 'Since you are level 10 or lower you get free buffs, $name! Good luck to you.'");
		}
		if (($ulevel > 10) && ($ulevel < 25)) {
		$client->Message(315, "$NPCName whispers to you, 'Hello $name, I will give you buffs for 100 platinum.'");
		}
		if (($ulevel >= 25) && ($ulevel < 80)) {
		$client->Message(315, "$NPCName whispers to you, 'Hello $name, I will give you buffs for 500 platinum.'");
		}
		if ($ulevel >= 80) {
		$client->Message(315, "$NPCName whispers to you, 'Hello $name, I will give you buffs for 1,000 platinum.'");
		}
	}
}


sub EVENT_ITEM {

	$client->Message(7, " ");
	my $NPCName = $npc->GetCleanName();
	
	if ($platinum == 1000) {
		if ($ulevel >= 80) {
			quest::selfcast(5278);
			quest::selfcast(5415);
			quest::selfcast(5312);
			quest::selfcast(5405);
			quest::selfcast(5409);
			quest::selfcast(5521);
			quest::selfcast(5365);
			quest::selfcast(278);
			quest::selfcast(939);
			quest::selfcast(3391);
			quest::selfcast(5390);
			$client->Message(315, "$NPCName whispers to you, 'Thank you $name!'");
		} else {
			$client->Message(315, "$NPCName whispers to you, 'Use the correct amount, $name!'");
			quest::givecash($copper,$silver,$gold,$platinum);
		}
	}
	if ($platinum == 500) {
		if (($ulevel < 80)&&($ulevel >= 25)) {
			quest::selfcast(5278);
			quest::selfcast(5415);
			quest::selfcast(5312);
			quest::selfcast(5405);
			quest::selfcast(5409);
			quest::selfcast(5521);
			quest::selfcast(5365);
			quest::selfcast(278);
			quest::selfcast(939);
			quest::selfcast(3391);
			quest::selfcast(5390);
			$client->Message(315, "$NPCName whispers to you, 'Thank you $name!'");
		} else {
			$client->Message(315, "$NPCName whispers to you, 'Use the correct amount, $name!'");
			quest::givecash($copper,$silver,$gold,$platinum);
		}
	}
	if ($platinum == 100) {
		if (($ulevel > 10) && ($ulevel < 25)) {
			quest::selfcast(5415);
			quest::selfcast(5312);
			quest::selfcast(5405);
			quest::selfcast(5409);
			quest::selfcast(5521);
			quest::selfcast(5365);
			quest::selfcast(278);
			quest::selfcast(939);
			quest::selfcast(3391);
			quest::selfcast(5390);
			$client->Message(315, "$NPCName whispers to you, 'Thank you $name!'");
		} else {
			$client->Message(315, "$NPCName whispers to you, 'Use the correct amount, $name!'");
			quest::givecash($copper,$silver,$gold,$platinum);
		}
	}
	if (($platinum < 100) || ($platinum < 500) && ($platinum > 100) || ($platinum < 1000) && ($platinum > 100) && ($platinum > 500) || ($platinum > 1000)) {
		$client->Message(315, "$NPCName whispers to you, 'Use the correct amount, $name!'");
		quest::givecash($copper,$silver,$gold,$platinum);
	}
}
It simply charges a fee based on the user level. It also buffs them upon correct payment.

Enjoy!
__________________
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 03:12 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 - 2026, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3