|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Quests::Q&A This is the quest support section |

01-08-2013, 09:51 PM
|
 |
Sarnak
|
|
Join Date: Aug 2012
Location: work
Posts: 74
|
|
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
|

01-08-2013, 10:34 PM
|
 |
Dragon
|
|
Join Date: Dec 2009
Posts: 719
|
|
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?
|

01-08-2013, 10:46 PM
|
Demi-God
|
|
Join Date: Aug 2010
Posts: 1,742
|
|
You probably want EVENT_CAST. The spell id is in the $spell_id variable.
|

01-08-2013, 11:10 PM
|
 |
Sarnak
|
|
Join Date: Aug 2012
Location: work
Posts: 74
|
|
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
|

01-08-2013, 11:50 PM
|
 |
Dragon
|
|
Join Date: Dec 2009
Posts: 719
|
|
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.
|

01-09-2013, 12:12 AM
|
 |
Dragon
|
|
Join Date: Dec 2009
Posts: 719
|
|
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.
|

01-09-2013, 02:30 AM
|
 |
Sarnak
|
|
Join Date: Aug 2012
Location: work
Posts: 74
|
|
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
|

01-09-2013, 09:43 PM
|
 |
Dragon
|
|
Join Date: Dec 2009
Posts: 719
|
|
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.
|

01-09-2013, 10:01 PM
|
 |
Sarnak
|
|
Join Date: Aug 2012
Location: work
Posts: 74
|
|
Quote:
Originally Posted by c0ncrete
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
|
 |
|
 |

01-09-2013, 10:17 PM
|
 |
Dragon
|
|
Join Date: Dec 2009
Posts: 719
|
|
Quote:
Originally Posted by javewow
I can't understand
|
clearly.
Quote:
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
|
because you are doing it wrong.
as i've said before...
1) you do not need %transmute. stop using it.
2) the script name should be script_<scriptfileid>.pl
EXAMPLE:
Code:
mysql> select id, name, clickeffect, scriptfileid from items where name = "Fireworks Rack";
+-------+----------------+-------------+--------------+
| id | name | clickeffect | scriptfileid |
+-------+----------------+-------------+--------------+
| 51778 | Fireworks Rack | 7652 | 0 |
+-------+----------------+-------------+--------------+
1 row in set (0.30 sec)
the item you are using doesn't have a script associated with it. assign one in the database and name your script accordingly.
i have no idea where you are getting the numbers 69231 or 5137. if you don't explain everything you are doing and where you are getting the information from, we can only guess at how to help you resolve your issue.
|
 |
|
 |

01-09-2013, 10:04 PM
|
 |
Dragon
|
|
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
|
|
PM's go unanswered. So. What is your native language?
|

01-09-2013, 10:29 PM
|
 |
Sarnak
|
|
Join Date: Aug 2012
Location: work
Posts: 74
|
|
Before, I use "Fireworks Rack" is error
Behind me to "Firework: Dancing Lights"
Firework: Dancing Lights ID = 69231 spellID=5137
I want to click can summon -> Spawn NPC
But Pl error Can't succeed
__________________
To create the most beautiful server for "!!~[BP] PLARYBOT EQ~!" Welcome to our server
|

01-09-2013, 10:40 PM
|
 |
Dragon
|
|
Join Date: Dec 2009
Posts: 719
|
|
if you'd do it the way i've instructed, it will work.
|

01-09-2013, 10:59 PM
|
 |
Sarnak
|
|
Join Date: Aug 2012
Location: work
Posts: 74
|
|
Quote:
Originally Posted by c0ncrete
if you'd do it the way i've instructed, it will work.
|
Thank you I understand
I do try
--------------------------------------------
Update items set scriptfileid = "xxxxxx" where id=69231;
------------------------------------------
Now change to
Code:
mysql> select id, name, clickeffect, scriptfileid from items where name = "Firework: Dancing Lights";
+-------+--------------------------+-------------+--------------+
| id | name | clickeffect | scriptfileid |
+-------+--------------------------+-------------+--------------+
| 69231 | Firework: Dancing Lights | 5137 | 32767 |
+-------+--------------------------+-------------+--------------+
1 row in set
mysql>
save-> script_32767.pl
__________________
To create the most beautiful server for "!!~[BP] PLARYBOT EQ~!" Welcome to our server
|

01-09-2013, 11:03 PM
|
 |
Dragon
|
|
Join Date: Dec 2009
Posts: 719
|
|
yes, then name the quest file script_32767.pl and forget everything about %transmute and $spell_id. you're just looking for the item click.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 07:11 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |