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:
[TFS 1.3] How to get a value from a name table
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 =...