Glyph Posted August 17, 2008 Share Posted August 17, 2008 Func randochar() $wee = Random(1, 2, 1) Return Execute("_" & $wee & "()") EndFunc ;==>randochar Func _1() ;number 0-9 $ran = Chr(Random(48, 57, 1)) Return $ran EndFunc ;==>_1 Func _2() ;letter a-f $ran = Chr(Random(65, 70, 1)) Return $ran EndFunc ;==>_2 This works perfectly fine, but i tried to use obfuscator, and because it's an execute function it won't work being obfuscated.... Anyone have any workarounds?? this code was made by me thinkign the obfuscator might work with execute function... tolle indicium Link to comment Share on other sites More sharing options...
NELyon Posted August 17, 2008 Share Posted August 17, 2008 (edited) Func randochar() Switch Random(1, 2, 1) Case 1 return _1(); Case 2 return _2(); EndSwitch EndFunc ;==>randochar Func _1() ;number 0-9 $ran = Chr(Random(48, 57, 1)) Return $ran EndFunc ;==>_1 Func _2() ;letter a-f $ran = Chr(Random(65, 70, 1)) Return $ran EndFunc ;==>_2 Edited August 17, 2008 by KentonBomb Link to comment Share on other sites More sharing options...
Glyph Posted August 17, 2008 Author Share Posted August 17, 2008 didn't even think to use a switch! very clever, thank you! tolle indicium Link to comment Share on other sites More sharing options...
NELyon Posted August 17, 2008 Share Posted August 17, 2008 didn't even think to use a switch! very clever, thank you! Or you can go ninja like this: Func randochar() Switch Random(1, 2, 1) Case 1 $ran = Chr(Random(48, 57, 1)) Return $ran Case 2 $ran = Chr(Random(65, 70, 1)) Return $ran EndSwitch EndFunc ;==>randochar Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now