LUA:HasLanguage
- Last edited 10 years ago by I need to Update My Profile
LUA - HasLanguage
Return to: LUA | Tutorials | Portal | Forum | Project Manager | Bug Tracker
HasLanguage()
Checks to see if the given player has the given language
Syntax
var = HasLanguage(param1, param2)
Parameters
- Required - param1 (Spawn), param2 (int32)
- param1 is a reference to a player.
- param2 is the language ID.
Returns
- bool
Usage
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 respond differently if the player has the "Halasian" language or not.
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