Auto Arguments #31


  • Enhancment
  • Accepted
Open
Assigned to _ForgeUser7448041
  • bryanschmidty created this issue May 9, 2012

    I would like to suggest that the script accept automatic arguments based on the item the player is holding at the time the script is ran.  I imagine that you could pass 3 or more arguments: <itemID> <itemData> <itemName> and maybe damage info, enchantment info, etc?

    An example of use would be:
    /sbcreate [@bypass /sell <itemID>] [/broadcast <player> just sold <itemName>]

  • bryanschmidty added the tags New Enhancment May 9, 2012
  • _ForgeUser7448041 posted a comment May 9, 2012

    it shouldn't be difficult to add ! I'll see if I can do it !

  • _ForgeUser7448041 removed a tag New May 9, 2012
  • _ForgeUser7448041 added a tag Accepted May 9, 2012
  • bryanschmidty posted a comment May 9, 2012

    Sweet! And I just thought of a few extra arguments too: <itemAmtHand> = the amount of that item in hand; <itemAmtInventory> = the amount of that item in inventory

    Sorry, my mind keeps thinking of more possibilities, lol.


    Edited May 9, 2012
  • _ForgeUser7448041 posted a comment May 9, 2012

    @bryanschmidty: Go

    Possibilities are endless but my time is not ! I have thousand of things I want to add, but I can't... ! so don't be too much creative lol... thanks !

  • bryanschmidty posted a comment May 9, 2012

    No worries. I completely understand. Do you have a repository that you wouldn't mind giving me read access to? I would love to help take a bit of the load off if I can code a few features.

  • _ForgeUser7448041 posted a comment May 10, 2012

    I'm working on an API that will provide the possibilities to easily, add options, or bind script to any bukkit event, I should release it soon !

    anyway, I released a part of the source code on the main page ( look at the comments ) ! but don't try to mod it atm, some things may change !

  • bryanschmidty posted a comment May 10, 2012

    That sounds awesome! I will keep an eye out for the API. Keep up the good work :)

  • _ForgeUser7448041 posted a comment May 15, 2012

    @bryanschmidty: Go

    I'm don't think this script will work :


    /sbcreate [@bypass /sell <itemID>] [/broadcast <player> just sold <itemName>]


    because if you sell the item, then your item is no longer hold by the player, so it can't return the itemName !


    More... if the player doesn't have an item in hand, then the /sell command won't work, and the broadcast message with an empty itemName will also be sent !

  • bryanschmidty posted a comment May 15, 2012

    @Shereis: Go

    I was under the impression that these arguments would be passed to the script at the time that it was executed. So, you left-click the block with cobblestone and immediately, the script receives the data value of the block, stores it, and uses that throughout the rest of the script.

    I understand the second part, and that would be harder to get around, but I don't see it as an issue. I would plan on linking this script to a sign that says "Click here with the item you wish to sell". So if nothing is sold, it is the user's fault, and not the script's.

  • _ForgeUser7448041 posted a comment May 17, 2012

    @bryanschmidty: Go

    however placing the broadcast message before the sell commands, will works...

    if I have the time, I will see if I can store the items infos for this feature.


    Edited May 17, 2012

To post a comment, please login or register a new account.