Coder Social home page Coder Social logo

cleolibrary / cleo-redux Goto Github PK

View Code? Open in Web Editor NEW
202.0 11.0 21.0 9.07 MB

Experimental JavaScript runtime for GTA 3D era games/GTA IV/Bully

Home Page: https://re.cleo.li

License: Other

JavaScript 0.78% HTML 12.47% Rust 33.83% C++ 11.70% C 6.14% Inno Setup 33.00% Shell 2.08%
cleolibrary javascript scripting-engine gta scripting-language typescript cleo-redux

cleo-redux's Introduction

CLEO Redux

Discord YouTube Channel

CLEO Redux is an experimental runtime for GTA 3D era games and, with limited functionality, other games or applications. It supports JavaScript and TypeScript languages.

Its flexible, extensible and secure environment provides rich scripting capabilities and allows easily add and remove countless mini-scripts.

A complete simple script looks like this:

const VK_F4 = 115;
while (true) {
  wait(250);

  if (Pad.IsKeyPressed(VK_F4)) {
    Game.ActivateSaveMenu();
    wait(1000);
  }
}

To run this script, save it as a .js file in the {game}/CLEO directory and start the game.

See more examples

Documentation

https://re.cleo.li/docs

Installation

https://re.cleo.li/docs/en/installation.html

Contribution

There are multiple ways to contribute to the project. We welcome any help with improving our documentation, writing new example scripts, developing plugins using CLEO SDK, sharing your ideas, or testing early builds available on our Discord.

License

CLEO Redux is available under the end-user license agreement

cleo-redux's People

Contributors

jesper-hustad avatar thefantomkiller420 avatar thirteenag avatar user-grinch avatar vitalrus95 avatar x87 avatar yuksel-kadir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cleo-redux's Issues

Problem: Silent Patch Installed in Modloader

When I installed Silent Patch in Modloader Folder

This window coms sometime (and sometime not)

Game works normally, but many times I start gta_sa.exe this window come

Screenshot (252) - Copy

Solution: I think this plugin (ImGuiRedux) try to find SilentPatch Files in GTA SA/VC/III root Direcory..
You can make an code

if Silent Patch files not available in root Directory
Then Try to Find Scripts Directory
if not available in Scripts directory
Then Try to Find Modloader Directory (with any subfolder)

Add type label

Hi, I just want to register some SA:MP natives in this cool JavaScript runtime and I need the label type to add in sa.json

Basically I have this native register:

{
  "id": "0B34",
  "name": "sampRegisterChatCommand",
  "num_params": 2,
  "input": [
    {
      "name": "cmd",
      "type": "string"
    },
    {
      "name": "func",
      "type": "label"
    }
  ]
}

And this function:

// method 1
native("sampRegisterChatCommand", "test", () => {
   log("Command /test called");
});

// method 2
function test() {
   log("Command /test called");
}
native("sampRegisterChatCommand", "test", test);

The problem is that not working with this label type

[ERROR] Unknown argument type function in command sampRegisterChatCommand

CLEO Redux doesn't work on re3

When i run re3, CLEO Redux simply does not want to see the game and does not work. Even if the file "re3.pdb" is present, the script loader still does not see the game

SA: DE How to read and write memory

Is there a feasible way to read/write the memory of San Andreas (The Definitive Edition)
I can easily modify them through the Cheat engine, but I need to use this opcodes in the script to achieve some functions.

Frames are skipping

https://youtu.be/_crRD00DPIM

The movement should be smooth, after all, I'm using wait 0.

{$cleo}
0000:

while true
    wait 0      

    if 0C00: key_pressed 89 //y
    then
        04C4: store_coords_to 11@ 12@ 13@ from_actor $PLAYER_ACTOR with_offset 0.0 1.0 0.0
        00A1: put_actor $PLAYER_ACTOR at 11@ 12@ 13@
    end  
    if 0C00: key_pressed 72 //h
    then
        04C4: store_coords_to 11@ 12@ 13@ from_actor $PLAYER_ACTOR with_offset 0.0 -1.0 0.0
        00A1: put_actor $PLAYER_ACTOR at 11@ 12@ 13@
    end
    
end

CLEO Redux - Some doubts!

Could be Event-driven stuff be added to Javascript version of cleo?

Like, instead of having a while loop as the main code, we could have something like:

//script.js

GameEvents.onKeyPressed(keyCode) => {
   //......

}

Also a lot of events, so we can have less expensive code!

There's a way to use external Classes from Javascript?

For example the class WebScoket

[Redux SA:DE] - Using Text class has some bugs!

PS: Using javascript

First bug is, every time you call any method from the class Text which creates a text on screen the word missing! appears in front of it:

image

Secong bug is, if your string is too big, the game closes without any crash message:

//Key 117 is F6
var player = new Player(0);
var playerHasControl = player.isControlOn();
var isMenuActive = false;
var CM = {
    showText: function (msg) {
        Text.Print(msg, 500, 0);
    }
};
while (true) {
    if (Pad.IsKeyPressed(117)) {
        if (!isMenuActive) {
            isMenuActive = true;
            CM.showText("hi\0");
            player.setControl(false);
            var i = 0;
            var msg = "";
            while (i < 10) {
                msg += String(i) + " ";
                i++;
                CM.showText(msg);
                wait(500);
            }
        }
        else {
            isMenuActive = false;
            player.setControl(true);
        }
        log("player is being controlled: " + String(player.isControlOn()));
    }
    wait(100);
}

