Quantcast

Jump to content

» «
Photo

Your most complex structures!

7 replies to this topic
gtasearcher
  • gtasearcher

    No sh*t.

  • Members
  • Joined: 26 Aug 2008

#1

Posted 06 May 2009 - 05:37 PM

Mine is
CODE
REPEAT
WAIT 0
0209: [email protected] = random_int_in_ranges 41407 41409
if
Actor.Dead([email protected])
then
[email protected] = 'TTIOT38'
jump @4
end
[email protected] = Actor.Health([email protected])
0A91: $CLEO_TTIOT_TRUTH_HEALTH = [email protected] / 5 // int
03C4: set_status_text $CLEO_TTIOT_TRUTH_HEALTH type 1 GXT 'TTIOT4' // global_variable  // Score ~1~
IF
80F2:   not actor $PLAYER_ACTOR near_actor [email protected] radius 25.0 25.0 0
then
03CF: load_wav [email protected] as 1
repeat
wait 0
until 03D0:   wav 1 loaded
if
[email protected] == 41407
then
[email protected] = 'TTIOT12'
end
if
[email protected] == 41408
then
[email protected] = 'TTIOT13'
end
if
[email protected] == 41409
then
[email protected] == 'TTIOT14'
end
0949: link_wav 1 to_actor $PLAYER_ACTOR
03D1: play_wav 1
06C9: remove_actor [email protected] from_group
repeat
wait 0
00BC: show_text_highpriority GXT [email protected] time 1 flag 1  // ~s~Come back between 9:00 and 17:00.
if
Actor.Dead([email protected])
then
[email protected] = 'TTIOT38'
jump @4
end
[email protected] = Actor.Health([email protected])
0A91: $CLEO_TTIOT_TRUTH_HEALTH = [email protected] / 5 // int
03C4: set_status_text $CLEO_TTIOT_TRUTH_HEALTH type 1 GXT 'TTIOT4' // global_variable  // Score ~1~
if
00F2:   actor $PLAYER_ACTOR near_actor [email protected] radius 20.0 20.0 0
then
jump @HIGH_LEVEL
end
until 03D2:   wav 1 ended
repeat
wait 0
if
Actor.Dead([email protected])
then
[email protected] = 'TTIOT38'
jump @4
end
[email protected] = Actor.Health([email protected])
0A91: $CLEO_TTIOT_TRUTH_HEALTH = [email protected] / 5 // int
03C4: set_status_text $CLEO_TTIOT_TRUTH_HEALTH type 1 GXT 'TTIOT4' // global_variable  // Score ~1~
until 00F2: actor $PLAYER_ACTOR near_actor [email protected] radius 20.0 20.0 0
jump @HIGH_LEVEL                                                                                        

:HIGH_LEVEL
0631: put_actor [email protected] in_group $PLAYER_GROUP
repeat
wait 0
if
Actor.Dead([email protected])
then
[email protected] = 'TTIOT38'
jump @4
end
[email protected] = Actor.Health([email protected])
0A91: $CLEO_TTIOT_TRUTH_HEALTH = [email protected] / 5 // int
03C4: set_status_text $CLEO_TTIOT_TRUTH_HEALTH type 1 GXT 'TTIOT4' // global_variable  // Score ~1~
UNTIL 03D2:   wav 1 ended
040D: unload_wav 1
end
until 0202:   actor $PLAYER_ACTOR near_car [email protected] radius 15.0 15.0 flag 0
If you don't understand it, take a look here.
- = repeat...until
* = if...then...end
CODE
---------
REPEAT
WAIT 0
0209: [email protected] = random_int_in_ranges 41407 41409
*************
if
Actor.Dead([email protected])
then
[email protected] = 'TTIOT38'
jump @4
end
*************
[email protected] = Actor.Health([email protected])
0A91: $CLEO_TTIOT_TRUTH_HEALTH = [email protected] / 5 // int
03C4: set_status_text $CLEO_TTIOT_TRUTH_HEALTH type 1 GXT 'TTIOT4' // global_variable  // Score ~1~
*************
IF
80F2:   not actor $PLAYER_ACTOR near_actor [email protected] radius 25.0 25.0 0
then
03CF: load_wav [email protected] as 1
-----------------
repeat
wait 0
until 03D0:   wav 1 loaded
-----------------
*************
if
[email protected] == 41407
then
[email protected] = 'TTIOT12'
end
************
************
if
[email protected] == 41408
then
[email protected] = 'TTIOT13'
end
***********
***********
if
[email protected] == 41409
then
[email protected] == 'TTIOT14'
end
**********
0949: link_wav 1 to_actor $PLAYER_ACTOR
03D1: play_wav 1
06C9: remove_actor [email protected] from_group
-------------
repeat
wait 0
00BC: show_text_highpriority GXT [email protected] time 1 flag 1  // ~s~Come back between 9:00 and 17:00.
**********
if
Actor.Dead([email protected])
then
[email protected] = 'TTIOT38'
jump @4
end
*********
[email protected] = Actor.Health([email protected])
0A91: $CLEO_TTIOT_TRUTH_HEALTH = [email protected] / 5 // int
03C4: set_status_text $CLEO_TTIOT_TRUTH_HEALTH type 1 GXT 'TTIOT4' // global_variable  // Score ~1~
*********
if
00F2:   actor $PLAYER_ACTOR near_actor [email protected] radius 20.0 20.0 0
then
jump @HIGH_LEVEL
end
********
until 03D2:   wav 1 ended
--------------
-------------
repeat
wait 0
***********
if
Actor.Dead([email protected])
then
[email protected] = 'TTIOT38'
jump @4
end
**********
[email protected] = Actor.Health([email protected])
0A91: $CLEO_TTIOT_TRUTH_HEALTH = [email protected] / 5 // int
03C4: set_status_text $CLEO_TTIOT_TRUTH_HEALTH type 1 GXT 'TTIOT4' // global_variable  // Score ~1~
until 00F2: actor $PLAYER_ACTOR near_actor [email protected] radius 20.0 20.0 0
jump @HIGH_LEVEL                                                                                        

:HIGH_LEVEL
0631: put_actor [email protected] in_group $PLAYER_GROUP
--------------
repeat
wait 0
*********
if
Actor.Dead([email protected])
then
[email protected] = 'TTIOT38'
jump @4
end
*********
[email protected] = Actor.Health([email protected])
0A91: $CLEO_TTIOT_TRUTH_HEALTH = [email protected] / 5 // int
03C4: set_status_text $CLEO_TTIOT_TRUTH_HEALTH type 1 GXT 'TTIOT4' // global_variable  // Score ~1~
UNTIL 03D2:   wav 1 ended
040D: unload_wav 1
end
*********
until 0202:   actor $PLAYER_ACTOR near_car [email protected] radius 15.0 15.0 flag 0
------------

Which is yours? sly.gif

coin-god
  • coin-god

    High Roller

  • $outh $ide Hoodz
  • Joined: 18 Mar 2007
  • None

#2

Posted 06 May 2009 - 07:27 PM

I would have to post my mission code of my Zombie Mod.

But its private. ph34r.gif

ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union
  • Contribution Award [Mods]
    Helpfulness Awards [Mods]

#3

Posted 06 May 2009 - 08:56 PM

QUOTE (gtasearcher @ May 6 2009, 17:37)

Which is yours? sly.gif

you wont read it

Dutchy3010
  • Dutchy3010

    Female SCM coder!

  • Moderator
  • Joined: 30 Jul 2006
  • Netherlands
  • Best Script 2013 [DYOM]
    Best Script 2012 [DYOM]

#4

Posted 06 May 2009 - 11:03 PM Edited by Dutchy3010, 06 May 2009 - 11:39 PM.

This is one of the DYOM structures. Of course it isn't the biggest, because those were way to big to post here (some over 900 lines).

CODE
var
 $idx : integer
 $count : integer
 $buffer : integer
 $ready : integer
end  
0085: [email protected] = $TEXTCUR
0085: [email protected] = [email protected]
$ready = 0
$count = 0
gosub @TEXT_clear
repeat
   wait 10    
   // A-Z, a-z
   for $idx = 65 to 90
     if and
       0AB0:  key_pressed $idx
       not $count == $TEXTMAX
     then
       0084: $buffer = $idx
       if 8AB0: not key_pressed 16
       then
         $buffer += 32
       end
       0A8C: write_memory [email protected] size 1 value $buffer virtual_protect 0
       [email protected] += 1  
       0A8C: write_memory [email protected] size 1 value 0 virtual_protect 0
       $count += 1
       repeat
         wait 0
       until 8AB0: not key_pressed $idx
     end
   end
   // 0- 9
   for $idx = 48 to 57
     if and
       0AB0:  key_pressed $idx
       not $count == $TEXTMAX
     then
       0A8C: write_memory [email protected] size 1 value $idx virtual_protect 0
       [email protected] += 1  
       0A8C: write_memory [email protected] size 1 value 0 virtual_protect 0
       $count += 1
       repeat
         wait 0
       until 8AB0: not key_pressed $idx
     end
   end
   // Space
   if and
       0AB0:  key_pressed 32
       not $count == $TEXTMAX
   then
       0A8C: write_memory [email protected] size 1 value 32 virtual_protect 0
       [email protected] += 1  
       0A8C: write_memory [email protected] size 1 value 95 virtual_protect 0
       [email protected] += 1  
       0A8C: write_memory [email protected] size 1 value 0 virtual_protect 0
       [email protected] -= 1  
        $count += 1
       repeat
         wait 0
       until 8AB0: not key_pressed 32
   end
   // ,
   if and
       0AB0:  key_pressed 188
       not $count == $TEXTMAX
   then
       0A8C: write_memory [email protected] size 1 value 44 virtual_protect 0
       [email protected] += 1  
       0A8C: write_memory [email protected] size 1 value 0 virtual_protect 0
       $count += 1
       repeat
         wait 0
       until 8AB0: not key_pressed 188
   end
   // .
   if and
       0AB0:  key_pressed 190
       not $count == $TEXTMAX
   then
       0A8C: write_memory [email protected] size 1 value 46 virtual_protect 0
       [email protected] += 1  
       0A8C: write_memory [email protected] size 1 value 0 virtual_protect 0
       $count += 1
       repeat
         wait 0
       until 8AB0: not key_pressed 190
   end
   // ~
   if and
       0AB0:  key_pressed 192
       0AB0:  key_pressed 16
       not $count == $TEXTMAX
   then
       0A8C: write_memory [email protected] size 1 value 126 virtual_protect 0
       [email protected] += 1  
       0A8C: write_memory [email protected] size 1 value 0 virtual_protect 0
       $count += 1
       repeat
         wait 0
       until 8AB0: not key_pressed 192
   end
   // backspace
   if 0AB0:  key_pressed 8
   then
       [email protected] -= 1  
       0A8C: write_memory [email protected] size 1 value 95 virtual_protect 0
       $count -= 1
       repeat
         wait 0
       until 8AB0: not key_pressed 8
   end
   // return
   if 0AB0:  key_pressed 13
   then
       0A8C: write_memory [email protected] size 1 value 0 virtual_protect 0
       $ready = 1
       repeat
         wait 0
       until 8AB0: not key_pressed 13
   end
   
   if 803B:   not  [email protected] == [email protected] // (int)
   then
     gosub @TEXT_show_perm
     0085: [email protected] = [email protected]
   end    
until $ready == 1
03E6: remove_text_box
return

trickstar34
  • trickstar34

    ATM, Money

  • BUSTED!
  • Joined: 14 Dec 2008

#5

Posted 08 May 2009 - 08:31 PM Edited by trickstar34, 29 May 2009 - 11:12 PM.

mine so far is the code to the Verdant Meadows oddjob to my GTA: San Andreas Empire Mode mod. But like goin-god, I like to keep my codes as private as possible.

EDIT: I'm going to have to change my answer, my Your The Cop mod definately is my most complex (5000+ lines)

james227uk
  • james227uk

    One Spartan Army

  • Andolini Mafia Family
  • Joined: 05 Feb 2008

#6

Posted 08 May 2009 - 08:50 PM Edited by james227uk, 08 May 2009 - 10:02 PM.

I don't really make high level constructions; I only use them when it's neccesary to use them.

@Trickstar34

A mod as simple as that is not really worth it. Besides, lots of people could learn from it

trickstar34
  • trickstar34

    ATM, Money

  • BUSTED!
  • Joined: 14 Dec 2008

#7

Posted 08 May 2009 - 09:05 PM

I'm talking about v2 (which hasnt been released yet), your thinking of my v1, which is just a code to cause payouts. My v1.5 has 2 missions. My v2 will have 5 which Verdant Meadows is my most complex. It has over 1000 lines of code which I'm trying to decrease before it is released.

Now out of my uploaded scripts, it would be v1.5's Doherty Garage oddjob (although not too complex), which will be even more complex before v2 release.

While I'm talking about my mod, v1 has a unlimited payout bug which I fixed in v1.5, so to anyone who downloaded it, I suggest you remove v1 (unless your trying to get max money) and install v1.5 until either the possible v1.6 or v2.0 are released.

Just to let you know that was still kind of on topic because I was simply discribing my mod and making suggestions towards people interested in it.

Wesser
  • Wesser

    The complexity simplifier, the efficiency optimizer

  • Feroci
  • Joined: 19 Aug 2006
  • Unknown
  • Contribution Award [Mods]

#8

Posted 04 August 2009 - 02:19 PM

This is mine I made some times ago which I forgot to post. It will be useful to create a reload system by pressing a key.
CODE

{$CLEO}

0000: NOP

