Page 1 of 1

separeting strings

Posted: 2009-03-12 19:56:38
by xinxilas
How can i separete strings using ","
Something like that:
DIM A[10]
...
...
A[10] = 0x0F13,CONTAINER or A[8] = 0x0F13,ground

So i use A[n0] (to get first valor) and A[n1] (to get second valour):

n 1 to 10
UO.FindType('A[n0]','-1','my') ;
uo.moveitem('finditem', '0', 'A[n1]')
next

Posted: 2009-03-12 21:09:12
by Destruction

Posted: 2009-03-12 22:26:01
by xinxilas
Thank you!!

So this is the best way?

Code: Select all

sub droptest()
var n
DIM ID[7]
ID[0] = '0x0F16 CONTAINER'; amesthysts
ID[1] = '0x0F10 CONTAINER'; emerald
ID[2] = '0x0F0F ground'; star sapphire
ID[3] = '0x0F18 ground'; tourmaline
ID[4] = '0x0F26 ground'; diamond
ID[5] = '0x0F11 ground'; sapphire
ID[6] = '0x0F15 ground'; citrine
ID[7] = '0x0F13 ground'; rubi
For n=0 To 7
if uo.count(MID(ID[n], 0, 6)) >=1 then
wait(1600)
UO.FindType(MID(ID[n], 0, 6),'-1','my') ;
uo.moveitem('finditem', '0', MID(ID[n], 7, 9))
endif
Next
end sub

Posted: 2009-03-12 23:40:03
by Destruction
Another way is two arrays.

All ways is best.