|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Q&A This is the quest support section |
|
|
|
12-23-2013, 05:12 AM
|
Hill Giant
|
|
Join Date: Sep 2013
Posts: 118
|
|
Handling task rewards via sub event task_stage_complete
Task ID: 272
Last Activity ID in task: 4
I'm just trying to hand out a reward by class via the perl system. This is my player.pl for the zone that it's in. I've been messing around with it and can't seem to find the problem. The whole quest is handled via Perl and everything is working properly with the steps of the task and completing it.. but I'm not even getting the reward message that's in there. Am I using the sub event wrong or something? The rest of my player.pl is working properly.
Code:
sub EVENT_TASK_STAGE_COMPLETE {
if($task_id == 272 && $activity_id == 4) {
$client->Message(15,"REWARD TOWN USA");
if($class eq "Warrior"){quest::summonitem(1377);}
elsif($class eq "Cleric") {quest::summonitem(1385);}
elsif($class eq "Paladin") {quest::summonitem(1384);}
elsif($class eq "Ranger") {quest::summonitem(1387);}
elsif($class eq "Shadowknight"){quest::summonitem(1384);}
elsif($class eq "Druid"){quest::summonitem(1389);}
elsif($class eq "Monk"){quest::summonitem(1391);}
elsif($class eq "Bard"){quest::summonitem(1386);}
elsif($class eq "Rogue"){quest::summonitem(1387);}
elsif($class eq "Shaman"){quest::summonitem(1388);}
elsif($class eq "Necromancer"){quest::summonitem(1392);}
elsif($class eq "Wizard"){quest::summonitem(1392);}
elsif($class eq "Magician"){quest::summonitem(1392);}
elsif($class eq "Enchanter"){quest::summonitem(1392);}
}
}
|
|
|
|
12-23-2013, 07:07 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
I haven't done anything like this myself, but if that's the end of the task, wouldn't it be sub EVENT_TASK_COMPLETE?
|
12-23-2013, 07:14 PM
|
Hill Giant
|
|
Join Date: Sep 2013
Posts: 118
|
|
Quote:
Originally Posted by Kingly_Krab
I haven't done anything like this myself, but if that's the end of the task, wouldn't it be sub EVENT_TASK_COMPLETE?
|
There's no information on that one it just says "update me" in this: http://www.eqemulator.net/wiki/wikka...=QuestTutorial
Everyone seems to be using stage completed and using if task and if activity. I tried using task complete with if task_id and that doesn't seem to do anything either. As of right now I've kinda ghetto rigged it to just give you a reward when you hail the guy again based off of a qglobal.
EDIT:
neverrrrrrrrrrrrmind. When I used task completed i was trying to use if($taskid) and i realized later that it was task_id.. such a stupid mistake lol. Thanks.
|
12-23-2013, 07:21 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
That's good you got it working, also, I thought I would re-write your script.
Code:
sub EVENT_TASK_COMPLETE
{
if($task_id == 272)
{
my %rewards = ("Warrior" => 1377,
"Cleric" => 1385,
"Paladin" => 1384,
"Ranger" => 1387,
"Shadowknight" => 1384,
"Druid" => 1389,
"Monk" => 1391,
"Bard" => 1386,
"Rogue" => 1387,
"Shaman" => 1388,
"Necromancer" => 1392,
"Wizard" => 1392,
"Magician" => 1392,
"Enchanter" => 1392);
$client->Message(15, "REWARD TOWN USA");
quest::summonitem($rewards{$class}, 1);
}
}
|
12-23-2013, 07:42 PM
|
Hill Giant
|
|
Join Date: Sep 2013
Posts: 118
|
|
Quote:
Originally Posted by Kingly_Krab
That's good you got it working, also, I thought I would re-write your script.
Code:
sub EVENT_TASK_COMPLETE
{
if($task_id == 272)
{
my %rewards = ("Warrior" => 1377,
"Cleric" => 1385,
"Paladin" => 1384,
"Ranger" => 1387,
"Shadowknight" => 1384,
"Druid" => 1389,
"Monk" => 1391,
"Bard" => 1386,
"Rogue" => 1387,
"Shaman" => 1388,
"Necromancer" => 1392,
"Wizard" => 1392,
"Magician" => 1392,
"Enchanter" => 1392);
$client->Message(15, "REWARD TOWN USA");
quest::summonitem($rewards{$class}, 1);
}
}
|
Thanks! I was actually wanting to learn about doing that but I never really had a simple good example. I appreciate this a lot.
|
12-23-2013, 07:48 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
You're welcome.
|
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 11:42 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|