Writing a script to pick items up out of a box or ground

General Injection issues

Moderators: Murderator+, Murderator

Post Reply
fourtytwo
Posts: 19
Joined: 2006-04-16 07:26:09

Writing a script to pick items up out of a box or ground

Post by fourtytwo »

1: How do I set a script to remove 325 of item "xxyy" from a chest and place it in my back pack?

2: How do I set a script for the exact same thing except from the floor or ground?


Thanks guys! You all are awesome.
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Code: Select all

uo.moveitem(... , ... , 'backpack')
fourtytwo
Posts: 19
Joined: 2006-04-16 07:26:09

Post by fourtytwo »

first set of dots being the item and the 2nd set being the bag?
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

fourtytwo wrote:first set of dots being the item and the 2nd set being the bag?


Code: Select all

uo.FindType( type of item , [color] , container )
uo.MoveItem('finditem','quantity',container(backpack, ground))
fourtytwo
Posts: 19
Joined: 2006-04-16 07:26:09

Post by fourtytwo »

ok thanks :D I'll see if i can get her to work.
fourtytwo
Posts: 19
Joined: 2006-04-16 07:26:09

Post by fourtytwo »

I can't seem to get the script to stop. It keeps trying to pick them up when I only want to pick up 300 of them and then the script stop.. Here is my script:

Code: Select all

sub wooltome()
var wool = "0x0DF8"; the wool
var bag = "0x4002E458"; my backpack
    uo.findtype( wool, '0x0000', '0x40080EFF' )
      while uo.findcount()
        uo.moveitem( 'finditem', '300', bag )
     wend
endsub


I just want it to pick up the wool, put 300 in my bag and then stop. But it keeps trying to keep going.
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Code: Select all

sub wooltome() 
var wool = "0x0DF8"; Write GH bottle type here
var bag = "0x4002E458"; Keg ID here
var i = 0
    uo.findtype( wool, '0x0000', '0x40080EFF' )
    if uo.findcount() then
      for i = 0 to 300
        uo.moveitem( 'finditem', '300', bag )
      next
    end if
end sub
fourtytwo
Posts: 19
Joined: 2006-04-16 07:26:09

Post by fourtytwo »

Ok thanks it works BUT it floods my screen with "you can not pick up this item" for about 5-7 seconds.. is there anyway to cut that time out?
fourtytwo
Posts: 19
Joined: 2006-04-16 07:26:09

Post by fourtytwo »

Any idea why its doing this?
DerMeister =)
Expert!
Posts: 1032
Joined: 2006-02-25 21:48:38

Post by DerMeister =) »

Code: Select all

sub wooltome() 
var wool = "0x0DF8"; the wool
var bag = "0x4002E458"; my backpack   
      uo.findtype( wool, '0x0000', '0x40080EFF' )
      if uo.findcount() then
        uo.moveitem( 'finditem', '300', bag )
     end if
endsub


Wool collecting into stack or each wool is a separate item?
fourtytwo
Posts: 19
Joined: 2006-04-16 07:26:09

Post by fourtytwo »

sdfs
Last edited by fourtytwo on 2006-04-23 19:55:59, edited 1 time in total.
DerMeister =)
Expert!
Posts: 1032
Joined: 2006-02-25 21:48:38

Post by DerMeister =) »

Code: Select all

sub wooltome() 
var wool = "0x0DF8"; the wool
var bag = "0x4002E458"; my backpack   
      uo.findtype( wool, '-1', '0x40080EFF' )
      if uo.findcount() then
        uo.moveitem( 'finditem', '300')
     end if
endsub
fourtytwo
Posts: 19
Joined: 2006-04-16 07:26:09

Post by fourtytwo »

Awesome Perfect!!!!
fourtytwo
Posts: 19
Joined: 2006-04-16 07:26:09

Post by fourtytwo »

.
DerMeister =)
Expert!
Posts: 1032
Joined: 2006-02-25 21:48:38

Post by DerMeister =) »

fourtytwo wrote:Awesome Perfect!!!!


What does it means? :)
Post Reply