Red Miko Global Moderator
Status : with Kochiya-sama Posts : 213 Chips : 5562 Power : 9 Join date : 2010-10-03 Age : 28 Location : now @ Outer-Gensokyo Quote : DANMAKU BOUNDED FIELD!! Badge :
| Subject: [GML] Number Finder Sun Oct 03, 2010 2:29 pm |
Game Maker Number Finder Compability Game Maker 6 Lite or higher by: Irfan Gunawan script ini di-implementasikan untuk mencari nilai seperti digame kartu 24~ yang susah n males ngitungnya bikin kalah... - Code:
-
globalvar op, arg; op[0]="+" op[1]="-" op[2]="*" op[3]="/" arg[0] = argument[0] // As target arg[1] = argument[1] // As number to operate arg[2] = argument[2] // As number to operate arg[3] = argument[3] // As number to operate arg[4] = argument[4] // As number to operate
globalvar a,b,c,SUM,str,i,ret; a=0;b=0;c=0;i=0;str="";ret="";
do { b=0 do { c=0 do { str=string(arg[1])+op[a]+string(arg[2])+op[b]+string(arg[3])+op[c]+string(arg[4]) SUM[i]=execute_string("return "+str) if SUM[i]==arg[0] then { //show_message("Solution \#"+string(i)+" made at '"+str+"'!") ret=ret+"Solution \#"+string(i)+" made at '"+str+"'!"+" " } c+=1 i+=1 } until (c>=4) b+=1 } until (b>=4) a+=1 } until (a>=4) if ret == "" then ret = "No Solutions Made!" return ret
// kalo mau ambil hasilnya pake // {nama variable} = {nama script ini, dan parameternya} // contoh: // ret_val = algorithm_finder(24,6,6,6,6) // << dia akan menghasilkan beberapa hasil // silahkan dicoba.. ntar applikasi testernya nyusul
silahkan copas ke gm.. arigatou~ --> O: http://vixep.forumotion.com/script-lainnya-f23/gm-number-finder-t91.htm
|
|