• 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!

Lua [SOLVED] TFS 1.2 - Displaying List to In-Game Window From SQL Database

ArkSeyonet

Chancho
Joined
Nov 11, 2008
Messages
201
Reaction score
11
Basically, I have been unsuccessful so far in trying to take data from the SQL database, and displaying it in a TextDialog.

To show you the tables I need.

I need the TextDialog to display Like this:

Code:
Current Targets:
BlahBlah - Reward: 1 gold.
BlahBleh - Reward: 100,000 gold.

So I will need to get 'name' and 'reward' from the sql database from the table 'hunt_system' for each separate 'id' that way it will display the full list of targets.

So basically what I need to know is in LUA, how do I pull information from the SQL database and put it into a table or array, and then display table or array in TextDialog?
 
Maybe this will help you.

Code:
https://otland.net/threads/tfs-1-x-bounty-hunter-system.213135/page-3#post-2328554
 
Maybe this will help you.

Code:
https://otland.net/threads/tfs-1-x-bounty-hunter-system.213135/page-3#post-2328554

That's exactly what I was looking for, thank you.

I recommend that you do a cache for this and update in some globalevent every x time.

I will look into that, it would be a lot better than having to do the sql query everytime someone used the command.
 
Back
Top