Prodig - Komunitas Proyek Digital
Selamat datang di ProDig!
Di sini adalah tempat untuk berbagi proyek (game, seni, program, dan situs).
Di sini Anda juga bisa mendapatkan hal lainnya seperti permainan, berbagi karya, ilmu pengetahuan, kesenangan, dan sebagainya. :)

Ayo daftar lalu langsung login tanpa perlu konfirmasi email sama sekali :D!
Prodig - Komunitas Proyek Digital

Tempat untuk berbagi proyek digital : Situs, Game, Seni, Program
 
CalendarPortalHomeRulesSearchFAQMemberlistUsergroupsRegisterLog in
Welcome to the ProDig, Guest!

 
 

 [GML] Number Finder

View previous topic View next topic Go down 
AuthorMessage
Red Miko
Global Moderator


Status : with Kochiya-sama
Posts : 213
Chips : 2646
Power : 9
Join date : 2010-10-03
Age : 20
Location : now @ Outer-Gensokyo
Quote : DANMAKU BOUNDED FIELD!!
Badge :

PostSubject: [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.forumsrpg.net/script-lainnya-f23/gm-number-finder-t91.htm





I'm currently living together with him. It's hard to have a family.

User bar:


Did you need PREMIUM mode? Then PM me @ this site!

Wanna some BlackBerry? From Gensokyo~

--> My mostly used browser: <--

Mokofox

--> Be happy to look some Girls <--

Back to top Go down
View user profile
 

[GML] Number Finder

View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Prodig - Komunitas Proyek Digital  :: Education Chamber :: Programming :: GML-
Jump to: