Quantcast

Jump to content

» «
Photo

What is the script?

12 replies to this topic
Dr. John
  • Dr. John

    Women and Wine

  • Members
  • Joined: 31 Dec 2011
  • India

#1

Posted 29 April 2012 - 05:36 AM



The download link was broken so I thought I would make one myself. So, what opcode has been used here?

LINK/2012
  • LINK/2012

    LIVIN' IN CODE

  • Feroci
  • Joined: 30 Jan 2011
  • Brazil

#2

Posted 29 April 2012 - 06:08 AM

Haha, I lol'd, very funny.

Search for TRAIN in opcode search tool and you will found the necesary opcodes.

Basically is:
If player is at crazy train location, destroy all trains and disable train traffic then spawn two trains, when the trains arrive a point destroy it and respawn.
If the player go out of crazy trains point, destroy it and reenable train traffic.

Have fun

ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union

#3

Posted 29 April 2012 - 06:36 AM

QUOTE (Dr. John13 @ Sunday, Apr 29 2012, 05:36)


The download link was broken so I thought I would make one myself. So, what opcode has been used here?

try this
CODE
{$CLEO .cs}
:TRAIN_crash
03A4: name_thread 'TRAIN'
0006: 12@ = 0
0006: 33@ = 0

:TRAIN_25
0001: wait 0 ms
00D6: if
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @TRAIN_25
if
00FE:   actor $PLAYER_ACTOR  0 (in-sphere)near_point -1982.1246 -594.5937 25.7206 radius  100.5  100.5  50.5
004D: jump_if_false @TRAIN_136
00D6: if
0039:   12@ == 0
004D: jump_if_false @TRAIN_222
0006: 12@ = 1
//00BC: show_text_highpriority GXT 'FEM_ON' time 3000 flag 1  // ON
06D7: enable_train_traffic 0
0002: jump @TRAIN_248

:TRAIN_136
00D6: if
0039:   12@ == 1
004D: jump_if_false @TRAIN_25
0006: 12@ = 0
//00BC: show_text_highpriority GXT 'FEM_OFF' time 3000 flag 1  // OFF
06D7: enable_train_traffic 0
07BE: remove_references_to_train 1@
07BE: remove_references_to_train 2@
0001: wait 1000 ms
0002: jump @TRAIN_25


:TRAIN_222
00D6: if and
0039:   12@ == 1
0019:   33@ > 7000
004D: jump_if_false @TRAIN_25
06D7: enable_train_traffic 0
07BE: remove_references_to_train 1@
07BE: remove_references_to_train 2@
0006: 12@ = 0
0001: wait 1000 ms
0002: jump @TRAIN_25

:TRAIN_248
0247: load_model #FREIGHT
0247: load_model #FREIFLAT
0247: load_model #STREAK
0247: load_model #STREAKC
0001: wait 0 ms
00D6: if or
8248:   not model #FREIGHT available
8248:   not model #FREIFLAT available
8248:   not model #STREAK available
8248:   not model #STREAKC available
004D: jump_if_false @TRAIN_310
0002: jump @TRAIN_248

:TRAIN_310
06D8: 2@ = create_train_at -1981.207 -474.4401 25.7109 type 12 direction 0
06DC: set_train 2@ acc 60.0
06DD: set_train 2@ speed 70.0
0001: wait 1000 ms
06D7: enable_train_traffic 0
06D8: 1@ = create_train_at -1979.603 -678.1725 27.759 type 12 direction 1
06DC: set_train 1@ acc 60.0
06DD: set_train 1@ speed 70.0
0006: 33@ = 0
0249: release_model #FREIGHT
0249: release_model #FREIFLAT
0249: release_model #STREAK
0249: release_model #STREAKC
0002: jump @TRAIN_25

Dr. John
  • Dr. John

    Women and Wine

  • Members
  • Joined: 31 Dec 2011
  • India

#4

Posted 29 April 2012 - 06:44 AM Edited by Dr. John13, 29 April 2012 - 08:23 AM.

I can see that XYZ Cods are of that tunnel. In that case, If I add cods of other areas then will this be the output? Thank you ZAZ.

Dr. John
  • Dr. John

    Women and Wine

  • Members
  • Joined: 31 Dec 2011
  • India

#5

Posted 29 April 2012 - 08:23 AM

Sorry for Double Post.

Tested it and found that the swamping rate is low. Which opcode should be edited for good swamping rate?

ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union

#6

Posted 29 April 2012 - 09:14 AM

QUOTE (Dr. John13 @ Sunday, Apr 29 2012, 08:23)
Sorry for Double Post.

Tested it and found that the swamping rate is low. Which opcode should be edited for good swamping rate?

this
CODE
0019:   33@ > 7000

