Advertisement
wertercatt

Elite Penguin Force Gift Shop Roof Wheelbot Script

Jul 2nd, 2019
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 40.60 KB | None | 0 0
  1. local L0_0, L1_1, L2_2, L3_3
  2. L0_0 = _util
  3. L0_0 = L0_0.GetReason
  4. L0_0 = L0_0()
  5. L1_1 = _const
  6. L1_1 = L1_1.CREATED
  7. if L0_0 == L1_1 then
  8.   L0_0 = _util
  9.   L0_0 = L0_0.AddInterest
  10.   L1_1 = _const
  11.   L1_1 = L1_1.ITEM_DROPPED
  12.   L0_0(L1_1)
  13.   L0_0 = _util
  14.   L0_0 = L0_0.AddInterest
  15.   L1_1 = _const
  16.   L1_1 = L1_1.COLLIDED
  17.   L0_0(L1_1)
  18. end
  19. L0_0 = _util
  20. L0_0 = L0_0.GetReason
  21. L0_0 = L0_0()
  22. L1_1 = _const
  23. L1_1 = L1_1.TOUCHED
  24. if L0_0 == L1_1 then
  25.   L0_0 = _util
  26.   L0_0 = L0_0.GetConversationCount
  27.   L0_0 = L0_0()
  28.   function L1_1()
  29.     repeat
  30.       if _util.GetVar("M4C2_moveBot") == 1 then
  31.         _util.MoveObject(_id.M4C2_WBot_Roof, 90, 144)
  32.       end
  33.       repeat
  34.         scriptWait()
  35.       until 90 >= _util.GetX(_id.M4C2_WBot_Roof) or _util.GetVar("M4C2_moveBot") == 0
  36.       if _util.GetVar("M4C2_moveBot") == 1 then
  37.         _util.MoveObject(_id.M4C2_WBot_Roof, 250, 144)
  38.       end
  39.       repeat
  40.         scriptWait()
  41.       until _util.GetX(_id.M4C2_WBot_Roof) >= 250 or _util.GetVar("M4C2_moveBot") == 0
  42.       _util.IncVar("M4C2_robotCount")
  43.     until _util.GetVar("M4C2_moveBot") == 0 or _util.GetVar("M4C2_robotCount") >= 4
  44.     _util.ClearEffects()
  45.     if _util.GetVar("M4C2_moveBot") == 1 then
  46.       _util.SetVar("M4C2_moveBot", 0)
  47.       _util.ActivateNpc(_id.M4C2_WBot_Roof, 0)
  48.     end
  49.   end
  50.   L2_2 = _util
  51.   L2_2 = L2_2.GetVar
  52.   L3_3 = "M4C2_introRoof"
  53.   L2_2 = L2_2(L3_3)
  54.   if L2_2 == 0 then
  55.     if L0_0 == 0 then
  56.       L2_2 = _util
  57.       L2_2 = L2_2.AddConversation
  58.       L3_3 = 2477
  59.       L2_2(L3_3, 2478, -1, _const.CHANGE_DIALOG, 1)
  60.     elseif L0_0 == 1 then
  61.       L2_2 = _util
  62.       L2_2 = L2_2.AddConversation
  63.       L3_3 = 2479
  64.       L2_2(L3_3, 2480, -1, _const.CHANGE_DIALOG, 102)
  65.       L2_2 = _util
  66.       L2_2 = L2_2.SetVar
  67.       L3_3 = "M4C2_introRoof"
  68.       L2_2(L3_3, 1)
  69.     end
  70.   elseif L0_0 == 102 then
  71.     L2_2 = _util
  72.     L2_2 = L2_2.SetConversationCount
  73.     L3_3 = _util
  74.     L3_3 = L3_3.GetSelf
  75.     L3_3 = L3_3()
  76.     L2_2(L3_3, 0)
  77.     L2_2 = _util
  78.     L2_2 = L2_2.GetVar
  79.     L3_3 = "M4C2_moveBot"
  80.     L2_2 = L2_2(L3_3)
  81.     if L2_2 == 0 then
  82.       L2_2 = _util
  83.       L2_2 = L2_2.SetVar
  84.       L3_3 = "M4C2_moveBot"
  85.       L2_2(L3_3, 1)
  86.       L2_2 = _util
  87.       L2_2 = L2_2.SetVar
  88.       L3_3 = "M4C2_robotCount"
  89.       L2_2(L3_3, 0)
  90.       L2_2 = scriptPlay
  91.       L3_3 = L1_1
  92.       L2_2(L3_3)
  93.     end
  94.   elseif L0_0 == 0 then
  95.     L2_2 = _util
  96.     L2_2 = L2_2.GetVar
  97.     L3_3 = "M4C2_fightWB"
  98.     L2_2 = L2_2(L3_3)
  99.     if L2_2 < 2 then
  100.       L2_2 = _util
  101.       L2_2 = L2_2.AddConversation
  102.       L3_3 = 2485
  103.       L2_2(L3_3, 2486, -1, _const.CHANGE_DIALOG, 102)
  104.     else
  105.       L2_2 = _util
  106.       L2_2 = L2_2.GetVar
  107.       L3_3 = "M4C2_fightWB"
  108.       L2_2 = L2_2(L3_3)
  109.       if L2_2 == 2 then
  110.         L2_2 = _util
  111.         L2_2 = L2_2.GetVar
  112.         L3_3 = "M4C2_hitCream"
  113.         L2_2 = L2_2(L3_3)
  114.         if L2_2 == 1 then
  115.           L2_2 = _util
  116.           L2_2 = L2_2.AddConversation
  117.           L3_3 = 2509
  118.           L2_2(L3_3, 2511, -1, _const.END_DIALOG, 0)
  119.         else
  120.           L2_2 = _util
  121.           L2_2 = L2_2.AddConversation
  122.           L3_3 = 2509
  123.           L2_2(L3_3, 2510, -1, _const.END_DIALOG, 0)
  124.         end
  125.       else
  126.         L2_2 = _util
  127.         L2_2 = L2_2.GetVar
  128.         L3_3 = "M4C2_fightWB"
  129.         L2_2 = L2_2(L3_3)
  130.         if L2_2 == 3 then
  131.           L2_2 = _util
  132.           L2_2 = L2_2.GetVar
  133.           L3_3 = "M4C2_deadWB"
  134.           L2_2 = L2_2(L3_3)
  135.           if L2_2 == 0 then
  136.             L2_2 = _util
  137.             L2_2 = L2_2.AddConversation
  138.             L3_3 = 2534
  139.             L2_2(L3_3, 2535, -1, _const.END_DIALOG, 0)
  140.           end
  141.         else
  142.           L2_2 = _util
  143.           L2_2 = L2_2.GetVar
  144.           L3_3 = "M4C2_deadWB"
  145.           L2_2 = L2_2(L3_3)
  146.           if L2_2 == 1 then
  147.             L2_2 = _util
  148.             L2_2 = L2_2.AddMonologue
  149.             L3_3 = 2561
  150.             L2_2(L3_3)
  151.           else
  152.             L2_2 = _util
  153.             L2_2 = L2_2.GetVar
  154.             L3_3 = "M4C2_deadWB"
  155.             L2_2 = L2_2(L3_3)
  156.             if L2_2 == 2 then
  157.               function L2_2()
  158.                 _util.SetExitLocked(_id.Doors_GiftShop2Town, false)
  159.                 _util.SetExitLocked(_id.Doors_GiftRoof2Office, false)
  160.                 _util.SetVar("M4C2_haveWB", 1)
  161.                 _util.ShowMap()
  162.                 _util.DelItem(_id.M4C2_WBot_RoofDead)
  163.                 _util.AddInventoryItem(_id.Inventory_WBot)
  164.                 repeat
  165.                   scriptWait()
  166.                 until _util.IsPopUpVisible() == false
  167.               end
  168.               L3_3 = scriptPlay
  169.               L3_3(L2_2)
  170.             end
  171.           end
  172.         end
  173.       end
  174.     end
  175.   elseif L0_0 == 50 then
  176.     L2_2 = _util
  177.     L2_2 = L2_2.AddDialog
  178.     L3_3 = 2505
  179.     L2_2(L3_3, _const.CHANGE_DIALOG, 51)
  180.   elseif L0_0 == 51 then
  181.     L2_2 = _util
  182.     L2_2 = L2_2.AddDialog
  183.     L3_3 = 2506
  184.     L2_2(L3_3, _const.CHANGE_DIALOG, 52)
  185.   elseif L0_0 == 52 then
  186.     L2_2 = _util
  187.     L2_2 = L2_2.GetVar
  188.     L3_3 = "M4C2_hitCream"
  189.     L2_2 = L2_2(L3_3)
  190.     if L2_2 == 1 then
  191.       L2_2 = _util
  192.       L2_2 = L2_2.AddMonologue
  193.       L3_3 = 2508
  194.       L2_2(L3_3, "DialogStrings", _const.END_DIALOG, 0)
  195.     else
  196.       L2_2 = _util
  197.       L2_2 = L2_2.AddMonologue
  198.       L3_3 = 2507
  199.       L2_2(L3_3, "DialogStrings", _const.END_DIALOG, 0)
  200.     end
  201.   elseif L0_0 == 53 then
  202.     L2_2 = _util
  203.     L2_2 = L2_2.AddMonologue
  204.     L3_3 = 2526
  205.     L2_2(L3_3, "DialogStrings", _const.END_DIALOG, 0)
  206.     L2_2 = _util
  207.     L2_2 = L2_2.SetVar
  208.     L3_3 = "M4C2_blueWB"
  209.     L2_2(L3_3, 2)
  210.   elseif L0_0 == 530 then
  211.     L2_2 = _util
  212.     L2_2 = L2_2.AddMonologue
  213.     L3_3 = 2528
  214.     L2_2(L3_3, "DialogStrings", _const.END_DIALOG, 0)
  215.     L2_2 = _util
  216.     L2_2 = L2_2.SetVar
  217.     L3_3 = "M4C2_blueWB"
  218.     L2_2(L3_3, 2)
  219.   elseif L0_0 == 54 then
  220.     L2_2 = _util
  221.     L2_2 = L2_2.AddMonologue
  222.     L3_3 = 2549
  223.     L2_2(L3_3, "DialogStrings", _const.END_DIALOG, 0)
  224.     L2_2 = _util
  225.     L2_2 = L2_2.SetVar
  226.     L3_3 = "M4C2_blueWB"
  227.     L2_2(L3_3, 2)
  228.   elseif L0_0 == 540 then
  229.     L2_2 = _util
  230.     L2_2 = L2_2.AddMonologue
  231.     L3_3 = 2550
  232.     L2_2(L3_3, "DialogStrings", _const.END_DIALOG, 0)
  233.     L2_2 = _util
  234.     L2_2 = L2_2.SetVar
  235.     L3_3 = "M4C2_blueWB"
  236.     L2_2(L3_3, 2)
  237.   elseif L0_0 == 60 then
  238.     L2_2 = _util
  239.     L2_2 = L2_2.AddDialog
  240.     L3_3 = 2530
  241.     L2_2(L3_3, _const.CHANGE_DIALOG, 61)
  242.   elseif L0_0 == 61 then
  243.     function L2_2()
  244.       _util.DisableInput()
  245.       _util.PlaySFX(52)
  246.       _util.SwitchState("succeedBlack", _id.M4C2_WBot_RoofSnow)
  247.       repeat
  248.         scriptWait()
  249.       until not _util.IsAnimPlaying(_id.M4C2_WBot_RoofSnow)
  250.       _util.DelItem(_id.M4C2_WBot_RoofSnow)
  251.       _util.AddItem(_id.M4C2_WBot_RoofWeld)
  252.       _util.SetVar("M4C2_fightWB", 3)
  253.       _util.SetVar("M4C2_blueWB", 0)
  254.       _util.SetVar("M4C2_blackWB", 0)
  255.       _util.SetVar("M4C2_redWB", 0)
  256.       _util.SetVar("M4C2_purpleWB", 0)
  257.       _util.SetVar("M4C2_yellowWB", 0)
  258.       _util.SetVar("M4C2_greenWB", 0)
  259.       _util.SetVar("M4C2_pinkWB", 0)
  260.       _util.EnableInput()
  261.       _util.ActivateNpc(_id.M4C2_WBot_RoofWeld, 62)
  262.     end
  263.     L3_3 = scriptPlay
  264.     L3_3(L2_2)
  265.   elseif L0_0 == 62 then
  266.     L2_2 = _util
  267.     L2_2 = L2_2.AddMonologue
  268.     L3_3 = 2531
  269.     L2_2(L3_3, "DialogStrings", _const.CHANGE_DIALOG, 63)
  270.   elseif L0_0 == 63 then
  271.     L2_2 = _util
  272.     L2_2 = L2_2.AddDialog
  273.     L3_3 = 2532
  274.     L2_2(L3_3, _const.CHANGE_DIALOG, 64)
  275.   elseif L0_0 == 64 then
  276.     L2_2 = _util
  277.     L2_2 = L2_2.AddMonologue
  278.     L3_3 = 2533
  279.     L2_2(L3_3, "DialogStrings", _const.END_DIALOG, 0)
  280.   elseif L0_0 == 200 then
  281.     function L2_2()
  282.       _util.DisableInput()
  283.       _util.PlaySFX(67)
  284.       _util.SwitchState("failBlack", _util.GetSelf())
  285.       repeat
  286.         scriptWait()
  287.       until not _util.IsAnimPlaying(_util.GetSelf())
  288.       _util.SwitchState("", _util.GetSelf())
  289.       _util.SetVar("M4C2_blackWB", 2)
  290.       _util.EnableInput()
  291.       if _util.GetVar("M4C2_fightWB") == 1 then
  292.         _util.AddMonologue(2499, "DialogStrings", _const.CHANGE_DIALOG, 102)
  293.       elseif _util.GetVar("M4C2_fightWB") == 3 then
  294.         _util.AddMonologue(2552, "DialogStrings", _const.END_DIALOG, 0)
  295.       end
  296.     end
  297.     L3_3 = scriptPlay
  298.     L3_3(L2_2)
  299.   elseif L0_0 == 70 then
  300.     function L2_2()
  301.       _util.DisableInput()
  302.       _util.PlaySFX(84)
  303.       _util.SwitchState("succeedPurple", _id.M4C2_WBot_RoofDead)
  304.       repeat
  305.         scriptWait()
  306.       until not _util.IsAnimPlaying(_id.M4C2_WBot_RoofDead)
  307.       _util.SwitchState("bubble", _id.M4C2_WBot_RoofDead)
  308.       _util.SetVar("M4C2_deadWB", 2)
  309.       _util.EnableInput()
  310.       _util.AddMonologue(2563, "DialogStrings", _const.END_DIALOG, 0)
  311.       _util.SetObjective(654)
  312.       _util.RemoveMapAlert(_const.M4C2ROBOTGIFT)
  313.       _util.AddMapAlert(_const.STORY_MISSION, 210, 130, _const.M4C2MISSIONEND, 70, 70)
  314.     end
  315.     L3_3 = scriptPlay
  316.     L3_3(L2_2)
  317.   elseif L0_0 == 202 then
  318.     function L2_2()
  319.       _util.DisableInput()
  320.       _util.PlaySFX(67)
  321.       _util.SwitchState("failPurple", _util.GetSelf())
  322.       repeat
  323.         scriptWait()
  324.       until not _util.IsAnimPlaying(_util.GetSelf())
  325.       _util.SwitchState("", _util.GetSelf())
  326.       _util.EnableInput()
  327.       if _util.GetVar("M4C2_fightWB") == 1 then
  328.         _util.AddMonologue(2501, "DialogStrings", _const.CHANGE_DIALOG, 102)
  329.       elseif _util.GetVar("M4C2_fightWB") == 2 then
  330.         _util.AddMonologue(2524, "DialogStrings", _const.END_DIALOG, 0)
  331.       elseif _util.GetVar("M4C2_fightWB") == 3 then
  332.         _util.AddMonologue(2547, "DialogStrings", _const.END_DIALOG, 0)
  333.       end
  334.     end
  335.     L3_3 = scriptPlay
  336.     L3_3(L2_2)
  337.   elseif L0_0 == 201 then
  338.     function L2_2()
  339.       _util.DisableInput()
  340.       _util.PlaySFX(67)
  341.       _util.SwitchState("failRed", _util.GetSelf())
  342.       repeat
  343.         scriptWait()
  344.       until not _util.IsAnimPlaying(_util.GetSelf())
  345.       _util.SwitchState("", _util.GetSelf())
  346.       _util.EnableInput()
  347.       if _util.GetVar("M4C2_fightWB") == 1 then
  348.         _util.AddMonologue(2491, "DialogStrings", _const.CHANGE_DIALOG, 102)
  349.       elseif _util.GetVar("M4C2_fightWB") == 2 then
  350.         _util.AddMonologue(2491, "DialogStrings", _const.END_DIALOG, 0)
  351.       elseif _util.GetVar("M4C2_fightWB") == 3 then
  352.         _util.AddMonologue(2539, "DialogStrings", _const.END_DIALOG, 0)
  353.       end
  354.     end
  355.     L3_3 = scriptPlay
  356.     L3_3(L2_2)
  357.   elseif L0_0 == 203 then
  358.     function L2_2()
  359.       _util.DisableInput()
  360.       _util.PlaySFX(67)
  361.       _util.SwitchState("failYellow", _util.GetSelf())
  362.       repeat
  363.         scriptWait()
  364.       until not _util.IsAnimPlaying(_util.GetSelf())
  365.       _util.SwitchState("", _util.GetSelf())
  366.       _util.EnableInput()
  367.       if _util.GetVar("M4C2_fightWB") == 1 then
  368.         _util.AddMonologue(2495, "DialogStrings", _const.CHANGE_DIALOG, 102)
  369.       elseif _util.GetVar("M4C2_fightWB") == 2 then
  370.         _util.AddMonologue(2520, "DialogStrings", _const.END_DIALOG, 0)
  371.       elseif _util.GetVar("M4C2_fightWB") == 3 then
  372.         _util.AddMonologue(2543, "DialogStrings", _const.END_DIALOG, 0)
  373.       end
  374.     end
  375.     L3_3 = scriptPlay
  376.     L3_3(L2_2)
  377.   elseif L0_0 == 204 then
  378.     function L2_2()
  379.       _util.DisableInput()
  380.       _util.PlaySFX(67)
  381.       _util.SwitchState("failGreen", _util.GetSelf())
  382.       repeat
  383.         scriptWait()
  384.       until not _util.IsAnimPlaying(_util.GetSelf())
  385.       _util.SwitchState("", _util.GetSelf())
  386.       _util.EnableInput()
  387.       if _util.GetVar("M4C2_fightWB") == 1 then
  388.         _util.AddMonologue(2493, "DialogStrings", _const.CHANGE_DIALOG, 102)
  389.       elseif _util.GetVar("M4C2_fightWB") == 2 then
  390.         _util.AddMonologue(2518, "DialogStrings", _const.END_DIALOG, 0)
  391.       elseif _util.GetVar("M4C2_fightWB") == 3 then
  392.         _util.AddMonologue(2541, "DialogStrings", _const.END_DIALOG, 0)
  393.       end
  394.     end
  395.     L3_3 = scriptPlay
  396.     L3_3(L2_2)
  397.   elseif L0_0 == 205 then
  398.     function L2_2()
  399.       _util.DisableInput()
  400.       _util.PlaySFX(67)
  401.       _util.SwitchState("failPink", _util.GetSelf())
  402.       repeat
  403.         scriptWait()
  404.       until not _util.IsAnimPlaying(_util.GetSelf())
  405.       _util.SwitchState("", _util.GetSelf())
  406.       _util.EnableInput()
  407.       if _util.GetVar("M4C2_fightWB") == 1 then
  408.         _util.AddMonologue(2497, "DialogStrings", _const.CHANGE_DIALOG, 102)
  409.       elseif _util.GetVar("M4C2_fightWB") == 2 then
  410.         _util.AddMonologue(2522, "DialogStrings", _const.END_DIALOG, 0)
  411.       elseif _util.GetVar("M4C2_fightWB") == 3 then
  412.         _util.AddMonologue(2545, "DialogStrings", _const.END_DIALOG, 0)
  413.       end
  414.     end
  415.     L3_3 = scriptPlay
  416.     L3_3(L2_2)
  417.   elseif L0_0 == 206 then
  418.     L2_2 = _util
  419.     L2_2 = L2_2.GetVar
  420.     L3_3 = "M4C2_dusterWB"
  421.     L2_2 = L2_2(L3_3)
  422.     if L2_2 < 2 then
  423.       function L2_2()
  424.         _util.DisableInput()
  425.         _util.PlaySFX(67)
  426.         _util.SwitchState("failDuster", _util.GetSelf())
  427.         repeat
  428.           scriptWait()
  429.         until not _util.IsAnimPlaying(_util.GetSelf())
  430.         _util.SwitchState("", _util.GetSelf())
  431.         _util.SetVar("M4C2_dusterWB", 2)
  432.         _util.EnableInput()
  433.         if 2 > _util.GetVar("M4C2_fightWB") then
  434.           _util.AddMonologue(2488, "DialogStrings", _const.CHANGE_DIALOG, 102)
  435.         else
  436.           _util.AddMonologue(2488, "DialogStrings", _const.END_DIALOG, 0)
  437.         end
  438.       end
  439.       L3_3 = scriptPlay
  440.       L3_3(L2_2)
  441.     else
  442.       L2_2 = _util
  443.       L2_2 = L2_2.GetVar
  444.       L3_3 = "M4C2_dusterWB"
  445.       L2_2 = L2_2(L3_3)
  446.       if L2_2 == 2 then
  447.         L2_2 = _util
  448.         L2_2 = L2_2.GetVar
  449.         L3_3 = "M4C2_fightWB"
  450.         L2_2 = L2_2(L3_3)
  451.         if L2_2 < 2 then
  452.           L2_2 = _util
  453.           L2_2 = L2_2.AddMonologue
  454.           L3_3 = 2513
  455.           L2_2(L3_3, "DialogStrings", _const.CHANGE_DIALOG, 102)
  456.         else
  457.           L2_2 = _util
  458.           L2_2 = L2_2.AddMonologue
  459.           L3_3 = 2513
  460.           L2_2(L3_3, "DialogStrings", _const.END_DIALOG, 0)
  461.         end
  462.       end
  463.     end
  464.   elseif L0_0 == 207 then
  465.     function L2_2()
  466.       _util.DisableInput()
  467.       _util.SwitchState("opening", _id.M4C2_WBot_RoofWeld)
  468.       repeat
  469.         scriptWait()
  470.       until not _util.IsAnimPlaying(_id.M4C2_WBot_RoofWeld)
  471.       _util.DelItem(_id.M4C2_WBot_RoofWeld)
  472.       _util.AddItem(_id.M4C2_WBot_RoofDead)
  473.       _util.EnableInput()
  474.       _util.StartMiniGame(_const.ROBOTOMY, 0, 1000)
  475.       repeat
  476.         scriptWait()
  477.       until _util.GetGameState() ~= _const.MISSION
  478.       repeat
  479.         scriptWait()
  480.       until _util.GetGameState() == _const.MISSION
  481.       if _util.GetMinigameOutput1() == 1 then
  482.         _util.PlaySFX(54)
  483.         _util.SetVar("M4C2_deadWB", 1)
  484.         _util.ActivateNpc(_id.M4C2_WBot_RoofDead, 208)
  485.       elseif _util.GetMinigameOutput1() == 0 then
  486.         _util.PlaySFX(67)
  487.         _util.SwitchState("", _id.M4C3_SBot_WC)
  488.         _util.SetConversationCount(0)
  489.       end
  490.     end
  491.     L3_3 = scriptPlay
  492.     L3_3(L2_2)
  493.   elseif L0_0 == 208 then
  494.     L2_2 = _util
  495.     L2_2 = L2_2.AddDialog
  496.     L3_3 = 2558
  497.     L2_2(L3_3, _const.CHANGE_DIALOG, 209)
  498.   elseif L0_0 == 209 then
  499.     L2_2 = _util
  500.     L2_2 = L2_2.AddMonologue
  501.     L3_3 = 2559
  502.     L2_2(L3_3, "DialogStrings", _const.CHANGE_DIALOG, 210)
  503.   elseif L0_0 == 210 then
  504.     L2_2 = _util
  505.     L2_2 = L2_2.AddMonologue
  506.     L3_3 = 2560
  507.     L2_2(L3_3, "DialogStrings", _const.END_DIALOG, 0)
  508.   end
  509. end
  510. L0_0 = _util
  511. L0_0 = L0_0.GetReason
  512. L0_0 = L0_0()
  513. L1_1 = _const
  514. L1_1 = L1_1.ITEM_DROPPED
  515. if L0_0 == L1_1 then
  516.   L0_0 = _util
  517.   L0_0 = L0_0.GetSource
  518.   L0_0 = L0_0()
  519.   L1_1 = _id
  520.   L1_1 = L1_1.Inventory_PuffleBlue
  521.   if L0_0 == L1_1 then
  522.     L1_1 = _util
  523.     L1_1 = L1_1.GetVar
  524.     L2_2 = "M4C2_fightWB"
  525.     L1_1 = L1_1(L2_2)
  526.     if L1_1 ~= 1 then
  527.       L1_1 = _util
  528.       L1_1 = L1_1.GetVar
  529.       L2_2 = "M4C2_blueWB"
  530.       L1_1 = L1_1(L2_2)
  531.       if L1_1 < 2 then
  532.         L1_1 = _util
  533.         L1_1 = L1_1.GetVar
  534.         L2_2 = "M4C2_deadWB"
  535.         L1_1 = L1_1(L2_2)
  536.       end
  537.     elseif L1_1 < 1 then
  538.       L1_1 = _util
  539.       L1_1 = L1_1.SetSuccess
  540.       L2_2 = _util
  541.       L2_2 = L2_2.GetSelf
  542.       L2_2 = L2_2()
  543.       L3_3 = true
  544.       L1_1(L2_2, L3_3)
  545.       L1_1 = _util
  546.       L1_1 = L1_1.SetVar
  547.       L2_2 = "M4C2_hit"
  548.       L3_3 = 0
  549.       L1_1(L2_2, L3_3)
  550.       L1_1 = _util
  551.       L1_1 = L1_1.GetTouchValid
  552.       L1_1 = L1_1()
  553.       if L1_1 then
  554.         L1_1 = _util
  555.         L1_1 = L1_1.SetVar
  556.         L2_2 = "M4C2_moveBot"
  557.         L3_3 = 0
  558.         L1_1(L2_2, L3_3)
  559.       end
  560.     end
  561.   else
  562.     L1_1 = _id
  563.     L1_1 = L1_1.Inventory_PuffleBlack
  564.     if L0_0 == L1_1 then
  565.       L1_1 = _util
  566.       L1_1 = L1_1.GetVar
  567.       L2_2 = "M4C2_fightWB"
  568.       L1_1 = L1_1(L2_2)
  569.       if L1_1 ~= 2 then
  570.         L1_1 = _util
  571.         L1_1 = L1_1.GetVar
  572.         L2_2 = "M4C2_blackWB"
  573.         L1_1 = L1_1(L2_2)
  574.         if L1_1 < 2 then
  575.           L1_1 = _util
  576.           L1_1 = L1_1.GetVar
  577.           L2_2 = "M4C2_deadWB"
  578.           L1_1 = L1_1(L2_2)
  579.         end
  580.       elseif L1_1 < 1 then
  581.         L1_1 = _util
  582.         L1_1 = L1_1.SetSuccess
  583.         L2_2 = _util
  584.         L2_2 = L2_2.GetSelf
  585.         L2_2 = L2_2()
  586.         L3_3 = true
  587.         L1_1(L2_2, L3_3)
  588.         L1_1 = _util
  589.         L1_1 = L1_1.SetVar
  590.         L2_2 = "M4C2_hit"
  591.         L3_3 = 0
  592.         L1_1(L2_2, L3_3)
  593.         L1_1 = _util
  594.         L1_1 = L1_1.GetTouchValid
  595.         L1_1 = L1_1()
  596.         if L1_1 then
  597.           L1_1 = _util
  598.           L1_1 = L1_1.SetVar
  599.           L2_2 = "M4C2_moveBot"
  600.           L3_3 = 0
  601.           L1_1(L2_2, L3_3)
  602.         end
  603.       end
  604.     else
  605.       L1_1 = _id
  606.       L1_1 = L1_1.Inventory_PuffleRed
  607.       if L0_0 == L1_1 then
  608.         L1_1 = _util
  609.         L1_1 = L1_1.GetVar
  610.         L2_2 = "M4C2_redWB"
  611.         L1_1 = L1_1(L2_2)
  612.         if L1_1 < 2 then
  613.           L1_1 = _util
  614.           L1_1 = L1_1.GetVar
  615.           L2_2 = "M4C2_deadWB"
  616.           L1_1 = L1_1(L2_2)
  617.           if L1_1 < 1 then
  618.             L1_1 = _util
  619.             L1_1 = L1_1.SetSuccess
  620.             L2_2 = _util
  621.             L2_2 = L2_2.GetSelf
  622.             L2_2 = L2_2()
  623.             L3_3 = true
  624.             L1_1(L2_2, L3_3)
  625.             L1_1 = _util
  626.             L1_1 = L1_1.SetVar
  627.             L2_2 = "M4C2_hit"
  628.             L3_3 = 0
  629.             L1_1(L2_2, L3_3)
  630.             L1_1 = _util
  631.             L1_1 = L1_1.GetTouchValid
  632.             L1_1 = L1_1()
  633.             if L1_1 then
  634.               L1_1 = _util
  635.               L1_1 = L1_1.SetVar
  636.               L2_2 = "M4C2_moveBot"
  637.               L3_3 = 0
  638.               L1_1(L2_2, L3_3)
  639.             end
  640.           end
  641.         end
  642.       else
  643.         L1_1 = _id
  644.         L1_1 = L1_1.Inventory_PufflePurple
  645.         if L0_0 == L1_1 then
  646.           L1_1 = _util
  647.           L1_1 = L1_1.GetVar
  648.           L2_2 = "M4C2_deadWB"
  649.           L1_1 = L1_1(L2_2)
  650.           if L1_1 ~= 1 then
  651.             L1_1 = _util
  652.             L1_1 = L1_1.GetVar
  653.             L2_2 = "M4C2_purpleWB"
  654.             L1_1 = L1_1(L2_2)
  655.             if L1_1 < 2 then
  656.               L1_1 = _util
  657.               L1_1 = L1_1.GetVar
  658.               L2_2 = "M4C2_deadWB"
  659.               L1_1 = L1_1(L2_2)
  660.             end
  661.           elseif L1_1 < 2 then
  662.             L1_1 = _util
  663.             L1_1 = L1_1.SetSuccess
  664.             L2_2 = _util
  665.             L2_2 = L2_2.GetSelf
  666.             L2_2 = L2_2()
  667.             L3_3 = true
  668.             L1_1(L2_2, L3_3)
  669.             L1_1 = _util
  670.             L1_1 = L1_1.SetVar
  671.             L2_2 = "M4C2_hit"
  672.             L3_3 = 0
  673.             L1_1(L2_2, L3_3)
  674.             L1_1 = _util
  675.             L1_1 = L1_1.GetTouchValid
  676.             L1_1 = L1_1()
  677.             if L1_1 then
  678.               L1_1 = _util
  679.               L1_1 = L1_1.SetVar
  680.               L2_2 = "M4C2_moveBot"
  681.               L3_3 = 0
  682.               L1_1(L2_2, L3_3)
  683.             end
  684.           end
  685.         else
  686.           L1_1 = _id
  687.           L1_1 = L1_1.Inventory_PuffleGreen
  688.           if L0_0 == L1_1 then
  689.             L1_1 = _util
  690.             L1_1 = L1_1.GetVar
  691.             L2_2 = "M4C2_greenWB"
  692.             L1_1 = L1_1(L2_2)
  693.             if L1_1 < 2 then
  694.               L1_1 = _util
  695.               L1_1 = L1_1.GetVar
  696.               L2_2 = "M4C2_deadWB"
  697.               L1_1 = L1_1(L2_2)
  698.               if L1_1 < 1 then
  699.                 L1_1 = _util
  700.                 L1_1 = L1_1.SetSuccess
  701.                 L2_2 = _util
  702.                 L2_2 = L2_2.GetSelf
  703.                 L2_2 = L2_2()
  704.                 L3_3 = true
  705.                 L1_1(L2_2, L3_3)
  706.                 L1_1 = _util
  707.                 L1_1 = L1_1.SetVar
  708.                 L2_2 = "M4C2_hit"
  709.                 L3_3 = 0
  710.                 L1_1(L2_2, L3_3)
  711.                 L1_1 = _util
  712.                 L1_1 = L1_1.GetTouchValid
  713.                 L1_1 = L1_1()
  714.                 if L1_1 then
  715.                   L1_1 = _util
  716.                   L1_1 = L1_1.SetVar
  717.                   L2_2 = "M4C2_moveBot"
  718.                   L3_3 = 0
  719.                   L1_1(L2_2, L3_3)
  720.                 end
  721.               end
  722.             end
  723.           else
  724.             L1_1 = _id
  725.             L1_1 = L1_1.Inventory_PuffleYellow
  726.             if L0_0 == L1_1 then
  727.               L1_1 = _util
  728.               L1_1 = L1_1.GetVar
  729.               L2_2 = "M4C2_yellowWB"
  730.               L1_1 = L1_1(L2_2)
  731.               if L1_1 < 2 then
  732.                 L1_1 = _util
  733.                 L1_1 = L1_1.GetVar
  734.                 L2_2 = "M4C2_deadWB"
  735.                 L1_1 = L1_1(L2_2)
  736.                 if L1_1 < 1 then
  737.                   L1_1 = _util
  738.                   L1_1 = L1_1.SetSuccess
  739.                   L2_2 = _util
  740.                   L2_2 = L2_2.GetSelf
  741.                   L2_2 = L2_2()
  742.                   L3_3 = true
  743.                   L1_1(L2_2, L3_3)
  744.                   L1_1 = _util
  745.                   L1_1 = L1_1.SetVar
  746.                   L2_2 = "M4C2_hit"
  747.                   L3_3 = 0
  748.                   L1_1(L2_2, L3_3)
  749.                   L1_1 = _util
  750.                   L1_1 = L1_1.GetTouchValid
  751.                   L1_1 = L1_1()
  752.                   if L1_1 then
  753.                     L1_1 = _util
  754.                     L1_1 = L1_1.SetVar
  755.                     L2_2 = "M4C2_moveBot"
  756.                     L3_3 = 0
  757.                     L1_1(L2_2, L3_3)
  758.                   end
  759.                 end
  760.               end
  761.             else
  762.               L1_1 = _id
  763.               L1_1 = L1_1.Inventory_PufflePink
  764.               if L0_0 == L1_1 then
  765.                 L1_1 = _util
  766.                 L1_1 = L1_1.GetVar
  767.                 L2_2 = "M4C2_pinkWB"
  768.                 L1_1 = L1_1(L2_2)
  769.                 if L1_1 < 2 then
  770.                   L1_1 = _util
  771.                   L1_1 = L1_1.GetVar
  772.                   L2_2 = "M4C2_deadWB"
  773.                   L1_1 = L1_1(L2_2)
  774.                   if L1_1 < 1 then
  775.                     L1_1 = _util
  776.                     L1_1 = L1_1.SetSuccess
  777.                     L2_2 = _util
  778.                     L2_2 = L2_2.GetSelf
  779.                     L2_2 = L2_2()
  780.                     L3_3 = true
  781.                     L1_1(L2_2, L3_3)
  782.                     L1_1 = _util
  783.                     L1_1 = L1_1.SetVar
  784.                     L2_2 = "M4C2_hit"
  785.                     L3_3 = 0
  786.                     L1_1(L2_2, L3_3)
  787.                     L1_1 = _util
  788.                     L1_1 = L1_1.GetTouchValid
  789.                     L1_1 = L1_1()
  790.                     if L1_1 then
  791.                       L1_1 = _util
  792.                       L1_1 = L1_1.SetVar
  793.                       L2_2 = "M4C2_moveBot"
  794.                       L3_3 = 0
  795.                       L1_1(L2_2, L3_3)
  796.                     end
  797.                   end
  798.                 end
  799.               else
  800.                 L1_1 = _id
  801.                 L1_1 = L1_1.Inventory_MechanoDuster
  802.                 if L0_0 == L1_1 then
  803.                   L1_1 = _util
  804.                   L1_1 = L1_1.GetVar
  805.                   L2_2 = "M4C2_dusterWB"
  806.                   L1_1 = L1_1(L2_2)
  807.                   if L1_1 < 2 then
  808.                     L1_1 = _util
  809.                     L1_1 = L1_1.GetVar
  810.                     L2_2 = "M4C2_fightWB"
  811.                     L1_1 = L1_1(L2_2)
  812.                     if L1_1 < 2 then
  813.                       L1_1 = _util
  814.                       L1_1 = L1_1.SetVar
  815.                       L2_2 = "M4C2_moveBot"
  816.                       L3_3 = 0
  817.                       L1_1(L2_2, L3_3)
  818.                       L1_1 = _util
  819.                       L1_1 = L1_1.AddDialog
  820.                       L2_2 = 2487
  821.                       L3_3 = _const
  822.                       L3_3 = L3_3.CHANGE_DIALOG
  823.                       L1_1(L2_2, L3_3, 206)
  824.                     else
  825.                       L1_1 = _util
  826.                       L1_1 = L1_1.GetVar
  827.                       L2_2 = "M4C2_fightWB"
  828.                       L1_1 = L1_1(L2_2)
  829.                       if L1_1 == 2 then
  830.                         L1_1 = _util
  831.                         L1_1 = L1_1.AddDialog
  832.                         L2_2 = 2512
  833.                         L3_3 = _const
  834.                         L3_3 = L3_3.CHANGE_DIALOG
  835.                         L1_1(L2_2, L3_3, 206)
  836.                       end
  837.                     end
  838.                   end
  839.                 else
  840.                   L1_1 = _id
  841.                   L1_1 = L1_1.Inventory_RobotomyTool
  842.                   if L0_0 == L1_1 then
  843.                     function L1_1()
  844.                       _util.DisableInput()
  845.                       _util.PlaySFX(67)
  846.                       _util.SwitchState("failRobotomy", _util.GetSelf())
  847.                       repeat
  848.                         scriptWait()
  849.                       until not _util.IsAnimPlaying(_util.GetSelf())
  850.                       _util.SwitchState("", _util.GetSelf())
  851.                       _util.SetVar("M4C2_robotomyWB", 2)
  852.                       _util.EnableInput()
  853.                       if _util.GetVar("M4C2_fightWB") == 1 then
  854.                         _util.AddMonologue(2489, "DialogStrings", _const.CHANGE_DIALOG, 102)
  855.                       elseif _util.GetVar("M4C2_fightWB") == 2 then
  856.                         _util.AddMonologue(2514, "DialogStrings", _const.END_DIALOG, 0)
  857.                       end
  858.                     end
  859.                     L2_2 = _util
  860.                     L2_2 = L2_2.GetVar
  861.                     L3_3 = "M4C2_fightWB"
  862.                     L2_2 = L2_2(L3_3)
  863.                     if L2_2 == 3 then
  864.                       L2_2 = _util
  865.                       L2_2 = L2_2.GetVar
  866.                       L3_3 = "M4C2_deadWB"
  867.                       L2_2 = L2_2(L3_3)
  868.                       if L2_2 == 0 then
  869.                         L2_2 = _util
  870.                         L2_2 = L2_2.PlaySFX
  871.                         L3_3 = 123
  872.                         L2_2(L3_3)
  873.                         L2_2 = _util
  874.                         L2_2 = L2_2.AddDialog
  875.                         L3_3 = 2553
  876.                         L2_2(L3_3, _const.CHANGE_DIALOG, 207)
  877.                       end
  878.                     else
  879.                       L2_2 = _util
  880.                       L2_2 = L2_2.GetVar
  881.                       L3_3 = "M4C2_fightWB"
  882.                       L2_2 = L2_2(L3_3)
  883.                       if L2_2 ~= 3 then
  884.                         L2_2 = _util
  885.                         L2_2 = L2_2.GetVar
  886.                         L3_3 = "M4C2_robotomyWB"
  887.                         L2_2 = L2_2(L3_3)
  888.                         if L2_2 < 2 then
  889.                           L2_2 = _util
  890.                           L2_2 = L2_2.SetVar
  891.                           L3_3 = "M4C2_moveBot"
  892.                           L2_2(L3_3, 0)
  893.                           L2_2 = scriptPlay
  894.                           L3_3 = L1_1
  895.                           L2_2(L3_3)
  896.                         end
  897.                       end
  898.                     end
  899.                   else
  900.                     L1_1 = _id
  901.                     L1_1 = L1_1.Inventory_CreamPie
  902.                     if L0_0 == L1_1 then
  903.                       L1_1 = _util
  904.                       L1_1 = L1_1.RemoveInventoryItem
  905.                       L2_2 = _id
  906.                       L2_2 = L2_2.Inventory_CreamPie
  907.                       L1_1(L2_2)
  908.                       L1_1 = _util
  909.                       L1_1 = L1_1.GetVar
  910.                       L2_2 = "M4C2_fightWB"
  911.                       L1_1 = L1_1(L2_2)
  912.                       if L1_1 == 1 then
  913.                         function L1_1()
  914.                           _util.DisableInput()
  915.                           _util.PlaySFX(55)
  916.                           _util.MoveObject(_util.GetSelf(), 176, 144)
  917.                           _util.SwitchState("succeedBlue", _id.M4C2_WBot_Roof)
  918.                           repeat
  919.                             scriptWait()
  920.                           until not _util.IsAnimPlaying(_id.M4C2_WBot_Roof) and _util.GetX(_id.M4C2_WBot_Roof) == 176
  921.                           _util.AddItem(_id.M4C2_Computer)
  922.                           _util.DelItem(_id.M4C2_WBot_Roof)
  923.                           _util.AddItem(_id.M4C2_WBot_RoofSnow)
  924.                           _util.SetVar("M4C2_fightWB", 2)
  925.                           _util.SetVar("M4C2_blueWB", 0)
  926.                           _util.SetVar("M4C2_blackWB", 0)
  927.                           _util.SetVar("M4C2_redWB", 0)
  928.                           _util.SetVar("M4C2_purpleWB", 0)
  929.                           _util.SetVar("M4C2_yellowWB", 0)
  930.                           _util.SetVar("M4C2_greenWB", 0)
  931.                           _util.SetVar("M4C2_pinkWB", 0)
  932.                           _util.SetVar("M4C2_moveBot", 0)
  933.                           _util.SetVar("M4C2_hitCream", 1)
  934.                           _util.EnableInput()
  935.                           _util.ActivateNpc(_id.M4C2_WBot_RoofSnow, 50)
  936.                         end
  937.                         L2_2 = scriptPlay
  938.                         L3_3 = L1_1
  939.                         L2_2(L3_3)
  940.                       else
  941.                         L1_1 = _util
  942.                         L1_1 = L1_1.GetVar
  943.                         L2_2 = "M4C2_fightWB"
  944.                         L1_1 = L1_1(L2_2)
  945.                         if L1_1 == 2 then
  946.                           L1_1 = _util
  947.                           L1_1 = L1_1.AddDialog
  948.                           L2_2 = 2527
  949.                           L3_3 = _const
  950.                           L3_3 = L3_3.CHANGE_DIALOG
  951.                           L1_1(L2_2, L3_3, 530)
  952.                         else
  953.                           L1_1 = _util
  954.                           L1_1 = L1_1.GetVar
  955.                           L2_2 = "M4C2_fightWB"
  956.                           L1_1 = L1_1(L2_2)
  957.                           if L1_1 == 3 then
  958.                             L1_1 = _util
  959.                             L1_1 = L1_1.AddDialog
  960.                             L2_2 = 2548
  961.                             L3_3 = _const
  962.                             L3_3 = L3_3.CHANGE_DIALOG
  963.                             L1_1(L2_2, L3_3, 540)
  964.                           end
  965.                         end
  966.                       end
  967.                     end
  968.                   end
  969.                 end
  970.               end
  971.             end
  972.           end
  973.         end
  974.       end
  975.     end
  976.   end
  977. end
  978. L0_0 = _util
  979. L0_0 = L0_0.GetReason
  980. L0_0 = L0_0()
  981. L1_1 = _const
  982. L1_1 = L1_1.COLLIDED
  983. if L0_0 == L1_1 then
  984.   L0_0 = _util
  985.   L0_0 = L0_0.GetSource
  986.   L0_0 = L0_0()
  987.   L1_1 = 0
  988.   L2_2 = 0
  989.   L3_3 = _id
  990.   L3_3 = L3_3.Inventory_PuffleBlue
  991.   if L0_0 == L3_3 then
  992.     L3_3 = _util
  993.     L3_3 = L3_3.GetVar
  994.     L3_3 = L3_3("M4C2_hit")
  995.     if L3_3 == 0 then
  996.       L3_3 = _util
  997.       L3_3 = L3_3.SetVar
  998.       L3_3("M4C2_hit", 1)
  999.       L3_3 = _util
  1000.       L3_3 = L3_3.GetVar
  1001.       L3_3 = L3_3("M4C2_fightWB")
  1002.       if L3_3 == 1 then
  1003.         function L3_3()
  1004.           _util.DisableInput()
  1005.           _util.PlaySFX(55)
  1006.           _util.MoveObject(_util.GetSelf(), 176, 144)
  1007.           _util.SwitchState("succeedBlue", _util.GetSelf())
  1008.           repeat
  1009.             scriptWait()
  1010.           until not _util.IsAnimPlaying(_util.GetSelf()) and _util.GetX(_util.GetSelf()) == 176
  1011.           _util.AddItem(_id.M4C2_Computer)
  1012.           _util.DelItem(_id.M4C2_WBot_Roof)
  1013.           _util.AddItem(_id.M4C2_WBot_RoofSnow)
  1014.           _util.SetVar("M4C2_fightWB", 2)
  1015.           _util.SetVar("M4C2_blueWB", 0)
  1016.           _util.SetVar("M4C2_blackWB", 0)
  1017.           _util.SetVar("M4C2_redWB", 0)
  1018.           _util.SetVar("M4C2_purpleWB", 0)
  1019.           _util.SetVar("M4C2_yellowWB", 0)
  1020.           _util.SetVar("M4C2_greenWB", 0)
  1021.           _util.SetVar("M4C2_pinkWB", 0)
  1022.           _util.EnableInput()
  1023.           _util.ActivateNpc(_id.M4C2_WBot_RoofSnow, 50)
  1024.         end
  1025.         scriptPlay(L3_3)
  1026.       else
  1027.         L3_3 = _util
  1028.         L3_3 = L3_3.GetVar
  1029.         L3_3 = L3_3("M4C2_fightWB")
  1030.         if L3_3 == 2 then
  1031.           L3_3 = _util
  1032.           L3_3 = L3_3.AddDialog
  1033.           L3_3(2525, _const.CHANGE_DIALOG, 53)
  1034.         else
  1035.           L3_3 = _util
  1036.           L3_3 = L3_3.GetVar
  1037.           L3_3 = L3_3("M4C2_fightWB")
  1038.           if L3_3 == 3 then
  1039.             L3_3 = _util
  1040.             L3_3 = L3_3.AddDialog
  1041.             L3_3(2548, _const.CHANGE_DIALOG, 54)
  1042.           end
  1043.         end
  1044.       end
  1045.     end
  1046.   else
  1047.     L3_3 = _id
  1048.     L3_3 = L3_3.Inventory_PuffleBlack
  1049.     if L0_0 == L3_3 then
  1050.       L3_3 = _util
  1051.       L3_3 = L3_3.GetVar
  1052.       L3_3 = L3_3("M4C2_hit")
  1053.       if L3_3 == 0 then
  1054.         L3_3 = _util
  1055.         L3_3 = L3_3.SetVar
  1056.         L3_3("M4C2_hit", 1)
  1057.         function L3_3()
  1058.           _UPVALUE0_ = 180
  1059.           repeat
  1060.             _util.DisableInput()
  1061.             _UPVALUE1_ = _UPVALUE1_ + 1
  1062.             scriptWait()
  1063.           until _UPVALUE1_ >= _UPVALUE0_
  1064.           _util.EnableInput()
  1065.           if _util.GetVar("M4C2_fightWB") == 1 then
  1066.             _util.AddDialog(2498, _const.CHANGE_DIALOG, 200)
  1067.           elseif _util.GetVar("M4C2_fightWB") == 2 then
  1068.             _util.AddDialog(2529, _const.CHANGE_DIALOG, 60)
  1069.           elseif _util.GetVar("M4C2_fightWB") == 3 then
  1070.             _util.AddDialog(2551, _const.CHANGE_DIALOG, 200)
  1071.           end
  1072.         end
  1073.         scriptPlay(L3_3)
  1074.       end
  1075.     else
  1076.       L3_3 = _id
  1077.       L3_3 = L3_3.Inventory_PuffleRed
  1078.       if L0_0 == L3_3 then
  1079.         L3_3 = _util
  1080.         L3_3 = L3_3.GetVar
  1081.         L3_3 = L3_3("M4C2_hit")
  1082.         if L3_3 == 0 then
  1083.           L3_3 = _util
  1084.           L3_3 = L3_3.SetVar
  1085.           L3_3("M4C2_hit", 1)
  1086.           L3_3 = _util
  1087.           L3_3 = L3_3.SetVar
  1088.           L3_3("M4C2_redWB", 2)
  1089.           function L3_3()
  1090.             _util.DisableInput()
  1091.             _UPVALUE0_ = 70
  1092.             repeat
  1093.               _UPVALUE1_ = _UPVALUE1_ + 1
  1094.               scriptWait()
  1095.             until _UPVALUE1_ >= _UPVALUE0_
  1096.             _util.EnableInput()
  1097.             if _util.GetVar("M4C2_fightWB") == 1 then
  1098.               _util.AddDialog(2490, _const.CHANGE_DIALOG, 201)
  1099.             elseif _util.GetVar("M4C2_fightWB") == 2 then
  1100.               _util.AddDialog(2515, _const.CHANGE_DIALOG, 201)
  1101.             elseif _util.GetVar("M4C2_fightWB") == 3 then
  1102.               _util.AddDialog(2515, _const.CHANGE_DIALOG, 201)
  1103.             end
  1104.           end
  1105.           scriptPlay(L3_3)
  1106.         end
  1107.       else
  1108.         L3_3 = _id
  1109.         L3_3 = L3_3.Inventory_PufflePurple
  1110.         if L0_0 == L3_3 then
  1111.           L3_3 = _util
  1112.           L3_3 = L3_3.GetVar
  1113.           L3_3 = L3_3("M4C2_hit")
  1114.           if L3_3 == 0 then
  1115.             L3_3 = _util
  1116.             L3_3 = L3_3.SetVar
  1117.             L3_3("M4C2_hit", 1)
  1118.             L3_3 = _util
  1119.             L3_3 = L3_3.GetVar
  1120.             L3_3 = L3_3("M4C2_deadWB")
  1121.             if L3_3 == 0 then
  1122.               L3_3 = _util
  1123.               L3_3 = L3_3.SetVar
  1124.               L3_3("M4C2_purpleWB", 2)
  1125.               L3_3 = _util
  1126.               L3_3 = L3_3.GetVar
  1127.               L3_3 = L3_3("M4C2_fightWB")
  1128.               if L3_3 == 1 then
  1129.                 L3_3 = _util
  1130.                 L3_3 = L3_3.ActivateNpc
  1131.                 L3_3(_id.M4C2_WBot_Roof, 202)
  1132.               else
  1133.                 L3_3 = _util
  1134.                 L3_3 = L3_3.GetVar
  1135.                 L3_3 = L3_3("M4C2_fightWB")
  1136.                 if L3_3 == 2 then
  1137.                   L3_3 = _util
  1138.                   L3_3 = L3_3.ActivateNpc
  1139.                   L3_3(_id.M4C2_WBot_RoofSnow, 202)
  1140.                 else
  1141.                   L3_3 = _util
  1142.                   L3_3 = L3_3.GetVar
  1143.                   L3_3 = L3_3("M4C2_fightWB")
  1144.                   if L3_3 == 3 then
  1145.                     L3_3 = _util
  1146.                     L3_3 = L3_3.AddDialog
  1147.                     L3_3(2546, _const.CHANGE_DIALOG, 202)
  1148.                   end
  1149.                 end
  1150.               end
  1151.             else
  1152.               L3_3 = _util
  1153.               L3_3 = L3_3.GetVar
  1154.               L3_3 = L3_3("M4C2_deadWB")
  1155.               if L3_3 == 1 then
  1156.                 L3_3 = _util
  1157.                 L3_3 = L3_3.ActivateNpc
  1158.                 L3_3(_id.M4C2_WBot_RoofDead, 70)
  1159.               end
  1160.             end
  1161.           end
  1162.         else
  1163.           L3_3 = _id
  1164.           L3_3 = L3_3.Inventory_PuffleGreen
  1165.           if L0_0 == L3_3 then
  1166.             L3_3 = _util
  1167.             L3_3 = L3_3.GetVar
  1168.             L3_3 = L3_3("M4C2_hit")
  1169.             if L3_3 == 0 then
  1170.               L3_3 = _util
  1171.               L3_3 = L3_3.SetVar
  1172.               L3_3("M4C2_hit", 1)
  1173.               L3_3 = _util
  1174.               L3_3 = L3_3.SetVar
  1175.               L3_3("M4C2_greenWB", 2)
  1176.               function L3_3()
  1177.                 _util.DisableInput()
  1178.                 _UPVALUE0_ = 100
  1179.                 repeat
  1180.                   _UPVALUE1_ = _UPVALUE1_ + 1
  1181.                   scriptWait()
  1182.                 until _UPVALUE1_ >= _UPVALUE0_
  1183.                 _util.EnableInput()
  1184.                 if _util.GetVar("M4C2_fightWB") == 1 then
  1185.                   _util.AddDialog(2492, _const.CHANGE_DIALOG, 204)
  1186.                 elseif _util.GetVar("M4C2_fightWB") == 2 then
  1187.                   _util.AddDialog(2517, _const.CHANGE_DIALOG, 204)
  1188.                 elseif _util.GetVar("M4C2_fightWB") == 3 then
  1189.                   _util.AddDialog(2540, _const.CHANGE_DIALOG, 204)
  1190.                 end
  1191.               end
  1192.               scriptPlay(L3_3)
  1193.             end
  1194.           else
  1195.             L3_3 = _id
  1196.             L3_3 = L3_3.Inventory_PuffleYellow
  1197.             if L0_0 == L3_3 then
  1198.               L3_3 = _util
  1199.               L3_3 = L3_3.GetVar
  1200.               L3_3 = L3_3("M4C2_hit")
  1201.               if L3_3 == 0 then
  1202.                 L3_3 = _util
  1203.                 L3_3 = L3_3.SetVar
  1204.                 L3_3("M4C2_hit", 1)
  1205.                 L3_3 = _util
  1206.                 L3_3 = L3_3.SetVar
  1207.                 L3_3("M4C2_yellowWB", 2)
  1208.                 L3_3 = _util
  1209.                 L3_3 = L3_3.GetVar
  1210.                 L3_3 = L3_3("M4C2_fightWB")
  1211.                 if L3_3 == 1 then
  1212.                   L3_3 = _util
  1213.                   L3_3 = L3_3.AddDialog
  1214.                   L3_3(2494, _const.CHANGE_DIALOG, 203)
  1215.                 else
  1216.                   L3_3 = _util
  1217.                   L3_3 = L3_3.GetVar
  1218.                   L3_3 = L3_3("M4C2_fightWB")
  1219.                   if L3_3 == 2 then
  1220.                     L3_3 = _util
  1221.                     L3_3 = L3_3.AddDialog
  1222.                     L3_3(2519, _const.CHANGE_DIALOG, 203)
  1223.                   else
  1224.                     L3_3 = _util
  1225.                     L3_3 = L3_3.GetVar
  1226.                     L3_3 = L3_3("M4C2_fightWB")
  1227.                     if L3_3 == 3 then
  1228.                       L3_3 = _util
  1229.                       L3_3 = L3_3.AddDialog
  1230.                       L3_3(2542, _const.CHANGE_DIALOG, 203)
  1231.                     end
  1232.                   end
  1233.                 end
  1234.               end
  1235.             else
  1236.               L3_3 = _id
  1237.               L3_3 = L3_3.Inventory_PufflePink
  1238.               if L0_0 == L3_3 then
  1239.                 L3_3 = _util
  1240.                 L3_3 = L3_3.GetVar
  1241.                 L3_3 = L3_3("M4C2_hit")
  1242.                 if L3_3 == 0 then
  1243.                   L3_3 = _util
  1244.                   L3_3 = L3_3.SetVar
  1245.                   L3_3("M4C2_hit", 1)
  1246.                   L3_3 = _util
  1247.                   L3_3 = L3_3.SetVar
  1248.                   L3_3("M4C2_pinkWB", 2)
  1249.                   L3_3 = _util
  1250.                   L3_3 = L3_3.GetVar
  1251.                   L3_3 = L3_3("M4C2_fightWB")
  1252.                   if L3_3 == 1 then
  1253.                     L3_3 = _util
  1254.                     L3_3 = L3_3.AddDialog
  1255.                     L3_3(2496, _const.CHANGE_DIALOG, 205)
  1256.                   else
  1257.                     L3_3 = _util
  1258.                     L3_3 = L3_3.GetVar
  1259.                     L3_3 = L3_3("M4C2_fightWB")
  1260.                     if L3_3 == 2 then
  1261.                       L3_3 = _util
  1262.                       L3_3 = L3_3.AddDialog
  1263.                       L3_3(2521, _const.CHANGE_DIALOG, 205)
  1264.                     else
  1265.                       L3_3 = _util
  1266.                       L3_3 = L3_3.GetVar
  1267.                       L3_3 = L3_3("M4C2_fightWB")
  1268.                       if L3_3 == 3 then
  1269.                         L3_3 = _util
  1270.                         L3_3 = L3_3.AddDialog
  1271.                         L3_3(2544, _const.CHANGE_DIALOG, 205)
  1272.                       end
  1273.                     end
  1274.                   end
  1275.                 end
  1276.               end
  1277.             end
  1278.           end
  1279.         end
  1280.       end
  1281.     end
  1282.   end
  1283. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement