Page 1 of 1

About random command, and some string functions.

Posted: 2005-01-09 20:22:50
by Psyny
Hello ! Long time i dont brother here =)

Well. Iam with 2 problems:

1-When i use a random command inside a loop... the randomered give the same value...

Exemple:

Code: Select all

var temp
for temp=1 to 10
 uo.print(str( uo.random(20) ) )
next


if the first time it return "13", the another 9 times it will return "13" too.

How i can solve it ?

--------------------------------

2- Whats the string functions that injection uses ?

I need to do something like that:

String: "Vendor Joe: Hello, what u need ?"

a: Take only the text before the " : " and after that remove the "vendor" title.

b: The string after " : " is the question that can change.

c: give the answer based in the question: "Hello Joe, i need to buy something"

in PHP i can use the functions "left" , "right" , "string pos" to do that. But how i can do that here ?

Re: About random command, and some string functions.

Posted: 2005-01-09 21:41:47
by Edred
Psyny wrote:in PHP i can use the functions "left" , "right" , "string pos" to do that. But how i can do that here ?


You can use left(), right(), mid() in injection's scripts...

Posted: 2005-01-14 15:22:07
by Psyny
oh my god... iam blind...

hehehe ok.. thx