Dr. John
  • Dr. John

    Women and Wine

  • Members
  • Joined: 31 Dec 2011
  • India

#7

Posted 29 April 2012 - 11:40 AM Edited by Dr. John13, 29 April 2012 - 11:43 AM.

I tried to add this opcode in the :tag 237

CODE
00AE: set_car 33@ traffic_behaviour_to 3


But, whenever I go to the tunnel, it crashes. I wanted to make the drivers aggressive and not to follow the red signal but in vain. confused.gif What to do? Here's the whole structure:

CODE
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007

{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------
thread 'TRAIN'
12@ = 0
33@ = 0

:TRAIN_25
wait 0
if
  Player.Defined($PLAYER_CHAR)
else_jump @TRAIN_25
if
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -1982.125 -594.5937 25.7206 radius 100.5 100.5 50.5
else_jump @TRAIN_129
if
 12@ == 0
else_jump @TRAIN_179
12@ = 1
06D7: enable_train_traffic 0
jump @TRAIN_237

:TRAIN_129
if
 12@ == 1
else_jump @TRAIN_25
12@ = 0
06D7: enable_train_traffic 0
07BE: remove_references_to_train 1@
07BE: remove_references_to_train 2@
wait 0
jump @TRAIN_25

:TRAIN_179
if and
 12@ == 1
 33@ > 5200
else_jump @TRAIN_25
06D7: enable_train_traffic 0
07BE: remove_references_to_train 1@
07BE: remove_references_to_train 2@
12@ = 0
wait 0
jump @TRAIN_25

:TRAIN_237
00AE: set_car 33@ traffic_behaviour_to 3
Model.Load(#FREIGHT)
Model.Load(#FREIFLAT)
Model.Load(#STREAK)
Model.Load(#STREAKC)
wait 0
if or
  not Model.Available(#FREIGHT)
  not Model.Available(#FREIFLAT)
  not Model.Available(#STREAK)
  not Model.Available(#STREAKC)
else_jump @TRAIN_306
jump @TRAIN_237

:TRAIN_306
06D8: 2@ = create_train_at -1981.207 -474.4401 25.7109 type 12 direction 0
06DC: set_train 2@ acc 60.0
06DD: set_train 2@ speed 70.0
wait 0
06D7: enable_train_traffic 0
06D8: 1@ = create_train_at -1979.603 -678.1725 27.759 type 12 direction 1
06DC: set_train 1@ acc 60.0
06DD: set_train 1@ speed 70.0
33@ = 0
Model.Destroy(#FREIGHT)
Model.Destroy(#FREIFLAT)
Model.Destroy(#STREAK)
Model.Destroy(#STREAKC)
jump @TRAIN_25

Deji
  • Deji

    Coding like a Rockstar!

  • Feroci
  • Joined: 24 Dec 2007
  • None

#8

Posted 29 April 2012 - 01:00 PM

CODE
00AE: set_car 33@ traffic_behaviour_to 3


There is no handle stored in 33@.

Dr. John
  • Dr. John

    Women and Wine

  • Members
  • Joined: 31 Dec 2011
  • India

#9

Posted 29 April 2012 - 01:01 PM

Yes, I know. The actual was 71@ but I got a error saying that 33 is the maximum. What should I do?

Deji
  • Deji

    Coding like a Rockstar!

  • Feroci
  • Joined: 24 Dec 2007
  • None

#10

Posted 29 April 2012 - 01:03 PM

But 71@ also has no handle. You should learn a bit more about coding. The parser needs to know which vehicle to operate on.

Dr. John
  • Dr. John

    Women and Wine

  • Members
  • Joined: 31 Dec 2011
  • India

#11

Posted 29 April 2012 - 01:09 PM

I want all the vehicles who are around the sphere to be aggressive and not a specific. I see that 33 here represents train. Now I can't find parser for each vehicle. confused.gif

ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union

#12

Posted 29 April 2012 - 02:23 PM Edited by ZAZ, 29 April 2012 - 02:26 PM.

QUOTE (Dr. John13 @ Sunday, Apr 29 2012, 13:09)
I want all the vehicles who are around the sphere to be aggressive and not a specific. I see that 33 here represents train. Now I can't find parser for each vehicle. confused.gif

i thought you want that the trains pass more often, therefor the timecheck 33@ > 7000
but if i understand you right, you want to increase the traffic density
remove that: 00AE: set_car 33@ traffic_behaviour_to 3
you need to check for random cars

Dr. John
  • Dr. John

    Women and Wine

  • Members
  • Joined: 31 Dec 2011
  • India

#13

Posted 29 April 2012 - 02:25 PM

In which tag should I put that opcode. Atleast there will be more hits when a car passes from the tracks.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users