SHARE
TWEET

DKC General lua script

a guest Dec 13th, 2010 159 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. while true do
  2.  
  3. -- X and Y Speeds
  4.  
  5.   Vehicle1 = memory.readbyte(0x7E08B0)
  6.   Vehicle2 = memory.readbyte(0x7E091E)
  7.   Tobog = memory.readbyte(0x7E0931)
  8.   CID = memory.readbyte(0x7E05B3)
  9.   Dx = memory.readwordsigned(0x7E08A2)
  10.   Dy = memory.readwordsigned(0x7E08A6)
  11.   Kx = memory.readwordsigned(0x7E0910)
  12.   Ky = memory.readwordsigned(0x7E0914)
  13.   Tx1 = memory.readwordsigned(0x7E0A60)
  14.   Ty1 = memory.readwordsigned(0x7E0A5E)
  15.   Tx2 = memory.readwordsigned(0x7E09EC)
  16.   Ty2 = memory.readwordsigned(0x7E09F0)
  17.   Vx = memory.readwordsigned(0x7E0C80)
  18.   Vy = memory.readwordsigned(0x7E0C84)
  19.  
  20.   if Tobog == 0x07 then
  21.     if Tx1 < 200 then
  22.       gui.text(10,43, "Toboggan")
  23.       gui.text(10,55, "X spd: " .. Tx2)
  24.       gui.text(10,65, "Y spd: " .. Ty2)
  25.     else
  26.       gui.text(10,43, "Toboggan")
  27.       gui.text(10,55, "X spd: " .. Tx1)
  28.       gui.text(10,65, "Y spd: " .. Ty1)
  29.     end
  30.   else
  31.     if CID == 1 then
  32.       if Vehicle1 == 0x09 then
  33.         gui.text(10,43, "Vehicle")
  34.         gui.text(10,55, "X spd: " .. Vx)
  35.         gui.text(10,65, "Y spd: " .. Vy)
  36.       else
  37.         gui.text(10,43, "Dixie")
  38.         gui.text(10,55, "X spd: " .. Dx)
  39.         if Dy == 768 then
  40.           gui.text(10,65, "Y spd: 0")
  41.         elseif Dy == 880 then
  42.           gui.text(10,65, "Y spd: 0")
  43.         else
  44.           gui.text(10,65, "Y spd: " .. Dy)
  45.         end
  46.       end
  47.     end
  48.     if CID == 2 then
  49.       if Vehicle2 == 0x09 then
  50.         gui.text(10,43, "Vehicle")
  51.         gui.text(10,55, "X spd: " .. Vx)
  52.         gui.text(10,65, "Y spd: " .. Vy)
  53.       else
  54.         gui.text(10,43, "Kiddie")
  55.         gui.text(10,55, "X spd: " .. Kx)
  56.         if Ky == 768 then
  57.           gui.text(10,65, "Y spd: 0")
  58.         elseif Ky == 880 then
  59.           gui.text(10,65, "Y spd: 0")
  60.         else
  61.           gui.text(10,65, "Y spd: " .. Ky)
  62.         end
  63.       end
  64.     end
  65.   end
  66.  
  67.  
  68. -- Team Throw OK?
  69.  
  70.   TT = memory.readbyte(0x7E08B0)
  71.  
  72.   if CID == 2 then
  73.     if TT == 62 then
  74.       gui.text(10,75, "Throw?")
  75.       gui.text(38,75, "NO", "red")
  76.     elseif TT == 64 then
  77.       gui.text(10,75, "Throw?")
  78.       gui.text(38,75, "OK", "green")
  79.     end
  80.   end
  81.  
  82.   emu.frameadvance()
  83. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top