while true
 wait 0
 if
 0256:  player $PLAYER_CHAR defined
 then
   if
   8118:  not actor $PLAYER_ACTOR dead
   then
     0581: enable_radar 0
     03F0: enable_text_draw 1
     0A96: [email protected] = actor $PLAYER_ACTOR struct
     000A: [email protected] += 0x718
     0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0 // GetCurrentSlot
     0A96: [email protected] = actor $PLAYER_ACTOR struct
     000A: [email protected] += 0x5A0
     [email protected] *= 0x1C
     005A: [email protected] += [email protected] // (int)
     000A: [email protected] += 0x08
     0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // GetClipAmmo
     0470: [email protected] = actor $PLAYER_ACTOR current_weapon
     0085: [email protected] = [email protected] // (int)
     0012: [email protected] *= 0x70
     000A: [email protected] += 0xC8AAB8
     000A: [email protected] += 0x20
     0A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 0 // GetMaxClipAmmo
     0085: [email protected] = [email protected] // (int)
     0093: [email protected] = integer [email protected] to_float
     041A: [email protected] = actor $PLAYER_ACTOR weapon [email protected] ammo
     0085: [email protected] = [email protected] // (int)
     0062: [email protected] -= [email protected] // (int)
     0085: [email protected] = [email protected] // (int)
     0093: [email protected] = integer [email protected] to_float
     0073: [email protected] /= [email protected] // (float)
     0087: [email protected] = [email protected] // (float)
     0092: [email protected] = float [email protected] to_integer
     0093: [email protected] = integer [email protected] to_float
     0063: [email protected] -= [email protected] // (float)
     0087: [email protected] = [email protected] // (float)
     [email protected] *= -1.0
     006B: [email protected] *= [email protected] // (float)
     [email protected] *= 1.05
     0092: [email protected] = float [email protected] to_integer
     0092: [email protected] = float [email protected] to_integer
     0062: [email protected] -= [email protected] // (int)
     0092: [email protected] = float [email protected] to_integer
     if
       [email protected] > 0
     then
       [email protected] += 1
     end
     gosub @DrawTextFormat
     033E: set_draw_text_position 32.0 300.0 GXT 'AMMO_1' // Ammo in clip
     gosub @DrawTextNumberFormat
     045A: draw_text_1number 200.0 300.0 GXT 'NUMBER' number [email protected] // ~1~ // AmmoInClip
     gosub @DrawTextFormat
     033E: set_draw_text_position 32.0 320.0 GXT 'AMMO_2' // Other clip ammo
     gosub @DrawTextNumberFormat
     045A: draw_text_1number 200.0 320.0 GXT 'NUMBER' number [email protected] // ~1~ // OtherClipAmmo
     gosub @DrawTextFormat
     033E: set_draw_text_position 32.0 340.0 GXT 'AMMO_3' // Total clip ammo
     gosub @DrawTextNumberFormat
     045A: draw_text_1number 200.0 340.0 GXT 'NUMBER' number [email protected] // ~1~ // TotalClipAmmo
     gosub @DrawTextFormat
     033E: set_draw_text_position 32.0 360.0 GXT 'AMMO_4' // Clips
     gosub @DrawTextNumberFormat
     045A: draw_text_1number 200.0 360.0 GXT 'NUMBER' number [email protected] // ~1~ // TotalClips (1 clip = ? bullet\s)
     gosub @DrawTextFormat
     033E: set_draw_text_position 32.0 380.0 GXT 'AMMO_5' // Last clip ammo remaining
     gosub @DrawTextNumberFormat
     045A: draw_text_1number 200.0 380.0 GXT 'NUMBER' number [email protected] // ~1~ // LastClipAmmoRemaining
     gosub @DrawTextFormat
     033E: set_draw_text_position 32.0 400.0 GXT 'AMMO_6' // Clip ammo fired
     gosub @DrawTextNumberFormat
     045A: draw_text_1number 200.0 400.0 GXT 'NUMBER' number [email protected] // ~1~ // ClipAmmoFired
     gosub @DrawTextFormat
     033E: set_draw_text_position 32.0 420.0 GXT 'AMMO_7' // Max clip ammo
     gosub @DrawTextNumberFormat
     045A: draw_text_1number 200.0 420.0 GXT 'NUMBER' number [email protected] // ~1~ // MaxClipAmmo
   end
 end
end

:DrawTextFormat
0341: unknown_text_draw_flag 0
033F: set_text_draw_letter_size 0.4 1.8
0340: set_text_draw_RGBA 255 255 255 255
return

:DrawTextNumberFormat
0341: unknown_text_draw_flag 0
033F: set_text_draw_letter_size 0.4 1.8
0340: set_text_draw_RGBA 0 177 0 255
return

CODE
#
# filename: bullet.fxt
# description: this file contains all cleo texts of the mod named bullet.cs.
#
#format is
# entry name <space> entry value
#
# entry name:  name of gxt entry read by scm
# entry value: name of gxt value where the text is stored
#
AMMO_1 Ammo in clip
AMMO_2 Other clip ammo
AMMO_3 Total clip ammo
AMMO_4 Clips
AMMO_5 Last clip ammo rem.
AMMO_6 Clip ammo fired
AMMO_7 Max clip ammo




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users