Quantcast

Jump to content

» «
Photo

[VC]Vigilante in any vehicle

4 replies to this topic
lolleroz
  • lolleroz

    Homeboy

  • Members
  • Joined: 29 Jul 2010
  • None

#1

Posted 26 June 2013 - 10:51 AM

Is there any way to script being able to start vigilante in any vehicle, and have no time limit to get back in a vehicle as you step out of it? The reason I'm asking because I changed 'Vigilante' to 'Contract Killing' (with GXT editor) so now it'd make more sense if I could do it in my black bulletproof Admiral and all... oh, and I'm talking about CLEO here, but if it's totally not possible then I guess I can start the whole game over too.

lolleroz
  • lolleroz

    Homeboy

  • Members
  • Joined: 29 Jul 2010
  • None

#2

Posted 07 July 2013 - 10:34 PM

bump..

ThirteenAG
  • ThirteenAG

    Soldier

  • Feroci Racing
  • Joined: 29 Dec 2008
  • None

#3

Posted 07 July 2013 - 10:47 PM Edited by ThirteenAG, 07 July 2013 - 10:50 PM.

All submissions controlled by main.scm:
CODE
:COP_252
if and
856C:   not actor $player_actor driving_police_vehicle
80DE:   not player $player_char driving_vehicle_type #HUNTER
80DE:   not player $player_char driving_vehicle_type #FBICAR
jf @COP_291
jump @COP

:COP_291
jump @COP_208

:COP_298
if
00DE:   player $player_char driving_vehicle_type #HUNTER
jf @COP_339
00BA: text_styled 'COP_M3' 6000 ms 5
jump @COP_395

:COP_339
if
00DE:   player $player_char driving_vehicle_type #CHEETAH
jf @COP_380
00BA: text_styled 'COP_M2' 6000 ms 5
jump @COP_395

:COP_380
00BA: text_styled 'COP_M' 6000 ms 5

:COP_395
wait 0
start_mission 78  // VIGILANTE
$322 = 1 // integer values

So, is there an easy way to do what you want? I guess not.
It probably could be done by modifying some main.scm checks(like actor $player_actor driving_police_vehicle to actor $player_actor driving, theoretically speaking) in memory, if you don't want to change main.scm itself.

lolleroz
  • lolleroz

    Homeboy

  • Members
  • Joined: 29 Jul 2010
  • None

#4

Posted 07 July 2013 - 11:21 PM

damn....guess I'll have to start a new game. Thanks for your help anyway.

Wesser
  • Wesser

    The complexity simplifier, the efficiency optimizer.

  • Feroci Racing
  • Joined: 19 Aug 2006
  • Unknown

#5

Posted 09 July 2013 - 12:21 PM

I prepared this script for SA that fits all of your needs:
CODE

{$CLEO}

0000: NOP

// "R3" script starts at 0x00012A72 offset.
// "COPCAR" mission starts at 0x002C9495 offset.

0AAA: 0@ = thread 'R3' pointer
if
   0@ <> 0x00000000