Third bug: Using Text.Display() has no method to clear it() like Help and Print

I took some reading about menus in CLEO and seems you need to create GXT in order to show strings in-game, and to solve that maybe a GXT class should exists? like Text.Print(GXT("any string here"),500,0)

Memory Access does not work in VC/SA in delegate mode (has a workaround)

there are multiple Memory.Read/Memory.Write commands in vc.json and sa.json for both CLEO PC and CLEO Android:

https://library.sannybuilder.com/#/vc?q="READ_MEMORY"
https://library.sannybuilder.com/#/sa?q="WRITE_MEMORY"

if CLEO runs in delegate mode Memory.Read and Memory.Write use wrong opcodes (0DD8 and 0DD9), leading to the game crash.

To fix that, platform tags should be implemented: sannybuilder/library#38

Temporary solution: delete two commands from vc.json and sa.json:

,
        {
          "input": [
            {
              "name": "address",
              "type": "int"
            },
            {
              "name": "size",
              "type": "int"
            },
            {
              "name": "ib",
              "type": "bool"
            }
          ],
          "output": [
            {
              "name": "result",
              "type": "any",
              "source": "var_any"
            }
          ],
          "id": "0DD8",
          "name": "READ_MEMORY",
          "num_params": 4,
          "class": "Memory",
          "member": "Read",
          "attrs": {
            "is_overload": true,
            "is_static": true
          },
          "short_desc": "Reads a value from the game memory"
        },
        {
          "input": [
            {
              "name": "address",
              "type": "int"
            },
            {
              "name": "value",
              "type": "any"
            },
            {
              "name": "size",
              "type": "int"
            },
            {
              "name": "ib",
              "type": "bool"
            },
            {
              "name": "vp",
              "type": "bool"
            }
          ],
          "id": "0DD9",
          "name": "WRITE_MEMORY",
          "num_params": 5,
          "class": "Memory",
          "member": "Write",
          "attrs": {
            "is_overload": true,
            "is_static": true
          },
          "short_desc": "Writes a value to the game memory"
        }

[SA:DE] Fatal Error when using opcode 076c in a script

Hi i tried to give the mafia territory around Las Venturas using the opcode 076c which would normally work perfectly fine in old San Andreas with CLEO 4 but with SA DE each time it refuses to load the game and causes a UE4 Fatal Error to occur?

Does not work with reVC

Will not load with reVC
I'll provide the log file if it helps:
15:18:14 [INFO] CLEO Redux 1.0.2 (x64)
15:18:14 [INFO] Copyright (c) 2021-2022, Seemann. Available under the license agreement at https://re.cleo.li/LICENSE.txt
15:18:14 [INFO] Visit re.cleo.li for news and updates.
15:18:15 [INFO] Host identified as reVC (64 bit)
15:18:15 [INFO] Image base address 0x7ff663ab0000
15:18:15 [WARN] CLEO Redux does not support CS scripts in reVC (64 bit)
15:18:15 [INFO] Registering custom commands
15:18:15 [INFO] Registering command IS_KEY_PRESSED
15:18:15 [INFO] Registering unsafe command READ_MEMORY with required permission mem
15:18:15 [INFO] Registering unsafe command WRITE_MEMORY with required permission mem
15:18:15 [INFO] Registering unsafe command CALL_FUNCTION with required permission mem
15:18:15 [INFO] SDK version 5
15:18:15 [INFO] Loading plugins from E:\GTA\GTAVC\CLEO\CLEO_PLUGINS
15:18:15 [INFO] Found plugin dylib64.cleo
15:18:15 [INFO] Dylib plugin 1.1
15:18:15 [INFO] Registering unsafe command LOAD_DYNAMIC_LIBRARY with required permission dll
15:18:15 [INFO] Registering unsafe command FREE_DYNAMIC_LIBRARY with required permission dll
15:18:15 [INFO] Registering unsafe command GET_DYNAMIC_LIBRARY_PROCEDURE with required permission dll
15:18:15 [INFO] Loaded plugin dylib64.cleo
15:18:15 [INFO] Found plugin IdeLoader64.cleo
15:18:15 [INFO] IDE Loader 1.1
15:18:15 [INFO] Registering a custom loader for glob ".ide"
15:18:15 [INFO] Loaded plugin IdeLoader64.cleo
15:18:15 [INFO] Found plugin ImGuiReduxWin64.cleo
15:18:16 [INFO] Registering command IMGUI_BEGIN_FRAME
15:18:16 [INFO] Registering command IMGUI_END_FRAME
15:18:16 [INFO] Registering command IMGUI_BEGIN
15:18:16 [INFO] Registering command IMGUI_END
15:18:16 [INFO] Registering command IMGUI_SET_WINDOW_POS
15:18:16 [INFO] Registering command IMGUI_SET_WINDOW_SIZE
15:18:16 [INFO] Registering command IMGUI_SET_NEXT_WINDOW_POS
15:18:16 [INFO] Registering command IMGUI_SET_NEXT_WINDOW_SIZE
15:18:16 [INFO] Registering command IMGUI_DUMMY
15:18:16 [INFO] Registering command IMGUI_TEXT
15:18:16 [INFO] Registering command IMGUI_TEXT_CENTERED
15:18:16 [INFO] Registering command IMGUI_TEXT_DISABLED
15:18:16 [INFO] Registering command IMGUI_TEXT_WRAPPED
15:18:16 [INFO] Registering command IMGUI_TEXT_COLORED
15:18:16 [INFO] Registering command IMGUI_BULLET_TEXT
15:18:16 [INFO] Registering command IMGUI_SET_TOOLTIP
15:18:16 [INFO] Registering command IMGUI_BUTTON
15:18:16 [INFO] Registering command IMGUI_IMAGE_BUTTON
15:18:16 [INFO] Registering command IMGUI_INVISIBLE_BUTTON
15:18:16 [INFO] Registering command IMGUI_COLOR_BUTTON
15:18:16 [INFO] Registering command IMGUI_ARROW_BUTTON
15:18:16 [INFO] Registering command IMGUI_CHECKBOX
15:18:16 [INFO] Registering command IMGUI_SAMELINE
15:18:16 [INFO] Registering command IMGUI_NEWLINE
15:18:16 [INFO] Registering command IMGUI_COLUMNS
15:18:16 [INFO] Registering command IMGUI_NEXT_COLUMN
15:18:16 [INFO] Registering command IMGUI_SPACING
15:18:16 [INFO] Registering command IMGUI_SEPARATOR
15:18:16 [INFO] Registering command GET_FRAMERATE
15:18:16 [INFO] Registering command IMGUI_GET_VERSION
15:18:16 [INFO] Registering command IMGUI_GET_PLUGIN_VERSION
15:18:16 [INFO] Registering command IMGUI_SET_CURSOR_VISIBLE
15:18:16 [INFO] Registering command IMGUI_GET_FRAME_HEIGHT
15:18:16 [INFO] Registering command IMGUI_GET_WINDOW_POS
15:18:16 [INFO] Registering command IMGUI_GET_WINDOW_SIZE
15:18:16 [INFO] Registering command IMGUI_CALC_TEXT_SIZE
15:18:16 [INFO] Registering command IMGUI_GET_WINDOW_CONTENT_REGION_WIDTH
15:18:16 [INFO] Registering command IMGUI_BEGIN_MAINMENUBAR
15:18:16 [INFO] Registering command IMGUI_END_MAINMENUBAR
15:18:16 [INFO] Registering command IMGUI_MENU_ITEM
15:18:16 [INFO] Registering command IMGUI_SELECTABLE
15:18:16 [INFO] Registering command IMGUI_BEGIN_CHILD
15:18:16 [INFO] Registering command IMGUI_END_CHILD
15:18:16 [INFO] Registering command IMGUI_PUSH_ITEM_WIDTH
15:18:16 [INFO] Registering command IMGUI_POP_ITEM_WIDTH
15:18:16 [INFO] Registering command IMGUI_COLLAPSING_HEADER
15:18:16 [INFO] Registering command IMGUI_SLIDER_INT
15:18:16 [INFO] Registering command IMGUI_SLIDER_FLOAT
15:18:16 [INFO] Registering command IMGUI_INPUT_INT
15:18:16 [INFO] Registering command IMGUI_INPUT_FLOAT
15:18:16 [INFO] Registering command IMGUI_INPUT_TEXT
15:18:16 [INFO] Registering command IMGUI_RADIO_BUTTON
15:18:16 [INFO] Registering command IMGUI_COLOR_PICKER
15:18:16 [INFO] Registering command IMGUI_IS_ITEM_ACTIVE
15:18:16 [INFO] Registering command IMGUI_IS_ITEM_CLICKED
15:18:16 [INFO] Registering command IMGUI_IS_ITEM_FOCUSED
15:18:16 [INFO] Registering command IMGUI_IS_ITEM_HOVERED
15:18:16 [INFO] Registering command IMGUI_GET_SCALING_SIZE
15:18:16 [INFO] Registering command IMGUI_GET_DISPLAY_SIZE
15:18:16 [INFO] Registering command IMGUI_SET_NEXT_WINDOW_TRANSPARENCY
15:18:16 [INFO] Registering command IMGUI_SET_MESSAGE
15:18:16 [INFO] Registering command IMGUI_BULLET
15:18:16 [INFO] Registering command IMGUI_COMBO
15:18:16 [INFO] Registering command IMGUI_LOAD_IMAGE
15:18:16 [INFO] Registering command IMGUI_FREE_IMAGE
15:18:16 [INFO] Registering command IMGUI_PUSH_STYLE_VAR
15:18:16 [INFO] Registering command IMGUI_PUSH_STYLE_VAR2
15:18:16 [INFO] Registering command IMGUI_PUSH_STYLE_COLOR
15:18:16 [INFO] Registering command IMGUI_POP_STYLE_VAR
15:18:16 [INFO] Registering command IMGUI_POP_STYLE_COLOR
15:18:16 [INFO] Registering command IMGUI_TABS
15:18:16 [INFO] Loaded plugin ImGuiReduxWin64.cleo
15:18:16 [INFO] Found plugin IniFiles64.cleo
15:18:16 [INFO] IniFiles plugin 1.2
15:18:16 [INFO] Registering unsafe command READ_INT_FROM_INI_FILE with required permission fs
15:18:16 [INFO] Registering unsafe command WRITE_INT_TO_INI_FILE with required permission fs
15:18:16 [INFO] Registering unsafe command READ_FLOAT_FROM_INI_FILE with required permission fs
15:18:16 [INFO] Registering unsafe command WRITE_FLOAT_TO_INI_FILE with required permission fs
15:18:16 [INFO] Registering unsafe command READ_STRING_FROM_INI_FILE with required permission fs
15:18:16 [INFO] Registering unsafe command WRITE_STRING_TO_INI_FILE with required permission fs
15:18:16 [INFO] Loaded plugin IniFiles64.cleo
15:18:16 [INFO] Found plugin Input64.cleo
15:18:16 [INFO] Input plugin 1.3
15:18:16 [INFO] Registering command IS_KEY_PRESSED
15:18:16 [INFO] Registering command IS_KEY_DOWN
15:18:16 [INFO] Registering command IS_KEY_UP
15:18:16 [INFO] Registering command GET_LAST_KEY
15:18:16 [INFO] Registering command TEST_CHEAT
15:18:16 [INFO] Registering command HOLD_KEY
15:18:16 [INFO] Registering command RELEASE_KEY
15:18:16 [INFO] Registering command SET_CURSOR_POS
15:18:16 [INFO] Registering command GET_CURSOR_POS
15:18:16 [INFO] Loaded plugin Input64.cleo
15:18:16 [INFO] Found plugin MemoryOperations64.cleo
15:18:16 [INFO] Init MemoryOperations
15:18:16 [INFO] Registering unsafe command GET_IMAGE_BASE with required permission mem
15:18:16 [INFO] Registering unsafe command FIND_PATTERN with required permission mem
15:18:16 [INFO] Registering unsafe command ALLOC_NEAR with required permission mem
15:18:16 [INFO] Registering unsafe command READ_RELATIVE_OFFSET with required permission mem
15:18:16 [INFO] Registering unsafe command WRITE_RELATIVE_OFFSET with required permission mem
15:18:16 [INFO] Loaded plugin MemoryOperations64.cleo
15:18:16 [INFO] Found plugin TextLoader64.cleo
15:18:16 [INFO] TXT Loader 1.0
15:18:16 [INFO] Registering a custom loader for glob "
.txt"
15:18:16 [INFO] Registering a custom loader for glob "*.text"
15:18:16 [INFO] Loaded plugin TextLoader64.cleo
15:18:16 [INFO] API version 0.242
15:18:16 [INFO] Found FXT dictionary E:\GTA\GTAVC\CLEO\CLEO_TEXT\Clothes.fxt
15:18:16 [INFO] FXT files successfully loaded
15:18:16 [WARN] This version of CLEO Redux does not support custom opcodes in main.scm in reVC
15:18:31 [INFO] New event received: "init runtime"
15:18:31 [INFO] Started scanning the CLEO directory at E:\GTA\GTAVC\CLEO
15:18:31 [INFO] Skipped CS script E:\GTA\GTAVC\CLEO\d_chuvst.cs
15:18:31 [INFO] Skipped CS script E:\GTA\GTAVC\CLEO\d_GoodGangs.cs
15:18:31 [INFO] Skipped CS script E:\GTA\GTAVC\CLEO\d_moneyHUD.cs
15:18:31 [INFO] Skipped CS script E:\GTA\GTAVC\CLEO\d_PoliceFix.cs
15:18:31 [INFO] Skipped CS script E:\GTA\GTAVC\CLEO\d_PS2pickup.cs
15:18:31 [INFO] Skipped CS script E:\GTA\GTAVC\CLEO\d_sandcastle.cs
15:18:31 [INFO] Skipped CS script E:\GTA\GTAVC\CLEO\d_weap_fix.cs
15:18:31 [INFO] Skipped CS script E:\GTA\GTAVC\CLEO\Mix Sets.cs
15:18:31 [INFO] Skipped CS script E:\GTA\GTAVC\CLEO\VC.Walk.cs
15:18:31 [INFO] Skipped CS script E:\GTA\GTAVC\CLEO\vcpd_ps2_teargas.cs
15:18:31 [INFO] Skipped CS script E:\GTA\GTAVC\CLEO\WardrobeMod.cs
15:18:44 [INFO] New event received: "host shut down"
15:18:44 [INFO] Exit

