Signup Now
Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28

    Amulet/Ring Equipper

    Amulet/Ring Equipper


    Description

    Automatically equips a specific ring or amulet.


    Configuration

    Edit the item variable on the init block to specify the item to be equipped, be it a ring or an amulet..


    Code

    init start
    -- local SCRIPT_VERSION = '1.0.0'

    local item = 'life ring' -- Can be a ring or an amulet

    -- DO NOT EDIT BELOW THIS LINE
    item = itemid(item)
    local slot, slotName = $neck, 'neck'
    if itemname(item):lower():find('ring') then
    slot, slotName = $finger, 'finger'
    end
    init end

    auto(100, 200)
    if slot.id ~= item and itemcount(item) > 0 then
    equipitem(item, slotName)
    waitping()
    end

    Git
    Last edited by Raphael; 04-26-2014 at 08:44 PM.

  2. #2
    Free User
    Join Date
    Jan 2014
    Location
    Moscow
    Posts
    6
    Reputation
    10
    Rep Power
    0
    how to right make for Terra amulet?

  3. #3
    Free User
    Join Date
    Jan 2014
    Location
    Moscow
    Posts
    6
    Reputation
    10
    Rep Power
    0
    Done, name terra amulet and neck in line slot, slotName = $finger, 'finger'

  4. #4
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    Quote Originally Posted by Teasher View Post
    Done, name terra amulet and neck in line slot, slotName = $finger, 'finger'
    No, don't touch that line, only the first one.

  5. #5
    Free User Death Brinker's Avatar
    Join Date
    Dec 2013
    Location
    Chile
    Posts
    400
    Reputation
    3
    Rep Power
    0
    Quote Originally Posted by Raphael View Post
    Amulet/Ring Equipper


    Description

    Automatically equips a specific ring or amulet.


    Configuration

    Edit the item variable on the init block to specify the item to be equipped, be it a ring or an amulet..


    Requirements

    • WindBot 1.3.0
    • Lucas Terra's Library 13.8



    Code

    init start
    local item = 'life ring' -- Can be a ring or an amulet

    -- DO NOT EDIT BELOW THIS LINE
    item = itemid(item)
    local slot, slotName = $neck, 'neck'
    if itemname(item):lower():find('ring') then
    slot, slotName = $finger, 'finger'
    end
    init end

    auto(100, 200)
    if slot.id ~= item and itemcount(item) > 0 then
    equipitem(item, slotName)
    waitping()
    end

    Gist
    what about if 3 monsther in the screen put ring if not .. remove ring!

  6. #6
    Moderator Leonardo's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    758
    Reputation
    77
    Rep Power
    22
    You must add a conditional equipper.

    Like:

    Conditions = {
    function() return itemname($neck.id) ~= 'Amulet of Loss' and $hppc <= 10 end,
    function() return $ring.id ~= itemid('might ring') end,
    }

  7. #7
    Banned
    Join Date
    Feb 2014
    Location
    Leetstreet
    Posts
    324
    Reputation
    38
    Rep Power
    0
    Should add that this equips a life ring (or whatever item you choose) regardless of if you're in pz or not.

    To "fix" this simply add to the if statement:
    and $pzone == false

  8. #8
    Banned
    Join Date
    Feb 2014
    Location
    Leetstreet
    Posts
    324
    Reputation
    38
    Rep Power
    0
    Did a small altercation to your code, and it seems to be working well for me but has not been tested very much to be honest.
    I added it when I was sick to the bone of life rings not being removed from hud when equipped, since even 1s equip ruins them in the way you can't sell

    HOWEVER - This only works with life rings for the moment since I haven't had a need for any other kind of item and thus not reseached their IDs etc when worn.


    init start
    local item = 'life ring' -- Can be a ring or an amulet

    -- DO NOT EDIT BELOW THIS LINE
    item = itemid(item)
    local slot, slotName = $neck, 'neck'
    if itemname(item):lower():find('ring') then
    slot, slotName = $finger, 'finger'
    end
    init end

    auto(100, 200)
    local itemcountbefore = itemcount(item)
    if slot.id ~= item and itemcount(item) > 0 then
    equipitem(item, slotName)
    waitping()
    -- Added by Hultin
    -- Removes a item from lootinglist, if a new one has been equipped.
    foreach lootingitem lootingitems do
    if(item == lootingitems.id and slot.id == 3089 and itemcount(item) == (itemcountbefore-1)) then
    print("Equiped, now lets remove muhahaha")
    increaseamountlooted(3052, -1) -- Well, it looks good. Remove it!
    else
    end
    end
    waitping()
    end
    Last edited by Hultin; 03-02-2014 at 07:19 AM.

  9. #9
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    Quote Originally Posted by Hultin View Post
    Did a small altercation to your code, and it seems to be working well for me but has not been tested very much to be honest.
    I added it when I was sick to the bone of life rings not being removed from hud when equipped, since even 1s equip ruins them in the way you can't sell

    HOWEVER - This only works with life rings for the moment since I haven't had a need for any other kind of item and thus not reseached their IDs etc when worn.


    init start
    local item = 'life ring' -- Can be a ring or an amulet

    -- DO NOT EDIT BELOW THIS LINE
    item = itemid(item)
    local slot, slotName = $neck, 'neck'
    if itemname(item):lower():find('ring') then
    slot, slotName = $finger, 'finger'
    end
    init end

    auto(100, 200)
    local itemcountbefore = itemcount(item)
    if slot.id ~= item and itemcount(item) > 0 then
    equipitem(item, slotName)
    waitping()
    -- Added by Hultin
    -- Removes a item from lootinglist, if a new one has been equipped.
    foreach lootingitem lootingitems do
    if(item == lootingitems.id and slot.id == 3089 and itemcount(item) == (itemcountbefore-1)) then
    print("Equiped, now lets remove muhahaha")
    increaseamountlooted(3052, -1) -- Well, it looks good. Remove it!
    else
    end
    end
    waitping()
    end
    You know that if you add it as a supply, it gets counted as used when equipped, right?

  10. #10
    Banned
    Join Date
    Feb 2014
    Location
    Leetstreet
    Posts
    324
    Reputation
    38
    Rep Power
    0
    I clearly did not :P

 

 

Posting Permissions

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