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

Thread: change weapon with x creature

  1. #1
    iBot User Vigilante Alert's Avatar
    Join Date
    Jun 2012
    Posts
    218
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5

    change weapon with x creature

    PHP Code:
    ilocal iWeapon = { default = "springsprout rod"elemental "underworld rod" }
    local iTarget "wyvern"

    if target.name == iTarget then
    if weapon ~= itemid(iWeapon.elementalthen
    setlooting
    ("no")
    wait(500)
    moveitems(iWeapon.elemental"all""weapon"1)
    wait(1000)
    setlooting("yes")
    end
    else
    if 
    weapon ~= itemid(iWeapon.default) then
    setlooting
    ("no")
    wait(500)
    moveitems(iWeapon.default, "all""weapon"1)
    wait(1000)
    setlooting("yes")
    end
    end 
    what is the error here?
    he just dont change to underwolrd and when i put i manually he change to springsprout.
    thx
    Last edited by Vigilante Alert; 07-17-2012 at 03:05 PM.

  2. #2
    iBot User Vigilante Alert's Avatar
    Join Date
    Jun 2012
    Posts
    218
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5
    bring up my post

  3. #3
    iBot User Vigilante Alert's Avatar
    Join Date
    Jun 2012
    Posts
    218
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5
    updated to script informations.
    The action work, I helped you, so thank doing:
    Rep +
    A action funcionou, eu ajudei vc, então agradeça fazendo:
    Rep +
    Its to increase my reputation as helper.

  4. #4
    Normal User sirmate's Avatar
    Join Date
    Mar 2012
    Location
    Poland
    Posts
    176
    Mentioned
    2 Post(s)
    Tagged
    3 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    105
    Rep Power
    6
    Code:
    local iTarget = "wyvern"
    local iWeapon = {default = "springsprout rod", elemental = "underworld rod"}
    
    if (target.name == iTarget and weapon ~= itemid(iWeapon.elemental)) then
        setlooting("no")
        wait(500)
        moveitems(iWeapon.elemental, "weapon", "all", 100)
        wait(1000)
        setlooting("yes")
    elseif (weapon ~= itemid(iWeapon.default)) then
        setlooting("no")
        wait(500)
        moveitems(iWeapon.default, "weapon", "all", 100)
        wait(1000)
        setlooting("yes")
    end
    (๏̯͡๏ )

  5. #5
    iBot User Vigilante Alert's Avatar
    Join Date
    Jun 2012
    Posts
    218
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5
    Quote Originally Posted by sirmate View Post
    Code:
    local iTarget = "wyvern"
    local iWeapon = {default = "springsprout rod", elemental = "underworld rod"}
    
    if (target.name == iTarget and weapon ~= itemid(iWeapon.elemental)) then
        setlooting("no")
        wait(500)
        moveitems(iWeapon.elemental, "weapon", "all", 100)
        wait(1000)
        setlooting("yes")
    elseif (weapon ~= itemid(iWeapon.default)) then
        setlooting("no")
        wait(500)
        moveitems(iWeapon.default, "weapon", "all", 100)
        wait(1000)
        setlooting("yes")
    end
    ah nah. doens`t work
    The action work, I helped you, so thank doing:
    Rep +
    A action funcionou, eu ajudei vc, então agradeça fazendo:
    Rep +
    Its to increase my reputation as helper.

  6. #6
    Normal User gabrieelgomes's Avatar
    Join Date
    Jun 2012
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    What monsters are you hunting? Wyverns and...? Maybe I can help u.

  7. #7
    Normal User sirmate's Avatar
    Join Date
    Mar 2012
    Location
    Poland
    Posts
    176
    Mentioned
    2 Post(s)
    Tagged
    3 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    105
    Rep Power
    6
    Ahhh. Forgot to tell that you need to use exact creature names.
    (๏̯͡๏ )

  8. #8
    Normal User ToadZ's Avatar
    Join Date
    Jul 2012
    Location
    Tarantula Caves - Tiquanda
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    26
    Rep Power
    5
    Quote Originally Posted by Vigilante Alert View Post
    what is the error here?
    he just dont change to underwolrd and when i put i manually he change to springsprout.
    thx
    http://www.tibiaibot.com/forum/showt...ll=1#post48028

  9. #9
    Normal User wicholost's Avatar
    Join Date
    Jun 2012
    Location
    Jamaica, Chile
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    14
    Rep Power
    5
    :lower() will solve that xd

  10. #10
    Normal User ToadZ's Avatar
    Join Date
    Jul 2012
    Location
    Tarantula Caves - Tiquanda
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    26
    Rep Power
    5
    Quote Originally Posted by wicholost View Post
    :lower() will solve that xd
    Nice solution

    Code:
    if target.name:lower() == iTarget then

Posting Permissions

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