Really must have been an exciting week that I missed.
Mr. Love comes back with more promises of M.E. (so once again I release M.M. (version 2E, but not fully debugged so no compile).
fastsync
disable systemkeys
disable escapekey
#constant cGOSTATE 1
#constant cEND 2
#constant cCOMPILE 3
#constant cTIMER 4
#constant cFILEIO 5
#constant cFILEINF 6
#constant cFILEACT 7
#constant cLEVEL 8
#constant cRUN 1
#constant cFILEIO 2
#constant cFILEINF 4
#constant cKEY 1
#constant cBUTT 2
#constant cIMG 3
#constant cTEXT 4
#constant cKEYSHOW 5
dim actr(8,50)
dim act$(4,50)
global dim dispr(3,50,20)
dim disp$(2,50,20)
global dim dispx(4,50,20)
global dim dispy(4,50,20)
dim disphy(4,50,20)
dim disphx(4,50,20)
dim txtfnt$(50,20)
dim keyshowfnt$(50,11)
dim cent(50,20)
global dim backx(50)
global dim backy(50)
dim cmd$(9)
global dim keyname$(11)
global dim key(11)
loadKeys()
global musicfile4
open to read 1,"menu.ini"
repeat
read string 1,line$
cmdcnt=0
last=0
n=len(line$)
line$=line$+":"
for num=1 to 9
cmd$(num)=""
next num
for num=0 to n
if mid$(line$,num)="/" then line$=left$(line$,num-1)+","+right$(line$,len(line$)-num)
if mid$(line$,num+1)="," or mid$(line$,num+1)=":"
inc cmdcnt
a$=left$(line$,num)
cmd$(cmdcnt)=right$(a$,len(a$)-last)
last=num+1
endif
next num
cmd$(1)=lower$(cmd$(1))
if cmd$(1)="music" then musicfile$=cmd$(2)
if cmd$(1)="set"
normalsize=val(cmd$(2))
normalfont$=cmd$(3)
normalwidth=val(cmd$(4))
normalheight=val(cmd$(5))
normaldepth=val(cmd$(6))
endif
if cmd$(1)="keyset"
num=val(cmd$(2))
key(num)=val(cmd$(3))
keyname$(num)=cmd$(4)
endif
until cmd$(1)="state"
perform checklist for display modes
num = checklist quantity()
if normalsize=0 then normalsize=12
if normalfont$="" then normalfont$="Tahoma"
if normalwidth=0 then normalwidth=checklist value a(num)
if normalheight=0 then normalheight=checklist value b(num)
if normaldepth=0 then normaldepth=checklist value c(num)
if check display mode(normalwidth,normalheight,normaldepth)=0
normalwidth=checklist value a(num)
normalheight=checklist value b(num)
normaldepth=checklist value c(num)
endif
empty checklist
set display mode normalwidth,normalheight,normaldepth
close file 1
set sprite 1,0,0
open to read 1,"menu.ini"
repeat
read string 1,line$
cmdcnt=0
last=0
n=len(line$)
line$=line$+":"
for num=1 to 9
cmd$(num)=""
next num
for num=0 to n
if mid$(line$,num)="/" then line$=left$(line$,num-1)+","+right$(line$,len(line$)-num)
if mid$(line$,num+1)="," or mid$(line$,num+1)=":"
inc cmdcnt
a$=left$(line$,num)
cmd$(cmdcnt)=right$(a$,len(a$)-last)
last=num+1
endif
next num
cmd$(1)=lower$(cmd$(1))
if cmd$(1)="state"
state=val(cmd$(2))
imgcnt=1
textcnt=1
buttcnt=1
keycnt=1
centtxt=1
endif
if cmd$(1)="read"
actr(cFILEIO,state)=1
actr(cFILEINF,state)=val(cmd$(2))
act$(cFILEINF,state)=cmd$(3)
actr(cFILEACT,state)=val(cmd$(4))
endif
if cmd$(1)="write"
actr(cFILEIO,state)=2
actr(cFILEINF,state)=val(cmd$(2))
act$(cFILEINF,state)=cmd$(3)
endif
if cmd$(1)="level" then actr(cLEVEL,state)=val(cmd$(2))
if cmd$(1)="open" then act$(cFILEIO,state)=cmd$(2)
if cmd$(1)="timer" then actr(cTIMER,state)=val(cmd$(2))
if cmd$(1)="end" then actr(cEND,state)=1
if cmd$(1)="run" then act$(cRUN,state)=cmd$(2)
if cmd$(1)="sound" then loadSound(cmd$(2), state)
if cmd$(1)="video" then loadVideo(cmd$(2), state)
if cmd$(1)="background" then loadBack(cmd$(2), state)
if cmd$(1)="compile" then actr(cCOMPILE,state)=1
if cmd$(1)="gostate" then actr(cGOSTATE,state)=val(cmd$(2))
if cmd$(1)="textsize" then disphy(cTEXT,state,textcnt)=val(cmd$(2))
if cmd$(1)="keysize" then disphy(cKEYSHOW,state,val(cmd$(2)))=val(cmd$(3))
if cmd$(1)="textfont" then txtfnt$(state,textcnt)=cmd$(2)
if cmd$(1)="keyfont" then keyshowfnt$(state,val(cmd$(2)))=cmd$(2)
if cmd$(1)="textitalic" then if disphx(cTEXT,state,textcnt)=2 then disphx(cTEXT,state,textcnt)=3 else disphx(cTEXT,state,textcnt)=1
if cmd$(1)="keyitalic" then if disphx(cKEYSHOW,state,val(cmd$(2)))=2 then disphx(cKEYSHOW,state,val(cmd$(2)))=3 else disphx(cKEYSHOW,state,val(cmd$(2)))=1
if cmd$(1)="textbold"then if disphx(cTEXT,state,textcnt)=1 then disphx(cTEXT,state,textcnt)=3 else disphx(cTEXT,state,textcnt)=2
if cmd$(1)="keybold"then if disphx(cKEYSHOW,state,val(cmd$(2)))=1 then disphx(cKEYSHOW,state,val(cmd$(2)))=3 else disphx(cKEYSHOW,state,val(cmd$(2)))=2
if cmd$(1)="textnormal"
disphx(cTEXT,state,textcnt)=4
disphy(cTEXT,state,textcnt)=normalsize
txtfnt$(state,textcnt)=normalfont$
centtxt=1
endif
if cmd$(1)="keynormal"
disphx(cKEYSHOW,state,val(cmd$(2)))=4
disphy(cKEYSHOW,state,val(cmd$(2)))=normalsize
keyshowfnt$(state,val(cmd$(2)))=normalfont$
endif
if cmd$(1)="nocenter" then centtxt=0
if cmd$(1)="img"
inc imgcnt
inc imgload
loadImg(cmd$(2), val(cmd$(3)), val(cmd$(4)), state, imgcnt, imgload)
endif
if cmd$(1)="text"
disp$(cTEXT-3,state,textcnt)=cmd$(2)
dispx(cTEXT,state,textcnt)=(val(cmd$(3))*screen width()/100)
dispy(cTEXT,state,textcnt)=(val(cmd$(4))*screen height()/100)
inc textcnt
endif
if cmd$(1)="keyshow"
keyname=val(cmd$(2))
dispx(cKEYSHOW,state,keyname)=(val(cmd$(3))*screen width()/100)
dispy(cKEYSHOW,state,keyname)=(val(cmd$(4))*screen height()/100)
endif
if cmd$(1)="key"
dispr(cKEY,state,keycnt)=val(cmd$(2))
dispx(cKEY,state,keycnt)=(val(cmd$(3))*screen width()/100)
dispy(cKEY,state,keycnt)=(val(cmd$(4))*screen height()/100)
disphx(cKEY,state,keycnt)=(val(cmd$(5))*screen width()/100)
disphy(cKEY,state,keycnt)=(val(cmd$(6))*screen height()/100)
inc keycnt
endif
if cmd$(1)="button"
dispr(cBUTT,state,buttcnt)=val(cmd$(2))
dispx(cBUTT,state,buttcnt)=(val(cmd$(3))*screen width()/100)
dispy(cBUTT,state,buttcnt)=(val(cmd$(4))*screen height()/100)
disphx(cBUTT,state,buttcnt)=(val(cmd$(5))*screen width()/100)
disphy(cBUTT,state,buttcnt)=(val(cmd$(6))*screen height()/100)
inc buttcnt
endif
cent(state,textcnt)=centtxt
print str$(state)+":"+cmd$(1)
until file end(1)=1
close file 1
delete sprite 1
if path exist(".fileslevelbanklevel1.zip") then copy file ".fileslevelbanklevel1.zip", ".fileslevelbanklevel0.zip"
undim cmd$(0)
if musicfile$>""
if right$(musicfile$,4)=".mp3" or right$(musicfile$,4)=".mid"
load music musicfile$, 50
loop music 50
else
load animation musicfile$, 50
loop animation 50
place animation 50,0,0,1,1
endif
endif
state=0
do
if actr(cCOMPILE,state)=1 then compile(state)
if act$(cRUN,state)>"" then actRun(act$(cRUN,state))
if actr(cEND,state)=1 then end
if image exist(1000+state)=1 then paste image 1000+state,backx(state),backy(state)
if animation exist(state*2+2)=1 then play animation state*2+2
if sound exist(state*2+2)=1 then play sound state*2+2
if animation exist(state*2+1)=1 then play animation state*2+1
for num=1 to 20
if dispr(cIMG,state,num)>0
paste image dispr(cIMG,state,num), dispx(cIMG,state,num), dispy(cIMG,state,num)
else exit:endif
next num
set text to normal
set text size normalsize
set text font normalfont$
for num=1 to 20
if disp$(cTEXT-3,state,num)>""
if disphx(cTEXT,state,num)>0
if disphx(cTEXT,state,num)=1 then set text to italic
if disphx(cTEXT,state,num)=2 then set text to bold
if disphx(cTEXT,state,num)=3 then set text to bolditalic
if disphx(cTEXT,state,num)=4 then set text to normal
endif
if txtfnt$(state,num)>"" then set text font txtfnt$(state,num)
if disphy(cTEXT,state,num)>0 then set text size disphy(cTEXT,state,num)
if cent(state,num)=1 then center text dispx(cTEXT,state,num),dispy(cTEXT,state,num),disp$(cTEXT-3,state,num)
if cent(state,num)=0 then text dispx(cTEXT,state,num),dispy(cTEXT,state,num),disp$(cTEXT-3,state,num)
else
exit
endif
next num
set text to normal
set text size normalsize
set text font normalfont$
for num=1 to 11
if dispx(cKEYSHOW,state,num)>0
if disphx(cKEYSHOW,state,num)=1 then set text to italic
if disphx(cKEYSHOW,state,num)=2 then set text to bold
if disphx(cKEYSHOW,state,num)=3 then set text to bolditalic
if disphx(cKEYSHOW,state,num)=4 then set text to normal
if keyshowfnt$(state,num)>"" then set text font keyshowfnt$(size,num)
if disphy(cKEYSHOW,state,num)>0 then set text size disphy(cKEYSHOW,state,num)
text dispx(cKEYSHOW,state,num),dispy(cKEYSHOW,state,num),keyname$(num)
endif
next num
if actr(cFILEIO,state)=1
open to read 3, act$(cFILEIO,state)
num=0
repeat
read string 3,cmd$
inc num
until num=actr(cFILEINF,state)
if cmd$=act$(cFILEINF,state) then state=actr(cFILEACT,state)
close file 3
endif
if actr(cFILEIO,state)=2
open to read 3, act$(cFILEIO,state)
open to write 4, act$(cFILEIO,state)
num=1
while num<>actr(cFILEINF,state)
read string 3,cmd$
write string 4,cmd$
inc num
endwhile
write string 4,act$(cFILEINF,state)
close file 4
close file 3
endif
if actr(cLEVEL,state)>0
if path exist(".fileslevelbanklevel1.zip") then delete file ".fileslevelbanklevel1.zip"
if actr(cLEVEL,state)>1
copy file ".fileslevelbanklevel"+str$(actr(cLEVEL,state))+".zip",".fileslevelbanklevel1.zip"
else copy file ".fileslevelbanklevel0.zip",".fileslevelbanklevel1.zip"
endif
endif
timerstart=timer()+actr(cTIMER,state)
repeat : until mouseclick()=0
if dispr(cBUTT,state,1)=0 and dispr(cKEY,state,1)=0 then j=1 else j=0
if actr(cGOSTATE,state)>0 then state=actr(cGOSTATE,state)
while j=0
if mouseclick()=1
stx=mousex()
sty=mousey()
for num=1 to 20
if dispr(cBUTT,state,num)>0
x=dispx(cBUTT,state,num)
y=dispy(cBUTT,state,num)
hx=disphx(cBUTT,state,num)
hy=disphy(cBUTT,state,num)
if abs(stx-x)<(hx/2) and abs(sty-y)<(hy/2)
state=dispr(cBUTT,state,num)
j=1
exit
endif
endif
if dispr(cKEY,state,num)>0
x=dispx(cKEY,state,num)
y=dispy(cKEY,state,num)
hx=disphx(cKEY,state,num)
hy=disphy(cKEY,state,num)
if abs(stx-x)<(hx/2) and abs(sty-y)<(hy/2)
keysub(dispr(cKEY,state,num), state)
j=1
exit
endif
endif
next num
endif
endwhile
repeat
until timerstart<timer()
loop
function keysub(keyn, state)
cls
if image exist(1000+state) then paste image 1000+state,backx(state),backy(state)
x=screen width()/2
center text x,(.1*screen height()),"Press The Key That You Want To Use To"
y=(.14*screen height())
if keyn=1 then center text x,y,"Walk Forward"
if keyn=2 then center text x,y,"Walk BackWards"
if keyn=3 then center text x,y,"Straft Left"
if keyn=4 then center text x,y,"Straft Right"
if keyn=5 then center text x,y,"Jump"
if keyn=6 then center text x,y,"Crouch"
if keyn=7 then center text x,y,"Use Objects"
if keyn=8 then center text x,y,"Reload"
if keyn=9 then center text x,y,"Peek Left"
if keyn=10 then center text x,y,"Peek Right"
if keyn=11 then center text x,y,"Run"
clear entry buffer
repeat
sca=scancode()
until sca>0
key(keyn)=sca
keyname$(keyn)=upper$(entry$())
if Upkey()=1 then keyname$(keyn)="Up"
if Downkey()=1 then keyname$(keyn)="Down"
if Leftkey()=1 then keyname$(keyn)="Left"
if Rightkey()=1 then keyname$(keyn)="Right"
if Returnkey()=1 then keyname$(keyn)="Enter"
if Escapekey()=1 then keyname$(keyn)="Esc"
if Spacekey()=1 then keyname$(keyn)="Space"
if Controlkey()=1 then keyname$(keyn)="Ctrl"
if Shiftkey()=1 then keyname$(keyn)="Shift"
endfunction 0
function compile(state)
delete file "setup.ini"
open to read 1,str$(state)+".ini"
open to write 2,"setup.ini"
repeat
read string 1, inf$
write string 2, inf$
until inf$="[GAMEDEBUG]"
write string 2, "width="+str$(screen width())
write string 2, "height="+str$(screen height())
write string 2, "depth="+str$(screen depth())
read string 1, inf$
repeat
write string 2, inf$
read string 1, inf$
until left$(inf$,3)="key"
for j=1 to 11
write string 2, "key"+str$(j)+"="+str$(key(j))
next j
repeat
read string 1, inf$
until left$(inf$,3)<>"key"
write string 2, inf$
repeat
read string 1, inf$
write string 2, inf$
until file end(1)=1
close file 1
close file 2
endfunction 0
function loadKeys()
keyname$(1)="W"
keyname$(2)="S"
keyname$(3)="A"
keyname$(4)="D"
keyname$(5)="Space"
keyname$(6)="C"
keyname$(7)="Enter"
keyname$(8)="R"
keyname$(9)="Q"
keyname$(10)="E"
keyname$(11)="Shift"
key(1)=17
key(2)=31
key(3)=30
key(4)=32
key(5)=57
key(6)=46
key(7)=28
key(8)=19
key(9)=16
key(10)=18
key(11)=42
endfunction 0
function loadSound(cmd$, state)
if right$(cmd$,4)=".mp3" or right$(cmd$,4)=".mid"
load music cmd$, state*2+2
else
load animation cmd$,state*2+2
endif
endfunction 0
function loadVideo(cmd$, state)
load animation cmd$, state*2+1
endfunction 0
function loadBack(cmd$, state)
load image cmd$,1000+state
sprite 1,-3000,-2000,1000+state
rem streach image!!!
backx(state)=(screen width()/2-sprite width(1)/2)
backy(state)=(screen height()/2-sprite height(1)/2)
endfunction 0
function loadImg(cmd$, locx, locy, state, imgload, imgcnt)
load image cmd$, imgload
sprite 1,-3000,-2000, imgload
dispr(cIMG,state,imgcnt)=imgload
dispx(cIMG,state,imgcnt)=(locx*screen width()/100)-sprite width(1)/2
dispy(cIMG,state,imgcnt)=(locy*screen height()/100)-sprite height(1)/2
endfunction 0
function actRun(run$)
minimize window
if animation exist(50)=1 then delete animation 50
if music exist(50)=1 then delete music 50
execute file run$,"","",1
maximize window
set window off
if musicfile$>""
if right$(musicfile$,4)=".mp3" or right$(musicfile$,4)=".mid"
load music musicfile$, 50
loop music 50
else
load animation musicfile$, 50
loop animation 50
place animation 50,0,0,1,1
endif
endif
endfunction 0
You have the revise of accode (monster) now changing his prices to 33.99... and the misinformation that he stole my script.
I have to correct this, monster did NOT steal my script, it took me a few trys but I found out that the plrassociated command extends past the actual model. From there it was simple, I mearly tweaked the script to what it is now (alot of the extras is thanx to dphoraoh... he suggested I change some things... and I did).
What monster is INFAMOUS for is the stealing of media, not scripts. (and no, I did not steal his... I have never seen his script but I would imagine that it is at least a little different then mine). I just wish people would realize that instead of claiming monster stole from me. He stole from others... I just quickly made what he 'labored' on.
oh... and in some locked thread in this forum... the key to uncap the fps in test game mode is x. U slows it down to 5fps and t resets it to 30
oh... and before I forget [ic:lock]
Your Mod was deleted by the Government.