Game:
Grand Theft Auto: Vice City on the PC
Tools:
Sanny Builder v3.04 by Seemann
CLEO Library v1.1.1.6 by Seemann and Alien
Author:
spaceeinstein
Information:
This page showcases my modifications, in chronological order of release, utilizing CLEO for GTA: Vice City. CLEO is an enhanced scripting extension that allows the use of custom scripting language for Sanny Builder without the need to modify the main script file, main.scm.

Modifications for Vice City


Source codes

const
ZOOM = 0@
ZOOM_CAR = 1@
end

ZOOM = 180.0
while true
    wait 10 ms
    if
        05EE:   key_pressed 84  // T
    then
        16@ = 0
        ZOOM = 350.0  // minimum zoom set to 350
        ZOOM_CAR = 0.0  // fast car dynamic zoom set to 0
        05DF: write_memory 0x974BEC size 4 value ZOOM virtual_protect 0  // current zoom lvl
    end
    if
        ZOOM >= 180.0
    then
        if
            16@ > 1000
        then
            ZOOM -= 10.0
            ZOOM_CAR += 10.0
            if
                180.0 > ZOOM
            then
                ZOOM = 180.0  // minimum zoom default 180
                ZOOM_CAR = 170.0  // fast car dynamic zoom default 170.0, difference between max and min (350 - 180 = 170)
            end
        end
    end
    05DF: write_memory 0x4C5CD5 size 4 value ZOOM virtual_protect 1  // in car min zoom
    05DF: write_memory 0x4C5D26 size 4 value ZOOM virtual_protect 1  // on foot min zoom
    05DF: write_memory 0x68FF04 size 4 value ZOOM_CAR virtual_protect 0  // fast car dynamic zoom
    05DF: write_memory 0x68FF0C size 4 value ZOOM virtual_protect 0  // minimum fast car dynamic zoom
end
const
PLAYER_CAR = 0@
TOT_NUM_GRG = 1@
GRG_OFFSET = 2@
GRG_POS_X = 3@
POS_X = 4@
GRG_POS_Y = 5@
POS_Y = 6@
GRG_POS_Z = 7@
POS_Z = 8@
INCREMENT = 9@
GRG_TYPE = 10@
end

var
TOT_NUM_GRG : integer
GRG_OFFSET : integer
GRG_POS_X : integer
GRG_POS_Y : integer
GRG_POS_Z : integer
INCREMENT : integer
GRG_TYPE : integer
end

05E0: TOT_NUM_GRG = read_memory 0x978DA4 size 4 virtual_protect 0  // get total number of created garages
GRG_OFFSET = 0x812668
INCREMENT = 0

while true  // check if vc bomb garage exists
    wait 10 ms
    if
        not INCREMENT == TOT_NUM_GRG
    then
        GRG_POS_X = GRG_OFFSET
        GRG_POS_Y = GRG_OFFSET
        GRG_POS_Z = GRG_OFFSET
        GRG_POS_X += 0x1C
        GRG_POS_Y += 0x20
        GRG_POS_Z += 0x24
        05E0: POS_X = read_memory GRG_POS_X size 4 virtual_protect 0
        05E0: POS_Y = read_memory GRG_POS_Y size 4 virtual_protect 0
        05E0: POS_Z = read_memory GRG_POS_Z size 4 virtual_protect 0
        if and
            POS_X == -1163.248
            POS_Y == -1407.282
            POS_Z == 10.157
        then
            GRG_TYPE = 4
            
            while true  // create interaction
            wait 10 ms
                if
                    00E0:   player $PLAYER_CHAR driving
                then
                    03C1: PLAYER_CAR = player $PLAYER_CHAR car
                    if and
                        80E1:   not key_pressed 0 16  // accelerate
                        01B0:   car PLAYER_CAR stopped_in_sphere 1 near_point -1154.91 -1405.25 11.2 radius 5.0 5.0 5.0
                    then
                        0512: permanent_text_box 'SEBOMB0'
                        while true
                            wait 100 ms
                            if
                                80E1:   not key_pressed 0 16  // accelerate
                            then
                                if
                                    0256:   player $PLAYER_CHAR defined
                                then
                                    01B4: set_player $PLAYER_CHAR not_frozen 0
                                    if
                                        GRG_TYPE == 2
                                    then
                                        00BC: text_highpriority 'SEBOMB1' 100 ms 1
                                    end
                                    if
                                        GRG_TYPE == 3
                                    then
                                        00BC: text_highpriority 'SEBOMB2' 100 ms 1
                                    end
                                    if
                                        GRG_TYPE == 4
                                    then
                                        00BC: text_highpriority 'SEBOMB3' 100 ms 1
                                    end
                                    if
                                        00E1:   key_pressed 0 10  // left
                                    then
                                        GRG_TYPE -= 1
                                        if
                                            GRG_TYPE == 1
                                        then
                                            GRG_TYPE = 4
                                        end
                                    end
                                    if
                                        00E1:   key_pressed 0 11  // right
                                    then
                                        GRG_TYPE += 1
                                        if
                                            GRG_TYPE == 5
                                        then
                                            GRG_TYPE = 2
                                        end
                                    end
                                end
                            else
                                if
                                    0256:   player $PLAYER_CHAR defined
                                then
                                    01B4: set_player $PLAYER_CHAR not_frozen 1
                                end
                                05DF: write_memory GRG_OFFSET size 1 value GRG_TYPE virtual_protect 0
                                break
                            end
                        end
                        03E6: remove_text_box
                    end
                end
            end

        else
            GRG_OFFSET += 0xA8
            INCREMENT += 1
        end
    else
        05DC: end_custom_thread
    end
