• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

TFS 1.X+ TFS 1.3 function explaining

Mjmackan

Mapper ~ Writer
Joined
Jul 18, 2009
Messages
1,477
Solutions
18
Reaction score
195
Location
Sweden
Hiya! Now I've tried for some time, anyone willing to explain this function:
MonsterType("rotworm"):getLoot()
I've tried several ways, but i only get table's returned or nil and i want the itemids.
 
Last edited:
This function returns the list of items configured for the system of items that will appear in the corpse
you get a table with other tables that contain, the ID of the item, the chance and the amount

example:
getLoot() ->
LUA:
{
    { itemId = 2160, chance = 10000, count = 5 },
    { itemId = 8475, chance = 250, count = 1 }
}
 
How can i break it down?

Edit:
Nvm i figured it out, ofcourse you just print [X] from the table and add .itemId (i wrote itemid) <- didn't work. Thanks for explaining Sarah!
 
Last edited:
Back
Top