View Full Version : help with custom quest please
jkennedy
01-14-2010, 02:36 AM
sub EVENT_SAY {
if($text=~/hail/i) {
quest::say("How Are you today, $name Bring me One Peice of Epic to receive your epic?");
}
}
sub EVENT_ITEM {
if(plugin::check_handin(\%itemcount, 1387 => 1) && $class eq "Warrior") {
quest::say("Well done. Here are your Epic");
quest::summonitem(10909);
quest::summonitem(10910); }
}
elsif(plugin::check_handin(\%itemcount, 1387 => 1) && $class eq "Ranger") {
quest::say("Well done. Here are your Epic");
quest::summonitem(20487);
quest::summonitem(20488);
}
}
Ok my problem is i cant give the npc to give the ranger his epic but the warrior can get his am i doing something wrong or maybe i need to change something but if i change the itemcount on the ranger to 2 of the 1387 it works just not one
bthomsen0312
01-14-2010, 09:38 AM
sub EVENT_SAY {
if($text=~/hail/i) {
quest::say("How Are you today, $name Bring me One Peice of Epic to receive your epic?");
}
}
sub EVENT_ITEM {
if(plugin::check_handin(\%itemcount, 1387 => 1) && $class eq "Warrior") {
quest::say("Well done. Here are your Epic");
quest::summonitem(10909);
quest::summonitem(10910); }
}
elsif(plugin::check_handin(\%itemcount, 1387 => 1) && $class eq "Ranger") {
quest::say("Well done. Here are your Epic");
quest::summonitem(20487);
quest::summonitem(20488);
}
}
Ok my problem is i cant give the npc to give the ranger his epic but the warrior can get his am i doing something wrong or maybe i need to change something but if i change the itemcount on the ranger to 2 of the 1387 it works just not one
um your code was screwed up for one
sub EVENT_SAY {
if($text=~/hail/i) {
quest::say("How Are you today, $name Bring me One Peice of Epic to receive your epic?");
}
}
sub EVENT_ITEM {
if (($itemcount {1387} == 1) && ($class eq "Warrior")) {
quest::say("Well done. Here are your Epic");
quest::summonitem(10909);
quest::summonitem(10910); }
elsif(($itemcount {1387} == 1) && ($class eq "Ranger")) {
quest::say("Well done. Here are your Epic");
quest::summonitem(20487);
quest::summonitem(20488); }
}
there is a fixed copy of your code, you were screwing up your syntax and you don't really need to use the plugin to do item hand ins. use notepad++ or georges perl quest editor as it makes checking these things alot easier
jkennedy
01-14-2010, 02:02 PM
thank you so much one last question is there a way to maek a npc check to see if a player has a item but not take it and also make it so u cant repeat a quest
joligario
01-14-2010, 04:30 PM
You should use the plugin for checking items. And you can return unused items.
sub EVENT_SAY {
if($text=~/hail/i) {
quest::say("How Are you today, $name Bring me One Peice of Epic to receive your epic?");
}
}
sub EVENT_ITEM {
if (plugin::check_handin(\%itemcount, 1387 => 1)) {
if ($class eq "Warrior") {
quest::say("Well done. Here are your Epic");
quest::summonitem(10909);
quest::summonitem(10910);
}
elsif ($class eq "Ranger") {
quest::say("Well done. Here are your Epic");
quest::summonitem(20487);
quest::summonitem(20488);
}
else {
quest::say("Sorry, your class does not get an epic on this server.");
quest::summonitem(1387);
}
}
else {
quest::say("I do not need this.");
plugin::return_items(\%itemcount);
}
}
bthomsen0312
01-14-2010, 06:19 PM
that else won't work there man
joligario
01-14-2010, 06:45 PM
Sure it will. Try it.
Secrets
01-15-2010, 06:45 AM
that else won't work there man
That else is for the other if, read the brackets :P
Secrets
01-15-2010, 07:09 AM
um your code was screwed up for one
sub EVENT_SAY {
if($text=~/hail/i) {
quest::say("How Are you today, $name Bring me One Peice of Epic to receive your epic?");
}
}
sub EVENT_ITEM {
if (($itemcount {1387} == 1) && ($class eq "Warrior")) {
quest::say("Well done. Here are your Epic");
quest::summonitem(10909);
quest::summonitem(10910); }
elsif(($itemcount {1387} == 1) && ($class eq "Ranger")) {
quest::say("Well done. Here are your Epic");
quest::summonitem(20487);
quest::summonitem(20488); }
}
there is a fixed copy of your code, you were screwing up your syntax and you don't really need to use the plugin to do item hand ins. use notepad++ or georges perl quest editor as it makes checking these things alot easier
edit: too tired. can't read posts.
jkennedy
01-15-2010, 09:16 AM
bthomsen0312 got it right and thank you
vBulletin® v3.8.11, Copyright ©2000-2024, vBulletin Solutions Inc.