Yoko
http://forum.yoko.com.ua/

Help Autoloot
http://forum.yoko.com.ua/viewtopic.php?f=3&t=736
Page 1 of 1

Author:  erkali [ 2004-07-01 01:01:02 ]
Post subject:  Help Autoloot

sub toastloot()
uo.print("Lootin'O'Matic")
while uo.notdead()
DIM lootcont[3]
lootcont[0]=0x0E75 #this is the id of the backpack
lootcont[1]=0x0e76 #put the id of a bag
lootcont[2]=0x09b0 #put the id of a pouch
if UO.count("lootcont[i]") > 0 then
wait(500)
UO.waittargettype(lootcont[i])
UO.grab("")
end if
end sub


########################
######Error##############
######################
Variable undifenied "i"

:S Help ME!

Author:  Boydon [ 2004-07-01 01:36:47 ]
Post subject: 

Here is mine.

Code:
sub loot()
var i,n
Dim A[25]
A[1] = 0x0eed ;Gold
A[2] = 0x0f10 ;Emerald
A[3] = 0x0f13 ;Ruby
A[4] = 0x0f15 ;Citrine
A[5] = 0x0f16 ;Amethyst
A[6] = 0x0f19 ;Sapphire
A[7] = 0x0f21 ;Star Sapphire
A[8] = 0x0f25 ;Piece of Amber
A[9] = 0x0f26 ;Diamond
A[10] = 0x0f2d ;Tourmaline
A[11] = 0x0f7a ;Black Pearl
A[12] = 0x0f7b ;Blood Moss
A[13] = 0x0f84 ;Garlic
A[14] = 0x0f85 ;Ginseng
A[15] = 0x0f86 ;Mandrake Root
A[16] = 0x0f88 ;Nightshade
A[17] = 0x0f8c ;Sulphurus Ash
A[18] = 0x0f8d ;Spider's Silk
A[19] = 0x0f78 ;Batwing
A[20] = 0x0f7d ;Daemon Blood
A[21] = 0x0f7e ;Bone
A[22] = 0x0f8a ;Pig Iron
A[23] = 0x0f8e ;Nox Crystal
A[24] = 0x0f8f ;Grave Dust
A[25] = 0x0F80 ;Daemon Bone
i = 500

FOR n=1 TO 25
uo.findtype(A[n],"-1","lastcontainer")
if uo.findcount() > 0 then
UO.grab(0,"finditem")
Wait(i)
end if
NEXT
end sub

Author:  Lem [ 2004-07-02 13:24:45 ]
Post subject: 

erkal:
1) always declare vars your program uses -_-"
2) avoid declaring arrays/vars inside cycles.
3) close cycles you opened.
4) Uo.Count(type) counts items contained in your BACKPACK, for an autoloot function you should use Uo.FindType and Uo.FindCount

Author:  ozcaN [ 2004-07-02 16:49:40 ]
Post subject: 

Anyone got a better version

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/