Possible, but not into array.
Function:
Code:
; explode( string string, string pattern, number num )
; Destruction
Sub explode( string, pattern, num )
var i, counter = 0, entry = 0
for i=0 to strlen( string ) -1
if mid( string, i, strlen( pattern ) ) == pattern then
counter = counter + 1
if num == counter-1 then
return mid( string, entry, i-entry )
endif
entry = i + 1
endif
next
if entry == 0 then
return false
endif
return mid( string, entry, strlen(string)-entry )
endsub
Example:
Code:
var str = "button <randomX> <randomY> 2151 2150 1 0 2"
uo.print( explode( str, " ", 0 ) )
uo.print( explode( str, " ", 1 ) )
uo.print( explode( str, " ", 2 ) )
uo.print( explode( str, " ", 3 ) )
uo.print( explode( str, " ", 4 ) )
uo.print( explode( str, " ", 5 ) )
uo.print( explode( str, " ", 6 ) )
uo.print( explode( str, " ", 7 ) )
Also i recommend u to see functions in this topic:
viewtopic.php?t=7379 This topic contains many simple scripts.
Sorry for my clumsy English.