Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: change weapon

  1. #1
    iBot User
    Join Date
    Apr 2013
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    5 Post(s)
    Reputation
    10
    Rep Power
    4

    change weapon

    Code:
    --changeweapon Engine:
    if (changeweapon == ("yes"))then
        
    if target.name = "Wyvern" then
    
    if  weapon ~= itemid("Wand of Defiance") then
        moveitems("Wand of Everblazing", "all", "weapon", 1)
        end
    
    else
    
    if weapon ~= itemid("Wand of Everblazing") then
        moveitems("Wand of Defiance", "all", "weapon", 1)
        end
    
    end
    engine

    Code:
    -- Change weapon to fire when Wyvern
    changeweapon = ("yes")
    Dont work with dubble == at if target.name == "Wyvern" then either

    This dont work as well :P
    Code:
    --changeweapon Engine:
    if (changeweapon == ("yes"))then
        
    if target.name = "Wyvern" then
    
    if  weapon ~= itemid("Wand of Everblazing") then
        moveitems("Wand of Everblazing", "all", "weapon", 1)
        end
    
    else
    
    if weapon ~= itemid("Wand of Defiance") then
        moveitems("Wand of Defiance", "all", "weapon", 1)
        end
    
    end

  2. #2
    Moderator Drakke's Avatar
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,898
    Mentioned
    216 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    390 Post(s)
    Reputation
    366
    Rep Power
    10
    Missing an 'End' as far as I can see, four If's and only three End's

  3. #3
    iBot User
    Join Date
    Apr 2013
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    5 Post(s)
    Reputation
    10
    Rep Power
    4
    Quote Originally Posted by Drakke View Post
    Missing an 'End' as far as I can see, four If's and only three End's
    Code:
    --changeweapon Engine:
    if (changeweapon == ("yes"))then
        
    if target.name = "Wyvern" then
    
    if  weapon ~= itemid("Wand of Defiance") then
        moveitems("Wand of Everblazing", "all", "weapon", 1)
        end
    
    else
    
    if weapon ~= itemid("Wand of Everblazing") then
        moveitems("Wand of Defiance", "all", "weapon", 1)
        end
    end
    end
    Like this?

  4. #4
    iBot User
    Join Date
    Apr 2013
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    5 Post(s)
    Reputation
    10
    Rep Power
    4
    Quote Originally Posted by Drakke View Post
    Missing an 'End' as far as I can see, four If's and only three End's
    Code:
    --changeweapon Engine:
    if (changeweapon == ("yes"))then
        
    if target.name = "Wyvern" then
    
    if  weapon ~= itemid("Wand of Defiance") then
        moveitems("Wand of Everblazing", "all", "weapon", 1)
        end
    end
    else
    
    if weapon ~= itemid("Wand of Everblazing") then
        moveitems("Wand of Defiance", "all", "weapon", 1)
        end
    end
    this dosent work as well... :/

  5. #5
    Moderator Drakke's Avatar
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,898
    Mentioned
    216 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    390 Post(s)
    Reputation
    366
    Rep Power
    10
    Lua Code:
    --changeweapon Engine:
    if (changeweapon == ("yes"))then
     
    if target.name = "Wyvern" then
     
    if  weapon ~= itemname("Wand of Defiance") then
        moveitems("Wand of Everblazing", "all", "weapon", 1)
        end
    else
     
    if weapon ~= itemname("Wand of Everblazing") then
        moveitems("Wand of Defiance", "all", "weapon", 1)
        end
    end
    end


    Do you get any errors in debug?

  6. #6
    iBot User
    Join Date
    Apr 2013
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    5 Post(s)
    Reputation
    10
    Rep Power
    4
    where do i find debug? i klick on it but cant find the file

  7. #7
    Moderator Drakke's Avatar
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,898
    Mentioned
    216 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    390 Post(s)
    Reputation
    366
    Rep Power
    10
    Quote Originally Posted by loooken View Post
    where do i find debug? i klick on it but cant find the file
    On the iBot window > Help > Debug > It should open a new window

  8. #8
    iBot User
    Join Date
    Aug 2012
    Posts
    805
    Mentioned
    18 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    38 Post(s)
    Reputation
    180
    Rep Power
    7
    try this:

    Lua Code:
    --changeweapon Engine:
    if (changeweapon == ("yes"))then
        if target.name = "Wyvern" then
    		if weapon ~= itemid("Wand of Defiance") then
    			moveitems("Wand of Everblazing", "all", "weapon", 1)
    		end
    	else
    		if weapon ~= itemid("Wand of Everblazing") then
    			moveitems("Wand of Defiance", "all", "weapon", 1)
    		end
    	end
    end

  9. #9
    iBot User
    Join Date
    Apr 2013
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    5 Post(s)
    Reputation
    10
    Rep Power
    4
    Quote Originally Posted by shanp View Post
    try this:

    Lua Code:
    --changeweapon Engine:
    if (changeweapon == ("yes"))then
        if target.name = "Wyvern" then
    		if weapon ~= itemid("Wand of Defiance") then
    			moveitems("Wand of Everblazing", "all", "weapon", 1)
    		end
    	else
    		if weapon ~= itemid("Wand of Everblazing") then
    			moveitems("Wand of Defiance", "all", "weapon", 1)
    		end
    	end
    end
    Quote Originally Posted by Drakke View Post
    On the iBot window > Help > Debug > It should open a new window


    I did tried window-help-debug. Nothing happen.

    I will test the script tomorrow mr thank you for the time so long!

  10. #10
    Moderator Drakke's Avatar
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,898
    Mentioned
    216 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    390 Post(s)
    Reputation
    366
    Rep Power
    10
    Lua Code:
    --changeweapon Engine:
    if (changeweapon == ("yes")) and target.name == 'Wyvern' then
     
    if  weapon ~= itemname("Wand of Defiance") then
        moveitems("Wand of Everblazing", "all", "weapon", 1)
        end
    else
     
    if weapon ~= itemname("Wand of Everblazing") then
        moveitems("Wand of Defiance", "all", "weapon", 1)
        end
    end

Posting Permissions

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