Get an Epic Experience with Premium

LibSlash

Development Tools Login to Add Favorites
  • 1 Like
  • Warhammer Online
  • 335 Monthly Downloads
  • Supports: 1.3.5
  • 482,299 Total Downloads
  • Updated 05/19/2010
  • Created 08/19/2008
  • 1,226 Favorites
  • Project Site
  • Comments
  • Release Type: Mature
  • License: MIT License
  • Newest File: v3.0-release
or

About LibSlash

A basic library for registering slash commands in the WAR interface.

If you're downloading this because an addon you want to use requires it, just extract it into the interface\addons directory, and that's all you need to do.

With LibSlash installed, you'll also be able to use /addon or /uimod to open the Addons window in-game.


If you're writing an addon and want to utilize LibSlash, place it in the proper addons directory along with your other addons. Then, add it as a dependency in your addon's .mod file, like so:

<Dependencies>
    <Dependency name="LibSlash" />
</Dependencies>

This will ensure that LibSlash is loaded before your addon, so that its functions will be available for use.

To register a slash command handler, call LibSlash.RegisterSlashCmd() with the slash command you want to register (a string, NOT INCLUDING THE /) and a function to serve as the handler:

LibSlash.RegisterSlashCmd("myslash", function(input) MyAddonHandleSlash(input) end)

The single argument passed to the handler is a string containing the rest of the chat line entered after the initial slash command, so the above code would call MyAddonHandleSlash with an argument of "testing" if I typed "/myslash testing" at the command line.

Alternatively, LibSlash.RegisterWSlashCmd() can be used to register a handler to receive a wstring version of the chat line, instead of having it automatically translated to a string.

To unregister a slash command, use LibSlash.UnregisterSlashCmd("myslash") - the only argument it takes is a string specifying the slash command to unregister. You can also use LibSlash.IsSlashCmdRegistered("myslash") to see if a slash command is already registered, possibly by another addon.

Both the register and unregister functions will return true on success, or false on failure for any reason such as attempting to register a slash command which is already registered, or other silly things.

------------------------------------------------------------------------
r56 | aiiane | 2010-05-19 18:15:17 +0000 (Wed, 19 May 2010) | 1 line
Changed paths:
   A /tags/v3.0-release (from /trunk:55)

Tagging as v3.0-release
------------------------------------------------------------------------
r55 | aiiane | 2010-05-19 18:12:20 +0000 (Wed, 19 May 2010) | 1 line
Changed paths:
   M /trunk/LibSlash.mod
   A /trunk/LibSlash.xml
   A /trunk/tint_square.tga

Added tint_square to replace texture lost in 1.3.5.
------------------------------------------------------------------------

Comments

First Previous Page 1 of 10 Next Last
  • #149
    Any chance for an update for the latest version of WAR?
  • #148
    Thank you for making this. :)
  • #146
    update ?
  • #145
    Is there like a library where we can see all the slash commands and what they do and for what addon?
    Please PM me with answer.
  • #144
    Can libslash have a command to print all currently registered slash commands to chatwindow in order of mod?
  • #142
    Could you please remove the text "release" from your File Names for the sake of Curse Client. It makes it much easier to see the version of the addon and adds to the Aesthetic of it. Thanks!
  • #141
    I just reloaded the new libslash and now it appears everything is working fine. In fact now even my old mods that were not working are working. So it was probably something with the new Warhammer UI. Because it was showing the latest libslash and other mods before I camped, the folder showed they were there, but camping and logging back in made it all golden.
  • #140
    It might be the new features from Warhammers UI, but I uploaded all the upto date mods (probably half of them) that I use and I am not getting any / commands including /addon or /unimod to work. No matter what addon I use with a slash / command before it, it is not recognizing it. I downloaded the new Libslash and none of those old slash commands are now working. I'm gonna have to go back to the older version of libslash and see if this helps.
  • #137
    ok, semi noob here. Can Libslash unregister a mythic slash command, or re-register it to something else? I'm looking for a way to disable /rel. Thanks
  • #138
    It could override it, yes.

    If you put this in a macro, running the macro would disable "/rel" until the UI was reloaded/you quit the game:

    /script LibSlash.RegisterSlashCmd("rel", function() end)

    (If you wanted it to last between sessions, you'd have to put it into an actual addon code file to run each time the game started.)
  • #139
    Thanks A bunch Aiiane, you truly are the Mod Queen.
  • #136
    I just installed this addon and am not experiencing any bugs whatsoever, and everything is moving around in my bags just fine. The other addons I am using are squared, State of the Realm, and Think Out Loud.
  • #134
    I confirm this bug :

    "As of patch 1.2 the addon now locks all the items in the bag. I have tested all the addons i have and seems the bags lock only when i have libslash even if i dont use any other addons."

    I have the same problem, exactly. I have tested each addons, and I found that the cause of this problem was LibSlash.
    I uninstall all my addons except LibSlash and the bug was persistant.

    If LibSlash is enable, I can't move my items in my bags. So yes, unfortunately there is a bug with LibSlash and this version of Warhammer :(
  • #135
    No, sorry, but it's not.
  • #132
    After doing some testing, have determined that LibSlash is the cause behind why am getting ton of lagspikes, disconnects and crashes after the 1.2 patch and fixes.

    Thx.

    ps. Also noticed that when Libslash installed my loading time from is slow even when loading zones (where some of the CTD's have happened).
  • To post a comment, please login or register a new account.
Login to Curse

Don't have an account? Create One.

Get an epic experience with Curse Premium
  • Faster addon downloads
  • Premium-Only Beta Giveaways
  • Ad-Free Curse experience
  • Premium Curse Client
  • and many More Features
  • Learn More »

Maingear

ENTER NOW