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 08-13-2006, 11:19 AM
herold's Avatar
herold
Sarnak
 
Join Date: Jan 2004
Location: Denmark
Posts: 58
Default Script help

Dont know if this is the right place for this, sorry if it isn't, but here goes...
I am trying to make a KEI casting NPC and have "developed" the following script ... problem is, it is not working.

Code:
sub EVENT_SAY
{
if($text=~/Hail/i){quest::say("Greetings $name. If you pay me 50 platinum pieces, I will cast Koadic's Endless Intellect on you.");}
}

sub EVENT_ITEM
{
if($platinum == 50)
{
quest::castspell($userid,2570);
}
}
or
Code:
sub EVENT_SAY
{
if($text=~/Hail/i){quest::say("Greetings $name. If you pay me 50 platinum pieces, I will cast Koadic's Endless Intellect on you.");}
if($platinum == 50)
{
quest::castspell($userid,2570);
}
}
none of them are working ... anyone got any ideas?
Reply With Quote
  #2  
Old 08-13-2006, 12:33 PM
ylosh
Sarnak
 
Join Date: Jan 2006
Posts: 39
Default

npcs will not cast group buff spells like koadics on players right now with castspell. detrimental or single target buffs work fine. castspell is also (spellid,$userid)

you can use quest::sellfcast(spellid); for koadics, wunshi and other group buffs.
Reply With Quote
  #3  
Old 08-13-2006, 01:03 PM
herold's Avatar
herold
Sarnak
 
Join Date: Jan 2004
Location: Denmark
Posts: 58
Default

selfcast will also affact the toon next to the NPC casting it, yes?
Reply With Quote
  #4  
Old 08-13-2006, 01:21 PM
Zengez
Hill Giant
 
Join Date: Nov 2004
Posts: 160
Default

the selfcast makes the client think the player cast it on themself, so it will cast it on the player and any/all players in that player's group that are within the spell range

hope that helps
Reply With Quote
  #5  
Old 08-13-2006, 01:36 PM
herold's Avatar
herold
Sarnak
 
Join Date: Jan 2004
Location: Denmark
Posts: 58
Default

I have evolved the code to the following, but still it does not work...
Code:
sub EVENT_SAY
{
if($text=~/Hail/i){quest::say("Greetings $name. If you pay me 50 platinum pieces, I will cast Koadic's Endless Intellect on you.");}
}
sub EVENT_ITEM
{
if($platinum == 50)
{
quest::selfcast(2570,$userid);
}
}
A friend of mine suggested that the NPC class is irrelevant ... ie. enchanter vs. warrior ... is this true?

And last but not least, I am trying to put the script on Nayr Cogswin on PoK (warrior, gnome - by the soulbinder) ... if he has to be an enchanter, where exactly do I change that? I tried looking under the table "npc_types" (in MySQL Control Center 0.9.2-beta ... which as far as I can see only loads 1000 entries/rows), but again with no luck...

Last edited by herold; 08-13-2006 at 09:59 PM..
Reply With Quote
  #6  
Old 08-13-2006, 04:40 PM
ylosh
Sarnak
 
Join Date: Jan 2006
Posts: 39
Default

quest::selfcast(spellid); don't need $userid
Reply With Quote
  #7  
Old 08-14-2006, 01:52 AM
Aramid
Discordant
 
Join Date: May 2006
Posts: 356
Default

Quote:
Originally Posted by herold
A friend of mine suggested that the NPC class is irrelevant ... ie. enchanter vs. warrior ... is this true?

And last but not least, I am trying to put the script on Nayr Cogswin on PoK (warrior, gnome - by the soulbinder) ... if he has to be an enchanter, where exactly do I change that? I tried looking under the table "npc_types" (in MySQL Control Center 0.9.2-beta ... which as far as I can see only loads 1000 entries/rows), but again with no luck...
Your friend is correct.

Did you name your script Nayr_Cogswin.pl (must be spelled exactly as the NPC's name in the database) and save it to your poknowledge folder under quests? If the name doesn't work, target him with someone that can use the #showstats command and get his npc ID number. Rename the script to that number ie:202117.pl if his ID was 202117.
Reply With Quote
  #8  
Old 08-14-2006, 08:08 AM
herold's Avatar
herold
Sarnak
 
Join Date: Jan 2004
Location: Denmark
Posts: 58
Default

Quote:
Originally Posted by Aramid
Your friend is correct.

Did you name your script Nayr_Cogswin.pl (must be spelled exactly as the NPC's name in the database) and save it to your poknowledge folder under quests? If the name doesn't work, target him with someone that can use the #showstats command and get his npc ID number. Rename the script to that number ie:202117.pl if his ID was 202117.
I used the 3rd party tool that came with the install, called "Questeditor" ... the "hail" portion of the script works, so the script is placed right, yes?

I will try and remove the $userid from the selfcast portion and see how that turns out.
Reply With Quote
  #9  
Old 08-14-2006, 10:44 AM
herold's Avatar
herold
Sarnak
 
Join Date: Jan 2004
Location: Denmark
Posts: 58
Default

Script works now

Thanks all for your help.

Code:
sub EVENT_SAY
{
if($text=~/Hail/i){quest::say("Greetings $name. If you pay me 50 platinum pieces, I will cast Koadic's Endless Intellect on you.");}
}
sub EVENT_ITEM
{
if($platinum == 50)
{
quest::selfcast(2570);
}
}
Reply With Quote
  #10  
Old 08-14-2006, 11:18 AM
herold's Avatar
herold
Sarnak
 
Join Date: Jan 2004
Location: Denmark
Posts: 58
Default

I modified the script and expanded it ... quite usefull for servers with small communities.

Code:
sub EVENT_SAY
{
if($text=~/Hail/i)
{quest::say("Greetings $name. If you want me to cast a spell on 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 cast the following spells : Spirit of Wolf = 1 pp // Dead Man Floating = 3 pp // Clarity II = 5 pp // Spiritual Light = 8 pp // Spiritual Radiance = 15 pp // Temperance = 1 peridot // Virtue = 4 peridots // KEI = 50 pp");}
if ($text=~/heal/i)
{
quest::selfcast(13);
}
}
sub EVENT_ITEM
{
if($platinum == 1)
{
quest::selfcast(278);
}
if($platinum == 3)
{
quest::selfcast(457);
}
if($platinum == 5)
{
quest::selfcast(1693);
}
if($platinum == 8)
{
quest::selfcast(2176);
}
if($platinum == 15)
{
quest::selfcast(2177);
}
if($item1== 10028)
{
quest::selfcast(3692);
}
if($itemcount{10028} == 4)
{
quest::selfcast(3467);
}
if($platinum == 50)
{
quest::selfcast(2570);
}
}
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 10:33 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