Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ScriptInfo = {"SMURFS Luascript by Mugg1991",
- "v0.1",
- "Oct 2017"}
- memory.usememorydomain("System Bus")
- function text(x, y, text, color, backcolor)
- if backcolor==nil then backcolor=0x00000000 end
- gui.drawText(x, y, text,color,backcolor,10,"Arial")
- end
- client.SetGameExtraPadding(80,0,0,0)
- console.clear()
- for i=1,table.getn(ScriptInfo),1 do
- print(ScriptInfo[i])
- end
- XposBefore=0
- nomove=0
- event.onexit(function()
- client.SetGameExtraPadding(0,0,0,0)
- end)
- event.onloadstate(function()
- nomove=0
- end)
- local dirTable = {
- [16] = 1,
- [32] = 2,
- [48] = 3
- }
- while true do
- Xcam = memory.read_u16_le(0xFF97)
- Ycam = memory.read_u16_le(0xFF99)
- Xpos = memory.read_u16_le(0xFFA1)
- Ypos = memory.read_u16_le(0xFFA3)
- Xvelo = memory.read_u8(0xFFCB)
- dir = memory.read_u8(0xFFEF)
- timerTen = memory.read_u8(0xF9CD)
- timerOne = memory.read_u8(0xF9CE)
- timerSub = "." .. string.format("%02d",memory.read_u8(0xF93E))
- timer = string.format("%x%x",timerTen,timerOne)
- invuln = memory.read_s8(0xF9AA)
- health = memory.read_s8(0xF9B6)
- rng = memory.read_u8(0xFAB1)
- difficulty = memory.read_u8(0xD9DB)
- level = memory.read_u8(0xf9a1)
- text(18,24,"velX " .. Xvelo,0xFFFFFF00)
- text(26,33,"dir " .. tostring(dirTable[dir]),0xFFFFFF00)
- text(32,49,"X " .. Xpos,0xFFFFFF00)
- text(32,58,"Y " .. Ypos,0xFFFFFF00)
- text(12,67,"camX " .. Xcam,0xFFFFFF00)
- text(12,76,"camY " .. Ycam,0xFFFFFF00)
- text(8,91,"invuln " .. invuln,0xFFFFFF00)
- text(8,100,"health " .. health,0xFFFFFF00)
- text(18,109,"time " .. timer,0xFFFFFF00)
- text(54,109,timerSub,0xFFFFFF00)
- text(24,118,"rng " .. rng,0xFFFFFF00)
- text(2,127,"difficulty " .. difficulty,0xFFFFFF00)
- if XposBefore ~= Xpos then
- nomove=0
- else
- nomove=nomove+1
- end
- text(8,49,nomove,0xFFFF4000)
- XposBefore = Xpos
- emu.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement