EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Plugins & Mods (https://www.eqemulator.org/forums/forumdisplay.php?f=678)
-   -   plugin::vtell (https://www.eqemulator.org/forums/showthread.php?t=31249)

Akkadius 05-06-2010 12:26 AM

plugin::vtell
 
Another attempt to make, "cosmetics" easier in my scripting I made a plugin for voice tells, considering the command is completely integer based, it's very annoying to do anything with it.

Another thing that is rather annoying is the NPC tells will take up your reply cache so I use them sparingly.

But regardless, this cuts down on the time consumption when using this feature.

Note: Froglok, Vah-Shir, and Iksar (Drakkin was not even found closely) are not 100% as there was no clear integer that I found right away that matched them, so they are relative. Regardless it is going to make doing any form of voicetells cake compared to messing around with integers. Hope you enjoy it.

Race List:
Quote:

"human" => 0,
"barbarian" => 1,
"erudin" => 2,
"woodelf" => 3,
"highelf" => 4,
"darkelf" => 5,
"halfelf" => 6,
"dwarf" => 7,
"troll" => 8,
"ogre" => 9,
"halfling" => 10,
"gnome" => 11,
"iksar" => 12,
"froglok" => 13,
"vahshir" => 15,
USAGE:

Code:

plugin::vtell("message","race-name","sex(malefemale)");

so

plugin::vtell("battle","barbarian","male");

Just name the file "voicetell.pl" and put it in your plugins folder to get it to work.

Code:

sub vtell
{
        my $GreetName = $_[0];
        my $RaceName = $_[1];
        my $Sex = $_[2];
        %GreetId = (
                "agree" => 1,
                "battle" => 2,
                "disagree" => 3,
                "follow" => 4,
                "greet" => 5,
                "heal" => 6,
                "help" => 7,
                "laugh" => 8,
                "part" => 9,
                "retreat" => 10,
                "stop" => 11,
                "thanks" => 12,
        );
                %RaceID = (
                "human" => 0,
                "barbarian" => 1,
                "erudin" => 2,
                "woodelf" => 3,
                "highelf" => 4,
                "darkelf" => 5,
                "halfelf" => 6,
                "dwarf" => 7,
                "troll" => 8,
                "ogre" => 9,
                "halfling" => 10,
                "gnome" => 11,
                "iksar" => 12,
                "froglok" => 13,
                "vahshir" => 15,
        );
                %SexName = (
                "male" => 2,
                "female" => 3,
        );
        my $name = plugin::val('$name');
        quest::voicetell($name, $GreetId{$GreetName}, $RaceID{$RaceName}, $SexName{$Sex});
}

return 1;

I hope you all enjoy this!

Akkadius 12-19-2010 04:01 PM

plugin::Autovtell();
 
Made an addition to this plugin in general, made another case for it though.

##plugin::Autovtell("greet/battle/disagree/follow/greet/heal/help/laugh/part/retreat/stop/thanks");

Usage:
plugin::Autovtell("greet");

What it does is return a greeting for the npc that this plugin is on based on their gender and race, very simple concept.

Update from the revision to cleanly put it in your group of plugins.

Inserted into the existing voice_tell.pl

http://img.photobucket.com/albums/v4...e654/vtell.png

Code:

##plugin::Autovtell("greet/battle/disagree/follow/greet/heal/help/laugh/part/retreat/stop/thanks");
##Automatically converts the race ID and Gender into a format the voicetell object understands
sub Autovtell
{
        my $GreetName = $_[0];
        my $npc = plugin::val('$npc');
        my $GetGender = $npc->GetGender();
        my $GetRace = $npc->GetRace();
                %GreetId2 = (
                "agree" => 1,
                "battle" => 2,
                "disagree" => 3,
                "follow" => 4,
                "greet" => 5,
                "heal" => 6,
                "help" => 7,
                "laugh" => 8,
                "part" => 9,
                "retreat" => 10,
                "stop" => 11,
                "thanks" => 12,
                );
               
                %RaceID2 = (
                1 => 0,
                2 => 1,
                3 => 2,
                4 => 3,
                5 => 4,
                6 => 5,
                7 => 6,
                8 => 7,
                9 => 8,
                10 => 9,
                11 => 10,
                12 => 11,
                128 => 12,
                130 => 15,
                330 => 13,
                );
               
                %Gender = (
                0 => 2,
                1 => 3,
                );
               
               
        my $name = plugin::val('$name');
        quest::voicetell($name, $GreetId2{$GreetName}, $RaceID2{$GetRace}, $Gender{$GetGender});
}



All times are GMT -4. The time now is 08:52 PM.

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