SHARE
TWEET

Credits Warp Display LUA Script

SethBling Jan 21st, 2015 2,959 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. target = {
  2.         ["slot7id"] = 62,
  3.         ["slot7x"] = 12*256+178,
  4.         ["fragmenty"] = 0,
  5.         ["fragmentx"] = 224,
  6.         ["viney"] = 13,
  7.         ["mushroomy"] = 55,
  8.         ["shell0x"] = 10,
  9.         ["shell1x"] = 104,
  10.         ["shell2x"] = 104,
  11.         ["shell3x"] = 74,
  12.         ["shell4x"] = 146,
  13.         ["shell5x"] = 117,
  14.         ["shell6x"] = 96,
  15.         ["slot8id"] = 53,
  16.         ["slot9id"] = 145,
  17. }
  18.  
  19. order = {
  20.         "slot7id",
  21.         "mushroomy",
  22.         "viney",
  23.         "fragmenty",
  24.         "fragmentx",
  25.         "slot7x",
  26.         "slot8id",
  27.         "shell0x",
  28.         "shell1x",
  29.         "shell2x",
  30.         "shell3x",
  31.         "shell4x",
  32.         "shell5x",
  33.         "shell6x",
  34.         "slot9id",
  35. }
  36.  
  37. while true do
  38.         mem = {}
  39.         mem["slot7id"] = memory.readbyte(0xA5)
  40.         slot7xhigh = memory.readbyte(0x14E7)
  41.         slot7xlow = memory.readbyte(0xEB)
  42.         mem["slot7x"] = slot7xhigh*256+slot7xlow
  43.         mem["fragmenty"] = memory.readbyte(0x1806)
  44.         mem["fragmentx"] = memory.readbyte(0x1805)
  45.         mem["viney"] = memory.readbyte(0xE2)
  46.         mem["mushroomy"] = memory.readbyte(0xE3)
  47.         mem["shell0x"] = memory.readbyte(0xE4)
  48.         mem["shell1x"] = memory.readbyte(0xE5)
  49.         mem["shell2x"] = memory.readbyte(0xE6)
  50.         mem["shell3x"] = memory.readbyte(0xE7)
  51.         mem["shell4x"] = memory.readbyte(0xE8)
  52.         mem["shell5x"] = memory.readbyte(0xE9)
  53.         mem["shell6x"] = memory.readbyte(0xEA)
  54.         mem["slot8id"] = memory.readbyte(0xA6)
  55.         mem["slot9id"] = memory.readbyte(0xA7)
  56.        
  57.         boxx = 3
  58.         for i = 1,#order do
  59.                 key = order[i]
  60.                 if mem[key] == target[key] or key == "fragmentx" and mem[key] >=216 and mem[key] <= 229 then
  61.                         gui.drawBox(boxx, 3, boxx+6, 9, 0xFF000000, 0x8000FF00);
  62.                 else
  63.                         gui.drawBox(boxx, 3, boxx+6, 9, 0xFF000000, 0x80FF0000);
  64.                 end
  65.                 boxx = boxx + 8
  66.         end
  67.        
  68.         for slot = 0,7 do
  69.                 status = memory.readbyte(0x14C8+slot)
  70.                 id = memory.readbyte(0x9E+slot)
  71.                 guide = false
  72.                 if id == 5 and slot >= 0 and slot <= 6 then
  73.                         guide = true
  74.                         name = "shell"..slot.."x"
  75.                 end
  76.                 if id == 0x3E and slot == 7 then
  77.                         guide = true
  78.                         name = "slot7x"
  79.                 end
  80.  
  81.                 if status == 0xB and guide then
  82.                         targetx = target[name]
  83.                         layer1x = memory.read_s16_le(0x1A);
  84.                         layer1y = memory.read_s16_le(0x1C);
  85.                        
  86.                         if id == 5 then
  87.                                 targetx = targetx + math.ceil((layer1x-targetx)/256)*256
  88.                         end
  89.                        
  90.                         gui.drawBox(targetx-layer1x, 0, targetx-layer1x+15, 256, 0x60000000)
  91.                        
  92.                         spritex = memory.readbyte(0xE4+slot) + memory.readbyte(0x14E0+slot)*256
  93.                         spritey = memory.readbyte(0xD8+slot) + memory.readbyte(0x14D4+slot)*256
  94.                         gui.drawBox(spritex-layer1x,spritey-layer1y,spritex-layer1x+15, spritey-layer1y+15, 0x60000000)
  95.                 end
  96.         end            
  97.        
  98.         emu.frameadvance();    
  99. 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