forked from Eroica-cpp/dota2scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDict.lua
150 lines (144 loc) · 5.35 KB
/
Dict.lua
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
local Dict = {}
Dict.ShortName2FullName = {
abaddon = "npc_dota_hero_abaddon",
abyssal_underlord = "npc_dota_hero_abyssal_underlord",
underlord = "npc_dota_hero_abyssal_underlord",
alchemist = "npc_dota_hero_alchemist",
ancient_apparition = "npc_dota_hero_ancient_apparition",
ancient = "npc_dota_hero_ancient_apparition",
antimage = "npc_dota_hero_antimage",
arc_warden = "npc_dota_hero_arc_warden",
axe = "npc_dota_hero_axe",
bane = "npc_dota_hero_bane",
batrider = "npc_dota_hero_batrider",
bat = "npc_dota_hero_batrider",
beastmaster = "npc_dota_hero_beastmaster",
bloodseeker = "npc_dota_hero_bloodseeker",
blood = "npc_dota_hero_bloodseeker",
bounty_hunter = "npc_dota_hero_bounty_hunter",
bounty = "npc_dota_hero_bounty_hunter",
brewmaster = "npc_dota_hero_brewmaster",
bristleback = "npc_dota_hero_bristleback",
broodmother = "npc_dota_hero_broodmother",
centaur = "npc_dota_hero_centaur",
chaos_knight = "npc_dota_hero_chaos_knight",
chen = "npc_dota_hero_chen",
clinkz = "npc_dota_hero_clinkz",
crystal_maiden = "npc_dota_hero_crystal_maiden",
maiden_crystal = "npc_dota_hero_crystal_maiden",
dark_seer = "npc_dota_hero_dark_seer",
dazzle = "npc_dota_hero_dazzle",
death_prophet = "npc_dota_hero_death_prophet",
disruptor = "npc_dota_hero_disruptor",
doom_bringer = "npc_dota_hero_doom_bringer",
doom = "npc_dota_hero_doom_bringer",
dragon_knight = "npc_dota_hero_dragon_knight",
drow_ranger = "npc_dota_hero_drow_ranger",
earth_spirit = "npc_dota_hero_earth_spirit",
earthshaker = "npc_dota_hero_earthshaker",
elder_titan = "npc_dota_hero_elder_titan",
ember_spirit = "npc_dota_hero_ember_spirit",
enchantress = "npc_dota_hero_enchantress",
enigma = "npc_dota_hero_enigma",
faceless_void = "npc_dota_hero_faceless_void",
faceless = "npc_dota_hero_faceless_void",
furion = "npc_dota_hero_furion",
gyrocopter = "npc_dota_hero_gyrocopter",
huskar = "npc_dota_hero_huskar",
invoker = "npc_dota_hero_invoker",
jakiro = "npc_dota_hero_jakiro",
juggernaut = "npc_dota_hero_juggernaut",
keeper_of_the_light = "npc_dota_hero_keeper_of_the_light",
kunkka = "npc_dota_hero_kunkka",
legion_commander = "npc_dota_hero_legion_commander",
legion = "npc_dota_hero_legion_commander",
leshrac = "npc_dota_hero_leshrac",
lich = "npc_dota_hero_lich",
life_stealer = "npc_dota_hero_life_stealer",
lina = "npc_dota_hero_lina",
lion = "npc_dota_hero_lion",
lone_druid = "npc_dota_hero_lone_druid",
luna = "npc_dota_hero_luna",
lycan = "npc_dota_hero_lycan",
magnataur = "npc_dota_hero_magnataur",
medusa = "npc_dota_hero_medusa",
meepo = "npc_dota_hero_meepo",
mirana = "npc_dota_hero_mirana",
morphling = "npc_dota_hero_morphling",
naga_siren = "npc_dota_hero_naga_siren",
necrolyte = "npc_dota_hero_necrolyte",
nevermore = "npc_dota_hero_nevermore",
night_stalker = "npc_dota_hero_night_stalker",
nyx_assassin = "npc_dota_hero_nyx_assassin",
obsidian_destroyer = "npc_dota_hero_obsidian_destroyer",
ogre_magi = "npc_dota_hero_ogre_magi",
omniknight = "npc_dota_hero_omniknight",
oracle = "npc_dota_hero_oracle",
phantom_assassin = "npc_dota_hero_phantom_assassin",
phantom_lancer = "npc_dota_hero_phantom_lancer",
phoenix = "npc_dota_hero_phoenix",
puck = "npc_dota_hero_puck",
pudge = "npc_dota_hero_pudge",
pugna = "npc_dota_hero_pugna",
queenofpain = "npc_dota_hero_queenofpain",
queen = "npc_dota_hero_queenofpain",
rattletrap = "npc_dota_hero_rattletrap",
clock = "npc_dota_hero_rattletrap",
razor = "npc_dota_hero_razor",
riki = "npc_dota_hero_riki",
rubick = "npc_dota_hero_rubick",
sand_king = "npc_dota_hero_sand_king",
sandking = "npc_dota_hero_sand_king",
shadow_demon = "npc_dota_hero_shadow_demon",
shadow_shaman = "npc_dota_hero_shadow_shaman",
shredder = "npc_dota_hero_shredder",
silencer = "npc_dota_hero_silencer",
skeleton_king = "npc_dota_hero_skeleton_king",
skywrath_mage = "npc_dota_hero_skywrath_mage",
slardar = "npc_dota_hero_slardar",
slark = "npc_dota_hero_slark",
sniper = "npc_dota_hero_sniper",
spectre = "npc_dota_hero_spectre",
spirit_breaker = "npc_dota_hero_spirit_breaker",
storm_spirit = "npc_dota_hero_storm_spirit",
storm = "npc_dota_hero_storm_spirit",
sven = "npc_dota_hero_sven",
techies = "npc_dota_hero_techies",
templar_assassin = "npc_dota_hero_templar_assassin",
terrorblade = "npc_dota_hero_terrorblade",
tidehunter = "npc_dota_hero_tidehunter",
tide = "npc_dota_hero_tidehunter",
tinker = "npc_dota_hero_tinker",
tiny = "npc_dota_hero_tiny",
treant = "npc_dota_hero_treant",
troll_warlord = "npc_dota_hero_troll_warlord",
tusk = "npc_dota_hero_tusk",
undying = "npc_dota_hero_undying",
ursa = "npc_dota_hero_ursa",
vengefulspirit = "npc_dota_hero_vengefulspirit",
venge = "npc_dota_hero_vengefulspirit",
venomancer = "npc_dota_hero_venomancer",
viper = "npc_dota_hero_viper",
visage = "npc_dota_hero_visage",
warlock = "npc_dota_hero_warlock",
weaver = "npc_dota_hero_weaver",
windrunner = "npc_dota_hero_windrunner",
winter_wyvern = "npc_dota_hero_winter_wyvern",
wisp = "npc_dota_hero_wisp",
witch_doctor = "npc_dota_hero_witch_doctor",
zuus = "npc_dota_hero_zuus",
zeus = "npc_dota_hero_zuus"
}
local cache = {}
function Dict.Phrase2HeroName(str)
if not str then return "" end
if cache[str] then return cache[str] end
for shortname, fullname in pairs(Dict.ShortName2FullName) do
if string.find(str, shortname) then
cache[str] = fullname
return fullname
end
end
return ""
end
return Dict