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

04-24-2006, 08:58 AM
|
|
Discordant
|
|
Join Date: Jan 2005
Posts: 320
|
|
The quest works now, thank all of you guys for your hard work and patience helping me get it going. Posting the working code, maybe it will help someone else looking to make a class specific quest.
Code:
sub EVENT_SAY {
if ($text=~/hail/i) {
quest::say("Hello $name , I am one of the finest weaponsmiths this land has ever seen. If you find me a mold I will craft you a weapon. However if it is armor you seek, my brother makes the best around.");}
}
sub EVENT_ITEM {
if ($class eq "Warrior") {
if (plugin::check_handin(\%itemcount, 6164 => 1)) {
quest::summonitem(62189);
quest::exp(750);
quest::emote("smiles warmly as he hands you your weapon.");
quest::ding();
}
}
if ($class eq "Paladin") {
if (plugin::check_handin(\%itemcount, 6164 => 1)) {
quest::summonitem(62189);
quest::exp(750);
quest::emote("smiles warmly as he hands you your weapon.");
quest::ding();
}
}
if ($class eq "Shadow Knight") {
if (plugin::check_handin(\%itemcount, 6164 => 1)) {
quest::summonitem(62189);
quest::exp(750);
quest::emote("smiles warmly as he hands you your weapon.");
quest::ding();
}
}
if ($class eq "Berserker") {
if (plugin::check_handin(\%itemcount, 6164 => 1)) {
quest::summonitem(62189);
quest::exp(750);
quest::emote("smiles warmly as he hands you your weapon.");
quest::ding();
}
}
if ($class eq "Monk") {
if (plugin::check_handin(\%itemcount, 6164 => 1)) {
quest::summonitem(6611);
quest::exp(750);
quest::emote("smiles warmly as he hands you your weapon.");
quest::ding();
}
}
if ($class eq "Beastlord") {
if (plugin::check_handin(\%itemcount, 6164 => 1)) {
quest::summonitem(6611);
quest::exp(750);
quest::emote("smiles warmly as he hands you your weapon.");
quest::ding();
}
}
if ($class eq "Druid") {
if (plugin::check_handin(\%itemcount, 6164 => 1)) {
quest::summonitem(29422);
quest::exp(750);
quest::emote("smiles warmly as he hands you your weapon.");
quest::ding();
}
}
if ($class eq "Necromancer") {
if (plugin::check_handin(\%itemcount, 6164 => 1)) {
quest::summonitem(29422);
quest::exp(750);
quest::emote("smiles warmly as he hands you your weapon.");
quest::ding();
}
}
if ($class eq "Wizard") {
if (plugin::check_handin(\%itemcount, 6164 => 1)) {
quest::summonitem(29422);
quest::exp(750);
quest::emote("smiles warmly as he hands you your weapon.");
quest::ding();
}
}
if ($class eq "Magician") {
if (plugin::check_handin(\%itemcount, 6164 => 1)) {
quest::summonitem(29422);
quest::exp(750);
quest::emote("smiles warmly as he hands you your weapon.");
quest::ding();
}
}
if ($class eq "Enchanter") {
if (plugin::check_handin(\%itemcount, 6164 => 1)) {
quest::summonitem(29422);
quest::exp(750);
quest::emote("smiles warmly as he hands you your weapon.");
quest::ding();
}
}
if ($class eq "Shaman") {
if (plugin::check_handin(\%itemcount, 6164 => 1)) {
quest::summonitem(29422);
quest::exp(750);
quest::emote("smiles warmly as he hands you your weapon.");
quest::ding();
}
}
if ($class eq "Cleric") {
if (plugin::check_handin(\%itemcount, 6164 => 1)) {
quest::summonitem(29442);
quest::exp(750);
quest::emote("smiles warmly as he hands you your weapon.");
quest::ding();
}
}
plugin::return_items(\%itemcount);
quest::say("These are not the pieces I need.");
}
}
|
 |
|
 |

04-24-2006, 09:20 AM
|
|
Discordant
|
|
Join Date: Jan 2005
Posts: 320
|
|
ok actually it doesn't work lol. This quest is starting to get old :( When you hand in the item now this stuff happens:
quest::exp(750);
quest::emote("smiles warmly as he hands you your weapon.");
quest::ding();
But instead of summoning the correct item for you, he hands you back the mold and says:
These are not the pieces I need.
So basically you can stand there and hand the mold in over and over until you reach max lvl if you want to do 10k turnins =/
|

04-24-2006, 12:02 PM
|
|
Hill Giant
|
|
Join Date: Aug 2005
Posts: 107
|
|
i got it working, let me finish it and i'll post it
|
 |
|
 |

