Results 1 to 9 of 9

Thread: Silk cutter!

  1. #1
    Normal User
    Join Date
    May 2013
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    16
    Rep Power
    4

    Please help me wtih action!

    Hello, i would like some help with spider silk cutter.
    It works great but only problem is if there is a field, for example poison field on the spot it just tries to cut/move even tho it doesn't need to. Could some kind soul please help me?


    Code:
    ----[Cut Spider Silk]----
    
    local X,Y,Z = 32919,32525,8 --change the coordenate here dont use space 
    
    local weaponTOuse = "machete" 
    
    
    
    --dont change below 
    
    local Break = { 183, 2295, 2296, 7538, 7539 } 
    
    while toptileitem(X,Y,Z) ~= 183 and toptileitem(X,Y,Z) ~= 189 do 
    
    moveitems(toptileitem(X,Y,Z), ground(X,Y,Z), ground(posx,posy,posz), 100) 
    
    wait(500) 
    
    toptileitem(X,Y,Z) 
    
    end 
    
    
    
    for i,j in pairs(Break) do 
    
       while toptileitem(X,Y,Z) == Break[i] do 
    
          useitemon(weaponTOuse,X,Y,Z) 
    
          wait(400,500) 
    
       end 
    
    end
    Last edited by goran21; 06-13-2013 at 05:07 PM.

  2. #2
    Normal User
    Join Date
    May 2013
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    16
    Rep Power
    4
    Anyone?

  3. #3
    iBot User Ragekemi's Avatar
    Join Date
    Sep 2012
    Posts
    300
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Reputation
    15
    Rep Power
    5
    Code:
    local Break = { 183, 2295, 2296, 7538, 7539 }
    Check if any one those ID's isnt the poison field one... :P

  4. #4
    Normal User
    Join Date
    May 2013
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    16
    Rep Power
    4
    Quote Originally Posted by Ragekemi View Post
    Code:
    local Break = { 183, 2295, 2296, 7538, 7539 }
    Check if any one those ID's isnt the poison field one... :P
    Yes Poison field id are 2121.

  5. #5
    Normal User xavizus's Avatar
    Join Date
    Jun 2013
    Location
    Japan
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    18
    Rep Power
    4
    Something that you could do are a check if there are any field at the tile.
    Example:
    PHP Code:
    for i,j in pairs(Break) do 
       while 
    not toptileitem(X,Y,Z) == *Poison Field ID here* do
          while 
    toptileitem(X,Y,Z) == Break[i] do 
             
    useitemon(weaponTOuse,X,Y,Z
             
    wait(400,500
          
    end 
       end
    end 

  6. #6
    Normal User
    Join Date
    May 2013
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    16
    Rep Power
    4
    Sorry but with that change it doesn't cut at all

    Id for closed silk are 183, id for open silk are 189 and id for poison field are 2121.
    And as I said for now it is working great just when i get a poison field at the spot it have to wait for it to disappear before it can continue, and it would be better if I could find a way for it to just handle 2121 the same as 189.
    But i don't have the knowledge to fix it
    Last edited by goran21; 06-13-2013 at 12:17 PM.

  7. #7
    Normal User
    Join Date
    May 2013
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    16
    Rep Power
    4
    I don't have to use this action if someone have or can make an action that is similar thats move items if necessary and then cuts and if field don't cut or move items. Ive search but haven't found anyone better then this yet...

  8. #8
    Normal User xavizus's Avatar
    Join Date
    Jun 2013
    Location
    Japan
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    18
    Rep Power
    4
    Quote Originally Posted by goran21 View Post
    I don't have to use this action if someone have or can make an action that is similar thats move items if necessary and then cuts and if field don't cut or move items. Ive search but haven't found anyone better then this yet...
    PHP Code:
    for i,j in pairs(Break) do  
          while 
    toptileitem(X,Y,Z) == Break[i] do  
               if(
    not toptileitem(X,Y,Z) == 2121then
                    useitemon
    (weaponTOuse,X,Y,Z)  
                    
    wait(400,500)  
               
    end
          end   
    end 

  9. #9
    Normal User
    Join Date
    May 2013
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    16
    Rep Power
    4
    Sorry it doesn't cut at all with that. But thanks for your effort i really appreciate you trying to help.

    Edit:

    Solved! for those who are interested this worked atleast twice:
    Code:
    ----[Cut Spider Silk]----
    
    local X,Y,Z = 32919,32525,8 --change the coordenate here dont use space 
    
    local weaponTOuse = "machete" 
    
    
    
    --dont change below 
    
    local Break = { 183, 2295, 2296, 7538, 7539 } 
    
    while toptileitem(X,Y,Z) ~= 183 and toptileitem(X,Y,Z) ~= 189 and toptileitem(X,Y,Z) ~= 2121 do 
    
    moveitems(toptileitem(X,Y,Z), ground(X,Y,Z), ground(posx,posy,posz), 100) 
    
    wait(500) 
    
    toptileitem(X,Y,Z) 
    
    end 
    
    
    
    for i,j in pairs(Break) do 
    
       while toptileitem(X,Y,Z) == Break[i] do 
    
          useitemon(weaponTOuse,X,Y,Z) 
    
          wait(400,500) 
    
       end 
    
    end
    Last edited by goran21; 06-14-2013 at 04:28 PM.

Posting Permissions

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