end
const
ADDRESS = 0@
INDEX = 1@
end

0000:
while true
    wait 10 ms
    if
        00E1:   key_pressed 0 19
    then
        if
            00DE:   player $PLAYER_CHAR driving_vehicle_type #SPEEDER
        then
            ADDRESS = 0x5A4EE6
            gosub @gosub
        end
        if
            00DE:   player $PLAYER_CHAR driving_vehicle_type #REEFER
        then
            ADDRESS = 0x5A4F66
            gosub @gosub
        end
        if
            00DE:   player $PLAYER_CHAR driving_vehicle_type #PREDATOR
        then
            ADDRESS = 0x5A4FE6
            gosub @gosub
        end
        if
            00DE:   player $PLAYER_CHAR driving_vehicle_type #DINGHY
        then
            ADDRESS = 0x5A5066
            gosub @gosub
        end
        if
            00DE:   player $PLAYER_CHAR driving_vehicle_type #COASTG
        then
            ADDRESS = 0x5A50E6
            gosub @gosub
        end
        if
            00DE:   player $PLAYER_CHAR driving_vehicle_type #RIO
        then
            ADDRESS = 0x5A5166
            gosub @gosub
        end
        if
            00DE:   player $PLAYER_CHAR driving_vehicle_type #SQUALO
        then
            ADDRESS = 0x5A51E6
            gosub @gosub
        end
        if
            00DE:   player $PLAYER_CHAR driving_vehicle_type #MARQUIS
        then
            ADDRESS = 0x5A5266
            gosub @gosub
        end
        if
            00DE:   player $PLAYER_CHAR driving_vehicle_type #TROPIC
        then
            ADDRESS = 0x5A52E6
            gosub @gosub
        end
    end
end

:gosub
INDEX = 0
while 001B: 12 > INDEX
    wait 0
    05DF: write_memory ADDRESS size 4 value 0.0 virtual_protect 1
    INDEX += 1
    ADDRESS += 0xA
end
return
const
DURATION = 0@
CURRENT_TIME = 1@
ADRENALINE_MODE = 2@
STAGE = 3@
VALUE_1 = 4@
VALUE_2 = 5@
WAIT_TIME = 50
end
var
CURRENT_TIME : integer
WAIT_TIME : integer
end

STAGE = 0  // stage 0

while true
    wait WAIT_TIME
    05E0: VALUE_1 = read_memory 0xA10942 size 4 virtual_protect 0
    05E0: VALUE_2 = read_memory 0xA10946 size 2 virtual_protect 0
    if and
        VALUE_1 == 0x55474D45  // ugme
        VALUE_2 == 0x4452  // dr
    then
        STAGE += 1
        05DF: write_memory 0xA10942 size 1 val 0x20 virtual_protect 0
        03E5: text_box 'CHEAT1'
    end
    if
        STAGE == 1  // stage 1
    then
        05E6: DURATION = actor $PLAYER_ACTOR struct
        DURATION += 0x634  // adrenaline duration = future time - current time 
        05E0: CURRENT_TIME = read_memory 0x974B2C size 4 virtual_protect 0  // current time
        CURRENT_TIME += WAIT_TIME  // future time = value, 20000 by default
        05DF: write_memory DURATION size 4 value CURRENT_TIME virtual_protect 0  // set adrenaline duration
        05E6: ADRENALINE_MODE = actor $PLAYER_ACTOR struct
        ADRENALINE_MODE += 0x63B
        05DF: write_memory ADRENALINE_MODE size 1 value 1 virtual_protect 0  // adrenaline mode, does not need reset
    end
    if or
        00E0:   player $PLAYER_CHAR driving
        STAGE == 2  // stage 2
    then
        05E6: DURATION = actor $PLAYER_ACTOR struct
        DURATION += 0x634
        05DF: write_memory DURATION size 4 value 0 virtual_protect 0  // turns off adrenaline
        STAGE = 0
    end
end
A A A
INDEX
Creative Commons License
These works are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
This page was last modified on 12/09/24 18:12:42 UTC.

Valid HTML 4.01 Strict Valid CSS!

eXTReMe Tracker