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

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 08-18-2014, 03:27 PM
knight-mare
Sarnak
 
Join Date: Jun 2014
Posts: 69
Default Skills quest

So here a quest script i put together for a skill up NPC
http://pastebin.com/xFgexccX

first day i set him up he worked perfect i tested him etc (level by level) and my skills went up

now hes dead to the world
when i run questerrors i get this
script error: qst_npc_999248::EVENT_ITEM
Reply With Quote
  #2  
Old 08-29-2014, 02:52 PM
chrsschb's Avatar
chrsschb
Dragon
 
Join Date: Nov 2008
Location: GA
Posts: 904
Default

Syntax looks fine to me.

Code:
sub EVENT_SAY 
	{
	if($text =~/Hail/i)
		{ 
		quest::say("Greetings $name. If you want me to set your skills for you, please say so and I will give you my [pricelist]. If you want me to [heal] you, please say so and I will do it for free.");
		}
    
	if($text=~/pricelist/i)
		{
		quest::say("I can set all skills to the following skill levels : level 20 = 10 pp // level 40 = 40 pp // level 60 = 80 pp // level 80 = 160 pp // level 100 = 320 pp // level 120 = 640 pp // level 150 = 1280 pp // level 200 = 2560 pp // level 250 = 5000 pp");
		}
    
	if($text=~/heal/i) 
		{ 
		quest::selfcast(13); 
		}
	}
    
sub EVENT_ITEM
    {
    if($platinum == 10)
		{
		quest::setallskills (20);
		}	
    
	if($platinum == 40)
		{
		quest::setallskills (40);
		}
    
	if($platinum == 80)
		{
		quest::setallskills (60);
		}
		
	if($platinum == 160)
		{
		quest::setallskills (80);
		}
    
	if($platinum == 320)
		{
		quest::setallskills(100);
		}
		
	if($platinum == 640)
		{
		quest::setallskills(120);
		}
		
	if($platinum == 1280)
		{
		quest::setallskills(150);
		}
    
	if($platinum == 2560)
		{
		quest::setallskills(200);
		}
    
	if($platinum == 5000)
		{
		quest::setallskills(250);
		}
    }
However consider expanding your code to use character level and class skill max values. For instance if your character is level 34 wizard, this code would give max skills for a level 34 wizard. You can place it inside any if statement with your predetermined prerequisites.

Code:
{
my $CharClass = $client->GetClass();
for ($skillid = 0; $skillid < 74; $skillid++)
	{
	my $SkillValue = $client->MaxSkill($skillid, $CharClass, $ulevel);
	$client->SetSkill($skillid, $SkillValue);
	}
}
__________________
Clumsy's World: Resurgence [2019-Present]
Clumsy's World 2.0 [2014-2016]
Clumsy's World [2006-2012]
Reply With Quote
  #3  
Old 06-21-2015, 12:49 PM
knight-mare
Sarnak
 
Join Date: Jun 2014
Posts: 69
Default

anyone any idea why this would not work? NPC responds to players and takes money but dose not give skills
Reply With Quote
  #4  
Old 06-21-2015, 03:58 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

you are using.. "setallskills" and it should just be.. "setallskill"


When you are stumped, best bet is to check the wiki.

http://wiki.eqemulator.org/p?Ultimat...rence&frm=Main
Reply With Quote
  #5  
Old 06-24-2015, 06:19 PM
knight-mare
Sarnak
 
Join Date: Jun 2014
Posts: 69
Default

sooo this is now quest

sub EVENT_SAY
{
if($text =~/Hail/i)
{
quest::say("Greetings $name. If you want me to set your skills for you, please say so and I will give you my [pricelist].");
}

if($text=~/pricelist/i)
{quest::say("I can set all skills to the following skill levels : level 20 = 10 pp // level 40 = 40 pp // level 60 = 80 pp // level 80 = 160 pp // level 100 = 320 pp // level 120 = 640 pp // level 150 = 1280 pp // level 200 = 2560 pp // level 250 = 5000 pp");}
}
}

