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-08-2013, 09:51 PM
javewow's Avatar
javewow
Sarnak
 
Join Date: Aug 2012
Location: work
Posts: 74
Default player.pl--spawn Boss

player.pl


Is that all right ? HELP!


sub EVENT_ITEM
{
if($castspell{7652} == 1)#player cast Fireworks
{

quest::spawn2(218068,0,0,$x,$y,$z,$h); #spawn BOSS
}
}
__________________
To create the most beautiful server for "!!~[BP] PLARYBOT EQ~!" Welcome to our server
Reply With Quote
  #2  
Old 01-08-2013, 10:34 PM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

please use CODE tags when you post code.

is this supposed to happen when someone hands a player an item? i'm not sure that EVENT_IETM is valid outside an npc script.

where is %castspell defined?
Reply With Quote
  #3  
Old 01-08-2013, 10:46 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

You probably want EVENT_CAST. The spell id is in the $spell_id variable.
Reply With Quote
  #4  
Old 01-08-2013, 11:10 PM
javewow's Avatar
javewow
Sarnak
 
Join Date: Aug 2012
Location: work
Posts: 74
Default

1---if players in this ZONE --loot item="Fireworks Rack"

2:---then in this cast---"Fireworks Rack"

3:---- if player cast finishing

4:---- At this time spawn-> Boss out



Such as of WOW GAme Boss

How to set up, please help to tell me


Very grateful
__________________
To create the most beautiful server for "!!~[BP] PLARYBOT EQ~!" Welcome to our server
Reply With Quote
  #5  
Old 01-08-2013, 11:50 PM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

if you're wanting for it to occur when a player uses a click effect, use EVENT_CLICK_CAST.

note that you will need to have the client cast a spell in the event with $client->CastSpell() or they won't be able to do anything else.

it won't show you the spell that is cast (in the case of the fireworks rack, it's "Use Ability", according to ZAM) in the event, but it will show you the itemID that was clicked.
Reply With Quote
  #6  
Old 01-09-2013, 12:12 AM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

oops. my bad.

i meant EVENT_ITEM_CLICK_CAST...

and it needs to be in an item script named something like quests\items\script_<scriptfileid>.pl instead of player.pl

<scriptfileid> is set in the database for that item's entry.
Reply With Quote
  #7  
Old 01-09-2013, 02:30 AM
javewow's Avatar
javewow
Sarnak
 
Join Date: Aug 2012
Location: work
Posts: 74
Default

PEQ\quests\items crate new pl

For example

script_51778.pl (51778=item:Fireworks Rack

Content:



sub EVENT_ITEM_CLICK
{
if($itemid == 51778 ) # Fireworks Rack
{
if($client->CastSpell(7652))
{

quest::spawn2(218068,0,0,$x,$y,$z,$h);
}
}



Right?? HELP ! I don't understand
__________________
To create the most beautiful server for "!!~[BP] PLARYBOT EQ~!" Welcome to our server
Reply With Quote
  #8  
Old 01-09-2013, 02:53 AM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Quote:
Originally Posted by javewow View Post
PEQ\quests\items crate new pl

For example

script_51778.pl (51778=item:Fireworks Rack

Content:



sub EVENT_ITEM_CLICK
{
if($itemid == 51778 ) # Fireworks Rack
{
if($client->CastSpell(7652))
{

quest::spawn2(218068,0,0,$x,$y,$z,$h);
}
}



Right?? HELP ! I don't understand
1. Please use [ CODE] blocks (it's the # icon when making a reply)
2. Please stop using [ COLOR], instead refer to #1
3. Due to language barrier, perhaps post your entire script (IF you use the CODE blocks). Because even if you don't understand the answers given and those answering don't understand your English, they WILL understand Perl -- thus your chances for an accurate (to what you want) answer will increase exponentially.

Those are my suggestions to make it easier on everyone.
Reply With Quote
  #9  
Old 01-09-2013, 03:40 AM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

i may have misunderstood your original intentions due to the fact that you were using EVENT_ITEM in your first post. without fully understanding what it is you are trying to do, it's extremely difficult to give you correct information.

if you are just looking to verify that a spell has been cast by the client, then EVENT_CAST is what you want to use, as lerxst2112 previously suggested.
Reply With Quote
  #10  
Old 01-09-2013, 10:50 AM
javewow's Avatar
javewow
Sarnak
 
Join Date: Aug 2012
Location: work
Posts: 74
Default

The picture shows


HELP!


__________________
To create the most beautiful server for "!!~[BP] PLARYBOT EQ~!" Welcome to our server
Reply With Quote
  #11  
Old 01-09-2013, 01:03 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Reply With Quote
  #12  
Old 01-09-2013, 01:35 PM
sorvani
Dragon
 
Join Date: May 2010
Posts: 965
Default

Try this.
also please notice the use of the [CODE] tag.
Code:
sub EVENT_CAST {
  if($spell_id == 7652) {
    quest::spawn2(218068,0,0,$x,$y,$z,$h);
  }
}
Reply With Quote
  #13  
Old 01-09-2013, 09:28 PM
javewow's Avatar
javewow
Sarnak
 
Join Date: Aug 2012
Location: work
Posts: 74
Default

Quote:
Originally Posted by sorvani View Post
Try this.
also please notice the use of the [CODE] tag.
Code:
sub EVENT_CAST {
  if($spell_id == 7652) {
    quest::spawn2(218068,0,0,$x,$y,$z,$h);
  }
}
Use your methods do not spawn

I will not

Code:
sub EVENT_ITEM_CLICK_CAST {
        my %transmute = ();
        $transmute[69231] = 5137;

               if($spell_id == 5137) {
    quest::spawn2(218068,0,0,$x,$y,$z,$h);
  }
}
__________________
To create the most beautiful server for "!!~[BP] PLARYBOT EQ~!" Welcome to our server
Reply With Quote
  #14  
Old 01-09-2013, 09:43 PM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

you're not using EVENT_ITEM_CLICK_CAST right.

the transmute stuff is not necessary. it's specific to one item.

you're using variables that likely aren't defined in the type of script and event you have them in. you will have to get values for x, y, z, and h.

again... $itemid is defined in EVENT_ITEM_CLICK_CAST, not $spell_id.

check your logs. they will generally tell you when you have issues in your scripts.
Reply With Quote
  #15  
Old 01-09-2013, 10:01 PM
javewow's Avatar
javewow
Sarnak
 
Join Date: Aug 2012
Location: work
Posts: 74
Default

Quote:
Originally Posted by c0ncrete View Post
you're not using EVENT_ITEM_CLICK_CAST right.

the transmute stuff is not necessary. it's specific to one item.

you're using variables that likely aren't defined in the type of script and event you have them in. you will have to get values for x, y, z, and h.

again... $itemid is defined in EVENT_ITEM_CLICK_CAST, not $spell_id.

check your logs. they will generally tell you when you have issues in your scripts.
I can't understand

new ->script_69231.pl

Code:
sub EVENT_ITEM_CLICK_CAST {
        my %transmute = ();
        $transmute[69231] = 5137;

               if($itemid && $transmute[$itemid]) {
                $client->NukeItem($itemid);
                $client->CastSpell($transmute[$itemid], 0, 1, 0, 0);
                $client->spawn2(469003,0,0,2.0,-2.0,4.47,100);
  }
}
Can't run not Spawn
__________________
To create the most beautiful server for "!!~[BP] PLARYBOT EQ~!" Welcome to our server
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:20 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