-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Events hooks and other automation features #590
Comments
I'm considering doing the following:
Would these two features suffice for your use case? Inventory items were added to the API in a recent change; there hasn't been a release since then, but you can build from source to get that change. I could also add a new websocket endpoint that would send client connect/disconnect and lobby change events, but this would be a fair amount more work than the above. |
This would get me what I need! Thanks! I am currently running a built from source from latest upstream, so which API has inventory items? |
You should be able to see inventory items in the data returned by
For your use case, you'll probably want to look at the Data field. If you're not familiar with the PSO item format, you can find the relevant item codes in system/item-tables/names-v4.json, the entries of which correspond to the first few bytes in Data. I probably won't be able to get the changes I mentioned above done very soon; work has been pretty busy these days. I'll try to get it done sometime this week or weekend though. |
No rush man. Thanks for your replies and awesome software 😃 |
I've added the |
I shall build a new version and begin testing! Thank you so much!
…On Mon, 13 Jan 2025, 10:48 am Martin Michelsen, ***@***.***> wrote:
I've added the /y/shell-exec endpoint in the HTTP server (it's the only
POST request; see the readme for details). Make sure to specify the Content-Type:
application/json header in the request; I forget if I mentioned that
elsewhere. I've also made the cc shell command skip permission checks, so
anything that would require cheat mode or debug mode should work even if
the client specified by on C-X ... doesn't have permissions. Let me know
if this works for your use case, or if you find any issues with it.
—
Reply to this email directly, view it on GitHub
<#590 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABUQFQCEXC2YBWRZWY27R32KMEMNAVCNFSM6AAAAABUUVVX5SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBWGAYDCNBUGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I'm running a sever for me and my kids, I'd like to be able to have the server fire off scripts or something when they connect. I know I can poll the API end point to see when they connect but I can't run server commands via the API and there isn't a unix socket to replicate the "console" for other commands that I could use programmatically. I could have a python script launch the server and get access to stdin/stdout but that feels clunky
I also can't see a way to check a player inventory from the server.
What I'd like is to be able to check their *mate/*fluid stocks on login and top them up to 10 of each.
I'm currently looking at using "as cc $i Trifluid x<number to make 10>" obviously with the stuff in <> filled in by the scripting language of my choice (Probably python), but would love something that doesn't require cheats to be enabled.
I think a unix socket to get access to the "console" would get me 80% of the way there. Or possibly 100% of the way, if there is already a way to check their inventory I just don't know about.
I think a way to do automations beyond just rare item alerting would be handy/useful. Also a way to gift things to users without having to use cheats as the user. Could be good for server wide competitions and stuff. (First user to collect 10 red boxes in EP 2 Ultimate before Tuesday, gets a Cell mag. Or something)
Could also be useful to be able to add hooks for custom server chat commands.
Sorry if this is a bit of a ramble.
Thanks
The text was updated successfully, but these errors were encountered: