Count script...

Ask for scripts here

Moderators: Murderator+, Murderator

Post Reply
titolivioms
Posts: 28
Joined: 2007-02-12 05:29:15

Count script...

Post by titolivioms »

Hi all, i need a script that counts how many objects from a TYPE i have in the backpack and them say...

the item cannot be stocked

this is the item info

ID=0x4006DCD0 Type=0x0E28 ISYQKMD Name=Lesser Explosion
Quantity: 1 Colour: 0x0000 Layer: 0 Has: 1
X=44 Y=122 Z=0 C=0x400B2770 F=0x00

so, is it possible to make a script that counts how many lessers i have in the backpack then say it to me? thank you.
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Code: Select all

sub How_Many()
  uo.FindType('0x0E28','0x0000','backpack')
  if uo.FindCount() then
    uo.Print(STR(uo.FindCount()))
    wait(100)
  end if
end sub
Destruction
Junior Expert
Posts: 3221
Joined: 2004-06-24 22:08:56

Post by Destruction »

Code: Select all

sub HowMany()
   var type = "0x0E28"
   var colr = "0x0000"
   uo.print( str( uo.count( type, colr ) ) )
endsub
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Destruction wrote:

Code: Select all

sub HowMany()
   var type = "0x0E28"
   var colr = "0x0000"
   uo.print( str( uo.count( type, colr ) ) )
endsub


the item cannot be stocked
titolivioms
Posts: 28
Joined: 2007-02-12 05:29:15

Post by titolivioms »

i dont understand russian, so what should i use? the one with var??
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

titolivioms wrote:i dont understand russian, so what should i use? the one with var??


Where did you see russian omg? We write you 2 scripts-copy them into you file and start
Destruction
Junior Expert
Posts: 3221
Joined: 2004-06-24 22:08:56

Post by Destruction »

Scripts Writer wrote:
Destruction wrote:

Code: Select all

sub HowMany()
   var type = "0x0E28"
   var colr = "0x0000"
   uo.print( str( uo.count( type, colr ) ) )
endsub


the item cannot be stocked

Read the manual.

My script works correctly.
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom
titolivioms
Posts: 28
Joined: 2007-02-12 05:29:15

Post by titolivioms »

sorry.. thank you anyway guys. :)
Post Reply