|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Custom Custom Quests here |
|
|
|
10-03-2014, 08:24 PM
|
|
Sarnak
|
|
Join Date: Apr 2014
Location: Florida
Posts: 44
|
|
Last touch on this wont work
So i made a quest EVERYTHING works on it BUT the quest::summonitem part i have even added a check to make sure that section is working and it is.. the npc just wont summon the item any ideas where i went wrong?
Code:
sub EVENT_SAY
{
my $weapon = quest::saylink ("weapon");
if ($text =~/Hail/i && !defined $qglobals{"Epic"})
{
quest::say("Hello $name, Along my journies i have aquired knowledge on how to create a [$weapon] with power like none seen before.");
}
if ($text =~/weapon/i)
{
quest::say("In order for me to make you this special weapon i need a few items. The first item I need is a greatsword from Acryila Caverns.");
}
elsif ($qglobals{"Epic"} == 1)
{
quest::say("The next item you need is an eye from a evil unicorn in Lesser Faydark.");
}
elsif ($qglobals{"Epic"} == 2)
{
quest::say("The next item i need is a Polished Shard from Droga.");
}
elsif ($qglobals{"Epic"} == 3)
{
quest::say("The next item i need is a Sphere of Sandstorm from Bastion of Thunder.");
}
elsif ($qglobals{"Epic"} == 4)
{
quest::say("The next item I need is dryad parts from Jagged Pine Forest.");
}
elsif ($qglobals{"Epic"} == 5)
{
quest::say("The next item i need is werewolf talon from Castle Mistmoore.");
}
elsif ($qglobals{"Epic"} == 6)
{
quest::say("The next item i need is a snowball from permafrost.");
}
elsif ($qglobals{"Epic"} == 7)
{
quest::say("This last part will not be so easy. I need Kallis' Head.");
}
elsif (($class eq "Wizard") && ($qglobals{"Epic"} == 8))
{
$client->Message(315, "$NPCNAME whispers to you, 'Congrats on your Epic!'");
quest::summonitem(32374);
}
else
{
quest::say("you are not a wizard somthing is wrong");
}
}
sub EVENT_ITEM
{
if ($item1== 51261 && !defined $qglobals{"Epic"})
{
quest::say("This is just what i was looking for! The next item you need is an eye from a evil unicorn in Lesser Faydark.");
quest::setglobal("Epic", 1, 1, "F");
}
elsif ($item1== 1815 && ($qglobals {"Epic"} == 1))
{
quest::say("Wow you are making incredible time getting me these items. The next item i need is a Polished Shard from Droga.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 81116 && ($qglobals {"Epic"} == 2))
{
quest::say("You are getting closer to greatness. The next item i need is a Sphere of Sandstorm from Bastion of Thunder.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 9429 && ($qglobals {"Epic"} == 3))
{
quest::say("Incdredible! The weapon is almost complete. The next item I need is dryad parts from Jagged Pine Forest.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 8107 && ($qglobals {"Epic"} == 4))
{
quest::say("You are half way there. The next item i need is werewolf talon from Castle Mistmoore.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 13746 && ($qglobals {"Epic"} == 5))
{
quest::say("The weapon is starting to glow. The next item i need is a snowball from permafrost.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 19034 && ($qglobals {"Epic"} == 6))
{
quest::say("Just one more peice to go. This last part will not be so easy. I need Kallis' Head.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 31420 && ($qglobals {"Epic"} == 7))
{
quest::say("That is everything. Give me a few seconds to get your weapon made.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
else
{
quest::say("I cannot use that at this time. Please give me the items in the correct order as I have instructed.");
}
sub EVENT_SAY
{
my $weapon = quest::saylink ("weapon");
if ($text =~/Hail/i && !defined $qglobals{"Epic"})
{
quest::say("Hello $name, Along my journies i have aquired knowledge on how to create a [$weapon] with power like none seen before.");
}
if ($text =~/weapon/i)
{
quest::say("In order for me to make you this special weapon i need a few items. The first item I need is a greatsword from Acryila Caverns.");
}
elsif ($qglobals{"Epic"} == 1)
{
quest::say("The next item you need is an eye from a evil unicorn in Lesser Faydark.");
}
elsif ($qglobals{"Epic"} == 2)
{
quest::say("The next item i need is a Polished Shard from Droga.");
}
elsif ($qglobals{"Epic"} == 3)
{
quest::say("The next item i need is a Sphere of Sandstorm from Bastion of Thunder.");
}
elsif ($qglobals{"Epic"} == 4)
{
quest::say("The next item I need is dryad parts from Jagged Pine Forest.");
}
elsif ($qglobals{"Epic"} == 5)
{
quest::say("The next item i need is werewolf talon from Castle Mistmoore.");
}
elsif ($qglobals{"Epic"} == 6)
{
quest::say("The next item i need is a snowball from permafrost.");
}
elsif ($qglobals{"Epic"} == 7)
{
quest::say("This last part will not be so easy. I need Kallis' Head.");
}
elsif (($class eq "Ranger") && ($qglobals{"Epic"} == 8))
{
$client->Message(315, "$NPCNAME whispers to you, 'Congrats on your Epic!'");
quest::summonitem(1119);
}
else
{
quest::say("you are not a wizard somthing is wrong");
}
}
sub EVENT_ITEM
{
if ($item1== 51261 && !defined $qglobals{"Epic"})
{
quest::say("This is just what i was looking for! The next item you need is an eye from a evil unicorn in Lesser Faydark.");
quest::setglobal("Epic", 1, 1, "F");
}
elsif ($item1== 1815 && ($qglobals {"Epic"} == 1))
{
quest::say("Wow you are making incredible time getting me these items. The next item i need is a Polished Shard from Droga.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 81116 && ($qglobals {"Epic"} == 2))
{
quest::say("You are getting closer to greatness. The next item i need is a Sphere of Sandstorm from Bastion of Thunder.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 9429 && ($qglobals {"Epic"} == 3))
{
quest::say("Incdredible! The weapon is almost complete. The next item I need is dryad parts from Jagged Pine Forest.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 8107 && ($qglobals {"Epic"} == 4))
{
quest::say("You are half way there. The next item i need is werewolf talon from Castle Mistmoore.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 13746 && ($qglobals {"Epic"} == 5))
{
quest::say("The weapon is starting to glow. The next item i need is a snowball from permafrost.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 19034 && ($qglobals {"Epic"} == 6))
{
quest::say("Just one more peice to go. This last part will not be so easy. I need Kallis' Head.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 31420 && ($qglobals {"Epic"} == 7))
{
quest::say("That is everything. Give me a few seconds to get your weapon made.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
else
{
quest::say("I cannot use that at this time. Please give me the items in the correct order as I have instructed.");
}
plugin::return_items(\%itemcount);
}
}
|
|
|
|
10-03-2014, 08:50 PM
|
Hill Giant
|
|
Join Date: Jul 2012
Posts: 212
|
|
There is no EVENT_ITEM. Try EVENT_TRADE
|
10-03-2014, 08:53 PM
|
|
Developer
|
|
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
|
|
I'm not a quest person...
but, have you tried this:
Code:
$client->summonitem(32374);
It would seem that you're trying to have the NPC summon the item with the way that it's written.
__________________
Uleat of Bertoxxulous
Compilin' Dirty
|
10-03-2014, 08:56 PM
|
|
Sarnak
|
|
Join Date: Apr 2014
Location: Florida
Posts: 44
|
|
Uleat that worked thankyou :P any certain reason quest::summonitem wasnt working though?
|
|
|
|
10-03-2014, 09:21 PM
|
|
Sarnak
|
|
Join Date: Apr 2014
Location: Florida
Posts: 44
|
|
well either way it works and now ive finished it so here is a customizable epic quest for anyone who wants it finished code:
Code:
sub EVENT_SAY
{
my $weapon = quest::saylink ("weapon");
if ($text =~/Hail/i && !defined $qglobals{"Epic"})
{
quest::say("Hello $name, Along my journies i have aquired knowledge on how to create a [$weapon] with power like none seen before.");
}
if ($text =~/weapon/i)
{
quest::say("In order for me to make you this special weapon i need a few items. The first item I need is a greatsword from Acryila Caverns.");
}
elsif ($qglobals{"Epic"} == 1)
{
quest::say("The next item you need is an eye from a evil unicorn in Lesser Faydark.");
}
elsif ($qglobals{"Epic"} == 2)
{
quest::say("The next item i need is a Polished Shard from Droga.");
}
elsif ($qglobals{"Epic"} == 3)
{
quest::say("The next item i need is a Sphere of Sandstorm from Bastion of Thunder.");
}
elsif ($qglobals{"Epic"} == 4)
{
quest::say("The next item I need is dryad parts from Jagged Pine Forest.");
}
elsif ($qglobals{"Epic"} == 5)
{
quest::say("The next item i need is werewolf talon from Castle Mistmoore.");
}
elsif ($qglobals{"Epic"} == 6)
{
quest::say("The next item i need is a snowball from permafrost.");
}
elsif ($qglobals{"Epic"} == 7)
{
quest::say("This last part will not be so easy. I need Kallis' Head.");
}
elsif (($class eq "Wizard") && ($qglobals{"Epic"} == 8))
{
quest::say("Congrats on your Epic! Use it well.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
$client->summonitem(16576);
}
elsif (($class eq "Ranger") && ($qglobals{"Epic"} == 8))
{
quest::say("Congrats on your Epic! Use it well.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
$client->summonitem(62649);
}
elsif (($class eq "Bard") && ($qglobals{"Epic"} == 8))
{
quest::say("Congrats on your Epic! Use it well.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
$client->summonitem(77640);
}
elsif (($class eq "Beastlord") && ($qglobals{"Epic"} == 8))
{
quest::say("Congrats on your Epic! Use it well.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
$client->summonitem(57054);
}
elsif (($class eq "Berserker") && ($qglobals{"Epic"} == 8))
{
quest::say("Congrats on your Epic! Use it well.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
$client->summonitem(18609);
}
elsif (($class eq "Cleric") && ($qglobals{"Epic"} == 8))
{
quest::say("Congrats on your Epic! Use it well.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
$client->summonitem(20076);
}
elsif (($class eq "Druid") && ($qglobals{"Epic"} == 8))
{
quest::say("Congrats on your Epic! Use it well.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
$client->summonitem(62880);
}
elsif (($class eq "Enchanter") && ($qglobals{"Epic"} == 8))
{
quest::say("Congrats on your Epic! Use it well.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
$client->summonitem(52962);
}
elsif (($class eq "Magician") && ($qglobals{"Epic"} == 8))
{
quest::say("Congrats on your Epic! Use it well.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
$client->summonitem(19839);
}
elsif (($class eq "Monk") && ($qglobals{"Epic"} == 8))
{
quest::say("Congrats on your Epic! Use it well.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
$client->summonitem(67742);
}
elsif (($class eq "Necromancer") && ($qglobals{"Epic"} == 8))
{
quest::say("Congrats on your Epic! Use it well.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
$client->summonitem(64067);
}
elsif (($class eq "Paladin") && ($qglobals{"Epic"} == 8))
{
quest::say("Congrats on your Epic! Use it well.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
$client->summonitem(48147);
}
elsif (($class eq "Rogue") && ($qglobals{"Epic"} == 8))
{
quest::say("Congrats on your Epic! Use it well.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
$client->summonitem(39941);
}
elsif (($class eq "Shadowknight") && ($qglobals{"Epic"} == 8))
{
quest::say("Congrats on your Epic! Use it well.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
$client->summonitem(48136);
}
elsif (($class eq "Shaman") && ($qglobals{"Epic"} == 8))
{
quest::say("Congrats on your Epic! Use it well.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
$client->summonitem(57405);
}
elsif (($class eq "Warrior") && ($qglobals{"Epic"} == 8))
{
quest::say("Congrats on your Epic! Use it well.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
$client->summonitem(60332);
}
else
{
quest::say("You have already completed this quest.");
}
}
sub EVENT_ITEM
{
if ($item1== 51261 && !defined $qglobals{"Epic"})
{
quest::say("This is just what i was looking for! The next item you need is an eye from a evil unicorn in Lesser Faydark.");
quest::setglobal("Epic", 1, 1, "F");
}
elsif ($item1== 1815 && ($qglobals {"Epic"} == 1))
{
quest::say("Wow you are making incredible time getting me these items. The next item i need is a Polished Shard from Droga.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 81116 && ($qglobals {"Epic"} == 2))
{
quest::say("You are getting closer to greatness. The next item i need is a Sphere of Sandstorm from Bastion of Thunder.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 9429 && ($qglobals {"Epic"} == 3))
{
quest::say("Incdredible! The weapon is almost complete. The next item I need is dryad parts from Jagged Pine Forest.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 8107 && ($qglobals {"Epic"} == 4))
{
quest::say("You are half way there. The next item i need is werewolf talon from Castle Mistmoore.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 13746 && ($qglobals {"Epic"} == 5))
{
quest::say("The weapon is starting to glow. The next item i need is a snowball from permafrost.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 19034 && ($qglobals {"Epic"} == 6))
{
quest::say("Just one more peice to go. This last part will not be so easy. I need Kallis' Head.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
elsif ($item1== 31420 && ($qglobals {"Epic"} == 7))
{
quest::say("That is everything. Give me a few seconds to get your weapon made.");
quest::setglobal("Epic", ($qglobals{"Epic"} +1), 1, "F");
}
else
{
quest::say("I cannot use that at this time. Please give me the items in the correct order as I have instructed.");
}
}
|
|
|
|
10-03-2014, 09:34 PM
|
|
Developer
|
|
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
|
|
Gotta remember that quest::say() makes the NPC speak..so, quest::summonitem() at best would make the NPC summon an item to its cursor...
But, NPC (nor Mob) does not have a cursor nor a SummonItem() method.
__________________
Uleat of Bertoxxulous
Compilin' Dirty
|
10-03-2014, 09:39 PM
|
Sarnak
|
|
Join Date: Jun 2013
Posts: 81
|
|
quest::summonitem(1001);
works just fine. It summons the given item number and places it on the cursor of the client who initiated the EVENT_... that the command is listed under. If the NPC no longer has a $client as a target (i.e. engaged in conversation or focused on) it will fail because there is no client to summon the item for.
According to your script, you would not receive the item upon the final turnin, that only sets the qglobal to 8. Now the client would need to say "weapon" one more time to activate the summonitem command.
|
10-03-2014, 11:26 PM
|
|
Developer
|
|
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
|
|
And that's why I don't do quests :P
But, at least you're on the right track
__________________
Uleat of Bertoxxulous
Compilin' Dirty
|
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:05 PM.
|
|
|
|
|
|
|
|
|
|
|
|
|