Advertisement
Noneatme

Untitled

Jan 30th, 2013
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.63 KB | None | 0 0
  1. cFunc["calculate_pongpos"] = function()
  2.     if(cSetting["enabled"] == true) then
  3.         if(cSetting["pong_state"] == 1) then
  4.             cSetting["pong_posx"] = cSetting["pong_posx"]-cSetting["pong_speed"]
  5.         elseif(cSetting["pong_state"] == 2) then
  6.            
  7.         elseif(cSetting["pong_state"] == 3) then
  8.             cSetting["pong_posx"] = cSetting["pong_posx"]+cSetting["pong_speed"]
  9.             cSetting["pong_posy"] = cSetting["pong_posy"]+cSetting["pong_yadd"]
  10.         elseif(cSetting["pong_state"] == 4) then
  11.  
  12.         elseif(cSetting["pong_state"] == 5) then
  13.             cSetting["pong_posx"] = cSetting["pong_posx"]+cSetting["pong_speed"]
  14.             cSetting["pong_posy"] = cSetting["pong_posy"]-cSetting["pong_yadd"]
  15.         elseif(cSetting["pong_state"] == 6) then
  16.            
  17.         end
  18.        
  19.         -- PONG CHECK --
  20.         -- PLAYERCHECK --
  21.         local y1 = cSetting["player_1_pos"]
  22.         local y2 = cSetting["pong_posy"]
  23.        
  24.         local distanzZurMitte = math.floor((y1-y2)+((151/aesy*sy)/2)-(25/aesy*sy)/2) -- WTF :D
  25.        
  26.         --local dis = math.floor((getDistanceBetweenPoints2D((48/aesx*sx), y2-distanzZurMitte/2, cSetting["pong_posx"], cSetting["pong_posy"])))
  27.        
  28.         --if(distanzZurMitte < 88/aesy*sy) and (dis <= 19/aesx*sx) then
  29.         if(cSetting["pong_posx"]-48/aesx*sx < 25/aesx*sx) then
  30.             if(distanzZurMitte/2 > 44/aesy*sy) then
  31.                 cSetting["pong_state"] = 3 -- Rechts oben
  32.             else
  33.                 cSetting["pong_state"] = 5 -- Rechts unten
  34.             end
  35.             cSetting["pong_yadd"] = (distanzZurMitte/10)
  36.         end
  37.         dxDrawText(cSetting["pong_yadd"], 500/aesx*sx, 60/aesy*sy, 1355/aesx*sx, 169/aesy*sy, tocolor(255, 255, 255, 255), 4/(aesx+aesy)*(sx+sy), "pricedown", "center", "center", false, false, true, false, false)
  38.         -- RAENDER CHECK --
  39.        
  40.     end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement