Results 1 to 6 of 6

Thread: fix and creat a script

  1. #1

    Join Date
    Nov 2012
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    10
    Rep Power
    5

    fix and creat a script



    I got this script to pick up 'stand trophy'

    if cap > 20 then
    for i=-1,1 do
    for j=-1,1 do
    if toptileitem(posx+i, posy+j, posz) == 872 then
    pausewalking(1000)
    moveitems(toptileitem(posx+i, posy+j, posz), ground(posx+i, posy+j, posz), graybp, 100)
    pausewalking(0)
    end
    end
    end
    end

    I wanna add more items ID, how can I do?

    also it will pick up to a bp and I want a script to throw away somewhere nobody can go... which script I have to use?

  2. #2
    iScripter Eli's Avatar
    Join Date
    Mar 2012
    Posts
    3,764
    Mentioned
    492 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    955 Post(s)
    Reputation
    586
    Rep Power
    10
    Lua Code:
    if cap > 20 then
    for i=-1,1 do
    for j=-1,1 do
    if toptileitem(posx+i, posy+j, posz) == 872 or toptileitem(posx+i, posy+j, posz) == ID2HERE or toptileitem(posx+i, posy+j, posz) == ID3HERE then
    pausewalking(1000)
    moveitems(toptileitem(posx+i, posy+j, posz), ground(posx+i, posy+j, posz), graybp, 100)
    pausewalking(0)
    end
    end
    end
    end

  3. #3

    Join Date
    Nov 2012
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    10
    Rep Power
    5
    thanks

  4. #4

    Join Date
    Nov 2012
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    10
    Rep Power
    5
    I wanted a script to add unlimited ID's is it possible? or maybe with item name. my porpouse with this script is to pick up all the trap items like parcel stamped parcel stand trophy box chest furtunire package... items that can make a 'stair' and then throw all those items in an action in the middle of the waypoint.

  5. #5
    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 items = {123, 1234, 125, 156, 1866}
     
    if cap > 20 then
    	for i=-1,1 do
    		for j=-1,1 do
    			if table.find(toptileitem(posx+i, posy+j, posz), items) then
    			pausewalking(1000)
    			moveitems(toptileitem(posx+i, posy+j, posz), ground(posx+i, posy+j, posz), graybp, 100)
    			pausewalking(0)
    			end
    		end
    	end
    end


    don't use names, just ids, if you have to use name, use itemid("item name") in the array

  6. #6

    Join Date
    Nov 2012
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    10
    Rep Power
    5
    yeah! so kind of you! thanks!

Posting Permissions

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