[SCRIPT] World Edit

  • I have the code-snippets addet to the script, but I not know is this right.



    I testet in SP and I have no errors ..

  • I have the code-snippets addet to the script, but I not know is this right.


    [snip]


    I testet in SP and I have no errors ..


    Less the lack of indentation in your post ( :P ), it seems alright. If there are no errors, and you can fill your selected area with blocks of the specified ID, then yes, it is right :)

  • After you add his code to the world edit script you use /we-fillblock I'd. Like this /we-fillback 57. Of cause this is after you use /we-select

    Yahgiggle Steam Signature, real name Deon Hamilton :thumbsup: Server @ ip 139.99.136.76:4255 Name (The Federation of territory) Unity :thumbsup:

    If at first your code does not work call it version 0.1 with the odd bug :thinking:

    My Own Website




    31245-logo-png
  • Well, for those having any trouble with my proposed addon, here's the entire script for your own personal use, until it is approved and/or officialized :)


    The command is, for example, /we-select then /we-fillblock 121 to fill the area with bricks.


  • Ok i talked to Red and for halfblocks you add 195 to the id so did some testing of my own and found you can change the position of the blocks like so


    195 halfblock bottom
    198 halfblock center
    201 halfblock top


    If your Half Block id is 37 and you want the block at the top you type /we-fillblock 20137
    if the id is, for example, over 100 like say 186 it Would be 20100 + 186 = 20286
    example 2 for Half block Center 198 19800 + 186 = 19986
    example 3 for Half block Bottom 195 19500 + 186 = 19686
    This is the same for All block types with the id over 100


    Full List
    North East South West is to show you what way the block is facing

    NorthEastSouthWestBlock type
    39424548Stair
    51545760Stair type2
    63666972Stair type3
    75788184Stair corner
    87909396 Stair inner corner
    99102105108Ramp
    111114117120Ramp upside down
    123126129132Ramp Half Corner
    135138141144Ramp Inner Corner
    147150153156Ramp Half Corner upside down
    159162165168Ramp Inner Corner upside down
    171174177180Ramp Corner
    183186189192Ramp Corner upside down
    195195195195Half Block bottom
    198198198198Half Block Center
    201201201201Half Block Top
    204207204207Cylinder on its side
    219219219219Pyramid
    222222222222Pyramid upside down


    NorthEastSouthWestBlock type
    225228231234Ramp On Its Side
    237240243246Arc
    249252255258Arc upside down
    261264267270Arc on its side
    273276279282Stair on its side
    285288291294Stair upside down
    297300303306Stair Corner upside down
    309312315318Stair Inner Corner upside down
    003003003003Cylinder
    006009012015Cylinder Half


    This took me some hours guys so a thank you would be nice :-)

    Yahgiggle Steam Signature, real name Deon Hamilton :thumbsup: Server @ ip 139.99.136.76:4255 Name (The Federation of territory) Unity :thumbsup:

    If at first your code does not work call it version 0.1 with the odd bug :thinking:

    My Own Website




    31245-logo-png

    Edited 49 times, last by yahgiggle ().

  • Ok i talked to Red and for halfblocks you add 195 to the id so did some testing of my own and found you can change the prossion of the blocks like so


    195 halfblock bottom
    198 halfblock center
    201 halfblock top


    so if your id was 37 and you want the block at the top you type /we-fillblock 20137


    What if the id is, for example, 186? Would it be 20100 + 186 = 20286 or "201".."186" = 201186 ?


    I am asking as we could amend the command to add optional values to the command arguments, such as


    /we-fillblock id [blocktype [rotation [orientation]]]


    Where

    • blocktype could be one of block, halfblock, reamp, rampcorner, rampcornerhalf, rampcornerinner, cylinder or cylinderhalf (not sure about the other block types) (default block)
    • rotation could be 0, 1, 2, or 3 (where angle = rotation * 90°) (default 0)
    • orientation could be up, side, or down (default up)


    For example


    /we-fillblock 126 ramp 1 down


    to place a ramp upside down, rotated 90 degrees. (Note: only id is mandatory.)


    However, there might be issues with some block types and orientation that must be taken into account when processing the command. For example, cylinders and ramp corners cannot normally be placed sideways, only upward or downward.



  • it would need to be it be 20100 + 186 = 20286



    i like your idea but i think it would be better that we name them like this hb for halfblock sb could be for stair block cb conerblock assb a simple stair block and so on this just cuts down the typing

    Yahgiggle Steam Signature, real name Deon Hamilton :thumbsup: Server @ ip 139.99.136.76:4255 Name (The Federation of territory) Unity :thumbsup:

    If at first your code does not work call it version 0.1 with the odd bug :thinking:

    My Own Website




    31245-logo-png

    Edited 4 times, last by yahgiggle ().

  • They could be aliases; long names = short names. I did not invent these names :) they actually are the ones used in the game itself. (With the command item.)


    yes i under stand this but cant we change this like this $halfblock = "hb" ; i know this is php but does lua do the same sort of thing?

    Yahgiggle Steam Signature, real name Deon Hamilton :thumbsup: Server @ ip 139.99.136.76:4255 Name (The Federation of territory) Unity :thumbsup:

    If at first your code does not work call it version 0.1 with the odd bug :thinking:

    My Own Website




    31245-logo-png
  • If would be, something like


    Code
    if blockType == "block" or blockType == "b" then
    ...
    elseif blockType == "halfblock" or blockType == "hb" then
    ...
    elseif blockType == "ramp" or blockType == "r" then
    ...
    elseif blockType == "stair1" or blocktype == "s" then
    ...
    ...
  • If would be, something like


    Code
    if blockType == "block" or blockType == "b" then
    ...
    elseif blockType == "halfblock" or blockType == "hb" then
    ...
    elseif blockType == "ramp" or blockType == "r" then
    ...
    elseif blockType == "stair1" or blocktype == "s" then
    ...
    ...



    yeah that looks good to me now all you need to do is make us the full script lol i know your just dying to do it hehe man my heads starting to implode just thinking about it

    Yahgiggle Steam Signature, real name Deon Hamilton :thumbsup: Server @ ip 139.99.136.76:4255 Name (The Federation of territory) Unity :thumbsup:

    If at first your code does not work call it version 0.1 with the odd bug :thinking:

    My Own Website




    31245-logo-png
  • yeah that looks good to me now all you need to do is make us the full script lol i know your just dying to do it hehe man my heads starting to implode just thinking about it


    LOL :P


    Yeah.... If the original author can make a Github project out of the script, I could fork it and make a PR for changes... That would make things much easier for everyone. I just don't want to take ownership without permission. Using Git, others could contribute as well.

  • LOL :P


    Yeah.... If the original author can make a Github project out of the script, I could fork it and make a PR for changes... That would make things much easier for everyone. I just don't want to take ownership without permission. Using Git, others could contribute as well.


    i think by all the ad dons you have done to this script you could do your own advanced world edit script and call it your own you only need to change we to something else maybe /lay-block ect ect

    Yahgiggle Steam Signature, real name Deon Hamilton :thumbsup: Server @ ip 139.99.136.76:4255 Name (The Federation of territory) Unity :thumbsup:

    If at first your code does not work call it version 0.1 with the odd bug :thinking:

    My Own Website




    31245-logo-png
  • also if your worried you could say he forked it from the protection script as some of the code he used is from that ie we-select


    not saying he did but thats just a fact about coding some lines need to be the same to get the end result



    or we could just keep it as is and use my chart for the block info haha

    Yahgiggle Steam Signature, real name Deon Hamilton :thumbsup: Server @ ip 139.99.136.76:4255 Name (The Federation of territory) Unity :thumbsup:

    If at first your code does not work call it version 0.1 with the odd bug :thinking:

    My Own Website




    31245-logo-png

  • I would never appropriate someone else's code without having a damn good reason to :) This is what I do for a living (code), and I highly respect the works of others, regardless how much efforts they had put into it. Besides, my additions were mostly copy / paste of the existing code as well.

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!