Posts by yahgiggle

    Moved by me because there is no plugin oO when you have your plugin then make a new post with the plugin added


    please keep your posts in the right areas

    Bump to let you guys know i have updated this script


    you can now keep your chest locked but let some users use it by adding them to your chest


    to add a user type in chat /cp add username id 1234
    to remove a user type in chat /cp delete username id 1234


    my plan is to later use your pin to open the chest but an api update is needed for that.


    the script not only checks pin but also the owner, so this means added users still cannot add other users or anything else

    Chest Protection 1.2


    What does it do
    This plugin protects all new chests that are added to the world after this plugin has been installed
    this means other users cannot steel your stuff or smash your chest even if that chest is outside the protected zones
    you can also have the option to unlock the contents that's inside the chests


    The chest commands are


    /cp = help
    /cp lock id pincode= lock the chest contents, note this is the default setting
    /cp unlock id pincode = unlock the contents of the chest, note if your chest is inside a protected zone the contents will still be locked as before
    /cp add playername id pincode = adding players to a locked chest
    /cp delete playername id pincode = to remove a player from your chest
    /cp unprotect id pincode = to unprotect your chest


    Example 1 /cp unlock 12 1234 = chest contents with id 12 is now unlocked, note that the chest is still protected from been removed or smashed,
    Example 2 /cp add yahgiggle 12 1234 = adding yahgiggle to your chest 12 with pincode 1234 note 1234 is the defult pincode for the chest
    Example 3 /cp delete yahgiggle 12 1234 = removing yahgiggle from your chest


    Note: the user name has to be 100% the same as the in game username if yahgiggle is Yahgiggle then yahgiggle wont work


    also the pin code defult is 1234 i plan to let chest owners change this pin
    Only the chest owner can add and remove users


    All Server Admins can still smash any chest


    Please report any bugs, also note this plugin is still at version one more stuff will be added,


    Also there has been a new small server side update that non steam server owners may need to install for this plugin to work

    But I have the blockplacer installed, in the same folder as the other plugins. Single player mode.
    Steam\steamapps\common\RisingWorld\plugins\BlockPlacer\BlockPlacer.jar


    Is it in the wrong folder?


    ok i just tested it in single player and it works fine


    when you use /delete con in single player or on a server even if the command does not delete anything you get an output of Deleted all Construction
    in the chat box, you did not get this so i noted in your video that you have used your programmable keys to save this command, try doing another video but this time type the command don't use the shortcut key you have made.

    Ok, I am officially confused. I thought the commands "/selectarea", "/select area", "/select" and even "/selectportal" would all be 4 separate commands and the plugins/scripts would only respond to their corresponding one.

    in code you can have lots of commands that do 100% the same thing


    because its goes like this


    if (cmd[0].equals("/select")){
    player.enableAreaSelectionTool();
    player.sendTextMessage("select area tool now enabled");
    }


    if (cmd.length == 2){
    if (cmd[0].equals("/select")){
    if (cmd[1].equals("area")){
    player.enableAreaSelectionTool();
    player.sendTextMessage("select area tool now enabled");
    }
    }
    }


    if (cmd[0].equals("/selectarea")){
    player.enableAreaSelectionTool();
    player.sendTextMessage("select area tool now enabled");
    }




    all 3 commands = player.enableAreaSelectionTool() <----------- this is the real command as such

    ok red51 reply was this


    red51: basically the game just has "one" selection tool. not sure about lua but if you call "player.enableAreaSelectionTool()" in the plugin api multiple times, nothing will happen (just the selection tool gets enabled). which methods do you call exactly?
    Yahgiggle: i use player.enableAreaSelectionTool()
    Yahgiggle: this is what i expected but didint know 100% cheers
    red51: yeah you can basically call this method multiple times, it doesn't matter

    Sorry, I didn't intend to be rude; direct maybe yes, but not rude; if it sounded like this, I apologise.

    This may be a point.
    If it is of any relevance or usefulness, when I still used chat commands for the various functions of my plug-ins, I decided to use a common prefix, which was usually the name of the plug-in (or an acronim for it), reducing the possibility of conflicts ("/gps sethome", "/gps gohome", etc), but still not ruling them out definitely and so, I gave the possibility to change the prefix via plug-in settings, in case another one use (now or in the future) the same string as a prefix or a command.


    Now, I moved everything to GUI, but there is still the (single) command to call up the main GUI entry point; in any case, for this, I still give the possibility to customise it.

    i was going to add GUI but decided that the game will have that built into it fully at some point anyway so no point to it. like i said above, if it turns out that two instance's of the selection tool does run, then i will redo my script to include /pb i have messaged red and im now waiting for a reply

    1) "/selectarea" is definitely a different command than the other two, as event.getCommand().split(" ")[0].equals("/select") will not match it; the other two might end up behaving differently or not according to the way each treats further words after the first.
    2) Are we sure that only one instance of the area selecting tool would be created or there will be several?


    3) Even if they share the same area selecting tool, once the selection completed, each will carry on its own processing of that area; not necessarily what the user may want...


    This is similar to the problem with Java package names (which should ideally be unique world-wide) or with GUID (which are by definition "Globally Unique"). In both cases, some heuristics has been found to manage the problem. It should be much easier in a much more limited domain, like RW chat commands. I am not sure that picking the first string coming to mind and not yet used by another plug-in is such a heuristics...

    several instance's of the selection tool running at once oO i don't think it works like that, but ill ask red51 as thats a good point,
    , saying picking the first string coming to mind is a little rude Miwarre its almost saying i was lazy lol but the tru fact is the frist thing i picked was /bp
    but after all the problems with world edit and users typing the wrong thing like / weplace block /weplace block etc i decided adding /bp to the mix would case more problems than it solves.