Results 1 to 3 of 3

Thread: Switching from SPEARS to LONGSWORD.

  1. #1
    Normal User
    Join Date
    Oct 2012
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5

    Question Switching from SPEARS to LONGSWORD.

    Hello
    I have a problem. I want to make a hotkey that changes my weapon from Spears to Longsword if I have 1 spear and switching it back when I got 3 spears in bp.
    I have 3 actions and it dosent work, can somebody check what am doing wrong?

    Switch weapon:
    Code:
    if weapon == itemid("spear") and weaponamount <= meleeon then
    moveitems("longsword", "all", "weapon", 1) wait(500)
    end
    Movespears:
    Code:
    if itemcount('spear', mainBP) >= spearsback then
    moveitems('spear', mainBP, "weapon", spearsback)
    end
    Stop spears:
    Code:
    if cap > captonotloot then
    setsettings('Settings\\Looting\\List\\Spear\\Destination','00')
    else
    setsettings('Settings\\Looting\\List\\Spear\\Destination','10')
    end
    Also I have added in Setup:
    Code:
    -- Spears --
    captonotloot = 60 --cap to not loot spears
    meleeon = 4 --amount of spears to take longsword
    spearsback = 5 --spears to switch from melee to range

  2. #2
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9
    PHP Code:
    if (weapon == itemid("spear")) and (weaponamount <= meleeonthen
        moveitems
    ("longsword","all","weapon",1)
    elseif (
    weapon == itemid("longsword")) and (itemcount("spear") >= spearsbackthen
        moveitems
    ("spear","all","weapon",100)
    elseif (
    weapon == itemid("spear")) and (itemcount("spear") > 0then
        moveitems
    ("spear","all","weapon",100)
    end 
    Your stop loot spear script should work, make sure Spear is spelled Spear with capital S in the looting.

  3. #3
    Normal User
    Join Date
    Oct 2012
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    I have changed from "spear" to "Spear" in looting but nothing fixed. It still dosen't change Spears to Longsword. Any ideas?

Posting Permissions

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