ordinator voices
This commit is contained in:
parent
058b7c9849
commit
cb2208f9bf
2 changed files with 41 additions and 1 deletions
|
@ -58,6 +58,8 @@ this.playGuardText = function(npc, str, target)
|
||||||
return output
|
return output
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local ordinator = "ordinator"
|
||||||
|
|
||||||
-- Plays a random sound of specified type and returns the path of the sound file that was played
|
-- Plays a random sound of specified type and returns the path of the sound file that was played
|
||||||
this.playGuardVoice = function(mobile, type)
|
this.playGuardVoice = function(mobile, type)
|
||||||
local distanceCap = 2500 -- sounds further away than this are too quiet to be heard
|
local distanceCap = 2500 -- sounds further away than this are too quiet to be heard
|
||||||
|
@ -66,9 +68,18 @@ this.playGuardVoice = function(mobile, type)
|
||||||
local race = ref.baseObject.race.id:lower()
|
local race = ref.baseObject.race.id:lower()
|
||||||
local directory, soundPath, sound
|
local directory, soundPath, sound
|
||||||
|
|
||||||
|
-- ordinators have special voices, so here's some hacky shit to incorporate them
|
||||||
|
if not ref.baseObject.female and (ref.id:lower():match(ordinator) or ref.object.class.id:lower():match(ordinator)) then
|
||||||
|
race = ordinator
|
||||||
|
end
|
||||||
|
|
||||||
-- make sure the race/sex/type combo exists in the voice data
|
-- make sure the race/sex/type combo exists in the voice data
|
||||||
if this.dialogues.voice[race] and this.dialogues.voice[race][sex] and this.dialogues.voice[race][sex][type] then
|
if this.dialogues.voice[race] and this.dialogues.voice[race][sex] and this.dialogues.voice[race][sex][type] then
|
||||||
directory = string.format("vo\\%s\\%s\\", this.dialogues.voice[race].dir, sex)
|
if race == ordinator then
|
||||||
|
directory = string.format("vo\\%s\\", this.dialogues.voice[race].dir)
|
||||||
|
else
|
||||||
|
directory = string.format("vo\\%s\\%s\\", this.dialogues.voice[race].dir, sex)
|
||||||
|
end
|
||||||
sound = table.choice(this.dialogues.voice[race][sex][type])
|
sound = table.choice(this.dialogues.voice[race][sex][type])
|
||||||
-- sound will be nil if the race/sex/type combo is an empty table
|
-- sound will be nil if the race/sex/type combo is an empty table
|
||||||
if sound then soundPath = directory .. sound.file end
|
if sound then soundPath = directory .. sound.file end
|
||||||
|
|
|
@ -594,6 +594,35 @@ local voices = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dir = "w"
|
dir = "w"
|
||||||
|
},
|
||||||
|
ordinator = {
|
||||||
|
m = {
|
||||||
|
["sneaking"] = {
|
||||||
|
{ file = "Hlo_ORM008.mp3", subtitle = "Watch yourself. We'll have no trouble here." },
|
||||||
|
{ file = "Hlo_ORM004.mp3", subtitle = "If you're here for trouble, you'll get more than you bargained for." },
|
||||||
|
{ file = "Hlo_ORM003.mp3", subtitle = "We're watching you. Scum." }
|
||||||
|
},
|
||||||
|
["stop_sneaking"] = {
|
||||||
|
{ file = "Hlo_ORM001.mp3", subtitle = "Grrrr." },
|
||||||
|
{ file = "Hlo_ORM009.mp3", subtitle = "Go on about your business." },
|
||||||
|
{ file = "Hlo_ORM007.mp3", subtitle = "Keep moving." },
|
||||||
|
{ file = "Hlo_ORM011.mp3", subtitle = "Move along." },
|
||||||
|
},
|
||||||
|
["stop_following"] = {
|
||||||
|
{ file = "Hlo_ORM011.mp3", subtitle = "Move along." },
|
||||||
|
{ file = "Hlo_ORM009.mp3", subtitle = "Go on about your business." },
|
||||||
|
{ file = "Hlo_ORM007.mp3", subtitle = "Keep moving." },
|
||||||
|
{ file = "Hlo_ORM002.mp3", subtitle = "Go. Now." }
|
||||||
|
},
|
||||||
|
["join_combat"] = {
|
||||||
|
{ file = "Atk_ORM002.mp3", subtitle = "Fool!" },
|
||||||
|
{ file = "Atk_ORM003.mp3", subtitle = "You have sealed your fate!" },
|
||||||
|
{ file = "Atk_ORM004.mp3", subtitle = "You cannot escape the righteous!" },
|
||||||
|
{ file = "Atk_ORM005.mp3", subtitle = "You will pay with your blood!" },
|
||||||
|
{ file = "Atk_ORM001.mp3", subtitle = "May our Lords be merciful!" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dir = "ord"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue