Signup Now
Page 4 of 7 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 63
  1. #31
    Moderator Leonardo's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    758
    Reputation
    77
    Rep Power
    22
    Updated to version 1.5.0

    randomcolor
    --[[ options:
    hue = 0-360 or "colorName" (valid string colors: red, yellow, blue, green, orange, cyan, purple, pink, monochrome)
    saturation = 0-100 (distance from gray)
    brightness = 0-100 "dark", "medium", "light" (balance between black and white)
    transparency = 0-100 (transparency duh)
    gradient = true/false (returns colors to use with 'addgradcolors')
    amount = 0-3000 (amount of colors returned)
    ]]--

    init start

    local colorOptions = {
    gradient = true,
    amount = 100,
    hue = 'purple'
    }

    setposition(0, 0)
    setfillstyle('gradient', 'linear', 1, 0, 0, 50, 50)

    init end

    addgradcolors(randomcolor(colorOptions))
    drawshape('rect', 0, 0, 100, 100)


    This will draw a box in your screen with 100 random blue colors filling the shape.

    table.search
    -- enables advanced searching method (extends table.find functionality)

    table.search(tbl, "example", true, true)


    Searches for "example" string in the table tbl, the first true determines if you want to disconsider case sensitive, the second if you want to search partially in another string that doesn't have the exact value, it could return the position for "exampleee" as it contains the string "example" as requested.

    Alternate Invocations

    table.search(tbl, 100, 150, 50)


    Searches for 100 in the table 'tbl' or the first number between 150 and 50.

    Alternate Invocations

    table.search(tbl, true, true)


    Searches for the boolean true in the table 'tbl', you can pass another bool parameter to determine wheter to convert table values to bool to check if they are equal to the one given to search, this doesn't change the table values to boolean.

    Optionally all invocations can be used with an argument for key-value tables.


    botversion
    print(botversion())


    Prints the version of bot as a number like 300 for "3.0.0", basically it parses the variable $botversion, converting into a number. You can pass the parameter to be converted.

    drawvector
    drawvector(50, 50, 25, 25)


    Draws a line in your screen starting from 50:50 going to 25:25, it's just a helper to draw lines.
    Last edited by Leonardo; 11-23-2014 at 02:46 AM.

  2. #32
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    Quote Originally Posted by Leonardo View Post
    Updated to version 1.5.0
    botversion
    print(botversion())


    Prints the version of bot as a number like 300 for "3.0.0", basically it parses the variable $botversion, converting into a number. You can pass the parameter to be converted.
    Please don't implement botversion() this way. If we ever decide to go for a 2.4.11, it will break.

  3. #33
    Moderator Leonardo's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    758
    Reputation
    77
    Rep Power
    22
    Quote Originally Posted by Raphael View Post
    Please don't implement botversion() this way. If we ever decide to go for a 2.4.11, it will break.
    Yeah you're right, I'll fix that problem later.

  4. #34
    Moderator mistgun's Avatar
    Join Date
    Dec 2013
    Location
    Lodz, Poland
    Posts
    1,821
    Reputation
    220
    Rep Power
    26
    ​Great function

    table.search


    • -- enables advanced searching method (extends table.find functionality)
    • table.search(tbl,"example",true,true)

    Last edited by Leonardo; 11-23-2014 at 12:47 PM.

  5. #35
    Moderator Leonardo's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    758
    Reputation
    77
    Rep Power
    22
    Lib updated

    Added: rashidlocation

    if rashidlocation() == 'Carlin' then
    gotolabel('TravelCarlin')
    end


    Possible results are Cities names capitalized: "Carlin", "Svargrond", "Liberty Bay", "Port Hope", "Ankrahmun", "Darashia" or "Edron"

  6. #36
    Free User Flawless's Avatar
    Join Date
    Apr 2014
    Posts
    24
    Reputation
    24
    Rep Power
    0
    Code:
    16:24:40 error in Library file Leonardo.lua:
      ["[itemid('strong mana potion']      = 8..."]:Leonardo.lua:93: ')' expected near ']'
    I've fixed it by myself but there might be people who cant.

  7. #37
    Free User ozzix's Avatar
    Join Date
    Jan 2014
    Location
    Sweden
    Posts
    4,769
    Reputation
    151
    Rep Power
    31
    Quote Originally Posted by Flawless View Post
    Code:
    16:24:40 error in Library file Leonardo.lua:
      ["[itemid('strong mana potion']      = 8..."]:Leonardo.lua:93: ')' expected near ']'
    I've fixed it by myself but there might be people who cant.
    hard to tell anything from that error msg, but there is nothing wrong with itemid('strong mana potion')

    Level Latest Scripts
    250+
    Oramond Sewers [MAGE |RP X1 | RP X2 |RP X3|EK X2 | EK X1]
    200+
    Banuta X2 [MAGE | RP]
    280+
    Roshamuul Mountain [RP]
    280+
    Ferumbras Lair [RP]
    250+
    Roshamuul North Silencers [RP]

  8. #38
    Free User Flawless's Avatar
    Join Date
    Apr 2014
    Posts
    24
    Reputation
    24
    Rep Power
    0
    Quote Originally Posted by ozzix View Post
    hard to tell anything from that error msg, but there is nothing wrong with itemid('strong mana potion')
    There's a ")" missing after strong mana potion. the currently code is:

    Code:
    [('strong mana potion']
    instead of

    Code:
    [('strong mana potion')]

  9. #39
    Free User ozzix's Avatar
    Join Date
    Jan 2014
    Location
    Sweden
    Posts
    4,769
    Reputation
    151
    Rep Power
    31
    Quote Originally Posted by Flawless View Post
    There's a ")" missing after strong mana potion. the currently code is:

    Code:
    [('strong mana potion']
    instead of

    Code:
    [('strong mana potion')]
    but where are you reading this? i can't find it

    Level Latest Scripts
    250+
    Oramond Sewers [MAGE |RP X1 | RP X2 |RP X3|EK X2 | EK X1]
    200+
    Banuta X2 [MAGE | RP]
    280+
    Roshamuul Mountain [RP]
    280+
    Ferumbras Lair [RP]
    250+
    Roshamuul North Silencers [RP]

  10. #40
    Free User Flawless's Avatar
    Join Date
    Apr 2014
    Posts
    24
    Reputation
    24
    Rep Power
    0
    Quote Originally Posted by ozzix View Post
    but where are you reading this? i can't find it
    Line 93

    Code:
    local lootParse_itemsExceptions = {
    	[itemid('mana potion')]            = 50,
    	[itemid('health potion')]          = 45,
    	[itemid('strong mana potion']      = 80,
    	[itemid('strong health potion')]   = 100,
    	[itemid('great mana potion')]      = 120,
    	[itemid('great health potion')]    = 190,
    	[itemid('great spirit potion')]    = 190,
    	[itemid('ultimate health potion')] = 310,
    }

 

 

Posting Permissions

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