Close
Page 1 of 5 1 2 3 ... LastLast
Showing results 1 to 10 of 46

Hybrid View

  1. #1

    Default [Addon] LibRpc-0.2 / LibTrust-0.1

    New Addon 1: LibRpc-0.2
    LibRpc is an embeddable library for making remote procedure calls between WoW clients. An addon running on one client can call any global API on another client as long as the appropriate security permissions have been set using LibTrust. (Normal in-combat restrictions may also apply.) For example:

    Code:
    LibStub("LibRpc-0.2"):RemoteCall("Katator", nil, "SendChatMessage", "hello world")


    LibRpc also supports registration for remote events:

    (On Iaggo)
    Code:
    /script function printEvent(...) SendChatMessage(table.concat({...}, " ")) end
    /script LibStub("LibRpc-0.2"):RegisterRemoteEvent("Katator","AUTOFOLLOW_BEGIN", printEvent)
    (On Katator)
    Code:
    /follow Iaggo
    (On Iaggo)


    Remote procedure calls can be made through a cmdline interface:

    Code:
    /rpc Katator SendChatMessage "hello world"
    LibRpc uses AceComm-3.0 for RPC messages and AceSerializer-3.0 for marshalling function arguments. Any type that AceSerializer can handle should be usable as a function argument.

    New Addon 2: LibTrust-0.1
    LibTrust is an embeddable library for establishing trust relationships between characters. You don't want just anyone with LibRpc installed making WoW API calls on your toon -- they could mail all of your gold to another account, for example. LibRpc lets you say who you trust, presumably just your other characters.

    LibTrust starts out with an empty database of permissions. To enable trust between your characters use the "/trust allow" command. There are also commands to deny trust and allow/deny on specific APIs. Type /trust for more info.

    Installation:
    1) Download the zip files for both addons: LibRpc-0.2, LibTrust-0.1
    2) Unzip to [WoW]\Interface\AddOns
    3) Close WoW and restart

    You should see both LibRpc-0.2 and LibTrust-0.1 listed in your installed addons. Make sure they are enabled.

    Configuration:
    Log onto 2 of your toons. Let's call them Iaggo and Katator. Our goal will be to make Katator dance with Iaggo via a /rpc command:

    (On Iaggo)
    Code:
    /rpc katator DoEmote dance Iaggo
    Initially if you type this LibRpc will pop a LUA error on Katator: "RPC message from untrusted sender: Iaggo". Katator doesn't trust Iaggo, so she rejects the message. To fix this type the following:

    (On Katator)
    Code:
    /trust allow Iaggo
    Now when you run the /rpc command above Katator will start dancing with Iaggo. However, you'll also get an error message on Iaggo: "RPC message from untrusted sender Katator". The second message is Katator sending back the return values from the DoEmote call. In this case the return value is empty, but there is still a message sent. To get rid of the error we need to tell Iaggo to trust Katator:

    (On Iaggo)
    Code:
    /trust allow Katator
    Now the /rpc command will work correctly with no errors.



    Here's another example with a return value:

    Code:
    /rpc katator UnitArmor player


    WTF Can I Do With This?
    I started working on this for another mod, to be called MetaMacro. The idea is to reprogram macros on all of your clones dynamically, so you can easily switch which default totems your shaman clones drop, which characters are in your target macros, etc. I decided to release the RPC stuff first though because I want feedback and I thought that the /rpc command might be generally useful in macros.

    Some other ideas:
    <add here>

    To Do:
    - Upload to Ace SVN
    - API documentation
    - Improved configuration for LibTrust, possibly a GUI
    - [s]LibRpc option to limit debugging spew[/s]
    - [s]Support for remote event registration[/s]
    - [s]Demo remote event registration[/s]
    - Slash commands for events
    - Require string id instead of self in API calls if LibRpc is used non-embedded (like CallbackHandler-1.0)
    - Smart event unregistration on UI reoload
    - Better way to get the source of a fired event
    - /rpc party ... to avoid repetitive commands in macros
    - Bucket events
    - AceEvent message support (user events)
    - Unit tests

    Issues:
    - [s]Callback function info does not include return value[/s]
    - [s]Event args not being passed properly[/s]
    - I have learned that embedded libs can't have saved vars, so LibRpc has to be an addon
    - Event unregistration w/ multiple client addons may cause conflicts

    Updates:
    - 4/15/08: Fixed bug with callback function not geting return value, partial code for remote events
    - 4/17/08: LibRpc-0.2, remote event support
    - 4/18/08: Event args now passed correctly
    - 4/23/08: Debuging messages off by default, "/rpc debug" to toggle
    - 4/23/08: Removed overly picky error when calling UnregisterAllRemoteEvents with no events registered
    - 4/26/08: Fixed embedding implementation for both libs, should now be embeddable
    - 5/17/08: Fixed a LibTrust bug that garbled names containing out-of-locale characters (e.g., accented chars)
    All my codes r belong to you: wow5box

  2. #2

    Default

    Reserved
    All my codes r belong to you: wow5box

  3. #3

    Default

    Reserved 2
    All my codes r belong to you: wow5box

  4. #4

    Default

    Very nice idea! This enables a host of nice stuff for multiboxers, like showing every characters XP or Faction on their respective party frames. Very nice indeed, going to give it a try right away .

    Code:
    /rpc <alt> UnitXP player
    /rpc <alt> UnitMaxXP player
    To retrieve the amount of XP a character respectively has and needs in total to ding.

    Edit: Any way you can let remote clients register for events?

  5. #5

    Default

    Oh Chorizo, you are the man!

    what an awesome mod! I am in awe and almost started speaking l33t
    [align=center]AeineiA AeineiB AeneiC AenieD AeineiX
    All your soul are belong to us
    "They can't be bargained with. They can't be reasoned with. They don't feel pity, or remorse, or fear. And they absolutely will not stop, ever, until you are dead"
    The Wiki is your Friend
    [/align]

  6. #6

    Default

    Thanks you guys, I'm glad you like.

    Quote Originally Posted by 'Blubber',index.php?page=Thread&postID=53289#post5 3289
    Edit: Any way you can let remote clients register for events?
    Yeah, that's a great idea. Should be easy to do.
    All my codes r belong to you: wow5box

  7. #7

    Default

    tagging for DL at home


    nice addon function btw


    question.. would it be possible to lets say me leading a raid .. hit a button and stop all 24 others from casting (via escape or stop casting event ??/) LOL


    assuming we all DL'd it n etc and they allowed me on them ..

  8. #8

    Default

    Quote Originally Posted by 'Stix',index.php?page=Thread&postID=53437#post5343 7
    question.. would it be possible to lets say me leading a raid .. hit a button and stop all 24 others from casting (via escape or stop casting event ??/) LOL
    No, I don't think so. Any API that would cancel casting is probably protected, so you can only call it from a secure button / unit frame / etc.
    All my codes r belong to you: wow5box

  9. #9

    Default

    [quote='Chorizotarian',index.php?page=Thread&postID =53440#post53440]

    [quote='Stix',index.php?page=Thread&postID=53437#po st53437]question.. would it be possible to lets say me leading a raid .. hit a button and stop all 24 others from casting (via escape or stop casting event ??/) LOL[/quote]

    No, I don't think so. Any API that would cancel casting is probably protected, so you can only call it from a secure button / unit frame / etc.
    [/quote]Definitely protected. For anyone that wants to know more, take a look at the [url='http://www.wowwiki.com/World_of_Warcraft_API']World of Warcraft Global API[/url] on wowwiki.com. The functions with PROTECTED next to them can only be invoked by a button press on the client itself. All other functions can be called using LibRpc.

    mmm, been thinking about some stuff that one could make with this addon:
    • XP/Faction bars for all party members.
    • Remote global cooldown spark, maybe even with lag compensation. (Might be handy for casters, not really sure).
    • Remote cooldown warning, i.e.: like sct_cooldowns does for your own cooldowns.
    • Quest objective tracking for all party members.
    You can come up with a whole lot more I guess .

  10. #10

    Default

    Very very interesting Addon! I like. Hrm, Finding a use for this will take time but it does seem pretty damn neat.

Similar Threads

  1. I need a new addon
    By Catamer in forum Software Tools
    Replies: 5
    Last Post: 03-01-2009, 02:15 PM
  2. Addon Question, Limit addon to one character?
    By delafoo in forum Macros and Addons
    Replies: 1
    Last Post: 02-15-2009, 10:35 PM
  3. [Addon] OhNoes: Screen Coloring/Alert addon. Updated!
    By Depherios in forum Macros and Addons
    Replies: 18
    Last Post: 08-04-2008, 01:54 PM
  4. Addon
    By strat1219 in forum New Multi-Boxers & Support
    Replies: 1
    Last Post: 06-17-2008, 07:06 PM
  5. Anyone know of an addon that can ...
    By shocktrot in forum Macros and Addons
    Replies: 2
    Last Post: 12-30-2007, 12:57 AM

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •