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 01-24-2010, 10:27 PM
Ozzara
Fire Beetle
 
Join Date: May 2009
Location: I want to play EQ!
Posts: 7
Default Timer issues

Is it possible to use summonitem(); inside a sub EVENT_TIMER routine based on a sub EVENT_ITEM routine? It just wont summon the item i want after the timer has expired.

Example:

Code:
 sub EVENT_ITEM 
 {
       if(($itemcount{16905} == 1) && ($itemcount{13006} == 1) && ($itemcount{12018} == 1)  && ($platinum >= 80)) {
      
      quest::say("Text goes here");
		$theclienteid = $client->GetID();  #store client id
		$thename = $name;		   #store client name
		$theclient = $client;		   #store client
		quest::settimer("1",10);
 
     }


	else {
                 plugin::return_items(\%itemcount);
                 quest::say("text goes here ");
    }

}

sub EVENT_TIMER {

	if ($timer eq "1") {
		quest::say("text goes here $thename.");
		quest::stoptimer("1");
		$theclient->summonitem(5555,$theclienteid);
	}

}
Reply With Quote
  #2  
Old 01-24-2010, 10:33 PM
pfyon's Avatar
pfyon
Discordant
 
Join Date: Mar 2009
Location: Ottawa
Posts: 495
Default

Pretty sure $theclient needs to be either declared such that it is accessible from EVENT_TIMER.
Reply With Quote
  #3  
Old 01-24-2010, 11:14 PM
Ozzara
Fire Beetle
 
Join Date: May 2009
Location: I want to play EQ!
Posts: 7
Default

This totally works if i use:


Code:
$theclient->CastSpell(26,$theclienteid);

But when i try to use:

Code:
$theclient->summonitem(5555,$theclienteid);
Everything works, except it never summons an item. So if the CastSpell is working would'nt that mean $theclient has been declared?
Reply With Quote
  #4  
Old 01-24-2010, 11:57 PM
pfyon's Avatar
pfyon
Discordant
 
Join Date: Mar 2009
Location: Ottawa
Posts: 495
Default

My mistake, I haven't done much work with perl yet.

The functions are case sensitive, it could be SummonItem() as opposed to summonitem().
Reply With Quote
  #5  
Old 01-24-2010, 11:57 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

You are using the Quest Object wrong. See this wiki page for the full list:

http://www.eqemulator.net/wiki/wikka...a=QuestObjects


And here is the SummonItem() Object usages from that page:

Code:
SummonItem(item_id, charges= 0)
So, you are supposed to set charges in the second argument, not the client. You also have the S and I in lowercase, and Quest Objects are case sensitive and will not work if you don't use the correct case. I think this is probably how you would use it (though I have never tried it myself):

Code:
$theclient->SummonItem(5555, 1);
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #6  
Old 01-25-2010, 12:16 AM
Ozzara
Fire Beetle
 
Join Date: May 2009
Location: I want to play EQ!
Posts: 7
Default

It seems that while using Georges Tools, Quest Editor it changes my SummonItem to summonitem as soon as i step off the line of code.

I even tried
Code:
quest::SummonItem(5555,1);
again step of the line of code and it reverts it to
Code:
summonitem(5555,1);
Reply With Quote
  #7  
Old 01-25-2010, 02:01 AM
jkennedy
Hill Giant
 
Join Date: Dec 2009
Posts: 175
Default

just open your .pl file in ur quests folder and edit the quest to the uppercase version
Reply With Quote
  #8  
Old 01-27-2010, 01:10 AM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,474
Default

I fixed the program to correct the case. Thanks for reporting it.

ver 1.2.4

GeorgeS
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//
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 01:44 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3