Signup Now
Results 1 to 8 of 8

Thread: Switch Weapon?

  1. #1
    Free User Kociii's Avatar
    Join Date
    Dec 2013
    Posts
    150
    Reputation
    10
    Rep Power
    21

    Switch Weapon?

    Could any create a script that switch to a weapon when an amount of small stones left?

  2. #2
    Free User Turc's Avatar
    Join Date
    Dec 2013
    Location
    Poland
    Posts
    33
    Reputation
    12
    Rep Power
    0

    Post

    How it works? If small stone less than 10,it change weapon to 10 spear from your blue backpack to right hand.


    auto (100)
    if $rhand.count < 10 then
    equipitem('spear', 'rhand',' blue backpack', 10)
    end
    @Forgee, Thanks dude!
    Last edited by Turc; 12-17-2013 at 02:43 PM.

  3. #3
    Free User Forgee's Avatar
    Join Date
    Dec 2013
    Location
    Sweden
    Posts
    5
    Reputation
    16
    Rep Power
    0
    I'm just getting into scripting for this bot, but I think this should do the trick. If you have minAmount or less stones it will look for melee weapon in all open windows and equip it. If you got melee weapon equiped and atleast maxAmount of stones it will eqip them instead. It should work with any 1-handed distance and melee weapons. Just set the ids you want to use. It does not equip the stones you loot, I assume you already have that worked out. If not I believe you have my skype or just post here.

    Anyone know what tags I can wrap the code in (except [code] and [php])?
    init start
    local melee = 0 -- id of melee weapon
    local smallStone = 0 -- id of small stone
    local minAmount = 5 -- amout to equip melee
    local maxAmount = 10 -- amount to equip stones

    if smallStone == 0 or melee == 0 then
    printerror("You must specify the weapon ids.")
    end
    init end

    auto(500, 1000)

    if $rhand.id == smallStone and $rhand.count <= minAmount then
    equipitem(melee, 'rhand')
    wait(500, 1000)
    elseif $rhand.id == melee and itemcount(smallStone) >= maxAmount then
    equipitem(smallStone, 'rhand')
    wait(500, 1000)
    end


    P.S Turc, you forgot the 'then'.
    Last edited by Forgee; 12-17-2013 at 02:55 PM. Reason: added lua code tags

  4. #4
    Banned
    Join Date
    Dec 2013
    Location
    Barcelona
    Posts
    924
    Reputation
    22
    Rep Power
    0
    Thanks @Forgee, gonna try it soon and tell you how it's working!

    EDIT: @Mention not working?

  5. #5
    Wind Powered
    Join Date
    Dec 2013
    Location
    dvscripts.com
    Posts
    7,105
    Reputation
    433
    Rep Power
    39
    Forgee use

    Code:
    [.lua][/lua]
    [.lua] without (.) dot

  6. #6
    Free User Forgee's Avatar
    Join Date
    Dec 2013
    Location
    Sweden
    Posts
    5
    Reputation
    16
    Rep Power
    0
    Quote Originally Posted by Dworak View Post
    Forgee use

    Code:
    [.lua][/lua]
    [.lua] without (.) dot
    Thank you.

    Quote Originally Posted by Xeromex View Post
    Nice to see you here Forgee, the LUA king
    Sush you.
    Last edited by Forgee; 12-17-2013 at 02:58 PM.

  7. #7
    Free User Xeromex's Avatar
    Join Date
    Dec 2013
    Posts
    160
    Reputation
    15
    Rep Power
    21
    Nice to see you here Forgee, the LUA king

  8. #8
    Free User
    Join Date
    Dec 2016
    Posts
    11
    Reputation
    10
    Rep Power
    0

    Help Plx :D

    Hello people, could you please help me?
    I need an action to change the weapon when it ends the enchantment for another that is enchanted in bp.
    Ex: I have 3 axes enchanted. when one finishes pulling a new one. Is there an action for this?

 

 

Posting Permissions

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