Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function textbox(xstart,ystart,width,height,text,id)
- left = xstart
- down = ystart+height
- right = xstart+width
- up = ystart
- gui.drawbox(left,down,right,up,"")
- gui.text(left+2,up+2,text)
- if keys.leftclick and mousex>=left and mousex<=right and mousey>=up and mousey<=down then
- command=id
- end
- end;
- startframe=movie.framecount()-1
- startx = 65536*memory.readbyte(0x7E0EA2) + 256*memory.readbyte(0x7E0EA1) + memory.readbyte(0x7E0EA3)
- topspeed=512
- w=0
- move=0
- while true do
- local function displayer()
- --here starts the old script
- mf=movie.framecount()-1
- xpos = 65536*memory.readbyte(0x7E0EA2) + 256*memory.readbyte(0x7E0EA1) + memory.readbyte(0x7E0EA3)
- predx=startx + topspeed*(mf-startframe)
- lostx=predx-xpos
- lostf=lostx/topspeed
- min=math.floor(mf/3600)
- sec=math.floor(math.mod(mf,3600)/60)
- texty=30
- gui.text(10,texty,"X pos: " .. xpos)
- gui.text(10,texty+8,"Lost X: " .. lostx)
- gui.text(10,texty+16,"Lost F: " .. lostf)
- gui.text(10,texty+24,"Time: " .. min .. ":" .. sec)
- end
- gui.register(displayer)
- command=0
- keys=input.get()
- key1={}
- mousex=keys.xmouse
- mousey=keys.ymouse
- gui.text(156,12,"4 sword hit")
- textbox(106,20,30,12,"Left1",4)
- textbox(136,20,30,12,"Left",3)
- textbox(166,20,30,12,"Still",1)
- textbox(196,20,30,12,"Right",2)
- textbox(226,20,30,12,"Right1",5)
- --gui.text(156,32,"Normal form")
- --textbox(106,40,30,12,"Left 6hit",6)
- --textbox(136,40,30,12,"Right 6hit",7)
- --textbox(136,40,30,12,"Left 4kick",8)
- if command>0 then move=command end
- if command>=1 and command<=5 then
- w=43
- end
- if command>=6 and command<=7 then
- w=71
- end
- if move>=1 and move<=5 and w>0 then
- if w==43 then
- key1.Y=1
- if move==2 then key1.right=1 end
- if move==3 then key1.left=1 end
- if move==4 then key1.left=1 end
- if move==5 then key1.right=1 end
- end
- if w==29 then
- key1.Y=1
- if move==2 then key1.right=1 end
- if move==3 then key1.left=1 end
- end
- if w==15 then
- key1.Y=1
- if move==2 then key1.right=1 end
- if move==3 then key1.left=1 end
- end
- if w==1 then
- key1.Y=1
- if move==2 then key1.right=1 end
- if move==3 then key1.left=1 end
- end
- joypad.set(1,key1)
- end
- if move>=6 and move<=7 and w>0 then
- if w==71 then
- key1.Y=1
- end
- if w==60 then
- key1.Y=1
- end
- if w==49 then
- key1.Y=1
- end
- if w==31 then
- if move==6 then key1.left=1 end
- if move==7 then key1.right=1 end
- end
- if w==30 then
- key1.Y=1
- end
- if w==19 then
- key1.Y=1
- end
- if w==1 then
- key1.Y=1
- end
- joypad.set(1,key1)
- end
- if w>0 then w=w-1 end
- snes9x.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement