Created
November 19, 2016 08:45
-
-
Save MikuAuahDark/5bd47eb311cea985273883dd3d2daa11 to your computer and use it in GitHub Desktop.
GTASA Show Playing CLEO Script by Pressing F7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Show current playing user tracks when F7 is pressed | |
// Miku AuahDark <[email protected]> | |
{$CLEO .cs3} | |
{$VERSION 3.1.0027} | |
{ | |
Reserved Variables: | |
0@ = LoadLibrary("msvcrt") | |
1@ = GetProcAddress(0@,"calloc") | |
2@ = GetProcAddress(0@,"strrchr") | |
3@ = GetProcAddress(0@,"free") | |
4@ = Temporary variable | |
5@ = GetProcAddress(0@,"sprintf") | |
6@ = Pointer | |
9@ = Allocated Memory | |
10@ = Constants location | |
} | |
const | |
NULL = 0 // Same as #define NULL 0 in C++ | |
end | |
var | |
4@:Int | |
7@:Int | |
8@:Int | |
10@:Int | |
end | |
0000: | |
0000: | |
jump @Initialize | |
0900: "Copyright © 2037 Dark Energy Processor Corporation" | |
0000: | |
:Constants | |
hex | |
7E 62 7E 50 6C 61 79 69 6E 67 3A 7E 73 7E 20 25 // ~b~Playing:~s~ %s | |
73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | |
7E 62 7E 50 6C 61 79 69 6E 67 3A 7E 73 7E 20 25 // ~b~Playing:~s~ %s~n~~p~Next:~s~ %s | |
73 7E 6E 7E 7E 70 7E 4E 65 78 74 3A 7E 73 7E 20 | |
25 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | |
end | |
:Initialize | |
if and | |
0aa2: 0@ = LoadLibrary "msvcrt" | |
0aa4: 1@ = GetProcAddress "calloc" Library 0@ | |
0aa4: 2@ = GetProcAddress "strrchr" Library 0@ | |
0aa4: 3@ = GetProcAddress "free" Library 0@ | |
0aa4: 5@ = GetProcAddress "sprintf" Library 0@ | |
then | |
0a8d: 6@ = ReadFrom 0xB606C8 Size 4 VirtualProtect 0 | |
0aa7: Call 1@ With 2 Arguments_Pop 2 ArgumentList 4 16 ResultTo 9@ // 9@ = calloc(16,4) | |
0a9f: 4@ = CurrentThreadPointer | |
4@ += 16 | |
0a8d: 10@ = ReadFrom 4@ Size 4 VirtualProtect 0 | |
10@ -= @Constants | |
jump @MainLoop | |
else | |
0a93: FinishThread | |
end | |
:MainLoop | |
wait 100 | |
if | |
0ab0: Key 0x76 Pressed | |
then | |
0a8e: 7@ = 6@ + 0x6006C | |
0a8e: 8@ = 6@ + 0x60070 | |
0a8d: 7@ = ReadFrom 7@ Size 4 VirtualProtect 0 | |
7@ += 4 | |
0a8d: 7@ = ReadFrom 7@ Size 4 VirtualProtect 0 | |
7@ += 8 | |
0a8d: 7@ = ReadFrom 7@ Size 4 VirtualProtect 0 | |
0a8d: 8@ = ReadFrom 8@ Size 4 VirtualProtect 0 | |
if | |
8@ <> NULL | |
then | |
8@ += 4 | |
0a8d: 8@ = ReadFrom 8@ Size 4 VirtualProtect 0 | |
if | |
8@ <> NULL | |
then | |
8@ += 8 | |
0a8d: 8@ = ReadFrom 8@ Size 4 VirtualProtect 0 | |
if | |
8@ <> NULL | |
then | |
// Get their basenames | |
0aa7: Call 2@ With 2 Arguments_Pop 2 ArgumentList 92 7@ ResultTo 4@ // 4@ = strrchr(7@,'\\') | |
if | |
4@ == NULL | |
then | |
7@ = 4@ | |
else | |
0a8e: 7@ = 4@ + 1 | |
end | |
0aa7: Call 2@ With 2 Arguments_Pop 2 ArgumentList 92 8@ ResultTo 4@ // 4@ = strrchr(8@,'\\') | |
if | |
4@ == NULL | |
then | |
8@ = 4@ | |
else | |
0a8e: 8@ = 4@ + 1 | |
end | |
// Format the message | |
0a8e: 4@ = 10@ + 32 // ~b~Playing:~s~ %s~n~~p~Next:~s~ %s | |
0aa5: Call 5@ With 4 Arguments_Pop 4 ArgumentList 8@ 7@ 4@ 9@ // sprintf(9@,"~b~Playing:~s~ %s~n~~p~Next:~s~ %s",7@,8@) | |
jump @ShowTracks | |
else | |
jump @Process1 | |
end | |
else | |
jump @Process1 | |
end | |
else | |
jump @Process1 | |
end | |
else | |
jump @MainLoop | |
end | |
:Process1 | |
0aa7: Call 2@ With 2 Arguments_Pop 2 ArgumentList 92 7@ ResultTo 4@ // 4@ = strrchr(7@,'\\') | |
if | |
4@ == NULL | |
then | |
7@ = 4@ | |
else | |
0a8e: 7@ = 4@ + 1 | |
end | |
4@ = 10@ // ~b~Playing:~s~ %s | |
0aa5: Call 5@ With 3 Arguments_Pop 3 ArgumentList 7@ 4@ 9@ // sprintf(9@,"~b~Playing:~s~ %s",7@) | |
:ShowTracks | |
0aa5: Call 0x69F1E0 With 4 Arguments_Pop 4 ArgumentList 1 1 5000 9@ | |
wait 1000 | |
jump @MainLoop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment