Maceblade
12-22-2013, 08:54 PM
Basically my objective is;
1. Turn in item, be assigned a qglobal with a value ie 1
2. NPC then, based on qglobal value, offers you a list of items via varlink
3. I would like for you to click on item, it summons it for you and deducts the value of your qglobal almost as in alternate currency. so setting you back to 0.
My question is, is this an efficient way to do this? If not what other alternatives do I have? Could I use radiant crystals instead and how would they deduct them? And is it possible to quest::summonitem based on the click of the varlink?
sub EVENT_SAY {
my $varlink = quest::saylink("Let me see a varlink, please.", 0, "varlink");
my $itemlink = quest::saylink("Let me see an itemlink, please.", 0, "itemlink");
my $artifact = quest::varlink(1119);
my $artifact1 = quest::varlink(1261);
my $artifact2 = quest::varlink(5532);
my $artifact3 = quest::varlink(8495);
my $NPCName = $npc->GetCleanName();
if ($text=~/Hail/i && $epic1 == undef)
{
$client->Message(315, "$NPCName whispers to you, 'Hello $name, I can show you an Artifact using $varlink or $itemlink if you are interested in it.'");
}
if ($text =~/varlink/i && $qglobals{epic1 == 1})
{
$client->Message(315, "$NPCName whispers to you, 'Great job! To claim your reward say the number... $artifact (0), $artifact1 (1), $artifact2 (2), $artifact3 (3).'");}
if ($text =~/0/i && $epic1 == 1){
quest::summonitem(1119);
$client->SetGlobal("epic1", 0, 5, "F");}
if ($text =~/1/i && $epic1 == 1){
quest::summonitem(1261);
$client->SetGlobal("epic1", 0, 5, "F");
}
}
sub EVENT_ITEM {
#Handin: cipher of veeshan sets your qglobal for epic selection
if(plugin::check_handin(\%itemcount, 69311 => 1)){
quest::setglobal("epic1", 1, 5, "F");
quest::say("this worked");}
}
Its incomplete and does not function as intended bc of my qglobals. I was in the middle of tinkering with it when I decided to ask for help.
1. Turn in item, be assigned a qglobal with a value ie 1
2. NPC then, based on qglobal value, offers you a list of items via varlink
3. I would like for you to click on item, it summons it for you and deducts the value of your qglobal almost as in alternate currency. so setting you back to 0.
My question is, is this an efficient way to do this? If not what other alternatives do I have? Could I use radiant crystals instead and how would they deduct them? And is it possible to quest::summonitem based on the click of the varlink?
sub EVENT_SAY {
my $varlink = quest::saylink("Let me see a varlink, please.", 0, "varlink");
my $itemlink = quest::saylink("Let me see an itemlink, please.", 0, "itemlink");
my $artifact = quest::varlink(1119);
my $artifact1 = quest::varlink(1261);
my $artifact2 = quest::varlink(5532);
my $artifact3 = quest::varlink(8495);
my $NPCName = $npc->GetCleanName();
if ($text=~/Hail/i && $epic1 == undef)
{
$client->Message(315, "$NPCName whispers to you, 'Hello $name, I can show you an Artifact using $varlink or $itemlink if you are interested in it.'");
}
if ($text =~/varlink/i && $qglobals{epic1 == 1})
{
$client->Message(315, "$NPCName whispers to you, 'Great job! To claim your reward say the number... $artifact (0), $artifact1 (1), $artifact2 (2), $artifact3 (3).'");}
if ($text =~/0/i && $epic1 == 1){
quest::summonitem(1119);
$client->SetGlobal("epic1", 0, 5, "F");}
if ($text =~/1/i && $epic1 == 1){
quest::summonitem(1261);
$client->SetGlobal("epic1", 0, 5, "F");
}
}
sub EVENT_ITEM {
#Handin: cipher of veeshan sets your qglobal for epic selection
if(plugin::check_handin(\%itemcount, 69311 => 1)){
quest::setglobal("epic1", 1, 5, "F");
quest::say("this worked");}
}
Its incomplete and does not function as intended bc of my qglobals. I was in the middle of tinkering with it when I decided to ask for help.