Addon Request - Lua Command Sending
Is there any way for anyone to send a lua command to another wow client and have that client run the command.
I would like both clients to use the mod. Have some sort of approved list so that each client which sends commands are only able to send commands to trusted clients. I would like the commands to be run automatically if on the approved list. I have a seen a few mods capable of doing this. Like Elvui for example, you can send your entire elvui interface profile to another player. |
Telepathy does something along those lines with spells.
|
Cool addon idea but nothing close to what I am looking for really.
I want to beable to push a lua command. Even something simple like... /run print("hi noob") The idea is to beable to send a client LUA Commands that will run on next key press or just the instant they get the sent information from another client using the same mod. |
Something like this on the sending end:
... and this on the receiving end: Code:
RegisterAddonMessagePrefix("CmdShare") Also, you should either: (a) check the command against a list of secure/protected functions that require hardware events (or that can't be called by addons at all) and avoid sending it or execute it if it contains any; or (b) set up a secure macrotext button for the receive to click (or activate with a keybind) to execute the command, though you'd still need to check for functions that can't be called by addons at all (eg. CastSpellByName) and either avoid trying to execute the command, or convert those function calls into secure button attributes (eg. type/spell, spell/Frostbolt). |
I thank you for the effort you have put forth.
I would be very honest to say, I know less lua than your pet hamster. I would do an arena carry for you or something for you to create a mod however :D! I was thinking of something similar like this typing ! before what you type in chat tells the mod that this is a command to send then target or player name and then command. So I guess something like this? ! Morpheusxeno /run LeaveParty() |
shameless bump!
|
Code:
local whitelist = {"NSA","FBI"}; /rrun Morpheusxeno LeaveParty() |
Here is some better code (no unnecessary globals, unnecessary function calls, inconsistent formatting, etc.). If you need help turning it into an addon, copy and paste it into this page:
http://addon.bool.no/ Code:
---------------------------------------------------------------------------- |
Will test after work today. Thank you!
:banana: |
I created the addon , I dont get any errors when trying to run a command. But the command doesnt run either.
I think "Player-Server" has something to do with it. Can it just be "Player" |
I updated the code in my previous post to add your current server name if you don't include one in the command. The additional lines are highlighted in green, near the end.
|
Getting this lua error after the interface loads before doing anything.
Code:
Message: Interface\FrameXML\ChatFrame.lua:3546: attempt to index field 'chatFrame' (a nil value) |
It appears you changed the code since Phanx posted it. Perhaps it would be better to paste the actual code you are using to see where you attempt to access "chatFrame" where it does not exist.
|
Quote:
|
My code still works, just saying...
|
1 Attachment(s)
Should I need to prove to you via RDP that my code hasn't been changed. I don't really think that's necessary.
I use the US Client. Does this have anything to do with the reason it may not be working? I posted a replica of the LUA file with the code you used, And a video for good measure. Both showing only the mod are running and the code is without change. http://www.youtube.com/watch?v=7oOAnKjG8QE |
You guys really don't need to spam the thread with [b]videos[/i] to "prove" that you did or didn't edit some code... :rolleyes:
Anyway, I've added another section of code (highlighted in blue). The problem is some (unsurprisingly) idiotic coding in Blizzard's template system that assumes you are using XML and is full of annoying interdependencies. |
New Lua error after the changes.
Code:
Message: Interface\FrameXML\ChatFrame.lua:3546: attempt to index field 'chatFrame' (a nil value) |
Still looking for help to get the addon Phanx made for me working.
|
I posted working code a week ago.
|
All times are GMT -6. The time now is 08:58 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI