Results 1 to 2 of 2

Thread: Help me please with action change sword

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

    Help me please with action change sword

    PHP Code:
    local iWeapon = { default = DefaultWeaponelemental SecondWeapon 
    local iTarget "Ghost" 

    if target.name == iTarget then 
      
    if weapon ~= itemid(iWeapon.elementalthen 
        wait
    (500
        
    moveitems(iWeapon.elemental"all""weapon"1
        
    wait(1000
        
    end 
    else 
      if 
    weapon ~= itemid(iWeapon.default) then 
        wait
    (500
        
    moveitems(iWeapon.default, "all""weapon"1
        
    wait(1000
          
    end 
    end 
    works.

    when this trapped for a ghost.

    but it changes back to default weapon :S

  2. #2
    Premium User Daniloco's Avatar
    Join Date
    Jun 2012
    Location
    Chile
    Posts
    74
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    4 Post(s)
    Reputation
    33
    Rep Power
    5
    Quote Originally Posted by bubuzop View Post
    PHP Code:
    local iWeapon = { default = DefaultWeaponelemental SecondWeapon 
    local iTarget "Ghost" 

    if target.name == iTarget then 
      
    if weapon ~= itemid(iWeapon.elementalthen 
        wait
    (500
        
    moveitems(iWeapon.elemental"all""weapon"1
        
    wait(1000
        
    end 
    else 
      if 
    weapon ~= itemid(iWeapon.default) then 
        wait
    (500
        
    moveitems(iWeapon.default, "all""weapon"1
        
    wait(1000
          
    end 
    end 
    works.

    when this trapped for a ghost.

    but it changes back to default weapon :S
    Test with is:

    -- on Setup:

    PHP Code:
    DefaultWeapon 'nameyourmainweapon'   
    SecondWeapon 'nameyourelementalweapon' 


    --on action:

    PHP Code:
    local iWeapon = { default = DefaultWeaponelemental SecondWeapon }  
    local iTarget "Ghost"  

    if target.name == iTarget then  
      
    if weapon ~= itemid(iWeapon.elementalthen  
        wait
    (500)  
        
    moveitems(iWeapon.elemental"all""weapon"1)  
        
    wait(1000)  
        
    end  
    else  
      if 
    weapon ~= itemid(iWeapon.default) then  
        wait
    (500)  
        
    moveitems(iWeapon.default, "all""weapon"1)  
        
    wait(1000)  
          
    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
  •