sobinist

MurfyRng.cs

Oct 17th, 2021
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 27.47 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Numerics;
  4. using System.Threading.Tasks;
  5.  
  6. public class SDZ_MurfyAOJ: Perso
  7. {
  8.     public byte DsgVar_0;
  9.     public Text[] DsgVar_1;
  10.     public int[] DsgVar_2;
  11.     public int DsgVar_3;
  12.     public Text DsgVar_4;
  13.     public int DsgVar_5;
  14.     public int DsgVar_6;
  15.     public WayPoint DsgVar_7;
  16.     public WayPoint DsgVar_8;
  17.     public int DsgVar_9;
  18.     public float DsgVar_10;
  19.     public byte DsgVar_11;
  20.     public byte DsgVar_12;
  21.     public Vector3[] DsgVar_13;
  22.     public byte DsgVar_14;
  23.     public Vector3[] DsgVar_15;
  24.     public byte DsgVar_16;
  25.     public Vector3[] DsgVar_17;
  26.     public Perso DsgVar_18;
  27.     public int DsgVar_19;
  28.     public WayPoint DsgVar_20;
  29.     public int DsgVar_21;
  30.     public Vector3 DsgVar_22;
  31.     public Vector3 DsgVar_23;
  32.     public Vector3 DsgVar_24;
  33.     public Vector3 DsgVar_25;
  34.     public Vector3 DsgVar_26;
  35.     public Vector3 DsgVar_27;
  36.     public Vector3 DsgVar_28;
  37.     public float DsgVar_29;
  38.     public int DsgVar_30;
  39.     public Perso DsgVar_31;
  40.     public int DsgVar_32;
  41.     public bool DsgVar_33;
  42.     public byte DsgVar_34;
  43.     public int DsgVar_35;
  44.     public int DsgVar_36;
  45.     public int DsgVar_37;
  46.     public Vector3 DsgVar_38;
  47.     public Vector3 DsgVar_39;
  48.     public Vector3 DsgVar_40;
  49.     public Vector3 DsgVar_41;
  50.  
  51.     private async Task SDZ_AOJ_0_Init()
  52.     {
  53.         if (((DsgVar_19 != 0) && ACT_GetBooleanInArray(((GlobalActorModel)Refs.Perso["global"]).DsgVar_42, DsgVar_19)))
  54.         {
  55.             DsgVar_33 = 0;
  56.         }
  57.         DsgVar_41 = new Vector3(4f,80f,0f);
  58.         DsgVar_22 = Position;
  59.         if (DsgVar_33)
  60.         {
  61.             DsgVar_34 = 1;
  62.             DsgVar_40 = new Vector3(140f,843f,16f);
  63.             DsgVar_38 = new Vector3(14f,80.6f,0f);
  64.             DsgVar_39 = new Vector3(94f,92.4f,0f);
  65.             Proc_ChangeMyComportAndMyReflex(SDZ_AOJ_1_Attente, SDZ_AOJ_3_NoReflex);
  66.         }
  67.         else
  68.         {
  69.             DsgVar_40 = new Vector3(140f,(870-(27*(DsgVar_5-1))),16);
  70.             DsgVar_38 = new Vector3(14f,(86-(2.7f*DsgVar_5)),0);
  71.             DsgVar_39 = new Vector3(94f,(87+(2.7f*DsgVar_5)),0);
  72.             Proc_ChangeMyComportAndMyReflex(SDZ_AOJ_5_Resume, SDZ_AOJ_3_NoReflex);
  73.         }
  74.     }
  75.    
  76.     private async Task SDZ_AOJ_1_Attente()
  77.     {
  78.         if (globalRandomizer%16==0 && (Cond_IsValidObject(DsgVar_18)))
  79.         {
  80.             if (!(((Refs.AIModel["SDZ_MurfyAOJ"])(DsgVar_18)).DsgVar_33))
  81.             {
  82.                 DsgVar_33 = 0;
  83.                 DsgVar_18 = Nobody;
  84.                 Proc_ChangeMyComport(SDZ_AOJ_0_Init);
  85.             }
  86.         }
  87.         DsgVar_18 = Nobody;
  88.         if (globalRandomizer%4==0 && (((Func_DistanceToPerso(((YLT_RaymanModel)Refs.Perso["Rayman"])) < DsgVar_3) && ((YLT_RaymanModel)Refs.Perso["Rayman"]).Cond_CollideWithGround())))
  89.         {
  90.             ((YLT_RaymanModel)Refs.Perso["Rayman"]).DsgVar_16 = 0;
  91.             ((YAM_GenMenuMap)Refs.Perso["YAM_GenMenuMap_I1"]).Proc_ChangeOneCustomBit(29, 1);
  92.             ((GlobalActorModel)Refs.Perso["global"]).DsgVar_21 = 0;
  93.             ((GlobalActorModel)Refs.Perso["global"]).DsgVar_15 = 1;
  94.             if (Cond_IsCustomBitSet(29))
  95.             {
  96.                 if ((DsgVar_11 == 1))
  97.                 {
  98.                     if (fn_p_stNullVector(fn_p_stGetCollision(((YLT_RaymanModel)Refs.Perso["Rayman"]).Position, new Vector3(-3.5f,-0.2f,2.5f), 0)))
  99.                     {
  100.                         DsgVar_24 = (((StdCam)Refs.Perso["StdCamer"]).Position+new Vector3(-1f,1f,0f));
  101.                         DsgVar_25 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+new Vector3(-3.5f,-0.2f,2.5f));
  102.                     }
  103.                     else
  104.                     {
  105.                         DsgVar_24 = (((StdCam)Refs.Perso["StdCamer"]).Position+new Vector3(1f,1f,0f));
  106.                         DsgVar_25 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+new Vector3(3.5f,-0.2f,2.5f));
  107.                     }
  108.                 }
  109.                 else
  110.                 {
  111.                     if ((DsgVar_11 == 2))
  112.                     {
  113.                         if ((fn_p_stGetCollision(((YLT_RaymanModel)Refs.Perso["Rayman"]).Position, new Vector3(3.5f,-0.2f,2.5f), 0) == new Vector3(0f,0f,0f)))
  114.                         {
  115.                             DsgVar_24 = (((StdCam)Refs.Perso["StdCamer"]).Position+new Vector3(1f,1f,0f));
  116.                             DsgVar_25 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+new Vector3(3.5f,-0.2f,2.5f));
  117.                         }
  118.                         else
  119.                         {
  120.                             DsgVar_24 = (((StdCam)Refs.Perso["StdCamer"]).Position+new Vector3(-1f,1f,0f));
  121.                             DsgVar_25 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+new Vector3(-3.5f,-0.2f,2.5f));
  122.                         }
  123.                     }
  124.                     else
  125.                     {
  126.                         DsgVar_24 = (((StdCam)Refs.Perso["StdCamer"]).Position+DsgVar_13[Func_RandomInt(0, (DsgVar_12-1))]);
  127.                         DsgVar_36 = Func_RandomInt(0, (DsgVar_14-1));
  128.                         Proc_Loop(DsgVar_14);
  129.                         if ((fn_p_stGetCollision(((YLT_RaymanModel)Refs.Perso["Rayman"]).Position, DsgVar_15[DsgVar_36], 0) == new Vector3(0f,0f,0f)))
  130.                         {
  131.                             Proc_Break(0);
  132.                         }
  133.                         DsgVar_36++;
  134.                         if ((DsgVar_36 == DsgVar_14))
  135.                         {
  136.                             DsgVar_36 = 0;
  137.                         }
  138.                         Proc_EndLoop();
  139.                         DsgVar_25 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+DsgVar_15[DsgVar_36]);
  140.                     }
  141.                 }
  142.             }
  143.             else
  144.             {
  145.                 if ((DsgVar_11 == 1))
  146.                 {
  147.                     if ((fn_p_stGetCollision(((YLT_RaymanModel)Refs.Perso["Rayman"]).Position, ((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(-3.5f,-0.2f,2.5f)), 0) == new Vector3(0f,0f,0f)))
  148.                     {
  149.                         DsgVar_24 = (((StdCam)Refs.Perso["StdCamer"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(-1f,1f,0f)));
  150.                         DsgVar_25 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(-3.5f,-0.2f,2.5f)));
  151.                     }
  152.                     else
  153.                     {
  154.                         DsgVar_24 = (((StdCam)Refs.Perso["StdCamer"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(1f,1f,0f)));
  155.                         DsgVar_25 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(3.5f,-0.2f,2.5f)));
  156.                     }
  157.                 }
  158.                 else
  159.                 {
  160.                     if ((DsgVar_11 == 2))
  161.                     {
  162.                         if ((fn_p_stGetCollision(((YLT_RaymanModel)Refs.Perso["Rayman"]).Position, ((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(3.5f,-0.2f,2.5f)), 0) == new Vector3(0f,0f,0f)))
  163.                         {
  164.                             DsgVar_24 = (((StdCam)Refs.Perso["StdCamer"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(1f,1f,0f)));
  165.                             DsgVar_25 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(3.5f,-0.2f,2.5f)));
  166.                         }
  167.                         else
  168.                         {
  169.                             DsgVar_24 = (((StdCam)Refs.Perso["StdCamer"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(-1f,1f,0f)));
  170.                             DsgVar_25 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(-3.5f,-0.2f,2.5f)));
  171.                         }
  172.                     }
  173.                     else
  174.                     {
  175.                         DsgVar_24 = (((StdCam)Refs.Perso["StdCamer"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(DsgVar_13[Func_RandomInt(0, (DsgVar_12-1))]));
  176.                         DsgVar_36 = Func_RandomInt(0, (DsgVar_14-1));
  177.                         Proc_Loop(DsgVar_14);
  178.                         if ((fn_p_stGetCollision(((YLT_RaymanModel)Refs.Perso["Rayman"]).Position, ((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(DsgVar_15[DsgVar_36]), 0) == new Vector3(0f,0f,0f)))
  179.                         {
  180.                             Proc_Break(0);
  181.                         }
  182.                         DsgVar_36++;
  183.                         if ((DsgVar_36 == DsgVar_14))
  184.                         {
  185.                             DsgVar_36 = 0;
  186.                         }
  187.                         Proc_EndLoop();
  188.                         DsgVar_25 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(DsgVar_15[DsgVar_36]));
  189.                     }
  190.                 }
  191.             }
  192.             DsgVar_26 = (Func_Normalize((DsgVar_25-DsgVar_24))*DsgVar_10);
  193.             DsgVar_27 = ((StdCam)Refs.Perso["StdCamer"]).Position;
  194.             Proc_FixePositionPerso(this, DsgVar_24);
  195.             Proc_SetFullPersoOrientation((((YLT_RaymanModel)Refs.Perso["Rayman"]).Position-Position), new Vector3(0f,0f,1f), 0);
  196.             Proc_ChangeAction(Refs.Action["0x0001b445"]);
  197.             SOUND_SendSoundRequest(Refs.SoundEvent["0x078f9440"]);
  198.             Proc_ChangeMyComportAndMyReflex(SDZ_AOJ_2_Approche, SDZ_AOJ_1_JeCommenceAFilmer);
  199.         }
  200.     }
  201.    
  202.     private async Task SDZ_AOJ_2_Approche()
  203.     {
  204.         DsgVar_23 = (DsgVar_25-((YLT_RaymanModel)Refs.Perso["Rayman"]).Position);
  205.         DsgVar_23.Z = 0;
  206.         DsgVar_29 = VEC_AngleVector(((YLT_RaymanModel)Refs.Perso["Rayman"]).Func_GetPersoSighting(), DsgVar_23, 0);
  207.         if ((Func_AbsoluteValue(DsgVar_29) > 1f))
  208.         {
  209.             if ((Func_AbsoluteValue(DsgVar_29) > ((2f*Func_GetDeltaTime())/20)))
  210.             {
  211.                 if ((DsgVar_29 < 0f))
  212.                 {
  213.                     ((YLT_RaymanModel)Refs.Perso["Rayman"]).Proc_RotatePersoAroundZ(((-1.9f*Func_GetDeltaTime())/20));
  214.                 }
  215.                 else
  216.                 {
  217.                     ((YLT_RaymanModel)Refs.Perso["Rayman"]).Proc_RotatePersoAroundZ(((1.9f*Func_GetDeltaTime())/20));
  218.                 }
  219.             }
  220.             else
  221.             {
  222.                 ((YLT_RaymanModel)Refs.Perso["Rayman"]).Proc_RotatePersoAroundZ(DsgVar_29);
  223.             }
  224.         }
  225.         if ((VEC_GetVectorNorm((Position-DsgVar_25)) < 0.25f))
  226.         {
  227.             Proc_FixePositionPerso(this, DsgVar_25);
  228.             Proc_ChangePersoAnySighting((((YLT_RaymanModel)Refs.Perso["Rayman"]).Position-Position));
  229.             if ((DsgVar_11 == 1))
  230.             {
  231.                 DsgVar_27 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+((YLT_RaymanModel)Refs.Perso["Rayman"]).Func_AbsoluteVector(new Vector3(-2f,2f,0.1f)));
  232.             }
  233.             else
  234.             {
  235.                 if ((DsgVar_11 == 2))
  236.                 {
  237.                     DsgVar_27 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+((YLT_RaymanModel)Refs.Perso["Rayman"]).Func_AbsoluteVector(new Vector3(2f,2f,0.1f)));
  238.                 }
  239.                 else
  240.                 {
  241.                     await Macro_3();
  242.                 }
  243.             }
  244.             DsgVar_36 = Func_GetTime();
  245.             DsgVar_28 = Position;
  246.             DsgVar_32 = 1;
  247.             DsgVar_23 = (DsgVar_25-((YLT_RaymanModel)Refs.Perso["Rayman"]).Position);
  248.             DsgVar_23.Z = 0;
  249.             DsgVar_29 = VEC_AngleVector(((YLT_RaymanModel)Refs.Perso["Rayman"]).Func_GetPersoSighting(), DsgVar_23, 0);
  250.             if ((DsgVar_29 > 1f))
  251.             {
  252.                 Proc_FactorAnimationFrameRate(1);
  253.                 Proc_ChangeMyComport(SDZ_AOJ_9_Tourne);
  254.             }
  255.             DsgVar_21 = 254;
  256.             await Macro_0();
  257.             await Macro_2();
  258.             Proc_FactorAnimationFrameRate(1);
  259.             Proc_ChangeMyComportAndMyReflex(SDZ_AOJ_3_Parle, SDZ_AOJ_2_JeFilme);
  260.         }
  261.         DsgVar_24 = (DsgVar_24+((DsgVar_26*Func_GetDeltaTime())/1000));
  262.         Proc_FixePositionPerso(this, DsgVar_24);
  263.         ACT_ChangeActorSighting((((YLT_RaymanModel)Refs.Perso["Rayman"]).Position-Position));
  264.         if (globalRandomizer%4==0 && (1))
  265.         {
  266.             SetAGO(9, Position, new Vector3(0f,0f,0f), Refs.GameMaterial["0x0013ce88"], 4f);
  267.         }
  268.     }
  269.    
  270.     private async Task SDZ_AOJ_3_Parle()
  271.     {
  272.         await Macro_1();
  273.         if (Cond_PressedBut(NodeButton))
  274.         {
  275.             if (Cond_IsValidObject(DsgVar_31))
  276.             {
  277.                 fn_p_stKillPersoAndClearVariableProcedure1(DsgVar_31);
  278.             }
  279.             DsgVar_31 = Nobody;
  280.             DsgVar_32 = 0;
  281.         }
  282.         DsgVar_30 = TEXT_DisplayText(DsgVar_31, ((CHG_TexteMenu)Refs.Perso["ALW_TexteMenu"]), DsgVar_40, Refs.Text["0x0000011e"], DsgVar_32);
  283.         if ((DsgVar_30 == 1))
  284.         {
  285.             if (Cond_IsValidWayPoint(DsgVar_7))
  286.             {
  287.                 DsgVar_27 = fn_p_stGetWpAbsolutePosition(DsgVar_7);
  288.             }
  289.             if (Cond_IsValidWayPoint(DsgVar_7))
  290.             {
  291.                 DsgVar_28 = fn_p_stGetWpAbsolutePosition(DsgVar_8);
  292.             }
  293.         }
  294.         else
  295.         {
  296.             if (((DsgVar_30 == 9) || (DsgVar_32 == 0)))
  297.             {
  298.                 DsgVar_30 = TEXT_DisplayText(DsgVar_18, ((CHG_TexteMenu)Refs.Perso["ALW_TexteMenu"]), ((DsgVar_39*10)+new Vector3(-30f,-30f,12f)), NodeString, DsgVar_32);
  299.                 Proc_FactorAnimationFrameRate(1);
  300.                 Proc_ChangeMyComport(SDZ_AOJ_A_ParleAttendBouton);
  301.             }
  302.         }
  303.     }
  304.    
  305.     private async Task SDZ_AOJ_4_Sortie()
  306.     {
  307.         DsgVar_25 = (((StdCam)Refs.Perso["StdCamer"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(1f,1f,0f)));
  308.         DsgVar_26 = (Func_Normalize((DsgVar_25-DsgVar_24))*DsgVar_10);
  309.         if ((Cond_IsCustomBitSet(12) || (VEC_GetVectorNorm((Position-DsgVar_25)) < 0.1f)))
  310.         {
  311.             ((StdCam)Refs.Perso["StdCamer"]).DsgVar_0 = 0;
  312.             ((StdCam)Refs.Perso["StdCamer"]).DsgVar_2 = 0;
  313.             ((StdCam)Refs.Perso["StdCamer"]).ACT_SetNoColWithMap(0);
  314.             ((YAM_GenMenuMap)Refs.Perso["YAM_GenMenuMap_I1"]).Proc_ChangeOneCustomBit(29, 0);
  315.             ((GlobalActorModel)Refs.Perso["global"]).DsgVar_21 = 1;
  316.             DsgVar_33 = 0;
  317.             Proc_ChangeOneCustomBit(14, 1);
  318.             Proc_ChangeOneCustomBit(20, 1);
  319.             DsgVar_21 = 0;
  320.             SOUND_SendSoundRequest(Refs.SoundEvent["0x078f9460"]);
  321.             if ((DsgVar_19 != 0))
  322.             {
  323.                 ACT_SetBooleanInArray(((GlobalActorModel)Refs.Perso["global"]).DsgVar_42, DsgVar_19, 1);
  324.             }
  325.             fn_p_stKillPersoAndClearVariableProcedure1(this);
  326.         }
  327.         DsgVar_24 = (DsgVar_24+((DsgVar_26*Func_GetDeltaTime())/1000));
  328.         Proc_FixePositionPerso(this, DsgVar_24);
  329.         Proc_SetFullPersoOrientation((DsgVar_25-Position), new Vector3(0f,0f,1f), 0);
  330.         if (globalRandomizer%4==0 && (1))
  331.         {
  332.             SetAGO(9, Position, new Vector3(0f,0f,0f), Refs.GameMaterial["0x0013ce88"], 4f);
  333.         }
  334.     }
  335.    
  336.     private async Task SDZ_AOJ_5_Resume()
  337.     {
  338.         if (globalRandomizer%16==0 && (((((GlobalActorModel)Refs.Perso["global"]).DsgVar_60 == 0) && ((Func_DistanceToPerso(((YLT_RaymanModel)Refs.Perso["Rayman"])) < DsgVar_6) && ((YLT_RaymanModel)Refs.Perso["Rayman"]).Cond_CollideWithGround()))))
  339.         {
  340.             ((YAM_GenMenuMap)Refs.Perso["YAM_GenMenuMap_I1"]).Proc_ChangeOneCustomBit(29, 1);
  341.             DsgVar_21 = 0;
  342.             DsgVar_32 = 0;
  343.             DsgVar_31 = Nobody;
  344.             DsgVar_30 = TEXT_DisplayText(DsgVar_31, ((CHG_TexteMenu)Refs.Perso["ALW_TexteMenu"]), DsgVar_40, DsgVar_4, DsgVar_32);
  345.             DsgVar_31.Proc_TransparentDisplay(1);
  346.             DsgVar_31.Proc_SetTransparency(DsgVar_21);
  347.             Proc_ChangeMyComport(SDZ_AOJ_6_Resume_FadeIn);
  348.         }
  349.     }
  350.    
  351.     private async Task SDZ_AOJ_6_Resume_FadeIn()
  352.     {
  353.         Proc_FixePositionPerso(this, ((YLT_RaymanModel)Refs.Perso["Rayman"]).Position);
  354.         DsgVar_21 += (2*Func_GetDeltaTime());
  355.         if ((DsgVar_21 < 255f))
  356.         {
  357.             DsgVar_31.Proc_SetTransparency(DsgVar_21);
  358.             await Macro_0();
  359.             await Macro_1();
  360.         }
  361.         else
  362.         {
  363.             DsgVar_21 = 254;
  364.             DsgVar_31.Proc_SetTransparency(DsgVar_21);
  365.             await Macro_0();
  366.             await Macro_1();
  367.             Proc_FactorAnimationFrameRate(1);
  368.             Proc_ChangeMyComport(SDZ_AOJ_7_Resume_Attente);
  369.         }
  370.     }
  371.    
  372.     private async Task SDZ_AOJ_7_Resume_Attente()
  373.     {
  374.         if (((DsgVar_19 != 0) && ((YLT_RaymanModel)Refs.Perso["Rayman"]).DsgVar_10))
  375.         {
  376.             if ((Cond_JustPressedBut(NodeButton) && (((YLT_RaymanModel)Refs.Perso["Rayman"]).DsgVar_9 == 0)))
  377.             {
  378.                 ((YLT_RaymanModel)Refs.Perso["Rayman"]).DsgVar_8 = 11;
  379.                 Proc_ChangeComport(((YLT_RaymanModel)Refs.Perso["Rayman"]), YLT_Reinit);
  380.                 Proc_ChangeComportReflex(((YLT_RaymanModel)Refs.Perso["Rayman"]), YLT_ReinitReflexe);
  381.                 DsgVar_36 = Func_GetTime();
  382.             }
  383.             if ((((YLT_RaymanModel)Refs.Perso["Rayman"]).DsgVar_9 == 9))
  384.             {
  385.                 if (Cond_JustReleasedBut(NodeButton))
  386.                 {
  387.                     ((YLT_RaymanModel)Refs.Perso["Rayman"]).DsgVar_8 = 0;
  388.                     Proc_ChangeComport(((YLT_RaymanModel)Refs.Perso["Rayman"]), YLT_Reinit);
  389.                     Proc_ChangeComportReflex(((YLT_RaymanModel)Refs.Perso["Rayman"]), YLT_ReinitReflexe);
  390.                     DsgVar_36 = 0;
  391.                 }
  392.                 if (((DsgVar_36 != 0) && Cond_IsTimeElapsed(DsgVar_36,1500)))
  393.                 {
  394.                     ACT_SetBooleanInArray(((GlobalActorModel)Refs.Perso["global"]).DsgVar_42, DsgVar_19, 0);
  395.                     DsgVar_33 = 1;
  396.                     ((YLT_RaymanModel)Refs.Perso["Rayman"]).DsgVar_8 = 0;
  397.                     Proc_ChangeComport(((YLT_RaymanModel)Refs.Perso["Rayman"]), YLT_Reinit);
  398.                     Proc_ChangeComportReflex(((YLT_RaymanModel)Refs.Perso["Rayman"]), YLT_ReinitReflexe);
  399.                     Proc_FactorAnimationFrameRate(1);
  400.                     Proc_ChangeMyComport(SDZ_AOJ_8_Resume_FadeOut);
  401.                 }
  402.             }
  403.             if (globalRandomizer%16==0 && (1))
  404.             {
  405.                 if (Cond_IsValidWayPoint(DsgVar_20))
  406.                 {
  407.                     SetAGO(9, fn_p_stGetWpAbsolutePosition(DsgVar_20), new Vector3(0f,0f,0f), Refs.GameMaterial["0x0013ce88"], 4f);
  408.                 }
  409.                 else
  410.                 {
  411.                     SetAGO(9, DsgVar_22, new Vector3(0f,0f,0f), Refs.GameMaterial["0x0013ce88"], 4f);
  412.                 }
  413.             }
  414.         }
  415.         if (globalRandomizer%4==0 && ((Cond_IsInComport(((YLT_RaymanModel)Refs.Perso["Rayman"]),BNT_FadeDeLaMort) || ((((GlobalActorModel)Refs.Perso["global"]).DsgVar_60 > 0f) || ((VEC_GetVectorNorm((DsgVar_22-((YLT_RaymanModel)Refs.Perso["Rayman"]).Position)) > DsgVar_6) && (DsgVar_36 == 0))))))
  416.         {
  417.             ((YAM_GenMenuMap)Refs.Perso["YAM_GenMenuMap_I1"]).Proc_ChangeOneCustomBit(29, 0);
  418.             Proc_FactorAnimationFrameRate(1);
  419.             Proc_ChangeMyComport(SDZ_AOJ_8_Resume_FadeOut);
  420.         }
  421.         Proc_FixePositionPerso(this, ((YLT_RaymanModel)Refs.Perso["Rayman"]).Position);
  422.         if (Cond_IsValidObject(DsgVar_31))
  423.         {
  424.             await Macro_1();
  425.         }
  426.     }
  427.    
  428.     private async Task SDZ_AOJ_8_Resume_FadeOut()
  429.     {
  430.         Proc_FixePositionPerso(this, ((YLT_RaymanModel)Refs.Perso["Rayman"]).Position);
  431.         DsgVar_21 -= (2*Func_GetDeltaTime());
  432.         if ((DsgVar_21 > 0f))
  433.         {
  434.             DsgVar_31.Proc_SetTransparency(DsgVar_21);
  435.             await Macro_0();
  436.             await Macro_1();
  437.         }
  438.         else
  439.         {
  440.             DsgVar_21 = 0;
  441.             await Macro_0();
  442.             if (Cond_IsValidObject(DsgVar_31))
  443.             {
  444.                 fn_p_stKillPersoAndClearVariableProcedure1(DsgVar_31);
  445.             }
  446.             DsgVar_31 = Nobody;
  447.             ((YAM_GenMenuMap)Refs.Perso["YAM_GenMenuMap_I1"]).Proc_ChangeOneCustomBit(29, 0);
  448.             fn_p_stKillPersoAndClearVariableProcedure1(this);
  449.         }
  450.     }
  451.    
  452.     private async Task SDZ_AOJ_9_Tourne()
  453.     {
  454.         DsgVar_23 = (DsgVar_25-((YLT_RaymanModel)Refs.Perso["Rayman"]).Position);
  455.         DsgVar_23.Z = 0;
  456.         DsgVar_29 = VEC_AngleVector(((YLT_RaymanModel)Refs.Perso["Rayman"]).Func_GetPersoSighting(), DsgVar_23, 0);
  457.         if ((Func_AbsoluteValue(DsgVar_29) > 1f))
  458.         {
  459.             if ((Func_AbsoluteValue(DsgVar_29) > ((2f*Func_GetDeltaTime())/20)))
  460.             {
  461.                 if ((DsgVar_29 < 0f))
  462.                 {
  463.                     ((YLT_RaymanModel)Refs.Perso["Rayman"]).Proc_RotatePersoAroundZ(((-1.9f*Func_GetDeltaTime())/20));
  464.                 }
  465.                 else
  466.                 {
  467.                     ((YLT_RaymanModel)Refs.Perso["Rayman"]).Proc_RotatePersoAroundZ(((1.9f*Func_GetDeltaTime())/20));
  468.                 }
  469.             }
  470.             else
  471.             {
  472.                 ((YLT_RaymanModel)Refs.Perso["Rayman"]).Proc_RotatePersoAroundZ(DsgVar_29);
  473.             }
  474.         }
  475.         DsgVar_23 = (DsgVar_25-((YLT_RaymanModel)Refs.Perso["Rayman"]).Position);
  476.         DsgVar_23.Z = 0;
  477.         DsgVar_29 = VEC_AngleVector(((YLT_RaymanModel)Refs.Perso["Rayman"]).Func_GetPersoSighting(), DsgVar_23, 0);
  478.         if ((DsgVar_29 < 1f))
  479.         {
  480.             DsgVar_21 = 254;
  481.             await Macro_0();
  482.             await Macro_2();
  483.             Proc_FactorAnimationFrameRate(1);
  484.             Proc_ChangeMyComportAndMyReflex(SDZ_AOJ_3_Parle, SDZ_AOJ_2_JeFilme);
  485.         }
  486.     }
  487.    
  488.     private async Task SDZ_AOJ_A_ParleAttendBouton()
  489.     {
  490.         await Macro_1();
  491.         if (Cond_JustPressedBut(NodeButton))
  492.         {
  493.             if (Cond_IsValidObject(DsgVar_18))
  494.             {
  495.                 fn_p_stKillPersoAndClearVariableProcedure1(DsgVar_18);
  496.                 DsgVar_18 = Nobody;
  497.             }
  498.             DsgVar_34 += 1;
  499.             if ((DsgVar_34 > DsgVar_0))
  500.             {
  501.                 DsgVar_33 = 0;
  502.                 fn_p_stKillPersoAndClearVariableProcedure1(DsgVar_31);
  503.                 DsgVar_31 = Nobody;
  504.                 DsgVar_21 = 0;
  505.                 await Macro_0();
  506.                 SOUND_SendSoundRequest(Refs.SoundEvent["0x078dce08"]);
  507.                 await ACTION_ExecuteAction(Refs.Action["0x0001b4d9"]);
  508.                 Proc_ChangeAction(Refs.Action["0x0001b495"]);
  509.                 ((GlobalActorModel)Refs.Perso["global"]).DsgVar_15 = 0;
  510.                 ((YLT_RaymanModel)Refs.Perso["Rayman"]).DsgVar_16 = 1;
  511.                 Proc_FactorAnimationFrameRate(1);
  512.                 Proc_ChangeMyComportAndMyReflex(SDZ_AOJ_4_Sortie, SDZ_AOJ_0_JeBulle);
  513.             }
  514.             else
  515.             {
  516.                 DsgVar_32 = 1;
  517.                 await Macro_2();
  518.                 DsgVar_28 = Position;
  519.                 await Macro_3();
  520.                 fn_p_stKillPersoAndClearVariableProcedure1(DsgVar_31);
  521.                 DsgVar_31 = Nobody;
  522.                 DsgVar_36 = Func_GetTime();
  523.                 Proc_FactorAnimationFrameRate(1);
  524.                 Proc_ChangeMyComport(SDZ_AOJ_3_Parle);
  525.             }
  526.         }
  527.     }
  528.     private async Task SDZ_AOJ_0_JeBulle()
  529.     {
  530.         if ((((StdCam)Refs.Perso["StdCamer"]).DsgVar_6 < DsgVar_9))
  531.         {
  532.             ((StdCam)Refs.Perso["StdCamer"]).DsgVar_6 = DsgVar_9;
  533.         }
  534.     }
  535.    
  536.     private async Task SDZ_AOJ_1_JeCommenceAFilmer()
  537.     {
  538.         if ((((StdCam)Refs.Perso["StdCamer"]).DsgVar_6 < DsgVar_9))
  539.         {
  540.             ((StdCam)Refs.Perso["StdCamer"]).DsgVar_6 = DsgVar_9;
  541.             ((StdCam)Refs.Perso["StdCamer"]).DsgVar_1 = 1;
  542.             ((StdCam)Refs.Perso["StdCamer"]).DsgVar_0 = 1;
  543.             ((StdCam)Refs.Perso["StdCamer"]).DsgVar_2 = 1;
  544.             ((StdCam)Refs.Perso["StdCamer"]).DsgVar_3 = 1;
  545.             ((YLT_RaymanModel)Refs.Perso["Rayman"]).DsgVar_16 = 0;
  546.             ((StdCam)Refs.Perso["StdCamer"]).Cam_ForcePosition(1, 1, DsgVar_27);
  547.             if (Cond_IsCustomBitSet(29))
  548.             {
  549.                 ((StdCam)Refs.Perso["StdCamer"]).Cam_ForceTarget(1, 1, Position);
  550.             }
  551.             else
  552.             {
  553.                 ((StdCam)Refs.Perso["StdCamer"]).Cam_ForceTarget(1, 1, ((Position+((YLT_RaymanModel)Refs.Perso["Rayman"]).Position)/2));
  554.             }
  555.         }
  556.     }
  557.    
  558.     private async Task SDZ_AOJ_2_JeFilme()
  559.     {
  560.         if ((((StdCam)Refs.Perso["StdCamer"]).DsgVar_6 < DsgVar_9))
  561.         {
  562.             ((StdCam)Refs.Perso["StdCamer"]).DsgVar_6 = DsgVar_9;
  563.             ((StdCam)Refs.Perso["StdCamer"]).Cam_SetFlagNoAngularInertia(1, 1);
  564.             ((StdCam)Refs.Perso["StdCamer"]).Cam_SetFlagNoLinearInertia(1, 1);
  565.             ((StdCam)Refs.Perso["StdCamer"]).DsgVar_1 = 1;
  566.             ((StdCam)Refs.Perso["StdCamer"]).DsgVar_0 = 1;
  567.             ((StdCam)Refs.Perso["StdCamer"]).DsgVar_2 = 1;
  568.             ((StdCam)Refs.Perso["StdCamer"]).DsgVar_3 = 1;
  569.             ((YLT_RaymanModel)Refs.Perso["Rayman"]).DsgVar_16 = 0;
  570.             ((StdCam)Refs.Perso["StdCamer"]).Cam_ForcePosition(1, 1, DsgVar_27);
  571.             ((StdCam)Refs.Perso["StdCamer"]).Cam_ForceTarget(1, 1, DsgVar_28);
  572.         }
  573.     }
  574.     private async Task Macro_0()
  575.     {
  576.         SetAGO(125, DsgVar_41, (DsgVar_41+new Vector3(10f,15f,DsgVar_21)), Refs.GameMaterial["0x0013d030"], 5);
  577.     }
  578.    
  579.     private async Task Macro_1()
  580.     {
  581.         SetAGO(110, DsgVar_38, DsgVar_39, Refs.GameMaterial["0x00640767"], ((DsgVar_21*3)/4));
  582.     }
  583.    
  584.     private async Task Macro_2()
  585.     {
  586.         if ((DsgVar_2[(DsgVar_34-1)] == 1))
  587.         {
  588.             SOUND_SendSoundRequest(Refs.SoundEvent["0x078f9480"]);
  589.             SOUND_SendSoundRequest(Refs.SoundEvent["0x084bf8e8"]);
  590.         }
  591.         else
  592.         {
  593.             if (((DsgVar_2[(DsgVar_34-1)] == 2) || (DsgVar_2[(DsgVar_34-1)] == 0)))
  594.             {
  595.                 SOUND_SendSoundRequest(Refs.SoundEvent["0x078f94a0"]);
  596.                 SOUND_SendSoundRequest(Refs.SoundEvent["0x084bf908"]);
  597.             }
  598.             else
  599.             {
  600.                 if ((DsgVar_2[(DsgVar_34-1)] == 3))
  601.                 {
  602.                     SOUND_SendSoundRequest(Refs.SoundEvent["0x078f94c0"]);
  603.                     SOUND_SendSoundRequest(Refs.SoundEvent["0x084bf928"]);
  604.                 }
  605.             }
  606.         }
  607.         TEXT_FormatText(DsgVar_1[(DsgVar_34-1)], NodeString, Refs.Text["0x0000011e"]);
  608.         if ((DsgVar_2[(DsgVar_34-1)] > 0f))
  609.         {
  610.             DsgVar_40 = new Vector3(140f,(870-(27*(DsgVar_2[(DsgVar_34-1)]-1))),16);
  611.             DsgVar_38 = new Vector3(14f,(86-(2.7f*DsgVar_2[(DsgVar_34-1)])),0);
  612.             DsgVar_39 = new Vector3(94f,(87+(2.7f*DsgVar_2[(DsgVar_34-1)])),0);
  613.         }
  614.     }
  615.    
  616.     private async Task Macro_3()
  617.     {
  618.         DsgVar_36 = Func_RandomInt(0, (DsgVar_16-1));
  619.         if ((DsgVar_36 == DsgVar_35))
  620.         {
  621.             DsgVar_35 = (DsgVar_35+1);
  622.             if ((DsgVar_35 == DsgVar_16))
  623.             {
  624.                 DsgVar_35 = 0;
  625.             }
  626.         }
  627.         else
  628.         {
  629.             DsgVar_35 = DsgVar_36;
  630.         }
  631.         DsgVar_27 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+((YLT_RaymanModel)Refs.Perso["Rayman"]).Func_AbsoluteVector(DsgVar_17[DsgVar_35]));
  632.     }
  633. }
Add Comment
Please, Sign In to add comment