Quantcast
Channel: OTLand
Viewing all articles
Browse latest Browse all 32017

[TFS 1.3] How to get a value from a name table

$
0
0
I have the following code (using TFS 1.3), and what I'm trying to do is, when the player use !bestiary rat, it gets the value from the storage in the table, but right now I can't figure out the proper code:

Lua:
local monsters = {
    ["rat"] = 35001,
    ["troll"] = 35002,
    ["rotworm"] = 35003,
    ["dragon"] = 35004,
    ["dragon lord"] = 35005,
    ["demon"] = 35006,
}

local bestiary = TalkAction("!bestiary")

function bestiary.onSay(player, words, param)
    local t =...
[TFS 1.3] How to get a value from a name table

Viewing all articles
Browse latest Browse all 32017

Trending Articles