Signup Now
Page 3 of 6 FirstFirst 12345 ... LastLast
Results 21 to 30 of 60
  1. #21
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,440
    Reputation
    283
    Rep Power
    27
    @danielcb

    Dude, you don't quote the main post.
    Ever.

    About your doubt, I didn't get it.
    RaphSeller
    PayPal Instantaneous Reseller


    raphseller.com

  2. #22
    Free User Dani Scripts's Avatar
    Join Date
    Dec 2013
    Location
    Mexico
    Posts
    558
    Reputation
    56
    Rep Power
    22
    @Rahpael

    Sorry man, jeje i already learned what i was asking for xD thanks for ur tutorial
    Last edited by Dani Scripts; 02-26-2014 at 04:46 PM.

  3. #23
    Banned
    Join Date
    Feb 2014
    Location
    Leetstreet
    Posts
    324
    Reputation
    38
    Rep Power
    0
    I would like to point out that while this is a great tutorial, there is something that wasn't mentioned as far as I could see.

    And that is that lineedit values are ALWAYS returned as strings, so if you want to compared it to, lets say, $cap or itemcount() for example, you need to $cap <= tonumber(getuseroption("myoption"))

    Small thing that might help newbies out

  4. #24
    Free User Jesusz0r's Avatar
    Join Date
    Dec 2013
    Location
    Spain
    Posts
    278
    Reputation
    70
    Rep Power
    21
    Is there any way to get the user option as a global variable?
    adding it in a persistent hotkey will work as a global variable?
    Last edited by Jesusz0r; 03-19-2014 at 11:29 PM.

  5. #25
    Free User
    Join Date
    Mar 2014
    Posts
    115
    Reputation
    10
    Rep Power
    21
    How i change the ammount of manas to buy/leave on supplylist getting it from user options?
    Did I explained myself?

  6. #26
    Free User
    Join Date
    Apr 2014
    Location
    Netherlands
    Posts
    219
    Reputation
    13
    Rep Power
    20
    Hello,

    Is there any way to make and read settings like this?

    JSON CODE:
    Code:
    {
    	"type"     	: "group",
    	"name"     	: "userings",
    	"text"	: "Ring Setup",
    	"children" 	: [
    		{
    			"type"        : "checkbox",
    			"name"        : "stealthring",
    			"text"        : "Do you want to use a stealth ring?"
    		},
    		{
    			"type"  : "spinbox",
    			"name"  : "ringamount",
    			"text"  : "Amount of rings to take",
    			"min"	: 1,
    			"max"	: 5,
    			"value" : 3
    		},
    		{
    			"type"  : "spinbox",
    			"name"  : "ringmonsteramount",
    			"text"  : "Amount of creatures",
    			"min"	: 1,
    			"max"	: 10,
    			"value" : 2
    		},
    
    >>>> HERE THE TYPE OF CREATURES <<<< so they can choose which creatures, like Rats/Poison Spiders/Wolfs etc
    
    	]
    }
    And read it like this:


    Monsters = {TYPE OF CREATURES}


    Yours,

  7. #27
    Free User
    Join Date
    Apr 2014
    Location
    Netherlands
    Posts
    219
    Reputation
    13
    Rep Power
    20
    Quote Originally Posted by elspaki View Post
    How i change the ammount of manas to buy/leave on supplylist getting it from user options?
    Did I explained myself?
    It's done like this:

    Code:
    auto (1000,2000) setsetting('Supplies/Items/mana potion/UpTo', 'getuseroption('manastobuy')')
    make it a persistent.

    You can right click the setting to get the settingpath

  8. #28
    Free User
    Join Date
    Apr 2014
    Location
    Netherlands
    Posts
    219
    Reputation
    13
    Rep Power
    20
    Hello @Raphael ,

    I was searching the web trying to find out a bit more about jAson but I can't find any clear explenations/tutorials. (crying about all the info at w3c)

    For example. the functionallity of:

    {
    "type": "scriptinfo",
    "name": "Random Text",
    "version": "1.0"
    }


    It's working because of how windbot reads and processes those values?
    I mean type, name and version... not the values attached to them. just like child, min, max etc.
    or can you put anything there if I'd use it outside of windbot?

    Ty,

  9. #29
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,440
    Reputation
    283
    Rep Power
    27
    Quote Originally Posted by Tanochi View Post
    Hello,

    Is there any way to make and read settings like this?

    JSON CODE:
    Code:
    {
    	"type"     	: "group",
    	"name"     	: "userings",
    	"text"	: "Ring Setup",
    	"children" 	: [
    		{
    			"type"        : "checkbox",
    			"name"        : "stealthring",
    			"text"        : "Do you want to use a stealth ring?"
    		},
    		{
    			"type"  : "spinbox",
    			"name"  : "ringamount",
    			"text"  : "Amount of rings to take",
    			"min"	: 1,
    			"max"	: 5,
    			"value" : 3
    		},
    		{
    			"type"  : "spinbox",
    			"name"  : "ringmonsteramount",
    			"text"  : "Amount of creatures",
    			"min"	: 1,
    			"max"	: 10,
    			"value" : 2
    		},
    
    >>>> HERE THE TYPE OF CREATURES <<<< so they can choose which creatures, like Rats/Poison Spiders/Wolfs etc
    
    	]
    }
    And read it like this:


    Monsters = {TYPE OF CREATURES}


    Yours,
    No, not really a way to do that. You could make it a lineedit widget, tell the user to input the names as a comma-separated list and simply do:

    local Monsters = string.explode(getuseroption('...'), ',')


    That doesn't give you much control over the input though and will probably cause you problems with users mistyping stuff.

    Quote Originally Posted by Tanochi View Post
    Hello @Raphael ,

    I was searching the web trying to find out a bit more about jAson but I can't find any clear explenations/tutorials. (crying about all the info at w3c)

    For example. the functionallity of:

    {
    "type": "scriptinfo",
    "name": "Random Text",
    "version": "1.0"
    }


    It's working because of how windbot reads and processes those values?
    I mean type, name and version... not the values attached to them. just like child, min, max etc.
    or can you put anything there if I'd use it outside of windbot?

    Ty,
    JSON is simply a way to pass data. Theoretically, anything can go within it. The purpose though, is that each piece of software defines a basic structure so that a specific kind of data can be transferred following a common pattern
    RaphSeller
    PayPal Instantaneous Reseller


    raphseller.com

  10. #30
    Free User Wesker's Avatar
    Join Date
    Dec 2013
    Posts
    462
    Reputation
    -65
    Rep Power
    0
    how can i obtain a spcific value under that list seems getuseroption('value',itemid) doesnt exist

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •