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

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 03-11-2015, 09:24 AM
Bandor
Hill Giant
 
Join Date: May 2014
Posts: 209
Default Having a little trouble

Been working on a quest that I just cant seem to get to work for some reason lol. Been testing it and can't seem to figure out the problem,which im sure is something stupid as those are my favorite mistakes to make. Anyone able to give me some insight?


Code:
sub EVENT_SAY {
	if ( !defined $qglobals{"Slayer"} ) { # This will make sure that you have at LEAST step 1 when hailing.  If someone flat out gives an item to him without that, we can't do anything about that kind of laziness, but we ARE checking for defined before taking their items.
		quest::setglobal("Slayer", 1, 4, "F");
	} 
	if($text=~/hail/i) {
		if($qglobals{"Slayer"} == 2) {
			plugin::Whisper("Hello $name. Up for another " . quest::saylink("task", 1) . " perhaps?");
		} elsif($qglobals{"Slayer"} == 3) {
			plugin::Whisper("You are doing great works $name! One " . quest::saylink("task", 1) . " left!");
		} elsif($qglobals{"Slayer"} == 4) {
			plugin::Whisper("You have completed my tasks $name! There is but one last " . quest::saylink("step") . " we must take.");
		} else {
		plugin::Whisper("Hail $class. We have currently secured the first level of the tower , we have lost a lot of troops but Rahtiz is determined! Perhaps you and your friends could help us " . quest::saylink("secure", 1) . " the other levels?");
	quest::setglobal("Slayer", 1, 4, "F");
	} 
	elsif($text=~/task/i) {
		if($qglobals{"Slayer"} == 1) {
			plugin::Whisper("Make Haste!");
		quest::assigntask(16);
		} elsif($qglobals{"Slayer"} == 2) {
			plugin::Whisper("Make Haste!");
			quest::assigntask(34);
		} elsif($qglobals{"Slayer"} == 3) {
			plugin::Whisper("Make Haste!");
			quest::assigntask(35);
		} else {
			plugin::Whisper("I can do nothing for you at this time.");
		}
	}
		elsif($text=~/secure/i) {
	plugin::Whisper("Wonderful! Finish my " . quest::saylink("task") . " ! We will speak again after you complete this mission!");
	} 
elsif($text=~/step/i) {
		if($qglobals{"Slayer"} == 4) {
		plugin::Whisper("Take the orbs you have obtained from my tasks and combine them in this! Once you do that you are now able to enter the study of Daosheen! Quickly now speak with Rahtiz and tell him of your works!");
	} else {
			plugin::Whisper("You are not ready for this mission!");
	}
	}
__________________
Owner and Developer - Everquest: A New World
Reply With Quote
  #2  
Old 03-11-2015, 09:54 AM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

missing a boat load of brackets

Here is the code with no syntax errors.. not sure if its gonna work.. but it at least has correct syntax
Code:
sub EVENT_SAY {
	if ( !defined $qglobals{"Slayer"} ) { # This will make sure that you have at LEAST step 1 when hailing.  If someone flat out gives an item to him without that, we can't do anything about that kind of laziness, but we ARE checking for defined before taking their items.
		quest::setglobal("Slayer", 1, 4, "F");
	} 
	if($text=~/hail/i) {
		if($qglobals{"Slayer"} == 2) {
			plugin::Whisper("Hello $name. Up for another " . quest::saylink("task", 1) . " perhaps?");
		} elsif($qglobals{"Slayer"} == 3) {
			plugin::Whisper("You are doing great works $name! One " . quest::saylink("task", 1) . " left!");
		} elsif($qglobals{"Slayer"} == 4) {
			plugin::Whisper("You have completed my tasks $name! There is but one last " . quest::saylink("step") . " we must take.");
		} else {
			plugin::Whisper("Hail $class. We have currently secured the first level of the tower , we have lost a lot of troops but Rahtiz is determined! Perhaps you and your friends could help us " . quest::saylink("secure", 1) . " the other levels?");
			quest::setglobal("Slayer", 1, 4, "F");
		}
	}
	elsif($text=~/task/i) {
		if($qglobals{"Slayer"} == 1) {
			plugin::Whisper("Make Haste!");
		quest::assigntask(16);
		} elsif($qglobals{"Slayer"} == 2) {
			plugin::Whisper("Make Haste!");
			quest::assigntask(34);
		} elsif($qglobals{"Slayer"} == 3) {
			plugin::Whisper("Make Haste!");
			quest::assigntask(35);
		} else {
			plugin::Whisper("I can do nothing for you at this time.");
		}
	}
	elsif($text=~/secure/i) {
		plugin::Whisper("Wonderful! Finish my " . quest::saylink("task") . " ! We will speak again after you complete this mission!");
	} 
	elsif($text=~/step/i) {
		if($qglobals{"Slayer"} == 4) {
			plugin::Whisper("Take the orbs you have obtained from my tasks and combine them in this! Once you do that you are now able to enter the study of Daosheen! Quickly now speak with Rahtiz and tell him of your works!");
		} else {
			plugin::Whisper("You are not ready for this mission!");
		}
	}
}

Here is some advice for quests you do later.. to test them quickly..

First do this in Notepad++ rightclick the file...


now type this into the command prompt...
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 09:30 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