Results 1 to 7 of 7

Thread: Take off wand to kill X creature, then put back on

  1. #1
    Normal User hillsfar123's Avatar
    Join Date
    Sep 2012
    Location
    Tibia
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5

    Question Take off wand to kill X creature, then put back on

    Hello,
    I've been looking for quite a while but I couldn't find what I was looking for.
    Here's the idea;
    I'm hunting in a given spot, there are few Ice Golems roaming around, I don't want to use my Rod to kill them simply because they're immune and it's just waste of mana.
    I want my action to take off Underworld Rod (put it in main backpack) and kill targetted Ice Golem using exori vis.
    After that, it should put the rod back on.

    Here's what I found after checking 20 pages:

    PHP Code:
    local wand "Wand of Inferno"
    local bpfrom "Backpack of Holding"
    local placeto "weapon" -- weaponammoetc
    local count 
    1
    local twand 
    "Bonelord"


    if target.name == twand then
       
    if itemcount(wandplaceto) == 0 then
          moveitems
    (wandbpfromplacetocount)
       
    end
    else
       if 
    itemcount(wandplaceto) ~= 0 then
          moveitems
    (wandplacetobpfromcount)
       
    end
    end 
    credits to XtrmJosh

    now that's just a clue and it uses wand of inferno to kill x monster while i want something opposite.
    to not use wand for x monster.

    I'll appreciate any help I can get, still learning.
    thanks
    Last edited by hillsfar123; 10-26-2012 at 11:54 AM.

  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:
    local CREATURES = {"Ice Golem","Monster2"}
    local ROD "underworld rod"

    if (target.name == table.find(CREATURES,target.name)) and (weapon == itemid(ROD)) then
        
    if (weapon == itemid(ROD)) then
            moveitems
    (ROD,"weapon","all",1)
        
    end
    else
        if (
    weapon == 0then
            moveitems
    (ROD,"all","weapon",1)
        
    end
    end 
    Last edited by soder; 10-26-2012 at 10:17 AM.

  3. #3
    Normal User hillsfar123's Avatar
    Join Date
    Sep 2012
    Location
    Tibia
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5
    somehow, it does not work for me.
    thanks for your effort tho, i gave you rep

    it puts rod back on if i take it off manually, but it doesnt take rod off whenever i attack Ice Golem
    Last edited by hillsfar123; 10-26-2012 at 11:01 AM.

  4. #4
    Normal User hillsfar123's Avatar
    Join Date
    Sep 2012
    Location
    Tibia
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5
    I just tested and edited the example action I gave you.

    PHP Code:
    local wand "underworld rod"
    local bpfrom "Dragon Backpack"
    local placeto "weapon"
    local count 1
    local twand 
    "Ice Golem"


    if target.name == twand then
       
    if itemcount(wandplaceto) == 1 then
          moveitems
    (wandplacetobpfromcount)
       
    end
    else
       if 
    itemcount(wandplaceto) == 0 then
          moveitems
    (wandbpfromplacetocount)
       
    end
    end 
    - it puts rod back on if weapon == 0
    - if i manually take it off while attacking any monster but Ice Golem, it pust rod back on
    - if i take rod off while attacking Ice Golem, it wont put it back on until it's dead

    so there's something wrong with moving rod to backpack while targetting Ice Golem
    not quite sure what tho

  5. #5
    iBot User Dehan's Avatar
    Join Date
    May 2012
    Location
    www.ssocialscripts.com
    Posts
    910
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    114
    Rep Power
    7
    I think that this is what u're looking for:

    PHP Code:
    local ROD "Underworld Rod"
    local BP "Backpack of Holding"

    if target.name == "Ice Golem" and weapon == itemid(RODthen
       moveitems
    (ROD"weapon"BP1)
       
    wait(200,400)
    elseif 
    target.name ~= "Ice Golem" and weapon ~= itemid(RODthen
       moveitems
    (RODBP"weapon"1)
       
    wait(200,400)
    end 
    Check out - Dehan Accounts Service!

    Proud Scripter of BUgWT STAFF

  6. #6
    iBot User Dehan's Avatar
    Join Date
    May 2012
    Location
    www.ssocialscripts.com
    Posts
    910
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    114
    Rep Power
    7
    Quote Originally Posted by hillsfar123 View Post
    I just tested and edited the example action I gave you.

    - it puts rod back on if weapon == 0
    - if i manually take it off while attacking any monster but Ice Golem, it pust rod back on
    - if i take rod off while attacking Ice Golem, it wont put it back on until it's dead

    so there's something wrong with moving rod to backpack while targetting Ice Golem
    not quite sure what tho
    the problem is:
    Code:
       if itemcount(wand, placeto) == 0 then
          moveitems(wand, bpfrom, placeto, count)
       end
    it's not considering the target.name to move the Rod back to weapon slot
    Check out - Dehan Accounts Service!

    Proud Scripter of BUgWT STAFF

  7. #7
    Normal User hillsfar123's Avatar
    Join Date
    Sep 2012
    Location
    Tibia
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5
    Quote Originally Posted by Dehan View Post
    I think that this is what u're looking for:

    PHP Code:
    local ROD "Underworld Rod"
    local BP "Backpack of Holding"

    if target.name == "Ice Golem" and weapon == itemid(RODthen
       moveitems
    (ROD"weapon"BP1)
       
    wait(200,400)
    elseif 
    target.name ~= "Ice Golem" and weapon ~= itemid(RODthen
       moveitems
    (RODBP"weapon"1)
       
    wait(200,400)
    end 
    sorry for late answer, i was quite busy lately so i couldnt check it out.
    it does work just great, thanks a lot for your help, and youre right about considering target name to move the rod back

    thats what i was looking for.
    +rep for you

Tags for this Thread

Posting Permissions

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