-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvoicetell.pl
105 lines (94 loc) · 1.78 KB
/
voicetell.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
###USAGE EXAMPLES
###Akkadius
###plugin::vtell("message","race-name","sex(malefemale)");
###plugin::vtell("battle","barbarian","male");
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});
}
##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});
}
return 1;