EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Making a item link in text (https://www.eqemulator.org/forums/showthread.php?t=39503)

Bandor 03-23-2015 11:58 AM

Making a item link in text
 
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});
                }
            }
        }
                }


Bandor 03-23-2015 12:07 PM

found the code for item link,thought not sure what to do with it now lol. Might have to just rewrite the quest.

Bandor 03-23-2015 12:17 PM

Don't Mind my ramblings rewrote it much simpler now.

Incase your curious asto how to add items to text or w/e.

Code:

        sub EVENT_SAY {
                if($text=~/hail/i) {
                plugin::Whisper("Hello $name. Would you like my " . quest::saylink("charm", 1) . " ?");
quest::itemlink(3239);
        }
        elsif($text=~/charm/i) {
        plugin::Whisper("Here you go!");
        quest::summonitem(3239);
        }
        }



All times are GMT -4. The time now is 09:06 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.