04-24-2006, 01:00 PM
|
|
Hill Giant
|
|
Join Date: Aug 2005
Posts: 107
|
|
I added a few comments into the file for you, so you can tweak usability.
Code:
#this quest will work for any class as is, however it just gives xp to rogues, rangers, and bards
#this can be fixed by moving the emote, exp and ding functions into the if statements individually.
sub EVENT_SAY
{
if ($text=~/hail/i)
{
quest::say("Hello $name , I am one of the finest weaponsmiths this land has ever seen. If you find me a mold I will craft you a weapon. However if it is armor you seek, my brother makes the best around.");
}
}
sub EVENT_ITEM
{
if (plugin::check_handin(\%itemcount, 6164 => 1))
{
if(($class eq "Warrior") || ($class eq "Paladin") || ($class eq "Shadowknight") || ($class eq "Berserker"))
{
quest::summonitem('62189');
}
if(($class eq "Monk") || ($class eq "Beastlord"))
{
quest::summonitem('6611');
}
if(($class eq "Druid") || ($class eq "Necromancer") || ($class eq "Magician") || ($class eq "Wizard") || ($class eq "Enchanter") || ($class eq "Cleric"))
{
quest::summonitem('29442');
}
quest::emote("smiles warmly as he hands you your weapon.");
quest::exp(750);
quest::ding();
}
elsif(plugin::return_items(\%itemcount))
{
#this command isn't working. maybe quest::return_items returns a false value when it gives soemthing back.
quest::say("These are not the pieces I need.");
}
}
EDIT: oh, I only tested this on bards, warriors, and wizards... could be bugs.
|
 |
|
 |

04-24-2006, 01:06 PM
|
|
Discordant
|
|
Join Date: Jan 2005
Posts: 320
|
|
Nice, thank you Jimbabwe, I'll try this out 
|
 |
|
 |

04-24-2006, 01:11 PM
|
|
Discordant
|
|
Join Date: Jan 2005
Posts: 320
|
|
Quote:
#this command isn't working. maybe quest::return_items returns a false value when it gives soemthing back.
quest::say("These are not the pieces I need.");
}
}
|
That command does work, just doesn't for some reason in this specific quest, here is another quest I have that works perfect.
Code:
sub EVENT_SAY {
if($text=~/Hail/i){
quest::say("Hail $class , How are ye today? If it's armor your wanting I'm your man. I have all the materials except a mold. If you can bring me a Mold I'll make you the best armor I've got. If it is a weapon you seek then you should speak to my brother.");
}
}
sub EVENT_ITEM {
if(plugin::check_handin(\%itemcount, 16346 =>1)) { # tunic
quest::summonitem(4154);
quest::exp(500);
quest::emote("Bort smiles warmly as he hands you your reward.");
quest::say("Enjoy Your new Breastplate");
quest::ding();
}
elsif(plugin::check_handin(\%itemcount, 16343 =>1)) { # sleeves
quest::summonitem(4155);
quest::exp(500);
quest::emote("Bort smiles warmly as he hands you your reward.");
quest::say("Enjoy Your new Vambraces");
quest::ding();
}
elsif(plugin::check_handin(\%itemcount, 16344 =>1)) { # leggings
quest::summonitem(4158);
quest::exp(500);
quest::emote("Bort smiles warmly as he hands you your reward.");
quest::say("Enjoy Your new Leggings");
quest::ding();
}
elsif(plugin::check_handin(\%itemcount, 16345 =>1)) { # gauntlets
quest::summonitem(4157);
quest::exp(500);
quest::emote("Bort smiles warmly as he hands you your reward.");
quest::say("Enjoy Your new Gauntlets");
quest::ding();
}
elsif(plugin::check_handin(\%itemcount, 16299 =>1)) { # cap
quest::summonitem(4153);
quest::exp(500);
quest::emote("Bort smiles warmly as he hands you your reward.");
quest::say("Enjoy Your new Cap");
quest::ding();
}
elsif(plugin::check_handin(\%itemcount, 16297 =>1)) { # bracers
quest::summonitem(4156);
quest::exp(500);
quest::emote("Bort smiles warmly as he hands you your reward.");
quest::say("Enjoy Your new Bracer");
quest::ding();
}
elsif(plugin::check_handin(\%itemcount, 16298 =>1)) { # boots
quest::summonitem(4159);
quest::exp(500);
quest::emote("Bort smiles warmly as he hands you your reward.");
quest::say("Enjoy Your new Boots");
quest::ding();
}
else {
plugin::return_items(\%itemcount);
quest::say("I can't do anything with this item! You can have it back.");
}
}
I do appreciate you taking the time to help with this quest though, honestly it was starting to drive me nuts.
|
 |
|
 |

04-24-2006, 01:16 PM
|
|
Hill Giant
|
|
Join Date: Aug 2005
Posts: 107
|
|
I don't know how to test a NOT TRUE case in perl. If you can figure that out, then you can get that quest::say to work.
|
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
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 04:40 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |