PDA

View Full Version : Need help on return wrong items script please


shamanistik
05-22-2006, 02:31 PM
Hi all,
So far I had no problems writing quests, even did some events, work fine :)

But I decided to add a script so wrong items are returned back, since some quests requires 4 items, sometimes hard to find, I don't want people having to camp all the items again on the process of discovering the quest.

But nothing I tried seems to work, withtout the "wrong item back" script, it work, the wrong item back script alone work, but together.. nope :/
Half working, as I managed to have the quest working, and the wrong items back working with it, but problem is even if the quest is good, the reward work, but I have the text from wrong items, and quest items are returned along with the reward..

Here is a part of the script, if someone could check it, that would be greatly appreciated ;)

sub EVENT_SAY {
if ($text=~/hail/i) {
quest::say("Greetings, $name ");
}
if ($text=~/what process/i) {
quest::say("Want to know about it already? Amazing, young one.. Ok, fine. The Scaled Mystics have ranks, for now, you are just an apprentice. Me I am an Heyokah, the one the spirits talk within. A day, perhaps, you may become one, who know. But the path is long and painful. Do you want to follow this [path]?");
}
if ($text=~/path/i) {
quest::say("Alright, young one. Outside this tower lie the field of bone. A dangerous place indeed. You will go there, and slay the wild beasts. As a proof of your devotion, you will bring me these items along with your cudgel. A telson from a Scorpion, the scales of a scaled wolf, and a glowing silk from the dangerous spiders. Now go, young one, in the name of the Scaled Mystics ! ");}
}

sub EVENT_ITEM {
if ($itemcount{18206} == 1){
quest::say("Ahhh, a new recruit, excellent. Take this cudgel, young one, it's the first step in the [process] of being a great scaled mystic. ");
quest::summonitem("5140");
quest::givecash("0","0","0","10");
quest::exp(1500);
}
if ($itemcount{12846} == 1 && $itemcount{1831} == 1 && $itemcount{5140} == 1 && $itemcount{12466} == 1){quest::say("WOah !");
quest::summonitem(5141);
quest::exp(3000);}

else (plugin::check_handin(\%itemcount,)) {
quest::say("do I look like garbage??");
}

plugin::return_items(\%itemcount);
}

Thanks ! :confused:

jimbabwe
05-22-2006, 04:16 PM
i think you want this


sub EVENT_SAY {
if ($text=~/hail/i) {
quest::say("Greetings, $name ");
}
if ($text=~/what process/i) {
quest::say("Want to know about it already? Amazing, young one.. Ok, fine. The Scaled Mystics have ranks, for now, you are just an apprentice. Me I am an Heyokah, the one the spirits talk within. A day, perhaps, you may become one, who know. But the path is long and painful. Do you want to follow this [path]?");
}
if ($text=~/path/i) {
quest::say("Alright, young one. Outside this tower lie the field of bone. A dangerous place indeed. You will go there, and slay the wild beasts. As a proof of your devotion, you will bring me these items along with your cudgel. A telson from a Scorpion, the scales of a scaled wolf, and a glowing silk from the dangerous spiders. Now go, young one, in the name of the Scaled Mystics ! ");}
}

sub EVENT_ITEM {
if(plugin::check_handin(\%itemcount,18206 => 1)) {
quest::say("Ahhh, a new recruit, excellent. Take this cudgel, young one, it's the first step in the [process] of being a great scaled mystic. ");
quest::summonitem("5140");
quest::givecash("0","0","0","10");
quest::exp(1500);
}
elsif(plugin::check_handin(\%itemcount,12846 => 1,1831 => 1, 5140 => 1, 12466 => 1)) {
quest::say("WOah !");
quest::summonitem(5141);
quest::exp(3000);
}
else {
plugin::return_items(\%itemcount);
quest::say("do I look like garbage??");
}
}

shamanistik
05-22-2006, 05:06 PM
Aye thanks ! works fine :)