Inactive [MISC] CommandHelper [3.2.0] - Repeat commands! Aliases! Advanced command scripting! [1000]

Discussion in 'Inactive/Unsupported Plugins' started by sk89q, Feb 16, 2011.

  1. Offline


    CommandHelper is a utility plugin for working with commands.

    • Build your own commands without knowing Java or having to make a plugin
    • Repeat your last command with /.
    • Per-player command aliases
    • Global command aliases

    [​IMG] CommandHelper 3.2.0

    [​IMG] Requirements: Java 1.6+ required. Mac OS X users may have to update their Java version. In addition, you need "WorldEdit," but the download linked above has a version with WorldEdit already bundled.


    Pinoyskii, DHLF, beleg and 6 others like this.
  2. Offline


    Im setting up a command so that rollbacks are easier with LogBlock, i know you are part of reddit so you will know what im talking about. I need the commandhelper setup for /lbrb-r. If this makes more sence?
  3. Offline


    Hi, is there a way of escaping the $ signs in commands on the right hand side of an alias definition? I.e. allow a literal $ symbol to be passed?

    My ScrollingMenuSign plugin sometimes needs the $ sign in its commands, and I know at least one user of both our plugins has hit this problem - if he uses a SMS command in a CommandHelper alias, CH has already done a substitution on the $ sign so SMS never gets to see it.
  4. Offline


    Is this what you're looking for?
    /lbrb $p = /lb rollback player $p since 10 days
    /lbrb-r $p $r = /lb rollback player $p area $r since 10 days
    Put it in a string. /cmd = msg('$dollar') or /cmd = /other cmd with '$dollar sign'
  5. Offline


    Is there a way to have a characters name have an alias (not by say shortening the commands individually for every player, but just by setting an alias?)

    Example: /give [charactername] 46 64 but instead, /give [newcharacteralias] 46 64 and it would still work?

  6. Offline


    Yes, thanks!
  7. Offline


    I am trying to change /pex promote <player> to /promote <player> but i always get unknown command.
    Anything special i need to do?
  8. Offline


    This one causes CH to not be able to compile the script
    /mode [$gmode=0] = /gamemode player() $gmode
    I tried many different things, but it seems as soon as it spots the command /gamemode anywhere in the script, it refuses to compile

    Another thing..
    If I need a command that will store the players current world and coordinates, then tp the player to another world and location.. Another command to return the player to the world and location. And both needs to run from the console.. How would I do that?
    I already tried storing and retrieving data previously and ran into unknown errors
  9. Offline


    Er, perhaps I'm missing what you're trying to do, but you can remove the need for the player's name at all by doing something like: /give $item $qty = /give player() $item $qty

    Try: /promote $player = /pex promote $player

    Hmm, post the error you get. When your run /reloadaliases, it should give you a more descriptive error message. Check that, and if you still can't figure it out, post the error here so I can see it.

    When you run a console command, the "current player" isn't defined. So you'll have to explicitly set the player in the function (which will probably be passed in from the command you're running, or perhaps pulled in from a stored value). So, normally when run by a player, ploc() will return that player's location. But if you need to do it from the console, you'll have to explicitly set it, perhaps like so: /get_ploc $player = msg(ploc($player))
  10. Offline


    How wonderful..
    Now that I actually needed the error, it compiled without problems..

    I spent hours the other day trying to compile that without luck.. Wrote it the exact same way today, just on another computer (with windows 7. the one I used the other day is running vista)

    Anyway, I do know how to get the players location.. But last time I tried to store and retrieve data I ran into error after error (the wiki isn't of much help when only few functions have documentation ;))
    The commands will naturally be supplying the players name and, in the case of the first, also the name of a location (so gonna need a third to permanently store locations for that)
    They will be run by citizens NPCs, which is the same as typing them in console

    I will try to make them myself.. But any help, however little it might be, would be very much appreciated

    edit: It seems I can now make working scripts storing and retrieving values..
    However, this will not work as I need it to.. Even though you can get a players world with pworld, there is no way to set the pworld..
    So if I were to get it to work, I'd have to make sure the event location was in the same world as the player.. which it won't be as I need players to be able to join the even from main world, aswell as from our tutorial world (for players not yet approved for our main world)
  11. Offline


    I keep getting this error recently
    Even though I haven't modified any CommandHelper related files lately. Which file is it referring to?
  12. Offline


    It's your config.txt file. However, it shouldn't be throwing a stack trace. The most likely cause is that you have a word with a contraction (for instance, "can't"). Single quotes start and end a string, and in this case you have a starting one, but no ending one.
  13. Offline


    I haven't changed my config.txt lately though, it just randomly started doing that (and there are no quotes in it)
    My config.txt:
  14. Offline


    Gettin' now!
  15. Offline

    Brian Griffin

    Hello, sk89q.
    When build 1337 will be released?
  16. Hopefully a simple question...just wondering how to get access to the built-in commands. I'm told I don't have permission. Since I'm just running a server with a few friends, I'm not using permissions at all - everyone can do whatever they like. I'm listed in ops.txt and permissions.yml is empty. So far this hasn't been a problem with any other plugin.
  17. Offline


    The config issue I mentioned earlier still occurs. I checked the config.txt for any invisible characters that might cause the issue, but there is nothing different about line 3, so it seems to me like there's a bug in CommandHelper.
    It seems to cause the aliases below line 3 to not work (and the alias on line 4 gives "Bukkit sad. Bukkit want you to access command, but Bukkit cannot let you. bukkit will leak tears :'(", not sure why that is as they have permission to the original command)
    They all work for me, but some other people have to use the original commands instead of the aliases.
    I'm starting to think it's the persistance.ser file that's the problem, and it messes up the normal aliases for people with corrupted entries in persistance.ser. However I see no easy way to modify the persistance.ser file, so my only option is to delete every alias, and I don't really want to do that without being sure if it's the problem first. I have however done it just now, so hopefully that solves it.
  18. Offline


    is it possible to craft an if statement that will run different commands from the same alias based on the user's group?

    I'd like to have one command, but have that command warp to different warp points based on what group the user is in that typed the command.
  19. Offline


    Im trying to use command helper with citizens, and when i do the alias
    /questexp $player $skill $amount = runas(~op, '/addxp $player $skill $amount')
    the alias doesn't run as an op. it runs through the player. So when the quest executed this command
    only people who are op get exp. any suggestions?
  20. Offline


    Add the permission to the player first, then take it away afterwards again.
    I really wish mcmmos /addxp would work from console.
    As this is an alias I think I recognise, did you make sure to set the command in your quest file to run as server: false?

    .. And with that question.. You just gave me an idea how to solve a big issue!
    I'll write up something and post it here

    (I tried editing and adding this to above post, but I couldn't paste in this browser)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 9, 2016
  21. Offline


    I did set server:false
    it only runs if i do the quest though. so just give the player permission, restart. take it away, restart and it should be good?
  22. Offline


    @Bedrider923 Aye
  23. Offline


    i did that and now instead of bukkit sad, its getting insufficient mcpermissions?
  24. Offline


    Hi I'm having trouble putting together a particular command. It won't compile the commands and I have tried it the only 2 ways I know. I am trying to make an alias to the multiverse teleport command which has the syntax /mvtp $player $world. If player is not specified it teleports the user. I want to make it use /join but do the same thing except I also want it to assume world name "world" (this part I have gotten working...). The part where I have trouble is getting it to assume the user of the command if no user is specified so far I have tried:
    The Alias Attempts (open)

    /join [$user=player()] [$world=world] = /mvtp $user $world


    /join [$user=user] [$world=world] = /mvtp if(equals($user, 'user'), player(), $user, $user)
    from what I can tell either should work but neither do... any help would be appreciated.
  25. Offline


    Please update it for 1337
  26. Offline


    More that likely it will work. Does it not?
  27. Offline


    Can someone tell me why Im getting insufficient permissions when i run a command as an OP. The alias is an alias i got off citizens forums to grant mcmmo exp.

    edit: where is the link for 1337?
  28. Offline


    That alias seems to not work for all.
    Are you using permissionsbukkit?
  29. Offline


  30. Offline


  31. Offline


    Been having good success with this one today.

    ~Craftsman:/protect [$owner=''] [$size=25] = >>>
        assign(@owner, if(equals($owner,''),player(),$owner))
        assign(@size, min(max(10,$size),50))
        assign(@name, reg_replace('[^a-zA-Z0-9_]','',player()))
        assign(@count, get_value(concat(@name,'_zones')))
        store_value(concat(@name,'_zones'), @count)
        assign(@id, concat('zone_',@name,'_',@count))
        runas(~op,//outset @size)
        runas(~op,//expand vert)
        runas(~op,/region define @id @owner)
        runas(~op,/region flag @id creeper-explosion deny)
        runas(~op,/region flag @id ghast-fireball deny)
        # runas(~op,/region flag @id enderman-grief deny)
        msg(color('green'), 'Protecting all within' @size 'for' @owner)
           tmsg(@owner, color('green'),
                player() 'protected all within' @size 'for you'))
    Any mid-level craft guy (e.g., JoeCrafty) can type /protect Squeeble 20 to make a new region protecting a low-level builder (e.g., Squeeble)'s house. The zone is named 'zone_JoeCrafty_6' if it's his sixth such protection grant.

    I would like to figure out how to handle the case where someone types /protect 25 Jelloman, or /protect 15, getting the order of the arguments wrong.

Share This Page