Coding Global Background
Coding Global

Help with LS25 Lua Mod - Fetching Data from REST API and Updating Farm Account

Archived 9 months ago
1 messages
2 members
10 months ago
Open in Discord
W
woodly
Verified

Hello everyone, I'm working on an LS25 mod in Lua and need some assistance with a specific feature. My goal is to create a mod that: Fetches a money value from my own REST API. Writes this money value to the respective farm account within the game. I'm comfortable with the REST API part, but I'm having trouble with the Lua scripting within LS25 to: Make the HTTP request to my API. Parse the JSON response to get the money value. Identify the correct farm account to update. Update the farm account with the fetched money value. I would greatly appreciate any help, code examples, or pointers to relevant documentation. Here are some specific questions I have: What is the best way to make HTTP requests from within an LS25 Lua script? How can I parse JSON responses in Lua within the LS25 environment? How do I identify the correct farm account to update based on player or farm ID? What is the correct way to update the farm account with a new money value? Any help or guidance would be greatly appreciated. Thank you in advance!

Replies (1)