then
   // Main block (0x00A49960).
   {
       Skip the following check at the top of the submissions script loop:

           IF  IS_CHAR_IN_TAXI scplayer
           OR  IS_CHAR_IN_MODEL scplayer ambulan
           OR  IS_CHAR_IN_MODEL scplayer firetruk
           OR  IS_CHAR_IN_MODEL scplayer hunter
           OR  IS_CHAR_IN_MODEL scplayer boxburg
           OR  IS_CHAR_IN_ANY_POLICE_VEHICLE scplayer
   }
   0A8C: write_memory 0x00A5C42E size 4 value 0x00012B15 virtual_protect 0
   // Skip "Vigilante" trigger by jumping from "Firefighter" to "Burglar" trigger.
   0A8C: write_memory 0x00A5C853 size 4 value 0x0001334F virtual_protect 0
   0A8C: write_memory 0x00A5C865 size 4 value 0x0001334F virtual_protect 0
   0A8C: write_memory 0x00A5C960 size 4 value 0x0001334F virtual_protect 0
   0A8C: write_memory 0x00A5C971 size 4 value 0x0001334F virtual_protect 0
   // Set "Vigilante" as the last trigger by jumping to the end of "Pimping" trigger.
   0A8C: write_memory 0x00A5CA29 size 4 value 0x00013A0C virtual_protect 0
   0A8C: write_memory 0x00A5CB8F size 4 value 0x00013A0C virtual_protect 0
   0A8C: write_memory 0x00A5CBA0 size 4 value 0x00013A0C virtual_protect 0
   {
       Skip the following check which occurs twice of "Vigilante" trigger:

           IF  NOT IS_CHAR_IN_ANY_POLICE_VEHICLE scplayer
           AND NOT IS_CHAR_IN_MODEL scplayer hunter
   }
   0A8C: write_memory 0x00A5CABB size 4 value 0x00013185 virtual_protect 0
   0A8C: write_memory 0x00A5CBD2 size 4 value 0x000132A8 virtual_protect 0
   // Jump from "Pimping" to "Vigilante" trigger.
   0A8C: write_memory 0x00A5D160 size 4 value 0x000130CD virtual_protect 0
   0A8C: write_memory 0x00A5D178 size 4 value 0x000130CD virtual_protect 0
   0A8C: write_memory 0x00A5D18A size 4 value 0x000130CD virtual_protect 0
   0A8C: write_memory 0x00A5D29E size 4 value 0x000130CD virtual_protect 0
   0A8C: write_memory 0x00A5D2AF size 4 value 0x000130CD virtual_protect 0
end
2@ = false
while true
   wait 0
   if
       $ONMISSION == true
   then
       if
           2@ == false
       then
           0AAA: 0@ = thread 'COPCAR' pointer
           if
               0@ <> 0x00000000
           then
               // Mission block (0x00A7A6A0).
               0A9F: 0@ = current_thread_pointer
               0@ += 0x10 // CScriptThread.m_pcBaseAddress
               0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
               0@ -= @HOOK_00A7BC01_pcMainBuffer
               0A8F: 1@ = 0x00A7A6A0 - 0@ // pcMissionBuffer
               {
                   Considering the following check:

                       IF  IS_CHAR_IN_MODEL scplayer hunter

                   Replace it with this one:

                       IF  IS_CHAR_IN_FLYING_VEHICLE scplayer
               }
               0A8C: write_memory 0x00A7BC01 size 2 value 0x0002 virtual_protect 0     // GOTO command ID
               0A8C: write_memory 0x00A7BC03 size 1 value 0x01 virtual_protect 0       // 32-bit signed integer argument type
               0A8C: write_memory 0x00A7BC04 size 4 value 1@ virtual_protect 0         // relative offset
               // Comment this code and uncomment the rest to enable the timer while not in a vehicle.
               0A8C: write_memory 0x00A7DE57 size 4 value 0xFFFFC6AA virtual_protect 0
               0A8C: write_memory 0x00A7DE69 size 4 value 0xFFFFC6AA virtual_protect 0
               0A8C: write_memory 0x00A7DE98 size 2 value 0x0002 virtual_protect 0     // GOTO command ID
               0A8C: write_memory 0x00A7DE9A size 1 value 0x01 virtual_protect 0       // 32-bit signed integer argument type
               0A8C: write_memory 0x00A7DE9B size 4 value 0xFFFFC6AA virtual_protect 0 // relative offset
               0A8C: write_memory 0x00A7EF4F size 4 value 0xFFFFB5C0 virtual_protect 0
               0A8C: write_memory 0x00A7EF61 size 4 value 0xFFFFB5C0 virtual_protect 0
               0A8C: write_memory 0x00A7EF8E size 2 value 0x0002 virtual_protect 0     // GOTO command ID
               0A8C: write_memory 0x00A7EF90 size 1 value 0x01 virtual_protect 0       // 32-bit signed integer argument type
               0A8C: write_memory 0x00A7EF91 size 4 value 0xFFFFB5C0 virtual_protect 0 // relative offset
               {
                   Considering the following check which occurs twice:

                       IF  IS_CHAR_IN_ANY_POLICE_VEHICLE scplayer
                       OR  IS_CHAR_IN_MODEL scplayer hunter

                   Replace it with this one:

                       IF  IS_CHAR_IN_ANY_CAR scplayer
               }
               {0A8C: write_memory 0x00A7DD42 size 1 value 0x00 virtual_protect 0       // IF comparing rule (none)
               0A8C: write_memory 0x00A7DD43 size 2 value 0x00DF virtual_protect 0     // IS_CHAR_IN_ANY_CAR command ID
               0A8C: write_memory 0x00A7DD48 size 2 value 0x0002 virtual_protect 0     // GOTO command ID
               0A8C: write_memory 0x00A7DD4A size 1 value 0x01 virtual_protect 0       // 32-bit signed integer argument type
               0A8C: write_memory 0x00A7DD4B size 4 value 0xFFFFC950 virtual_protect 0 // relative offset
               0A8C: write_memory 0x00A7F0E8 size 1 value 0x00 virtual_protect 0       // IF comparing rule (none)
               0A8C: write_memory 0x00A7F0E9 size 2 value 0x00DF virtual_protect 0     // IS_CHAR_IN_ANY_CAR command ID
               0A8C: write_memory 0x00A7F0EE size 2 value 0x0002 virtual_protect 0     // GOTO command ID
               0A8C: write_memory 0x00A7F0F0 size 1 value 0x01 virtual_protect 0       // 32-bit signed integer argument type
               0A8C: write_memory 0x00A7F0F1 size 4 value 0xFFFFB5AA virtual_protect 0 // relative offset}
               {
                   Considering the following check which occurs twice:

                       IF  NOT IS_CHAR_IN_ANY_POLICE_VEHICLE scplayer
                       AND NOT IS_CHAR_IN_MODEL scplayer hunter

                   Replace it with this one:

                       IF  NOT IS_CHAR_IN_ANY_CAR scplayer
               }
               0A8C: write_memory 0x00A7DE9B size 1 value 0x00 virtual_protect 0       // IF comparing rule (none)
               0A8C: write_memory 0x00A7DE9C size 2 value 0x80DF virtual_protect 0     // NOT IS_CHAR_IN_ANY_CAR command ID (not flag set)
               0A8C: write_memory 0x00A7DEA1 size 2 value 0x0002 virtual_protect 0     // GOTO command ID
               0A8C: write_memory 0x00A7DEA3 size 1 value 0x01 virtual_protect 0       // 32-bit signed integer argument type
               0A8C: write_memory 0x00A7DEA4 size 4 value 0xFFFFC7F7 virtual_protect 0 // relative offset
               0A8C: write_memory 0x00A7EF91 size 1 value 0x00 virtual_protect 0       // IF comparing rule (none)
               0A8C: write_memory 0x00A7EF92 size 2 value 0x80DF virtual_protect 0     // NOT IS_CHAR_IN_ANY_CAR command ID (not flag set)
               0A8C: write_memory 0x00A7EF97 size 2 value 0x0002 virtual_protect 0     // GOTO command ID
               0A8C: write_memory 0x00A7EF99 size 1 value 0x01 virtual_protect 0       // 32-bit signed integer argument type
               0A8C: write_memory 0x00A7EF9A size 4 value 0xFFFFB701 virtual_protect 0 // relative offset
           end
           2@ = true
       end
   else
       2@ = false
   end
end

:HOOK_00A7BC01_pcMainBuffer
hex
   C804 02 0C00     // IS_CHAR_IN_FLYING_VEHICLE scplayer
   0200 01 97EAFFFF // GOTO FFFFEA97
end

I would encourage anyone to port it to VC.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users