optional arguments

allow a command to have optional arguments, e.g. when the calling site sets default values

Pools and callbacks

Pools are most Important thing to make good mod tool, really hope for them, example:

CPool.GetVehiclesPool().forEach(function(element, index) { 
    element.explode();
});

Also I really hope replacing existing GTA callbacks, that game will call intead of default ones, for example replacing add wanted level callback:

Memory.AttachToCallback(0x000000, function() {
     log("game tried to change wanted level");
});

Greetings! #

[STEAM] GTA Trilogy - Error Cleo Redux is and Ultimate ASI Loader

I bought the gta trilogy for steam and immediately downloaded Cleo Redux and Ultimate ASI Loader and I checked that the F4 press cheat trainer is not working, what should I do?

Attention
This version does not work the old one, but where is the date 2023 for the new version?
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
Ultimate ASI Loader - (https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases)
Cleo Redux - (https://github.com/cleolibrary/CLEO-Redux/releases/tag/1.0.6)
Cheat Trainer - (https://gamemodding.com/en/gta-san-andreas-definitive-edition/scripts/90551-simple-trainer-v05.html)

Error log act (cleo_redux.log)
cleo_redux.log

javascript timeout

This problem occurs in all js scripts.
At a certain time when the game is running, the script automatically stops and cannot take effect.

19:20:57 [ERROR] script FreeSav has timed out after the default timeout of 2 seconds

The log file will have the above record

Make it open source

Hello, may I ask why this awesome project is not open source?
Especially with JavaScript, CLEO has become much more interesting for many people.
Together you could implement many more ideas instead of keeping it closed source.

CLEO Installer - contributors wanted!

As CLEO Redux grows and there are now extra files available in addition to the core library (cleo_redux.asi) such as plugins, SDK or optionally ASI loader it makes sense to create an installer that will handle all the care of installing all necessary files depending on which game the user has. For example, for GTA III (gta3.exe) it may just install cleo_redux.asi and plugins. For GTA SA DE (SanAndreas.exe) it may install cleo_redux64.asi, plugins and check the presence of version.dll (optionally download and install).

A good choice for the installer is Inno Setup that is free and powerful https://jrsoftware.org/isinfo.php
Sanny Builder's installer may serve as an example: https://github.com/sannybuilder/installer

I may come up with a more detailed list of requirements if anyone wants to pick up this task.

showTextBox doesn't work

When I use showTextBox with a custom string nothing happens in the game.

var VK_F5 = 116;
var player = new Player(0);
while (true) {
  wait(250);
  if (Pad.IsKeyPressed(VK_F5) && player.isPlaying()) 
  {   
    showTextBox("test");   
  }
}

cleo_redux.log

15:45:34 [INFO] CLEO Redux 0.9.1 (x64)
15:45:34 [INFO] Copyright (c) 2021-2022, Seemann. Available under the license agreement at https://re.cleo.li/LICENSE.txt
15:45:34 [INFO] Visit re.cleo.li for news and updates.
15:45:34 [INFO] Host identified as Vice City: The Definitive Edition (1.0.0.14718)
15:45:34 [INFO] Image base address 0x7ff741120000
15:45:34 [INFO] CleoConfig { log_opcodes: true, allow_cs: true, allow_js: true, check_updates: true, allow_fxt: true, allow_js_runtime_extensions: false, permission_level: Lax }
15:45:34 [WARN] CLEO Redux does not support CS scripts in Vice City: The Definitive Edition
15:45:34 [INFO] Registering custom commands
15:45:34 [INFO] Registering unsafe command 0C06 WRITE_MEMORY with required permission mem
15:45:34 [INFO] Registering unsafe command 0C07 READ_MEMORY with required permission mem
15:45:34 [INFO] Registering unsafe command 0C08 CALL_FUNCTION with required permission mem
15:45:34 [INFO] Registering unsafe command 0C09 CALL_FUNCTION_RETURN with required permission mem
15:45:34 [INFO] Registering command 0C00 IS_KEY_PRESSED
15:45:34 [INFO] SDK version 1
15:45:34 [INFO] Loading plugins from F:\Grand Theft Auto - Vice City\Gameface\Binaries\Win64\CLEO\CLEO_PLUGINS
15:45:34 [INFO] Meta version 0.213
15:45:34 [WARN] This version of CLEO Redux does not support custom opcodes in main.scm in Vice City: The Definitive Edition
15:45:52 [INFO] New event received: "init scripts"
15:45:52 [INFO] Started scanning the CLEO directory
15:45:52 [INFO] Found JS script F:\Grand Theft Auto - Vice City\Gameface\Binaries\Win64\CLEO\VehicleSpawnerVC.js
15:45:52 [INFO] Successfully loaded VehicleSpawnerVC.js and created a script with the name "Vehicle"
15:45:52 [INFO] Found JS script F:\Grand Theft Auto - Vice City\Gameface\Binaries\Win64\CLEO\aezakmiscript.js
15:45:52 [INFO] Successfully loaded aezakmiscript.js and created a script with the name "aezakmi"
15:45:52 [INFO] Found JS script F:\Grand Theft Auto - Vice City\Gameface\Binaries\Win64\CLEO\enums.js
15:45:52 [INFO] Successfully loaded enums.js and created a script with the name "enums"
15:45:52 [INFO] ["Vehicle"] wait(0)
15:45:52 [INFO] ["aezakmi"] wait(0)
15:45:52 [INFO] ["enums"] wait(0)
15:45:52 [INFO] ["Vehicle"] wait(250)
15:45:52 [INFO] ["aezakmi"] wait(250)
15:45:52 [INFO] script "enums" has been disposed
15:45:52 [INFO] ["Vehicle"] 000002: 0C00
15:45:52 [INFO] ["Vehicle"] 000002: 01F5
15:45:52 [INFO] ["Vehicle"] 000002: 0448
15:45:52 [INFO] ["Vehicle"] 000002: 0C00
15:45:52 [INFO] ["Vehicle"] 000002: 0C00
15:45:52 [INFO] ["Vehicle"] wait(250)
15:45:52 [INFO] ["aezakmi"] 000002: 0C00
15:45:52 [INFO] ["aezakmi"] wait(250)
15:45:53 [INFO] ["Vehicle"] 000002: 0C00
15:45:53 [INFO] ["Vehicle"] 000002: 01F5
15:45:53 [INFO] ["Vehicle"] 000002: 0448
15:45:53 [INFO] ["Vehicle"] 000002: 0C00
15:45:53 [INFO] ["Vehicle"] 000002: 0C00
15:45:53 [INFO] ["Vehicle"] wait(250)
15:45:53 [INFO] ["aezakmi"] 000002: 0C00
15:45:53 [INFO] ["aezakmi"] wait(250)
15:45:53 [INFO] ["Vehicle"] 000002: 0C00
15:45:53 [INFO] ["Vehicle"] 000002: 01F5
15:45:53 [INFO] ["Vehicle"] 000002: 0448
15:45:53 [INFO] ["Vehicle"] 000002: 0C00
15:45:53 [INFO] ["Vehicle"] 000002: 0C00
15:45:53 [INFO] ["Vehicle"] wait(250)
15:45:53 [INFO] ["aezakmi"] 000002: 0C00
15:45:53 [INFO] ["aezakmi"] wait(250)
15:45:53 [INFO] ["Vehicle"] 000002: 0C00
15:45:53 [INFO] ["Vehicle"] 000002: 01F5
15:45:53 [INFO] ["Vehicle"] 000002: 0448
15:45:53 [INFO] ["Vehicle"] 000002: 0C00
15:45:53 [INFO] ["Vehicle"] 000002: 0C00
15:45:53 [INFO] ["Vehicle"] wait(250)
15:45:53 [INFO] ["aezakmi"] 000002: 0C00
15:45:53 [INFO] ["aezakmi"] wait(250)
15:45:53 [INFO] ["Vehicle"] 000002: 0C00
15:45:53 [INFO] ["Vehicle"] 000002: 01F5
15:45:53 [INFO] ["Vehicle"] 000002: 0448
15:45:53 [INFO] ["Vehicle"] 000002: 0C00
15:45:53 [INFO] ["Vehicle"] 000002: 0C00
15:45:53 [INFO] ["Vehicle"] wait(250)
15:45:53 [INFO] ["aezakmi"] 000002: 0C00
15:45:53 [INFO] ["aezakmi"] wait(250)
15:45:54 [INFO] ["Vehicle"] 000002: 0C00
15:45:54 [INFO] ["Vehicle"] 000002: 01F5
15:45:54 [INFO] ["Vehicle"] 000002: 0448
15:45:54 [INFO] ["Vehicle"] 000002: 0C00
15:45:54 [INFO] ["Vehicle"] 000002: 0C00
15:45:54 [INFO] ["Vehicle"] wait(250)
15:45:54 [INFO] ["aezakmi"] 000002: 0C00
15:45:54 [INFO] ["aezakmi"] wait(250)
15:45:54 [INFO] ["Vehicle"] 000002: 0C00
15:45:54 [INFO] ["Vehicle"] 000002: 01F5
15:45:54 [INFO] ["Vehicle"] 000002: 0448
15:45:54 [INFO] ["Vehicle"] 000002: 0C00
15:45:54 [INFO] ["Vehicle"] 000002: 0C00
15:45:54 [INFO] ["Vehicle"] wait(250)
15:45:54 [INFO] ["aezakmi"] 000002: 0C00
15:45:54 [INFO] ["aezakmi"] wait(250)
15:45:54 [INFO] ["Vehicle"] 000002: 0C00
15:45:54 [INFO] ["Vehicle"] 000002: 01F5
15:45:54 [INFO] ["Vehicle"] 000002: 0448
15:45:54 [INFO] ["Vehicle"] 000002: 0C00
15:45:54 [INFO] ["Vehicle"] 000002: 0C00
15:45:54 [INFO] ["Vehicle"] wait(250)
15:45:54 [INFO] ["aezakmi"] 000002: 0C00
15:45:54 [INFO] ["aezakmi"] 000002: 0256
15:45:54 [INFO] ["aezakmi"] true
15:45:54 [INFO] ["aezakmi"] showTextBox(test)
15:45:54 [INFO] ["aezakmi"] wait(1000)
15:45:54 [INFO] ["Vehicle"] 000002: 0C00
15:45:54 [INFO] ["Vehicle"] 000002: 01F5
15:45:54 [INFO] ["Vehicle"] 000002: 0448
15:45:54 [INFO] ["Vehicle"] 000002: 0C00
15:45:54 [INFO] ["Vehicle"] 000002: 0C00
15:45:54 [INFO] ["Vehicle"] wait(250)
15:45:55 [INFO] ["Vehicle"] 000002: 0C00
15:45:55 [INFO] ["Vehicle"] 000002: 01F5
15:45:55 [INFO] ["Vehicle"] 000002: 0448
15:45:55 [INFO] ["Vehicle"] 000002: 0C00
15:45:55 [INFO] ["Vehicle"] 000002: 0C00
15:45:55 [INFO] ["Vehicle"] wait(250)
15:45:55 [INFO] ["Vehicle"] 000002: 0C00
15:45:55 [INFO] ["Vehicle"] 000002: 01F5
15:45:55 [INFO] ["Vehicle"] 000002: 0448
15:45:55 [INFO] ["Vehicle"] 000002: 0C00
15:45:55 [INFO] ["Vehicle"] 000002: 0C00
15:45:55 [INFO] ["Vehicle"] wait(250)
15:45:55 [INFO] ["Vehicle"] 000002: 0C00
15:45:55 [INFO] ["Vehicle"] 000002: 01F5
15:45:55 [INFO] ["Vehicle"] 000002: 0448
15:45:55 [INFO] ["Vehicle"] 000002: 0C00
15:45:55 [INFO] ["Vehicle"] 000002: 0C00
15:45:55 [INFO] ["Vehicle"] wait(250)
15:45:55 [INFO] ["aezakmi"] wait(250)
15:45:55 [INFO] ["Vehicle"] 000002: 0C00
15:45:55 [INFO] ["Vehicle"] 000002: 01F5
15:45:55 [INFO] ["Vehicle"] 000002: 0448
15:45:55 [INFO] ["Vehicle"] 000002: 0C00
15:45:55 [INFO] ["Vehicle"] 000002: 0C00
15:45:55 [INFO] ["Vehicle"] wait(250)
15:45:55 [INFO] ["aezakmi"] 000002: 0C00
15:45:55 [INFO] ["aezakmi"] wait(250)
15:45:56 [INFO] ["Vehicle"] 000002: 0C00
15:45:56 [INFO] ["Vehicle"] 000002: 01F5
15:45:56 [INFO] ["Vehicle"] 000002: 0448
15:45:56 [INFO] ["Vehicle"] 000002: 0C00
15:45:56 [INFO] ["Vehicle"] 000002: 0C00
15:45:56 [INFO] ["Vehicle"] wait(250)
15:45:56 [INFO] ["aezakmi"] 000002: 0C00
15:45:56 [INFO] ["aezakmi"] wait(250)
15:45:56 [INFO] ["Vehicle"] 000002: 0C00
15:45:56 [INFO] ["Vehicle"] 000002: 01F5
15:45:56 [INFO] ["Vehicle"] 000002: 0448
15:45:56 [INFO] ["Vehicle"] 000002: 0C00
15:45:56 [INFO] ["Vehicle"] 000002: 0C00
15:45:56 [INFO] ["Vehicle"] wait(250)
15:45:56 [INFO] ["aezakmi"] 000002: 0C00
15:45:56 [INFO] ["aezakmi"] wait(250)
15:45:56 [INFO] ["Vehicle"] 000002: 0C00
15:45:56 [INFO] ["Vehicle"] 000002: 01F5
15:45:56 [INFO] ["Vehicle"] 000002: 0448
15:45:56 [INFO] ["Vehicle"] 000002: 0C00
15:45:56 [INFO] ["Vehicle"] 000002: 0C00
15:45:56 [INFO] ["Vehicle"] wait(250)
15:45:56 [INFO] ["aezakmi"] 000002: 0C00
15:45:56 [INFO] ["aezakmi"] wait(250)
15:45:56 [INFO] ["Vehicle"] 000002: 0C00
15:45:56 [INFO] ["Vehicle"] 000002: 01F5
15:45:56 [INFO] ["Vehicle"] 000002: 0448
15:45:56 [INFO] ["Vehicle"] 000002: 0C00
15:45:56 [INFO] ["Vehicle"] 000002: 0C00
15:45:56 [INFO] ["Vehicle"] wait(250)
15:45:56 [INFO] ["aezakmi"] 000002: 0C00
15:45:56 [INFO] ["aezakmi"] wait(250)
15:45:57 [INFO] ["Vehicle"] 000002: 0C00
15:45:57 [INFO] ["Vehicle"] 000002: 01F5
15:45:57 [INFO] ["Vehicle"] 000002: 0448
15:45:57 [INFO] ["Vehicle"] 000002: 0C00
15:45:57 [INFO] ["Vehicle"] 000002: 0C00
15:45:57 [INFO] ["Vehicle"] wait(250)
15:45:57 [INFO] ["aezakmi"] 000002: 0C00
15:45:57 [INFO] ["aezakmi"] wait(250)
15:45:57 [INFO] ["Vehicle"] 000002: 0C00
15:45:57 [INFO] ["Vehicle"] 000002: 01F5
15:45:57 [INFO] ["Vehicle"] 000002: 0448
15:45:57 [INFO] ["Vehicle"] 000002: 0C00
15:45:57 [INFO] ["Vehicle"] 000002: 0C00
15:45:57 [INFO] ["Vehicle"] wait(250)
15:45:57 [INFO] ["aezakmi"] 000002: 0C00
15:45:57 [INFO] ["aezakmi"] wait(250)

Raknet

Will the ability to read and send raknet packets be added?

Redux 0.9.1 cause game crash when call Memory function with string param

This is when i run with redux 0.9.0
0 9 0
ans with redux 0.9.1
0 9 1

This is my code

const _SAMP_CHAT_INFO_OFFSET_03DL = 0x2ACA10;
const _FUNC_ADDTOCHATWND_03DL = 0x67650;
const _send_chat_message = (_color, _message) => {
    let _chat_info = Memory.Read(_library + _SAMP_CHAT_INFO_OFFSET_03DL, 4, true);
        return Memory.CallMethod(_library + _FUNC_ADDTOCHATWND_03DL, _chat_info, 5, 0, 8, _message, 0, _color, 0);
}
const _say = (_message) => {
    return Memory.CallFunction(_library + 0x5860, 1, 0, _message);
}
const _send_command = (_command) => {
    return Memory.CallFunction(_library + 0x69340, 1, 0, _command);
}
do {
    wait(1000);
    var _is_samp_available = Memory.Read(0xC8D4C0, 4, true);
} while (_is_samp_available != 9);
const _library = DynamicLibrary.Load("samp.dll");
const _player = new Player(0);
const COOLDOWN = 5000;
TIMERA = COOLDOWN;

while (true) {
    wait(250);
    if(TIMERA >= COOLDOWN) {
        TIMERA = 0;
        log('/time')
        _say('/time')
        _send_command('/time');
        _send_chat_message(0xFFFFFF, '/time');
    }
}

QUESTION

hi, how do you make asi and compile it?

Incompatible with new GTA Vice City DE patch 1.0.17.39540

I get these outputs in the log after updating GTA Vice City DE recently.

[WARN] The host version is unknown or unsupported. It can only run a self-hosted CLEO runtime with SDK commands.
[INFO] Host identified as Grand Theft Auto: Vice City - The Definitive Edition (1.0.17.39540)
[INFO] Image base address 0x7ff63bba0000
[WARN] CLEO Redux does not support CS scripts in Grand Theft Auto: Vice City - The Definitive Edition (1.0.17.39540)

My plugins no longer work. I suspect this may be the reason.

add command GET_PLATFORM

They were originally derived from new commands made by AlexB for the Android cleo library. As far as I know, the ioscleo library will add them in the next version, they help to detect script cross-platform compatibility. At first I thought I would update the CLEO library to add them. I'm updating too little, I wish CLEO Redux added them? Maybe? Also is it possible for cleo redux to be cross platform?

For Installer (UAL Filename)

Currently, Installer install Ultimate Asi Loader as VorbisFile.dll ..... But in Gta-vice-city/GTA-III vorbisFile.dll not supported, these games support dinput8.dll

Before Install CLEO-Redux, Installer Check Is SA/VC/III... So you can add a simple code to install right filename of ASI Loader

IsSA = Install VorbisFile.dll
IsVC = Install dinput8.dll
IsIII = Install dinput8.dll

Require external libraries

Really hope for requiring external libraries for example WebSocket for pseudo-multiplayer

const WebSocket = require('ws')

[SA:DE] 0A69 crashes in JS script

Calling

/// <reference path=".config/sa.d.ts" />
Widget.CreateShopMenu('IE09')

crashes the game with error

ErrorMessage>LowLevelFatalError [File:Unknown] [Line: 970] 
Node /Game/SanAndreas/Textures/mobile/T_shop_barber_BC 0 Package_LoadSummary    has zero prerequisites, but has not been queued.

Same command works when in a CS script

{$CLEO}
{$USE ios}
{$O 0C05=0,terminate_this_custom_script }

0A69: create_shop_widget_menu "IE09"
0C05: terminate_this_custom_script 

The commands to create Corona are invalid

{$CLEO .cs}
0000:
int char
Player.GetChar(0, char)

:main
wait 0
if 
0256: 0
jf @main

:1 
wait 0
char.GetOffsetInWorldCoords(0.0 2.0 2.0 4@ 5@ 6@)
04D5: create_corona_at 4@ 5@ 6@ radius 2.0 type 2 flare 2 RGB 255 0 255
024F: create_corona_with_radius 1.0 type 2 lensflares 0 with_color 255 0 255 at 4@ 5@ 6@ 
jump @1

inconsistent path resolution in imports and sdk commands

complex scripts could be organized in folders and subfolders. For example

- \CLEO
-- \MegaMod
--- \extra
---- addon.js
---- model.mjs
---- lib.dll
--- index.js

import statements allows usage of ./ as the current file's directory. It resolves to CLEO/MegaMod/extra/ in addon.js and to CLEO/MegaMod/ in index.js.

SDK commands allows ./ too. But it always resolves to the index.js directory, regardless of the file location.

addon.js

import './model.mjs'; // works

DynamicLibrary.Load('./lib.dll'); // does not work, `CLEO/MegaMod/lib.dll` does not exist

DynamicLibrary.Load('./extra/lib.dll'); // works

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.