sub EVENT_ITEM
{
if($platinum == 10)
{
quest::setallskill (20) ;
}
if($platinum == 40)
{
quest::setallskill (40);
}
if($platinum == 80)
{
quest::setallskill (60);
}
if($platinum == 160)
{
quest::setallskill (80);
}
if($platinum == 320)
{
quest::setallskill (100);
}
if($platinum == 640)
{
quest::setallskill (120);
}
if($platinum == 1280)
{
quest::setallskill (150);
}
if($platinum == 2560)
{
quest::setallskill (200);
}
if($platinum == 5000)
{
quest::setallskill (250);
}
}

should all work? but itg dosnt ...he gobbles plat and gives no skills :S
Reply With Quote
  #6  
Old 06-24-2015, 07:01 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

Getting it to where it is easier to read. Still responding to hails?

Code:
sub EVENT_SAY
{
	if($text =~/Hail/i)
	{
		quest::say("Greetings $name. If you want me to set your skills for you, please say so and I will give you my [pricelist].");
	}

if($text=~/pricelist/i)
	{
		quest::say("I can set all skills to the following skill levels : level 20 = 10 pp // level 40 = 40 pp // level 60 = 80 pp // level 80 = 160 pp // level 100 = 320 pp // level 120 = 640 pp // level 150 = 1280 pp // level 200 = 2560 pp // level 250 = 5000 pp");}
	}
}

sub EVENT_ITEM
{
	if($platinum == 10)
	{
		quest::setallskill(20);
	}
	if($platinum == 40)
	{
		quest::setallskill(40);
	}
	if($platinum == 80)
	{
		quest::setallskill(60);
	}
	if($platinum == 160)
	{
		quest::setallskill(80);
	}
	if($platinum == 320)
	{
		quest::setallskill(100);
	}
	if($platinum == 640)
	{
		quest::setallskill(120);
	}
	if($platinum == 1280)
	{
		quest::setallskill(150);
	}
	if($platinum == 2560)
	{
		quest::setallskill(200);
	}
	if($platinum == 5000)
	{
		quest::setallskill(250);
	}
}
Reply With Quote
  #7  
Old 06-24-2015, 07:07 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

There was an extra }, try this:
Code:
sub EVENT_SAY {
    my %h = (10 => 20,
    40 => 40,
    80 => 60,
    160 => 80,
    320 => 100,
    640 => 120,
    1280 => 150,
    2560 => 200,
    5000 => 250);
    if($text =~/Hail/i) {
        quest::say("Greetings $name. If you want me to set your skills for you, please say so and I will give you my " . quest::saylink("price list", 1) . ".");
    } elsif($text=~/Price List/i) {
        quest::say("I can set all skills to the following skill levels:");
        quest::say("Level $h{$_}: " . quest::saylink($_, 1) . " Platinum") for (sort {$a <=> $b} @{[keys %h]});
    } elsif ($text!~/Hail/i && $text!~/Price List/i && $text ~~ @{[keys %h]} && $client->TakeMoneyFromPP(($text * 1000), 1)) {
        quest::setallskill($h{$text});
    }
}

Last edited by Kingly_Krab; 06-24-2015 at 07:16 PM..
Reply With Quote
  #8  
Old 06-24-2015, 07:13 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Such elegance you bring to otherwise crude and simple code, KK.
Reply With Quote
  #9  
Old 06-24-2015, 07:16 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

Yeah, just realized it didn't have saylinks so I added them. Not sure if making it more complex is elegant, but okay, haha.
Reply With Quote
  #10  
Old 06-24-2015, 07:19 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

So clicking the saylink for one of the options would take the money out of the character's inventory, as opposed to waiting for them to give it in a trade window. Clever and efficient, though likely less expected to the players.
Reply With Quote
  #11  
Old 06-24-2015, 07:43 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

Yeah, just the way I write things, it's more efficient to just take it all in one sweep.
Reply With Quote
  #12  
Old 06-25-2015, 08:08 AM
knight-mare
Sarnak
 
Join Date: Jun 2014
Posts: 69
Default

King your awsome.... any idea on this one?
Reply With Quote
  #13  
Old 06-25-2015, 08:10 AM
knight-mare
Sarnak
 
Join Date: Jun 2014
Posts: 69
Default

scratch that list bit... i completely bust second one so need to fix 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 12:45 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