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-06-2012, 05:44 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

lol, I made it bold in mine too, but making it giant is a sure win. <3 Secrets
Reply With Quote
  #2  
Old 05-06-2012, 09:15 PM
Drakiyth's Avatar
Drakiyth
Dragon
 
Join Date: Apr 2012
Posts: 545
Default

The extra ) actually broke the script on the npc and wasn't needed. (I already said I tested this on an NPC with the single ")") It was fine as is. Thanks for trying to help though. This call doesn't work with this EVENT type so it's impossible to do with it. I asked if you all knew a way to get this to work but I doubt it. I'll have to figure something else out.

NOTE: If I knew the answer to something I would of already made a script for the person who was asking for help. If you want to show you're true tech gods that know anything it would be better if you actually showed it instead of act like I should know everything already. If I did I wouldn't be asking for help. "Closing" that isn't even needed. The extra "IF" was a mistake but the single ) was fine. Try the script for yourself on an NPC.
Reply With Quote
  #3  
Old 05-06-2012, 10:22 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

First of all, with your attitude in your last reply, you really don't deserve further help. The answer has already been handed to you and you are complaining about that.

I tested the following script just now on a player.pl in my blackburrow zone and it worked perfectly fine.

Code:
sub EVENT_TARGET_CHANGE {

	if (plugin::check_hasitem($client, 2632))
	{
		quest::ding();
		$client->Message(13, "Target Changed");
	}

}
Note that I used a different item ID, because I just picked a random item my character had on them for testing. I also didn't use your nuke item, but used a debug message instead to prove it was getting that far and it did.

Also, anytime you have an opening parenthesis "(", or curly bracket "{", you always need a closing one that goes with that specific one. I highly recommend you download notepad++ for your script editing, because it will make it really easy for you to make sure you have your brackets and parenthesis properly closed. Just click next to the one you want to check and it highlights the other one in red.

The people that were responding in this thread to help you have been doing this stuff for years, so they know what they are talking about.

If you are still having a problem with that script, then your issue is most likely with the plugin itself. Maybe you don't have plugins in the correct folder. By default from PEQ, the plugin folder is inside the quest folder. You need to move it directly into your server folder for them to actually work.

As mentioned earlier, you are using && in your example which means they need to have both items for the nuke item to happen. What you want is || for OR instead of AND. This should work:
Code:
sub EVENT_TARGET_CHANGE {

	if(plugin::check_hasitem($client, 4202) || plugin::check_hasitem($client, 4203))
	{
		$client->Message(13, "Nuking Items");
		$client->NukeItem(4202);
		$client->NukeItem(4203);
	}

}
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 05-06-2012 at 10:28 PM..
Reply With Quote
  #4  
Old 05-06-2012, 11:10 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

I didn't mean it as offensive, I was just pointing out a syntax error. Trevius' reply is right though, the script he posted should work.

I didn't mean to come of as a know-it-all. I just wanted to help.
Reply With Quote
  #5  
Old 05-07-2012, 12:10 AM
chrsschb's Avatar
chrsschb
Dragon
 
Join Date: Nov 2008
Location: GA
Posts: 904
Default

I use a shit load of check_hasitem plugins on my server, Trevius is 100% right!
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 09:53 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3