Jotran
Banned User
- Joined
- Feb 8, 2015
- Messages
- 349
- Reaction score
- 109
This was written so you could easily see what metamethods that are available for each TFS metatable
It doesn't give the arguments but it is a nice reference tool
Example:
list npc
I had a screenshot but it wasn't showing
It doesn't give the arguments but it is a nice reference tool
Example:
list npc
I had a screenshot but it wasn't showing
Code:
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end
local meta = {
["combat"] = Combat,
["condition"] = Condition,
["container"] = Container,
["creature"] = Creature,
["group"] = Group,
["guild"] = Guild,
["house"] = House,
["item"] = Item,
["item type"] = ItemType,
["modal window"] = ModalWindow,
["monster"] = Monster,
["monster type"] = MonsterType,
["network message"] = NetworkMessage,
["npc"] = Npc,
["party"] = Party,
["player"] = Player,
["position"] = Position,
["teleport"] = Teleport,
["tile"] = Tile,
["town"] = Town,
["variant"] = Variant,
["vocation"] = Vocation
}
if type(meta[param:lower()]) ~= "table" then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param.." is not a TFS metatable.")
return false
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "------------"..param.." start -----------")
for name, type_ in pairs(meta[param:lower()]) do
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, type(type_).." "..name)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "------------"..param.." end -------------")
return false
end
Code:
<talkaction words="list" separator=" " script="getMetamethods.lua"/>
Last edited: