PDA

View Full Version : need help getting this to work.


kovouau
08-03-2006, 06:25 PM
sub EVENT_SAY {
if ($text=~/hail/i) {
quest::say("Hail, $name, I lost it. I must [find it]. I can't remember. The High Elder will have my head for this!");}
if ($text=~/find/i) {
quest::say("Yes, High Elder Siana had us fetch a delivery for her, only we lost it as we were returning through the portal into our world. We are sure it is around here. Just not sure where... The package contained armor adorned especially for the High Priest of our land. If you can find it and retrieve it for me, i will craft an item adorned for a $class of your world in return.");
}
}

sub EVENT_ITEM {

if ($item1 = 28500) {
quest::summonitem(18013);
quest::exp(10000);
quest::say{"Very well and thankyou $name. I have ordered the preparation of your items. Simply hand this note to Elder Sok and ;
quest::ding();
}

if ($item1 = 28506) {
quest::summonitem(18200);
quest::exp(10000);
quest::say{"Very well and thankyou $name. I have ordered the preparation of your items. Simply hand this note to Elder Sok and ;
quest::ding();
}

if ($item1 = 28502) {
quest::summonitem(18201);
quest::exp(10000);
quest::say{"Very well and thankyou $name. I have ordered the preparation of your items. Simply hand this note to Elder Sok and ;
quest::ding();
}

if ($item1 = 28503) {
quest::summonitem(18776);
quest::exp(10000);
quest::say{"Very well and thankyou $name. I have ordered the preparation of your items. Simply hand this note to Elder Sok and ;
quest::ding();
}

if ($item1 = 28505) {
quest::summonitem(18816);
quest::exp(10000);
quest::say{"Very well and thankyou $name. I have ordered the preparation of your items. Simply hand this note to Elder Sok and ;
quest::ding();
}

if ($item1 = 28501) {
quest::summonitem(18822);
quest::exp(10000);
quest::say{"Very well and thankyou $name. I have ordered the preparation of your items. Simply hand this note to Elder Sok and ;
quest::ding();
}

if ($item1 = 28504) {
quest::summonitem(18896);
quest::exp(10000);
quest::say{"Very well and thankyou $name. I have ordered the preparation of your items. Simply hand this note to Elder Sok and ;
quest::ding();
}

}
}

#END of FILE

The fsub event say section works..... but when i hand in the items, the mob eats them.... i have tried playing with it for about 3 hours, to no resolve...
Any help will be appreciated, the first quest i wrote worked fine, and it is similar to this.... i have another quest following the same syntax as this one, so hopefully i should be able to fix it from replies to this post..... Thanks in advance

Cripp
08-03-2006, 07:22 PM
sub EVENT_SAY
{
if ($text=~/hail/i)
{
quest::say("Hail, $name, I lost it. I must [find it]. I can't remember. The High Elder will have my head for this!");
}
if ($text=~/find/i)
{
quest::say("Yes, High Elder Siana had us fetch a delivery for her, only we lost it as we were returning through the portal into our world. We are sure it is around here. Just not sure where... The package contained armor adorned especially for the High Priest of our land. If you can find it and retrieve it for me, i will craft an item adorned for a $class of your world in return.");
}
}

sub EVENT_ITEM
{
if ($item1 == 28500)
{
quest::summonitem(18013);
quest::exp(10000);
quest::say{"Very well and thankyou $name. I have ordered the preparation of your items. Simply hand this note to Elder Sok and ;
quest::ding();
}

if ($item1 == 28506)
{
quest::summonitem(18200);
quest::exp(10000);
quest::say{"Very well and thankyou $name. I have ordered the preparation of your items. Simply hand this note to Elder Sok and ;
quest::ding();
}

if ($item1 == 28502)
{
quest::summonitem(18201);
quest::exp(10000);
quest::say{"Very well and thankyou $name. I have ordered the preparation of your items. Simply hand this note to Elder Sok and ;
quest::ding();
}

if ($item1 == 28503)
{
quest::summonitem(18776);
quest::exp(10000);
quest::say{"Very well and thankyou $name. I have ordered the preparation of your items. Simply hand this note to Elder Sok and ;
quest::ding();
}

if ($item1 == 28505)
{
quest::summonitem(18816);
quest::exp(10000);
quest::say{"Very well and thankyou $name. I have ordered the preparation of your items. Simply hand this note to Elder Sok and ;
quest::ding();
}

if ($item1 == 28501)
{
quest::summonitem(18822);
quest::exp(10000);
quest::say{"Very well and thankyou $name. I have ordered the preparation of your items. Simply hand this note to Elder Sok and ;
quest::ding();
}

if ($item1 == 28504)
{
quest::summonitem(18896);
quest::exp(10000);
quest::say{"Very well and thankyou $name. I have ordered the preparation of your items. Simply hand this note to Elder Sok and ;
quest::ding();
}
}

try this..

kovouau
08-04-2006, 03:15 PM
nope, they are still eating the items, would it be better to use $itemcount?

kovouau
08-04-2006, 04:37 PM
ok i fixed it..... silly little errors.

quest::say{"Very well and thankyou $name. I have ordered the preparation of your items. Simply hand this note to Elder Sok and ;
changed to
quest::say{"Very well and thankyou $name. I have ordered the preparation of your items. Simply hand this note to Elder Sok and);

and

if ($item1 == 28500)
changed to
if ($itemcount{28500} >= 1)
thanks for the help...

was just wondering also, if you could tell me what is wrong with this... it is repeated in the quest around 96 times, so i thought id just post one of them.

if ($class eq "Berserker") {
if ($itemcount{16375} >= 1) {
if ($itemcount{18201} >= 1) {
quest::summonitem(68299);
quest::exp(10000);
quest::emote("takes the mold, revelling at your tale of Warden Ikty. Dismissing you as he tends other items.");
quest::ding();
}
}
}

ylosh
08-04-2006, 04:57 PM
maybe it's how you copied and pasted the .pl file but in all the reward dialogue you have a ; with no preceding ") and there is an extra } in event_item. would be better to use the item handin plugins. can also do something like this since you're using the same xp reward and dialogue for every successful hand in. if you don't have the plugins you can get them from anonymous cvs access as well as lots of examples from everything that's been submitted to PEQ's quest repository.


sub EVENT_SAY {
if ($text=~/hail/i) {
quest::say("Hail, $name, I lost it. I must [find it]. I can't remember. The High Elder will have my head for this!");
}
if ($text=~/find/i) {
quest::say("Yes, High Elder Siana had us fetch a delivery for her, only we lost it as we were returning through the portal into our world. We are sure it is around here. Just not sure where... The package contained armor adorned especially for the High Priest of our land. If you can find it and retrieve it for me, i will craft an item adorned for a $class of your world in return.");
}
}

sub EVENT_ITEM {
if (plugin::check_handin(\%itemcount, 28500 => 1)) {
quest::summonitem(18013);
}
elsif (plugin::check_handin(\%itemcount, 28506 => 1)) {
quest::summonitem(18200);
}
elsif (plugin::check_handin(\%itemcount, 28502 => 1)) {
quest::summonitem(18201);
}
elsif (plugin::check_handin(\%itemcount, 28503 => 1)) {
quest::summonitem(18776);
}
elsif (plugin::check_handin(\%itemcount, 28505 => 1)) {
quest::summonitem(18816);
}
elsif (plugin::check_handin(\%itemcount, 28501 => 1)) {
quest::summonitem(18822);
}
elsif (plugin::check_handin(\%itemcount, 28504 => 1)) {
quest::summonitem(18896);
}
else {
plugin::return_items(\%itemcount);
return 1;
}
quest::exp(10000);
quest::say{"Very well and thankyou $name. I have ordered the preparation of your items. Simply hand this note to Elder Sok and...");
quest::ding();
}



you caught a couple of the errors already. in the second one -


if ($class eq "Berserker") {
if ($itemcount{16375} >= 1 && $itemcount{18201} >= 1) {
quest::summonitem(68299);
quest::exp(10000);
quest::emote("takes the mold, revelling at your tale of Warden Ikty. Dismissing you as he tends other items.");
quest::ding();
}
}