You are viewing an old version of this page. Return to the latest version.
Difference between revisions of "LUA:AddLanguage"
m (moved AddLanguage to LUA:AddLanguage: I screwed up when creating thse pages) |
|||
| Line 1: | Line 1: | ||
| − | {{ | + | {{LUAFunction |
| − | + | |Name = AddLanguage | |
| − | = | + | |Description = Gives the player the language |
| − | Gives the player the language | + | |Param1 = Spawn |
| − | + | |Param1Desc = is the reference to a player | |
| − | + | |Param2 = int32 | |
| − | + | |Param2Desc = is the language id | |
| − | + | |Example = | |
| − | |||
| − | = | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
<pre> | <pre> | ||
function hailed(NPC, Spawn) | function hailed(NPC, Spawn) | ||
| Line 37: | Line 30: | ||
end | end | ||
</pre> | </pre> | ||
| − | + | |ExampleDesc = This NPC will give the player the "Halasian" language if they select the right option. | |
| − | This NPC will give the player the "Halasian" language if they select the right option. | + | |Notes = === Language ID's === |
| − | + | <pre> | |
| − | == | + | 0 = Common |
| − | Language ID's < | + | 1 = Halasian |
| − | 0 | + | 2 = Thexian |
| − | 1 | + | 3 = Dwarven |
| − | 2 | + | 4 = Erudian |
| − | 3 | + | 5 = Guktan |
| − | 4 | + | 6 = Gnomish |
| − | 5 | + | 7 = Ayr'Dal |
| − | 6 | + | 8 = Stout |
| − | 7 | + | 9 = Koada'Dal |
| − | 8 | + | 10 = Lucanic |
| − | 9 | + | 11 = Antonican |
| − | 10 = Lucanic | + | 12 = Sebilisian |
| − | 11 = Antonican | + | 13 = Kerran |
| − | 12 = Sebilisian | + | 14 = Oggish |
| − | 13 = Kerran | + | 15 = Ykeshan |
| − | 14 = Oggish | + | 16 = Feir'Dal |
| − | 15 = Ykeshan | + | 17 = Orcish |
| − | 16 = Feir'Dal | + | 18 = Gnollish |
| − | 17 = Orcish | + | 19 = Draconic |
| − | 18 = Gnollish | + | 20 = Goblish |
| − | 19 = Draconic | + | 21 = Thulian |
| − | 20 = Goblish | + | 22 = Words of Shade |
| − | 21 = Thulian | + | 23 = Fayefolk |
| − | 22 = Words of Shade | + | 24 = Chaos Tongue |
| − | 23 = Fayefolk | + | 25 = Krombral |
| − | 24 = Chaos Tongue | + | 26 = Ratongan |
| − | 25 = Krombral | + | 27 = Druzaic |
| − | 26 = Ratongan | + | 28 = Uruvanian |
| − | 27 = Druzaic | + | 29 = Death's Whisper |
| − | 28 = Uruvanian | + | 30 = Screechsong |
| − | 29 = Death's Whisper | + | 31 = Volant |
| − | 30 = Screechsong | + | 32 = Argot |
| − | 31 = Volant | + | 33 = Serilian |
| − | 32 = Argot | + | 34 = Tik-Tok |
| − | 33 = Serilian | + | 35 = Faerlie |
| − | 34 = Tik-Tok | + | 36 = Gorwish |
| − | 35 = Faerlie | + | 37 = Sathirian |
| − | 36 = Gorwish | + | 38 = Di'Zokian |
| − | 37 = Sathirian | + | 39 = Froak |
| − | 38 = Di'Zokian | + | 40 = Shisik |
| − | 39 = Froak | + | 41 = Sul'Dal |
| − | 40 = Shisik | + | 42 = Ancient Draconic |
| − | 41 = Sul'Dal | + | 43 = Fleshless Tongue |
| − | 42 = Ancient Draconic | + | 44 = Gymy |
| − | 43 = Fleshless Tongue | + | </pre> |
| − | 44 = Gymy < | + | }} |
Latest revision as of 12:00, 30 January 2021
LUA:AllFunctions - AddLanguage
Return to: LUA:AllFunctions | Tutorials | Portal | Forum | Project Manager | Bug Tracker
Gives the player the language
Syntax
AddLanguage(param1, param2)
Parameters
- Required - param1 (Spawn), param2 (int32)
- param1 is the reference to a player
- param2 is the language id
Example
function hailed(NPC, Spawn) Say(NPC, "This is Halasian language", 0, 1) local con = CreateConversation() if not HasLanguage(Spawn, 1) then AddConversationOption(con, "Yes please!", "AddLang") AddConversationOption(con, "No thanks.") StartConversation(con, NPC, Spawn, "You do not know Halasian? Would you like to learn it?") else AddConversationOption(con, "Yes I do.") StartConversation(con, NPC, Spawn, "You know Halasian?") end end function AddLang(NPC, Spawn) AddLanguage(Spawn, 1) local con = CreateConversation() AddConversationOption(con, "Yay!") StartConversation(con, NPC, Spawn, "Here you go") end
This NPC will give the player the "Halasian" language if they select the right option.
Notes
Language ID's
0 = Common 1 = Halasian 2 = Thexian 3 = Dwarven 4 = Erudian 5 = Guktan 6 = Gnomish 7 = Ayr'Dal 8 = Stout 9 = Koada'Dal 10 = Lucanic 11 = Antonican 12 = Sebilisian 13 = Kerran 14 = Oggish 15 = Ykeshan 16 = Feir'Dal 17 = Orcish 18 = Gnollish 19 = Draconic 20 = Goblish 21 = Thulian 22 = Words of Shade 23 = Fayefolk 24 = Chaos Tongue 25 = Krombral 26 = Ratongan 27 = Druzaic 28 = Uruvanian 29 = Death's Whisper 30 = Screechsong 31 = Volant 32 = Argot 33 = Serilian 34 = Tik-Tok 35 = Faerlie 36 = Gorwish 37 = Sathirian 38 = Di'Zokian 39 = Froak 40 = Shisik 41 = Sul'Dal 42 = Ancient Draconic 43 = Fleshless Tongue 44 = Gymy