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 05-15-2010, 04:10 AM
blackdragonsdg
Dragon
 
Join Date: Dec 2008
Location: Tennessee
Posts: 654
Default What is wrong with this script?

It seems like the easier the script should be the more of a headache it is for me.....EVENT_SAY works just fine but EVENT_ITEM just eats the handin and nothing else happens. What did I do wrong?


Code:
sub EVENT_SAY {
    if($text=~/Hail/i) {
    quest::say("Hi there young one. I require some assistance, would you be willing to [help] me.");
    }
    if($text=~/help/i) {
    quest::say("I am a collector of sorts and over the years I have managed to collect items or bones from the various monsters around Norrarth. Right now I am looking for something from the king of Kael. Seek out the one named Tormax and bring me his head. Do this for me and I shall bestow a great reward upon you.");
    }
}

sub EVENT_ITEM {
  if(plugin::check_handin(\%itemcount, 30516 => 1)) {
    quest::say("Oh, you actually found him! That is great news now I can add his head to my collection. Thank you very much for your help. Here is your reward! If you wish to return to Relic at some point in the future simply hand me the Relic Stone of Return and I will send you back.");
    quest::summonitem(119590);
    quest::movepc(370,99,1177,-273);
    }
elsif (plugin::check_handin(\%itemcount, 119590 => 1)) {
    quest::say("So you want to return to Relic, very well then, off you go!");
    quest::summonitem(119590);
    quest::movepc(370,99,1177,-273);
    }
else {
    quest::say("I don't need this.");
    plugin::return_items(\%itemcount);
     }
}
Reply With Quote
  #2  
Old 05-15-2010, 04:39 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

Do you have the plugins in your emu\plugins folder or your quests\plugins folder?
Reply With Quote
  #3  
Old 05-15-2010, 01:47 PM
EqTitan
Sarnak
 
Join Date: Mar 2010
Location: hi
Posts: 31
Default

Ive found when writing quests that if I copy paste things, no rhyme or reason they just don't work sometimes. But if I sit there and manually type every letter of the script I just copyed, it works. Very odd I know but what are ya gonna do ....
Reply With Quote
  #4  
Old 05-15-2010, 03:17 PM
nilbog
Hill Giant
 
Join Date: Nov 2007
Posts: 197
Default

What text editor are you using to write/modify your scripts, EqTitan?
Reply With Quote
  #5  
Old 05-15-2010, 06:21 PM
blackdragonsdg
Dragon
 
Join Date: Dec 2008
Location: Tennessee
Posts: 654
Default

Quote:
Originally Posted by joligario View Post
Do you have the plugins in your emu\plugins folder or your quests\plugins folder?
Yup, that was the problem. The simple stuff always gets me....thanks for the help.
Reply With Quote
  #6  
Old 05-15-2010, 06:45 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

This;
(plugin::check_handin(\%itemcount, 30516 => 1)
does not always work for me - for whatever reason, it just will not work some times.

This;
($itemcount{30516} >= 1)
Always works for me. So try changing all your "plugin::check_handin's" to this.

I do always include this at the end of the script;
Code:
  else{
    quest::say("Sorry, I can't use this.");
    plugin::return_items(\%itemcount);
  }
So the player doesn't loose anything
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 05:22 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