module-development
textPage 9 of 43
50 messages on this page
Wednesday, July 16, 2025
User bddf69
Docs show main branch, not the tagged stuff. So technically, yes it is documented already haha
User bddf69
Oh yeah that's right haha, it's on the main branch but not actually tagged
User a12f6e
Altho pretty much nothing in the documentation actually says what it does lol
User bddf69
That parameter is undocumented in current release 🙈 Next release adds it to the api spec, so you'll actually see what's possible to be extended
User a12f6e
O interesting ok ty
User bddf69
You need to pass the
extend parameter for that to be populatedUser a12f6e
Is
PlayerOutputDTO.playerOnGameServers supposed to return an array of pogs for corresponding pogs across all game servers? It seems to be currently returning null even for online players.User bddf69
Roger! I've noted this stuff down. It's very likely to be added/fixed in the next release but no promises 🙏
User a12f6e
Thanks though, it's working with adjusting to use only gameserverid and then filtering myself
User a12f6e
I have to admit, it causes a twitch of pain every time I have to make a separate API call to get name from a pog lol 🙂 ❤️
User 69dd72
User bddf69
POGs dont have a name property still, that's in the player object
User bddf69
Oh bad error! You can't pass a
name to the search like that. It should be throwing a validation error and not a 500 though :'(User a12f6e
Uhhh ok why is this failing? Is /gameserver/player/search broken?
"result": { "logs": [ { "msg": "➡️ POST /gameserver/player/search", "details": { "args": [ { "method": "post", "url": "/gameserver/player/search", "body": { "search": { "name": [ "shade" ], "gameServerId": [ "6464a337-9bca-4bb6-abe3-a38805c5a803" ] } } } ] } }, { "msg": "☠️ Request errored", "details": { "args": [ { "traceId": "1a64b073f212bd357b7859269db30029", "details": "{\"error\":{\"code\":\"InternalServerError\",\"message\":\"Internal server error\"}}", "status": 500, "statusText": "Internal Server Error", "method": "post", "url": "/gameserver/player/search", "response": { "meta": { "error": { "code": "InternalServerError", "message": "Internal server error" } }, "data": {} } } ] } }, { "msg": "Request failed with status code 500", "details": "AxiosError: Request failed with status code 500\n at settle (file:///opt/node_modules/axios/lib/core/settle.js:19:12)\n at IncomingMessage.handleStreamEnd (file:///opt/node_modules/axios/lib/adapters/http.js:599:11)\n at IncomingMessage.emit (node:events:529:35)\n at endReadableNT (node:internal/streams/readable:1400:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)\n at Axios.request (file:///opt/node_modules/axios/lib/core/Axios.js:45:41)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async main (vm:module(0):14:25)\n at async vm:module(0):37:1" } ], "success": false }```
User a12f6e
Aw still no pog.name? :/
User a12f6e
Add packages without having to break them up one function at a time, like a bulk file importer.
User 2fc02a
I'm not a smart coder, but I know Takaro very well, what are you wanting to accomplish?
User a12f6e
I don't suppose there's a way at this time to add dependencies to a Takaro script? 🙂
User 2fc02a
I think that'd be easy enough to add. I can give it a shot
User 6ceaf4
Works great for my needs thanks. Just think it could auto remove itself when it runs.
User 2fc02a
Yeah that's the one I made
User 6ceaf4
El limon released an installed module cloner already.
User 2fc02a
I already have this is a rudimentary way. It'll clone a server. Only draw back is every item has its own uuid per a server so those all need to be done manually.
Tuesday, July 15, 2025
User 6ceaf4
That and the module cloner could also uninstall themselves after the cronjob runs
User 6ceaf4
@User 53442821 I'm thinking of a module that could install a module on all servers that are enabled. Maybe pick from a drop down the kind of game you want it installed (Rust X 7 days X...). Maybe with a field to inform server ids where you do not want the module.
Basically, a mass installer for new modules, with the standard configs
Basically, a mass installer for new modules, with the standard configs
User 69dd72
i got your triviatime with api working but still need to post it!
User 69dd72
yes @User 59898394
User 6ceaf4
Hey all, life got busy in the last 30 days or so, what did I miss?
@User 53442821 do you still take orders for new modules? 🙂
@User 53442821 do you still take orders for new modules? 🙂
Monday, July 14, 2025
User 69dd72
config schema:
{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "exchangeMessage": { "title": "Exchange Message", "type": "string", "description": "Message sent when players deposit casino coins", "default": "[Exchange] You have deposited {amount} casino coins." }, "accessMessage": { "title": "Access Message", "type": "string", "description": "Message sent when accessing the casino", "default": "Casino interface accessed. Please deposit your casino coins." } }, "required": [], "additionalProperties": false }
User 69dd72
hook
import { takaro, data } from '@takaro/helpers'; async function main() { const { player, gameServerId } = data; const logLine = data.eventData.msg; // Check if log line contains casino coin deposit const coinRegex = /item=casinoCoin, qnty=(\d+)/; const playerRegex = /(\d{17})/; // Steam ID pattern const coinMatch = logLine.match(coinRegex); const playerMatch = logLine.match(playerRegex); if (coinMatch && playerMatch) { const quantity = parseInt(coinMatch[1]); const steamId = playerMatch[1]; // Find the player by Steam ID const playerRes = await takaro.player.playerControllerSearch({ filters: { steamId: [steamId] } }); if (playerRes.data.data.length > 0) { const playerId = playerRes.data.data[0].id; // Add currency to player await takaro.playerOnGameserver.playerOnGameServerControllerAddCurrency( gameServerId, playerId, { currency: quantity } ); // Send confirmation message await takaro.gameserver.gameServerControllerSendMessage(gameServerId, { message: `[Exchange] You have deposited ${quantity} casino coins.`, opts: { recipient: { steamId: steamId } } }); } } } await main();
User 69dd72
if u testi t maybe it works xD
import { takaro, data } from '@takaro/helpers'; async function main() { const { player, gameServerId } = data; // Close any open UIs and remove items (equivalent to your CSMM command) await takaro.gameserver.gameServerControllerExecuteCommand(gameServerId, { command: `xui close looting` }); await takaro.gameserver.gameServerControllerExecuteCommand(gameServerId, { command: `remitem Steam_${player.steamId}` }); await player.pm('Casino interface accessed. Please deposit your casino coins.'); } await main();
User bddf69
Select the log line with a regex, then parse out the variablesi nside the hook code
User bddf69
Should totally work with Takaro aswell, I see no reason why it wouldnt be possible
User 2bffa0
In CSMM I guess yes
User 5c75f2
does this still work?
User 2bffa0
This is how I had it in CSMM, if you find out how to do it in Takaro, please share the module.
User bddf69
Yes! That was it :D
User 2bffa0
🔸INGAME COMMANDS🔸
./banco
eoc Steam_${player.steamId} "xui close looting";remitem Steam_${player.steamId}
eoc Steam_${player.steamId} "xui close looting";remitem Steam_${player.steamId}🔸CUSTOM HOOKS🔸
Event: logLine
Search String: , item=casinoCoin, qnty=
Variables:
Name = qnt | Regex = (?<=item=casinoCoin, qnty=)(\d+)
Name = receiver | Regex= \d{17}
Event: logLine
Search String: , item=casinoCoin, qnty=
addCurrency(${player.id}, ${custom.qnt}); pm2 [Exchange] Steam_${player.steamId} "You have deposited ${custom.qnt} casino coins."Variables:
Name = qnt | Regex = (?<=item=casinoCoin, qnty=)(\d+)
Name = receiver | Regex= \d{17}
User 2bffa0
@User 22055452 @User 48363098 you are talking about this
User 5c75f2
my deposit command is working, just need to some how get the coins removed from player inventory 🤣
guessing ima need to disable the shop for now xD
guessing ima need to disable the shop for now xD
User 5c75f2
exactly that
User 5c75f2
ive been hunting for that
User 5c75f2
THAT WAS IT
User 5c75f2
just not removing
User bddf69
Ah I know there was something like that in CPM where you stand ontop of a chest and it takes the items from that chest. I don't remember what the commands was tohugh x.x
User 5c75f2
yes that worked for inventory
User 5c75f2
thank you
User 5c75f2
damn it, shops useless to me unless i can make people be able to deposit their ingame money to the online shop 🤣
User bddf69
Viewing inventory is no problem, taking something out of an inventory is a different story. You'll need to find an ingame command that can do that, takaro can't do it natively