Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Luascript run help

Initiate Mage
Joined
Jun 8, 2023
Messages
4
Reaction score
1
Greetings everyone. I'm wondering if there's a way to initiate server luascripts using chat or macros, without having GM rights.
I know that any script can be run using "/gm ? runplot/pcall", but is there a way to run such scripts without GM?

I've tried to find in the source code of the client/server the parameters responsible for launching such scripts from GM and got utterly confused. My C++ knowledge at this point leaves much to be desired. I ask for your help.

So what I want to implement is the launching of a script for a "Convenient Mailbox" (OpenMailBoxByItem("CHECK")) or auction (OpenAC()) without using an item, but with a command in the chat such as: "/s ? mail" or a macro.

I would be grateful for any help.
 
Newbie Spellweaver
Joined
Jan 25, 2019
Messages
36
Reaction score
3
I don't know if I understood your question correctly, but I know a macro so that you can open the bank, mailbox and auction house without GM rights.

/run TimeFlagFrame:Show()

1689754111385 - Luascript run help - RaGEZONE Forums

then it should look like this :D

All you have to do is pay the rent with diamonds so you can open it..
 

Attachments

You must be registered for see attachments list
Upvote 0
Initiate Mage
Joined
Jun 8, 2023
Messages
4
Reaction score
1
I don't know if I understood your question correctly, but I know a macro so that you can open the bank, mailbox and auction house without GM rights.
Thank you for your response, but that's not quite what I wanted to implement.I'm interested in launching any scripts (not just mail/auction), without GM rights, using simple commands(for my custom scripts), for example:
/s ? mail
/s ? auc
I understand that this might be unsecure, but protection can be implemented in the Lua scripts themselves

I've found a part of the code that handles the execution of GM commands in the chat, but I can't figure out how to implement the running of luascripts without GM rights.
1689783445770 - Luascript run help - RaGEZONE Forums

Maybe I'm looking in the wrong place. Not sure
 

Attachments

You must be registered for see attachments list
Last edited:
Upvote 0
Junior Spellweaver
Joined
Apr 27, 2015
Messages
176
Reaction score
107
Do you mean open the interface for them ?

Code:
/run AuctionFrame:Show()
/run AuctionFrame:Hide()
/run MailFrame:Show()
/run MailFrame:Hide()

Anything with-in the games UI can be made visible or hidden this way, you just need to find the frame name.
 
Upvote 0
Initiate Mage
Joined
Jun 8, 2023
Messages
4
Reaction score
1
Do you mean open the interface for them ?

Code:
/run AuctionFrame:Show()
/run AuctionFrame:Hide()
/run MailFrame:Show()
/run MailFrame:Hide()

Anything with-in the games UI can be made visible or hidden this way, you just need to find the frame name.
Thank you for your response. However, it's not what I need. When using your method, the UI does open, but it doesn't work because there is no server request being made.

I want to implement the execution of any server script (located in the luascript folder) using commands in the chat. For example, it would be very interesting to implement a function that the guild/group leader could use to summon its members to their location, like ( /s ? inviteparty).

Currently, I can only execute these scripts if I have administrator privileges. Therefore, I want to find a way to execute them through chat commands for everyone(not all of them sure).

I understand that this requires some modification to the client/server source code
 
Upvote 0
Junior Spellweaver
Joined
Aug 9, 2019
Messages
170
Reaction score
26
00010.lua

function Test_Shop_Open()
OpenShop()
end

/gm ? runplot Test_Shop_Open

This opens the bank and works. If your aim is to run this for the player without a GM, this seems unlikely. If it is possible, I think this can be described as a vulnerability.
 
Upvote 0
Elite Diviner
Joined
Sep 12, 2020
Messages
442
Reaction score
224
you can open it but it does not work UNLESS you are a GM .....
 
Upvote 0
Back
Top