Advertisement
KBM-Quine

door code edit

Dec 29th, 2018
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.48 KB | None | 0 0
  1. local Gate = Graphics.loadImage("Gate.png")
  2. local Star = Graphics.loadImage("Star.png")
  3. local animTimer = 0
  4. local timeractive = false
  5. local frameCounter = 0
  6. local waitFrame = 0
  7. local timerTotal = 88
  8. local frameRate = 8
  9. local iframe = 0
  10. local StarAnimtimer = 0
  11. local Stariframe = 0
  12.  
  13. mem(0x00B251E0, FIELD_WORD, 9)
  14. local draw = false
  15.  
  16. function onStart()
  17.    
  18. end
  19.  
  20. function onTick()
  21.     staranimater()
  22.     for i,warp in ipairs(Warp.get()) do
  23.         Text.print(tostring(warp:mem(0x12, FIELD_WORD)), 20*i, 40*i)
  24.         if mem(0x00B251E0, FIELD_WORD) ~= warp:mem(0x12, FIELD_WORD) then
  25.             draw = true
  26.         end
  27.     end
  28.     Text.print(tostring(iframe), 100*i, 100*i)
  29.     Text.print(tostring(mem(0x00B251E0, FIELD_WORD)), 20, 80)
  30.     animate()
  31.     if player:mem(0x122,FIELD_WORD) == 7 then
  32.         timeractive = true
  33.     end
  34.     if timeractive then
  35.         animTimer = animTimer + 1
  36.         waitFrame = waitFrame + 1
  37.         if waitFrame >= 65 then
  38.             frameCounter = frameCounter + 1
  39.             waitFrame = 0
  40.         end
  41.     end
  42.     --for i,star in ipairs(BGO.get()) do
  43.     --  Text.print(tostring(star.id), 20*i, 10*i)
  44.     --    --star.width = 48
  45.     --  --star.height = 48
  46.     --end
  47. end
  48.  
  49.  
  50. function animate()
  51.     if animTimer == timerTotal - frameRate * frameCounter then
  52.         iframe = frameCounter
  53.     end
  54.    
  55.     --if animTimer == timerTotal - Framerate * 11 then
  56.     --  iframe = 0
  57.     --end
  58.     --if animTimer == timerTotal - Framerate * 10 then
  59.     --  iframe = 1
  60.     --end
  61.     --if animTimer == timerTotal - Framerate * 9 then
  62.     --  iframe = 2
  63.     --end
  64.     --if animTimer == timerTotal - Framerate * 8 then
  65.     --  iframe = 3
  66.     --end
  67.     --if animTimer == timerTotal - Framerate * 7 or animTimer == timerTotal - Framerate * 6 or animTimer == timerTotal - Framerate * 5 or animTimer == timerTotal - Framerate * 4 then
  68.     --  iframe = 4
  69.     --end
  70.     --if animTimer == timerTotal - Framerate * 3 then
  71.     --  iframe = 3
  72.     --end
  73.     --if animTimer == timerTotal - Framerate * 2 then
  74.     --  iframe = 2
  75.     --end
  76.     --if animTimer == timerTotal - Framerate * 1 then
  77.     --  iframe = 1
  78.     --end
  79.     --if animTimer == timerTotal then
  80.     --  iframe = 0
  81.     --  timeractive = false
  82.     --  animTimer = 0
  83.     --end
  84. end
  85.  
  86. function staranimater()
  87.     StarAnimtimer = StarAnimtimer + 1
  88.     if StarAnimtimer == 8 then
  89.         Stariframe = Stariframe + 1
  90.         StarAnimtimer = 0
  91.         if Stariframe == 3 then
  92.             Stariframe = 0
  93.         end
  94.     end
  95. end
  96.  
  97. function onDraw()
  98.     Graphics.drawImageToSceneWP(Gate, -199758, -200448, 0, 352 * iframe, 316, 352, -85.0)
  99.     if draw then
  100.         Graphics.drawImageToSceneWP(Star, -199658, -200256, 0, 80 * Stariframe, 116, 80, -80.0)
  101.     end
  102. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement