How can I go about doing this? I know how to make clickable links for quest dialogue but how do I make it a actual link for an item? I had a old quest laying around which did this fine so I modified it to do what I want but It keeps saying invalid item ID in varlink . Will not summon the item either. so not sure what I did wrong. Any Suggestions?
Code:
sub EVENT_SAY {
my %hash = ("Cleric" => [3239],
"Druid" => [3239],
"Shaman" => [3239],
"Necromancer" => [3239],
"Wizard" => [3239],
"Magician" => [3239],
"Enchanter" => [3239]);
if($text=~/hail/i) {
plugin::Whisper("Hello $name. Would you like my charm? If you see no Item to choose it means I have nothing for you!");
if (defined $hash{$class}[1]) {
foreach my $item (@{$hash{$class}}) {
$client->Message(315, quest::varlink($item) . " " . quest::saylink($item, 1, "Choose"));
}
} else {
$client->Message(315, quest::varlink($hash{$class}) . " " . quest::saylink($hash{$class}, 1, "Choose"));
}
} else {
if ($hash{$class} == int($text)) {
quest::setglobal("Charms", $hash{$class}, 5, "F");
quest::summonitem($hash{$class});
}
}
}
}