Results 1 to 7 of 7

Thread: need one action to use sword ring if target x criature

  1. #1
    iBot User
    Join Date
    Dec 2013
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    4 Post(s)
    Reputation
    10
    Rep Power
    3

    need one action to use sword ring if target x criature

    need one action to use sword ring if target x criature plx

  2. #2
    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
    PHP Code:
    local usering "sword ring"
    if target.name == "Demon" and ring ~= itemid(useringthen
    moveitems
    (usering"all""ring"1)
    wait(1000,1200)
    end 
    Last edited by shanp; 02-03-2014 at 02:08 PM.

  3. #3
    Focus Group Targets's Avatar
    Join Date
    Nov 2013
    Location
    PoA - Brazil
    Posts
    456
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    48 Post(s)
    Reputation
    109
    Rep Power
    5
    Quote Originally Posted by shanp View Post
    PHP Code:
    ring "sword ring"
    if target.name == "Demon" and ring ~= itemid(ringthen
    moveitems
    (ring"all""ring"1)
    wait(1000,1200)
    end 
    apenas complementando o "ring" tem que ser local

    dai no inicio fica:
    Lua Code:
     
    local ring = "sword ring"



  4. #4
    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
    Quote Originally Posted by TargetScripts View Post
    apenas complementando o "ring" tem que ser local

    dai no inicio fica:
    Lua Code:
     
    local ring = "sword ring"
    you're right, I made it too fast, and messed up variables, I change it in post before, now it shoud be ok

    btw. its english board
    Last edited by shanp; 02-03-2014 at 02:10 PM.

  5. #5
    Normal User
    Join Date
    Jan 2014
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    10
    Rep Power
    3
    and for multiple monsters and take from dp ? if u can plz ?

  6. #6
    iBot User walukasz's Avatar
    Join Date
    Feb 2012
    Location
    Poland
    Posts
    312
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    25 Post(s)
    Reputation
    67
    Rep Power
    5
    Lua Code:
    local RING_NAME = "sword ring"
    local EQUIPPED_ID = 3094 --[[ sword ring: 3094, axe ring: 3095, club ring: 3096, prismatic ring: 16264 ]]--
    local MONSTERS = {"Demon", "Orc"}
     
    if table.find(MONSTERS, target.name) and ring ~= EQUIPPED_ID and itemcount(RING_NAME) > 0 then
    	moveitems(RING_NAME, "all", "ring", 1)
    elseif not table.find(MONSTERS, target.name) and ring == EQUIPPED_ID then
    	moveitems(RING_NAME, "ring", "all", 1)
    end


    Lua Code:
    local MainBP = "red backpack"
    local RingDPBP = "orange backpack"
    local RingName = "sword ring"
    local RingsToTake = 4
     
    while windowcount(RingDPBP) ~= 1 do
    	reachgrounditem("depot")
    	wait(900, 1400)
    	openitem("depot")
    	wait(1400, 1500)
    	openitem(3502, "locker")
    	wait(1400, 1600)
    	openitem(RingDPBP, "Depot Chest")
    	wait(1400, 1600)
    end
     
    while true do
    	while itemcount(RingName)-itemcount(RingName, RingDPBP) < RingsToTake and itemcount(RingName, RingDPBP) > 0 and getcontainer(MainBP).maxslots - getcontainer(MainBP).usedslots) > 0 do
    		moveitems(RingName, RingDPBP, MainBP, 1)
    		wait(120, 150)
    		updateworld()
    	end
     
    	if itemcount(RingName)-itemcount(RingName, RingDPBP) < RingsToTake and itemcount(RingDPBP, RingDPBP) > 0 then
    		openitem(RingDPBP, RingDPBP)
    		wait(900, 1200)
    	else
    		break
    	end
    end
    Last edited by walukasz; 02-14-2014 at 04:45 PM.

  7. #7
    Normal User
    Join Date
    Jan 2014
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    10
    Rep Power
    3
    thanks very much ++ rep

Posting Permissions

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