viewing paste Unknown #6107 | C

Posted on the
  1. //===== rAthena Script ======================================= 
  2. //= 
  3. //===== By: ================================================== 
  4. //= 
  5. //===== Current Version: ===================================== 
  6. //= 1.0
  7. //===== Compatible With: ===================================== 
  8. //= rAthena
  9. //===== Description: ========================================= 
  10. //= [Aegis Conversion]
  11. //= Original filename: 
  12. //= NPC list:
  13. //= - #fund_master (prt_gld 1 1)
  14. //= - Investment_total#fund00 (prt_gld 2 2)
  15. //= - Revoting manager#Invest1 (prt_gld 164 98)
  16. //= - Revoting manager#Invest2 (prt_gld 164 98)
  17. //= - checking message. (prt_gld 3 2)
  18. //= - check global Var (sec_in02 15 35)
  19. //= - Brito01 (gefg_cas01 1 3)
  20. //= - Brito02 (gefg_cas02 1 3)
  21. //= - Brito03 (gefg_cas03 1 3)
  22. //= - Brito04 (gefg_cas04 1 3)
  23. //= - Brito05 (gefg_cas05 1 3)
  24. //= - Britopill (gef_fild13 1 3)
  25. //= - Green lake01 (payg_cas01 1 3)
  26. //= - Green lake02 (payg_cas02 1 3)
  27. //= - Green lake03 (payg_cas03 1 3)
  28. //= - Green lake04 (payg_cas04 1 3)
  29. //= - Green lake05 (payg_cas05 1 3)
  30. //= - Green lake00 (pay_gld 1 3)
  31. //= - Alde00 (alde_gld 1 3)
  32. //= - Alde01 (aldeg_cas01 1 3)
  33. //= - Alde02 (aldeg_cas02 1 3)
  34. //= - Alde03 (aldeg_cas03 1 3)
  35. //= - Alde04 (aldeg_cas04 1 3)
  36. //= - Alde05 (aldeg_cas05 1 3)
  37. //= - Valkyrie01 (prtg_cas01 1 3)
  38. //= - Valkyrie02 (prtg_cas02 1 3)
  39. //= - Valkyrie03 (prtg_cas03 1 3)
  40. //= - Valkyrie04 (prtg_cas04 1 3)
  41. //= - Valkyrie05 (prtg_cas05 1 3)
  42. //===== Additional Comments: ================================= 
  43. //= 1.0 Converted from the official Aegis script.
  44. //============================================================ 
  45.  
  46. prt_gld,1,1,0	script	#fund_master	844,{
  47. 	end;
  48. OnInit:
  49.     set .@inven, $2011_agit_invest;
  50.     if (GetAgitInvestMsg == 1) {
  51.         set $2011_agit_invest, 1;
  52.     }
  53.     else if (((GetAgitInvestMsg == 3) && (.@inven == 2)) || ((GetAgitInvestMsg == 3) && (.@inven == 1)) || ((GetAgitInvestMsg == 2) && (.@inven == 1))) {
  54.         set .@pcas01, $fund_prt01;
  55.         set .@pcas02, $fund_prt02;
  56.         set .@pcas03, $fund_prt03;
  57.         set .@pcas04, $fund_prt04;
  58.         set .@pcas05, $fund_prt05;
  59.         set .@pcasex, $fund_prt_extra;
  60.         set .@pycas01, $fund_pay01;
  61.         set .@pycas02, $fund_pay02;
  62.         set .@pycas03, $fund_pay03;
  63.         set .@pycas04, $fund_pay04;
  64.         set .@pycas05, $fund_pay05;
  65.         set .@pycasex, $fund_pay_extra;
  66.         set .@gcas01, $fund_gef01;
  67.         set .@gcas02, $fund_gef02;
  68.         set .@gcas03, $fund_gef03;
  69.         set .@gcas04, $fund_gef04;
  70.         set .@gcas05, $fund_gef05;
  71.         set .@gcasex, $fund_gef_extra;
  72.         set .@acas01, $fund_alde01;
  73.         set .@acas02, $fund_alde02;
  74.         set .@acas03, $fund_alde03;
  75.         set .@acas04, $fund_alde04;
  76.         set .@acas05, $fund_alde05;
  77.         set .@acasex, $fund_alde_extra;
  78.         set .@prtgld_res, .@pcas01 + .@pcas02 + .@pcas03 + .@pcas04 + .@pcas05 + .@pcasex;
  79.         set .@paygld_res, .@pycas01 + .@pycas02 + .@pycas03 + .@pycas04 + .@pycas05 + .@pycasex;
  80.         set .@gefgld_res, .@gcas01 + .@gcas02 + .@gcas03 + .@gcas04 + .@gcas05 + .@gcasex;
  81.         set .@aldegld_res, .@acas01 + .@acas02 + .@acas03 + .@acas04 + .@acas05 + .@acasex;
  82.     //----------- 2000 ¸¸ ÀÌ»óÀÎ ¾ÆÁöÆ®¿¡ ±âº»ÀûÀ¸·Î 2 ¼³Á¤/ ¹Ì¸¸ÀÏ °æ¿ì 1 ¼³Á¤
  83.         if (.@prtgld_res > 1999) {
  84.             set $prt_invest_result, 2;
  85.         }
  86.         else {
  87.             set $prt_invest_result, 1;
  88.         }
  89.         if (.@paygld_res > 1999) {
  90.             set $pay_invest_result, 2;
  91.         }
  92.         else {
  93.             set $pay_invest_result, 1;
  94.         }
  95.         if (.@gefgld_res > 1999) {
  96.             set $gef_invest_result, 2;
  97.         }
  98.         else {
  99.             set $gef_invest_result, 1;
  100.         }
  101.         if (.@aldegld_res > 1999) {
  102.             set $alde_invest_result, 2;
  103.         }
  104.         else {
  105.             set $alde_invest_result, 1;
  106.         }
  107.     //-------------------------------------------------------
  108.     //----- 7000 ¸¸ ÀÌ»óÀÇ ¾ÆÁöÆ®°¡ Á¸ÀçÇÒ °æ¿ì ¼øÀ§ ¼±º° ¾øÀÌ Á¾·á
  109.         if ((.@prtgld_res > 6999) || (.@paygld_res > 6999) || (.@gefgld_res > 6999) || (.@aldegld_res > 6999)) {
  110.             if (.@prtgld_res > 6999) {
  111.                 set $prt_invest_result, 3;
  112.             }
  113.             if (.@paygld_res > 6999) {
  114.                 set $pay_invest_result, 3;
  115.             }
  116.             if (.@gefgld_res > 6999) {
  117.                 set $gef_invest_result, 3;
  118.             }
  119.             if (.@aldegld_res > 6999) {
  120.                 set $alde_invest_result, 3;
  121.             }
  122.             set $2011_agit_invest, 4;
  123.         }
  124.         else {
  125.     //---- 2000 ÀÌ»ó 6999 ¹Ì¸¸ 1¼øÀ§ ¼±º° ȤÀº ÀçÅõÇ¥ ¼±º°
  126.             if (.@prtgld_res > .@paygld_res) {
  127.                 if (.@prtgld_res > .@gefgld_res) {
  128.                     if ((.@prtgld_res > .@aldegld_res) && (.@prtgld_res > 1999)) {
  129.                         // ¹ßÅ°¸® 1À§
  130.                         set $prt_invest_result, 3;
  131.                         set $2011_agit_invest, 4;
  132.                     }
  133.                     else if ((.@prtgld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  134.                         // ·çÀ̳ª 1À§
  135.                         set $alde_invest_result, 3;
  136.                         set $2011_agit_invest, 4;
  137.                     }
  138.                     else if ((.@prtgld_res == .@aldegld_res) && (.@prtgld_res > 1999)) {
  139.                         // ¹ßÅ°¸® vs ·çÀ̳ª ÀçÅõÇ¥
  140.                         set .@win, rand(1,2);
  141.             			if (.@win == 1) {
  142.             			    set $prt_invest_result, 3;
  143.             			}
  144.             			else {
  145.             			    set $alde_invest_result, 3;
  146.             			}
  147.             			set $2011_agit_invest, 4;
  148.                     }
  149.                     else {
  150.                         // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  151.                         set $2011_agit_invest, 4;
  152.                     }
  153.                 }
  154.                 else if (.@prtgld_res < .@gefgld_res) {
  155.                     if ((.@gefgld_res > .@aldegld_res) && (.@gefgld_res > 1999)) {
  156.                         // ºê¸®Å丮¾Æ 1À§
  157.                         set $gef_invest_result, 3;
  158.                         set $2011_agit_invest, 4;
  159.                     }
  160.                     else if ((.@gefgld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  161.                         // ·çÀ̳ª 1À§
  162.                         set $alde_invest_result, 3;
  163.                         set $2011_agit_invest, 4;
  164.                     }
  165.                     else if ((.@gefgld_res == .@aldegld_res) && (.@aldegld_res > 1999)) {
  166.                         // ºê¸®Å丮¾Æ vs ·çÀ̳ª ÀçÅõÇ¥
  167.                         set .@win, rand(1,2);
  168.             			if (.@win == 1) {
  169.             			    set $alde_invest_result, 3;
  170.             			}
  171.             			else {
  172.             			    set $gef_invest_result, 3;
  173.             			}
  174.             			set $2011_agit_invest, 4;
  175.                     }
  176.                     else {
  177.                         // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  178.                         set $2011_agit_invest, 4;
  179.                     }
  180.                 }
  181.                 else if (.@prtgld_res == .@gefgld_res) {
  182.                     if ((.@gefgld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  183.                         // ·çÀ̳ª 1À§
  184.                         set $alde_invest_result, 3;
  185.                         set $2011_agit_invest, 4;
  186.                     }
  187.                     else if ((.@gefgld_res > .@aldegld_res) && (.@gefgld_res > 1999)) {
  188.                         // ¹ßÅ°¸® vs ºê¸®Å丮¾Æ ÀçÅõÇ¥
  189.                         set .@win, rand(1,2);
  190.             			if (.@win == 1) {
  191.             			    set $prt_invest_result, 3;
  192.             			}
  193.             			else {
  194.             			    set $gef_invest_result, 3;
  195.             			}
  196.             			set $2011_agit_invest, 4;
  197.                     }
  198.                     else if ((.@gefgld_res == .@aldegld_res) && (.@gefgld_res > 1999)) {
  199.                         // ¹ßÅ°¸® vs ºê¸®Å丮¾Æ vs ·çÀ̳ª ÀçÅõÇ¥
  200.                         set .@win, rand(1,3);
  201.             			if (.@win == 1) {
  202.             			    set $gef_invest_result, 3;
  203.             			}
  204.             			else if (.@win == 2) {
  205.             			    set $alde_invest_result, 3;
  206.             			}
  207.             			else {
  208.             			    set $prt_invest_result, 3;
  209.             			}
  210.                     }
  211.                     else {
  212.                         // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  213.                         set $2011_agit_invest, 4;
  214.                     }
  215.                 }
  216.             }
  217.             else if (.@prtgld_res < .@paygld_res) {
  218.                 if (.@paygld_res > .@gefgld_res) {
  219.                     if ((.@paygld_res > .@aldegld_res) && (.@paygld_res > 1999)) {
  220.                         // û¸²È£¼ö 1À§
  221.                         set $pay_invest_result, 3;
  222.                         set $2011_agit_invest, 4;
  223.                     }
  224.                     else if ((.@paygld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  225.                         // ·çÀ̳ª 1À§
  226.                         set $alde_invest_result, 3;
  227.                         set $2011_agit_invest, 4;
  228.                     }
  229.                     else if ((.@paygld_res == .@aldegld_res) && (.@aldegld_res > 1999)) {
  230.                         // û¸²È£¼ö vs ·çÀ̳ª ÀçÅõÇ¥
  231.                         set .@win, rand(1,2);
  232.             			if (.@win == 1) {
  233.             			    set $pay_invest_result, 3;
  234.             			}
  235.             			else {
  236.             			    set $alde_invest_result, 3;
  237.             			}
  238.             			set $2011_agit_invest, 4;
  239.                     }
  240.                     else {
  241.                         // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  242.                         set $2011_agit_invest, 4;
  243.                     }
  244.                 }
  245.                 else if (.@paygld_res < .@gefgld_res) {
  246.                     if ((.@gefgld_res > .@aldegld_res) && (.@gefgld_res > 1999)) {
  247.                         //ºê¸®Å丮¾Æ 1À§
  248.                         set $gef_invest_result, 3;
  249.                         set $2011_agit_invest, 4;
  250.                     }
  251.                     else if ((.@gefgld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  252.                         // ·çÀ̳ª 1À§
  253.                         set $alde_invest_result, 3;
  254.                         set $2011_agit_invest, 4;
  255.                     }
  256.                     else if ((.@gefgld_res == .@aldegld_res) && (.@aldegld_res > 1999)) {
  257.                         // ºê¸®Å丮¾Æ vs ·çÀ̳ª ÀçÅõÇ¥
  258.                         set .@win, rand(1,2);
  259.             			if (.@win == 1) {
  260.             			    set $alde_invest_result, 3;
  261.             			}
  262.             			else {
  263.             			    set $gef_invest_result, 3;
  264.             			}
  265.             			set $2011_agit_invest, 4;
  266.                     }
  267.                     else {
  268.                         // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  269.                         set $2011_agit_invest, 4;
  270.                     }
  271.                 }
  272.                 else if (.@paygld_res == .@gefgld_res) {
  273.                     if ((.@gefgld_res > .@aldegld_res) && (.@gefgld_res > 1999)) {
  274.                         // û¸² vs ºê¸®Å丮¾Æ ÀçÅõÇ¥
  275.                         set .@win, rand(1,2);
  276.             			if (.@win == 1) {
  277.             			    set $pay_invest_result, 3;
  278.             			}
  279.             			else {
  280.             			    set $gef_invest_result, 3;
  281.             			}
  282.             			set $2011_agit_invest, 4;
  283.                     }
  284.                     else if ((.@gefgld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  285.                         // ·çÀ̳ª 1À§
  286.                         set $alde_invest_result, 3;
  287.                         set $2011_agit_invest, 4;
  288.                     }
  289.                     else if ((.@gefgld_res == .@aldegld_res) && (.@aldegld_res > 1999)) {
  290.                         // û¸² vs ºê¸®Å丮¾Æ vs ·çÀ̳ª ÀçÅõÇ¥
  291.                         set .@win, rand(1,3);
  292.             			if (.@win == 1) {
  293.             			    set $gef_invest_result, 3;
  294.             			}
  295.             			else if (.@win == 2) {
  296.             			    set $alde_invest_result, 3;
  297.             			}
  298.             			else {
  299.             			    set $pay_invest_result, 3;
  300.             			}
  301.             			set $2011_agit_invest, 4;
  302.                     }
  303.                     else {
  304.                         // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  305.                         set $2011_agit_invest, 4;
  306.                     }
  307.                 }
  308.             }
  309.             else if (.@prtgld_res == .@paygld_res) {
  310.                 if (.@paygld_res < .@gefgld_res) {
  311.                     if ((.@gefgld_res > .@aldegld_res) && (.@gefgld_res > 1999)) {
  312.                         // ºê¸®Å丮¾Æ 1À§
  313.                         set $gef_invest_result, 3;
  314.                         set $2011_agit_invest, 4;
  315.                     }
  316.                     else if ((.@gefgld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  317.                         // ·çÀ̳ª 1À§
  318.                         set $alde_invest_result, 3;
  319.                         set $2011_agit_invest, 4;
  320.                     }
  321.                     else if ((.@gefgld_res == .@aldegld_res) && (.@aldegld_res > 1999)) {
  322.                         // ºê¸®Å丮¾Æ vs ·çÀ̳ª ÀçÅõÇ¥
  323.                         set .@win, rand(1,2);
  324.             			if (.@win == 1) {
  325.             			    set $alde_invest_result, 3;
  326.             			}
  327.             			else {
  328.             			    set $gef_invest_result, 3;
  329.             			}
  330.             			set $2011_agit_invest, 4;
  331.                     }
  332.                     else {
  333.                         // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  334.                         set $2011_agit_invest, 4;
  335.                     }
  336.                 } // prt = pay = gef;
  337.                     if ((.@gefgld_res == .@aldegld_res) && (.@gefgld_res > 1999)) { // prt = pay = gef = alde > 1999;
  338.                         // ¹ßÅ°¸® vs ·çÀ̳ª vs û¸² vs ºê¸®Å丮¾Æ ÀçÅõÇ¥
  339.                         set .@win, rand(1,4);
  340.             			if (.@win == 1) {
  341.             			    set $gef_invest_result, 3;
  342.             			}
  343.             			else if (.@win == 2) {
  344.             			    set $prt_invest_result, 3;
  345.             			}
  346.             			else if (.@win == 3) {
  347.             			    set $alde_invest_result, 3;
  348.             			}
  349.             			else {
  350.             			    set $pay_invest_result, 3;
  351.             			}
  352.             			set $2011_agit_invest, 4;
  353.                     }
  354.                     else if ((.@gefgld_res > .@aldegld_res) && (.@gefgld_res > 1999)) {
  355.                         // ¹ßÅ°¸® vs û¸² vs ºê¸®Å丮¾Æ ÀçÅõÇ¥
  356.                         set .@win, rand(1,3);
  357.             			if (.@win == 1) {
  358.             			    set $gef_invest_result, 3;
  359.             			}
  360.             			else if (.@win == 2) {
  361.             			    set $pay_invest_result, 3;
  362.             			}
  363.             			else {
  364.             			    set $prt_invest_result, 3;
  365.             			}
  366.             			set $2011_agit_invest, 4;
  367.                     }
  368.                     else if ((.@gefgld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  369.                         // ·çÀ̳ª 1À§
  370.                         set $alde_invest_result, 3;
  371.                         set $2011_agit_invest, 4;
  372.                     }
  373.                     else {
  374.                         // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  375.                         set $2011_agit_invest, 4;
  376.                     }
  377.                 } // prt = pay > gef;
  378.                     if ((.@paygld_res > .@aldegld_res) && (.@paygld_res > 1999)) {
  379.                         // ¹ßÅ°¸® vs û¸² ÀçÅõÇ¥
  380.                         set .@win, rand(1,2);
  381.             			if (.@win == 1) {
  382.             			    set $prt_invest_result, 3;
  383.             			}
  384.             			else {
  385.             			    set $pay_invest_result, 3;
  386.             			}
  387.             			set $2011_agit_invest, 4;
  388.                     }
  389.                     else if ((.@paygld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  390.                         // ·çÀ̳ª 1À§
  391.                         set $alde_invest_result, 3;
  392.                         set $2011_agit_invest, 4;
  393.                     }
  394.                     else if ((.@paygld_res == .@aldegld_res) && (.@aldegld_res > 1999)) {
  395.                         // ¹ßÅ°¸® vs û¸² vs ·çÀ̳ª ÀçÅõÇ¥
  396.                         set .@win, rand(1,3);
  397.             			if (.@win == 1) {
  398.             			    set $alde_invest_result, 3;
  399.             			}
  400.             			else if (.@win == 2) {
  401.             			    set $pay_invest_result, 3;
  402.             			}
  403.             			else {
  404.             			    set $prt_invest_result, 3;
  405.             			}
  406.             			set $2011_agit_invest, 4;
  407.                     }
  408.                     else {
  409.                         // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  410.                         set $2011_agit_invest, 4;
  411.                     }
  412.                 }
  413.             }
  414.         }
  415.     }
  416. end;
  417. //-- ÅõÀÚ ½ÃÀÛÇ϶ó´Â ½ÅÈ£
  418. OnInvest_start:
  419.     set .@notice$, "From now on, we are going to start investment to connect 'Abyss gate' on WOE area; Valkyrie realm, Greenwood Lake, Luina, Britoniah.";
  420. //    broadcastserver "FF0000" FW_NORMAL 10 0 0 notice
  421.     set $fund_prt01, 0;
  422.     set $fund_prt02, 0;
  423.     set $fund_prt03, 0;
  424.     set $fund_prt04, 0;
  425.     set $fund_prt05, 0;
  426.     set $fund_pay01, 0;
  427.     set $fund_pay02, 0;
  428.     set $fund_pay03, 0;
  429.     set $fund_pay04, 0;
  430.     set $fund_pay05, 0;
  431.     set $fund_gef01, 0;
  432.     set $fund_gef02, 0;
  433.     set $fund_gef03, 0;
  434.     set $fund_gef04, 0;
  435.     set $fund_gef05, 0;
  436.     set $fund_alde01, 0;
  437.     set $fund_alde02, 0;
  438.     set $fund_alde03, 0;
  439.     set $fund_alde04, 0;
  440.     set $fund_alde05, 0;
  441.     donpcevent "Investment_total#fund00::OnEnable";
  442. end;
  443. //-- ÅõÀÚ±Ý ±×¸¸ ¹ÞÀ¸¶ó´Â ½ÅÈ£
  444. OnInvest_stop:
  445.     set .@notice$, "We've finished investment to connect 'Abyss gate'.";
  446. //    broadcastserver "FF0000" FW_NORMAL 10 0 0 notice
  447.     donpcevent "Investment_total#fund00::OnReset";
  448.     // ÅõÀÚ³»¿ª Á¤»ê¿¡ µé¾î°£´Ù. ¸¸¾à µ¿Á¡ÀÌ ÀÖÀ» °æ¿ì Ãß°¡ ÅõÇ¥°¡ ÁøÇàµÈ´Ù.
  449.     set .@pcas01, $fund_prt01;
  450.     set .@pcas02, $fund_prt02;
  451.     set .@pcas03, $fund_prt03;
  452.     set .@pcas04, $fund_prt04;
  453.     set .@pcas05, $fund_prt05;
  454.     set .@pcasex, $fund_prt_extra;
  455.     set .@pycas01, $fund_pay01;
  456.     set .@pycas02, $fund_pay02;
  457.     set .@pycas03, $fund_pay03;
  458.     set .@pycas04, $fund_pay04;
  459.     set .@pycas05, $fund_pay05;
  460.     set .@pycasex, $fund_pay_extra;
  461.     set .@gcas01, $fund_gef01;
  462.     set .@gcas02, $fund_gef02;
  463.     set .@gcas03, $fund_gef03;
  464.     set .@gcas04, $fund_gef04;
  465.     set .@gcas05, $fund_gef05;
  466.     set .@gcasex, $fund_gef_extra;
  467.     set .@acas01, $fund_alde01;
  468.     set .@acas02, $fund_alde02;
  469.     set .@acas03, $fund_alde03;
  470.     set .@acas04, $fund_alde04;
  471.     set .@acas05, $fund_alde05;
  472.     set .@acasex, $fund_alde_extra;
  473.     set .@prtgld_res, .@pcas01 + .@pcas02 + .@pcas03 + .@pcas04 + .@pcas05 + .@pcasex;
  474.     set .@paygld_res, .@pycas01 + .@pycas02 + .@pycas03 + .@pycas04 + .@pycas05 + .@pycasex;
  475.     set .@gefgld_res, .@gcas01 + .@gcas02 + .@gcas03 + .@gcas04 + .@gcas05 + .@gcasex;
  476.     set .@aldegld_res, .@acas01 + .@acas02 + .@acas03 + .@acas04 + .@acas05 + .@acasex;
  477. //----------- 2000 ¸¸ ÀÌ»óÀÎ ¾ÆÁöÆ®¿¡ ±âº»ÀûÀ¸·Î 2 ¼³Á¤/ ¹Ì¸¸ÀÏ °æ¿ì 1 ¼³Á¤
  478.     if (.@prtgld_res > 1999) {
  479.         set $prt_invest_result, 2;
  480.     }
  481.     else {
  482.         set $prt_invest_result, 1;
  483.     }
  484.     if (.@paygld_res > 1999) {
  485.         set $pay_invest_result, 2;
  486.     }
  487.     else {
  488.         set $pay_invest_result, 1;
  489.     }
  490.     if (.@gefgld_res > 1999) {
  491.         set $gef_invest_result, 2;
  492.     }
  493.     else {
  494.         set $gef_invest_result, 1;
  495.     }
  496.     if (.@aldegld_res > 1999) {
  497.         set $alde_invest_result, 2;
  498.     }
  499.     else {
  500.         set $alde_invest_result, 1;
  501.     }
  502. //-------------------------------------------------------
  503. //----- 7000 ¸¸ ÀÌ»óÀÇ ¾ÆÁöÆ®°¡ Á¸ÀçÇÒ °æ¿ì ¼øÀ§ ¼±º° ¾øÀÌ Á¾·á
  504.     if ((.@prtgld_res > 6999) || (.@paygld_res > 6999) || (.@gefgld_res > 6999) || (.@aldegld_res > 6999)) {
  505.         if (.@prtgld_res > 6999) {
  506.             set $prt_invest_result, 3;
  507.         }
  508.         if (.@paygld_res > 6999) {
  509.             set $pay_invest_result, 3;
  510.         }
  511.         if (.@gefgld_res > 6999) {
  512.             set $gef_invest_result, 3;
  513.         }
  514.         if (.@aldegld_res > 6999) {
  515.             set $alde_invest_result, 3;
  516.         }
  517.         set $2011_agit_invest, 4;
  518.     }
  519.     else {
  520. //---- 2000 ÀÌ»ó 6999 ¹Ì¸¸ 1¼øÀ§ ¼±º° ȤÀº ÀçÅõÇ¥ ¼±º°
  521.         if (.@prtgld_res > .@paygld_res) {
  522.             if (.@prtgld_res > .@gefgld_res) {
  523.                 if ((.@prtgld_res > .@aldegld_res) && (.@prtgld_res > 1999)) {
  524.                     // ¹ßÅ°¸® 1À§
  525.                     set $prt_invest_result, 3;
  526.                     set $2011_agit_invest, 4;
  527.                 }
  528.                 else if ((.@prtgld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  529.                     // ·çÀ̳ª 1À§
  530.                     set $alde_invest_result, 3;
  531.                     set $2011_agit_invest, 4;
  532.                 }
  533.                 else if ((.@prtgld_res == .@aldegld_res) && (.@prtgld_res > 1999)) {
  534.                     // ¹ßÅ°¸® vs ·çÀ̳ª ÀçÅõÇ¥
  535.                     donpcevent "Revoting manager#Invest1::OnStart";
  536.                     set $2011_agit_invest, 11;
  537.                 }
  538.                 else {
  539.                     // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  540.                     set $2011_agit_invest, 4;
  541.                 }
  542.             }
  543.             else if (.@prtgld_res < .@gefgld_res) {
  544.                 if ((.@gefgld_res > .@aldegld_res) && (.@gefgld_res > 1999)) {
  545.                     // ºê¸®Å丮¾Æ 1À§
  546.                     set $gef_invest_result, 3;
  547.                     set $2011_agit_invest, 4;
  548.                 }
  549.                 else if ((.@gefgld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  550.                     // ·çÀ̳ª 1À§
  551.                     set $alde_invest_result, 3;
  552.                     set $2011_agit_invest, 4;
  553.                 }
  554.                 else if ((.@gefgld_res == .@aldegld_res) && (.@aldegld_res > 1999)) {
  555.                     // ºê¸®Å丮¾Æ vs ·çÀ̳ª ÀçÅõÇ¥
  556.                     donpcevent "Revoting manager#Invest1::OnStart";
  557.                     set $2011_agit_invest, 15;
  558.                 }
  559.                 else {
  560.                     // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  561.                     set $2011_agit_invest, 4;
  562.                 }
  563.             }
  564.             else if (.@prtgld_res == .@gefgld_res) {
  565.                 if ((.@gefgld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  566.                     // ·çÀ̳ª 1À§
  567.                     set $alde_invest_result, 3;
  568.                     set $2011_agit_invest, 4;
  569.                 }
  570.                 else if ((.@gefgld_res > .@aldegld_res) && (.@gefgld_res > 1999)) {
  571.                     // ¹ßÅ°¸® vs ºê¸®Å丮¾Æ ÀçÅõÇ¥
  572.                     donpcevent "Revoting manager#Invest1::OnStart";
  573.                     set $2011_agit_invest, 13;
  574.                 }
  575.                 else if ((.@gefgld_res == .@aldegld_res) && (.@gefgld_res > 1999)) {
  576.                     // ¹ßÅ°¸® vs ºê¸®Å丮¾Æ vs ·çÀ̳ª ÀçÅõÇ¥
  577.                     donpcevent "Revoting manager#Invest1::OnStart";
  578.                     set $2011_agit_invest, 18;
  579.                 }
  580.                 else {
  581.                     // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  582.                     set $2011_agit_invest, 4;
  583.                 }
  584.             }
  585.         }
  586.         else if (.@prtgld_res < .@paygld_res) {
  587.             if (.@paygld_res > .@gefgld_res) {
  588.                 if ((.@paygld_res > .@aldegld_res) && (.@paygld_res > 1999)) {
  589.                     // û¸²È£¼ö 1À§
  590.                     set $pay_invest_result, 3;
  591.                     set $2011_agit_invest, 4;
  592.                 }
  593.                 else if ((.@paygld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  594.                     // ·çÀ̳ª 1À§
  595.                     set $alde_invest_result, 3;
  596.                     set $2011_agit_invest, 4;
  597.                 }
  598.                 else if ((.@paygld_res == .@aldegld_res) && (.@aldegld_res > 1999)) {
  599.                     // û¸²È£¼ö vs ·çÀ̳ª ÀçÅõÇ¥
  600.                     donpcevent "Revoting manager#Invest1::OnStart";
  601.                     set $2011_agit_invest, 14;
  602.                 }
  603.                 else {
  604.                     // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  605.                     set $2011_agit_invest, 4;
  606.                 }
  607.             }
  608.             else if (.@paygld_res < .@gefgld_res) {
  609.                 if ((.@gefgld_res > .@aldegld_res) && (.@gefgld_res > 1999)) {
  610.                     //ºê¸®Å丮¾Æ 1À§
  611.                     set $gef_invest_result, 3;
  612.                     set $2011_agit_invest, 4;
  613.                 }
  614.                 else if ((.@gefgld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  615.                     // ·çÀ̳ª 1À§
  616.                     set $alde_invest_result, 3;
  617.                     set $2011_agit_invest, 4;
  618.                 }
  619.                 else if ((.@gefgld_res == .@aldegld_res) && (.@aldegld_res > 1999)) {
  620.                     // ºê¸®Å丮¾Æ vs ·çÀ̳ª
  621.                     donpcevent "Revoting manager#Invest1::OnStart";
  622.                     set $2011_agit_invest, 15;
  623.                 }
  624.                 else {
  625.                     // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  626.                     set $2011_agit_invest, 4;
  627.                 }
  628.             }
  629.             else if (.@paygld_res == .@gefgld_res) {
  630.                 if ((.@gefgld_res > .@aldegld_res) && (.@gefgld_res > 1999)) {
  631.                     // û¸² vs ºê¸®Å丮¾Æ ÀçÅõÇ¥
  632.                     donpcevent "Revoting manager#Invest1::OnStart";
  633.                     set $2011_agit_invest, 16;
  634.                 }
  635.                 else if ((.@gefgld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  636.                     // ·çÀ̳ª 1À§
  637.                     set $alde_invest_result, 3;
  638.                     set $2011_agit_invest, 4;
  639.                 }
  640.                 else if ((.@gefgld_res == .@aldegld_res) && (.@aldegld_res > 1999)) {
  641.                     // û¸² vs ºê¸®Å丮¾Æ vs ·çÀ̳ª ÀçÅõÇ¥
  642.                     donpcevent "Revoting manager#Invest1::OnStart";
  643.                     set $2011_agit_invest, 19;
  644.                 }
  645.                 else {
  646.                     // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  647.                     set $2011_agit_invest, 4;
  648.                 }
  649.             }
  650.         }
  651.         else if (.@prtgld_res == .@paygld_res) {
  652.             if (.@paygld_res < .@gefgld_res) {
  653.                 if ((.@gefgld_res > .@aldegld_res) && (.@gefgld_res > 1999)) {
  654.                     // ºê¸®Å丮¾Æ 1À§
  655.                     set $gef_invest_result, 3;
  656.                     set $2011_agit_invest, 4;
  657.                 }
  658.                 else if ((.@gefgld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  659.                     // ·çÀ̳ª 1À§
  660.                     set $alde_invest_result, 3;
  661.                     set $2011_agit_invest, 4;
  662.                 }
  663.                 else if ((.@gefgld_res == .@aldegld_res) && (.@aldegld_res > 1999)) {
  664.                     // ºê¸®Å丮¾Æ vs ·çÀ̳ª ÀçÅõÇ¥
  665.                     donpcevent "Revoting manager#Invest1::OnStart";
  666.                     set $2011_agit_invest, 15;
  667.                 }
  668.                 else {
  669.                     // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  670.                     set $2011_agit_invest, 4;
  671.                 }
  672.             } // prt = pay = gef;
  673.                 if ((.@gefgld_res == .@aldegld_res) && (.@gefgld_res > 1999)) { // prt = pay = gef = alde > 1999;
  674.                     // ¹ßÅ°¸® vs ·çÀ̳ª vs û¸² vs ºê¸®Å丮¾Æ ÀçÅõÇ¥
  675.                     donpcevent "Revoting manager#Invest1::OnStart";
  676.                     set $2011_agit_invest, 21;
  677.                 }
  678.                 else if ((.@gefgld_res > .@aldegld_res) && (.@gefgld_res > 1999)) {
  679.                     // ¹ßÅ°¸® vs û¸² vs ºê¸®Å丮¾Æ ÀçÅõÇ¥
  680.                     donpcevent "Revoting manager#Invest1::OnStart";
  681.                     set $2011_agit_invest, 20;
  682.                 }
  683.                 else if ((.@gefgld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  684.                     // ·çÀ̳ª 1À§
  685.                     set $alde_invest_result, 3;
  686.                     set $2011_agit_invest, 4;
  687.                 }
  688.                 else {
  689.                     // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  690.                     set $2011_agit_invest, 4;
  691.                 }
  692.             } // prt = pay > gef;
  693.                 if ((.@paygld_res > .@aldegld_res) && (.@paygld_res > 1999)) {
  694.                     // ¹ßÅ°¸® vs û¸² ÀçÅõÇ¥
  695.                     donpcevent "Revoting manager#Invest1::OnStart";
  696.                     set $2011_agit_invest, 12;
  697.                 }
  698.                 else if ((.@paygld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  699.                     // ·çÀ̳ª 1À§
  700.                     set $alde_invest_result, 3;
  701.                     set $2011_agit_invest, 4;
  702.                 }
  703.                 else if ((.@paygld_res == .@aldegld_res) && (.@aldegld_res > 1999)) {
  704.                     // ¹ßÅ°¸® vs û¸² vs ·çÀ̳ª ÀçÅõÇ¥
  705.                     donpcevent "Revoting manager#Invest1::OnStart";
  706.                     set $2011_agit_invest, 17;
  707.                 }
  708.                 else {
  709.                     // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  710.                     set $2011_agit_invest, 4;
  711.                 }
  712.             }
  713.         }
  714.     }
  715. end;
  716. //-- ÅõÀÚ °á°ú ¹ßÇ¥Ç϶ó´Â ½ÅÈ£
  717. OnResult:
  718. //        broadcastserver "FF0000" FW_NORMAL 10 0 0 "We've got the result of investment for 'Abyss gate'. you can check through Investment Status Board on each WOE area."
  719.     set .@invest, $2011_agit_invest;
  720.     if (.@invest == 4) {
  721.         set $fund_prt01, 0;
  722.         set $fund_prt02, 0;
  723.         set $fund_prt03, 0;
  724.         set $fund_prt04, 0;
  725.         set $fund_prt05, 0;
  726.         set $fund_prt_extra, 0;
  727.         set $fund_pay01, 0;
  728.         set $fund_pay02, 0;
  729.         set $fund_pay03, 0;
  730.         set $fund_pay04, 0;
  731.         set $fund_pay05, 0;
  732.         set $fund_pay_extra, 0;
  733.         set $fund_gef01, 0;
  734.         set $fund_gef02, 0;
  735.         set $fund_gef03, 0;
  736.         set $fund_gef04, 0;
  737.         set $fund_gef05, 0;
  738.         set $fund_gef_extra, 0;
  739.         set $fund_alde01, 0;
  740.         set $fund_alde02, 0;
  741.         set $fund_alde03, 0;
  742.         set $fund_alde04, 0;
  743.         set $fund_alde05, 0;
  744.         set $fund_alde_extra, 0;
  745.     }
  746.     else if (.@invest == 2) {
  747.         // ÅõÀÚ³»¿ª Á¤»ê¿¡ µé¾î°£´Ù. ¸¸¾à µ¿Á¡ÀÌ ÀÖÀ» °æ¿ì Ãß°¡ ÅõÇ¥°¡ ÁøÇàµÈ´Ù.
  748.         set .@pcas01, $fund_prt01;
  749.         set .@pcas02, $fund_prt02;
  750.         set .@pcas03, $fund_prt03;
  751.         set .@pcas04, $fund_prt04;
  752.         set .@pcas05, $fund_prt05;
  753.         set .@pcasex, $fund_prt_extra;
  754.         set .@pycas01, $fund_pay01;
  755.         set .@pycas02, $fund_pay02;
  756.         set .@pycas03, $fund_pay03;
  757.         set .@pycas04, $fund_pay04;
  758.         set .@pycas05, $fund_pay05;
  759.         set .@pycasex, $fund_pay_extra;
  760.         set .@gcas01, $fund_gef01;
  761.         set .@gcas02, $fund_gef02;
  762.         set .@gcas03, $fund_gef03;
  763.         set .@gcas04, $fund_gef04;
  764.         set .@gcas05, $fund_gef05;
  765.         set .@gcasex, $fund_gef_extra;
  766.         set .@acas01, $fund_alde01;
  767.         set .@acas02, $fund_alde02;
  768.         set .@acas03, $fund_alde03;
  769.         set .@acas04, $fund_alde04;
  770.         set .@acas05, $fund_alde05;
  771.         set .@acasex, $fund_alde_extra;
  772.         set .@prtgld_res, .@pcas01 + .@pcas02 + .@pcas03 + .@pcas04 + .@pcas05 + .@pcasex;
  773.         set .@paygld_res, .@pycas01 + .@pycas02 + .@pycas03 + .@pycas04 + .@pycas05 + .@pycasex;
  774.         set .@gefgld_res, .@gcas01 + .@gcas02 + .@gcas03 + .@gcas04 + .@gcas05 + .@gcasex;
  775.         set .@aldegld_res, .@acas01 + .@acas02 + .@acas03 + .@acas04 + .@acas05 + .@acasex;
  776.     //----------- 2000 ¸¸ ÀÌ»óÀÎ ¾ÆÁöÆ®¿¡ ±âº»ÀûÀ¸·Î 2 ¼³Á¤/ ¹Ì¸¸ÀÏ °æ¿ì 1 ¼³Á¤
  777.         if (.@prtgld_res > 1999) {
  778.             set $prt_invest_result, 2;
  779.         }
  780.         else {
  781.             set $prt_invest_result, 1;
  782.         }
  783.         if (.@paygld_res > 1999) {
  784.             set $pay_invest_result, 2;
  785.         }
  786.         else {
  787.             set $pay_invest_result, 1;
  788.         }
  789.         if (.@gefgld_res > 1999) {
  790.             set $gef_invest_result, 2;
  791.         }
  792.         else {
  793.             set $gef_invest_result, 1;
  794.         }
  795.         if (.@aldegld_res > 1999) {
  796.             set $alde_invest_result, 2;
  797.         }
  798.         else {
  799.             set $alde_invest_result, 1;
  800.         }
  801.     //-------------------------------------------------------
  802.     //----- 7000 ¸¸ ÀÌ»óÀÇ ¾ÆÁöÆ®°¡ Á¸ÀçÇÒ °æ¿ì ¼øÀ§ ¼±º° ¾øÀÌ Á¾·á
  803.         if ((.@prtgld_res > 6999) || (.@paygld_res > 6999) || (.@gefgld_res > 6999) || (.@aldegld_res > 6999)) {
  804.             if (.@prtgld_res > 6999) {
  805.                 set $prt_invest_result, 3;
  806.             }
  807.             if (.@paygld_res > 6999) {
  808.                 set $pay_invest_result, 3;
  809.             }
  810.             if (.@gefgld_res > 6999) {
  811.                 set $gef_invest_result, 3;
  812.             }
  813.             if (.@aldegld_res > 6999) {
  814.                 set $alde_invest_result, 3;
  815.             }
  816.             set $2011_agit_invest, 4;
  817.         }
  818.         else {
  819.     //---- 2000 ÀÌ»ó 6999 ¹Ì¸¸ 1¼øÀ§ ¼±º° ȤÀº ÀçÅõÇ¥ ¼±º°
  820.             if (.@prtgld_res > .@paygld_res) {
  821.                 if (.@prtgld_res > .@gefgld_res) {
  822.                     if ((.@prtgld_res > .@aldegld_res) && (.@prtgld_res > 1999)) {
  823.                         // ¹ßÅ°¸® 1À§
  824.                         set $prt_invest_result, 3;
  825.                         set $2011_agit_invest, 4;
  826.                     }
  827.                     else if ((.@prtgld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  828.                         // ·çÀ̳ª 1À§
  829.                         set $alde_invest_result, 3;
  830.                         set $2011_agit_invest, 4;
  831.                     }
  832.                     else if ((.@prtgld_res == .@aldegld_res) && (.@prtgld_res > 1999)) {
  833.                         // ¹ßÅ°¸® vs ·çÀ̳ª ÀçÅõÇ¥
  834.                         set .@win, rand(1,2);
  835.             			if (.@win == 1) {
  836.             			    set $prt_invest_result, 3;
  837.             			}
  838.             			else {
  839.             			    set $alde_invest_result, 3;
  840.             			}
  841.             			set $2011_agit_invest, 4;
  842.                     }
  843.                     else {
  844.                         // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  845.                         set $2011_agit_invest, 4;
  846.                     }
  847.                 }
  848.                 else if (.@prtgld_res < .@gefgld_res) {
  849.                     if ((.@gefgld_res > .@aldegld_res) && (.@gefgld_res > 1999)) {
  850.                         // ºê¸®Å丮¾Æ 1À§
  851.                         set $gef_invest_result, 3;
  852.                         set $2011_agit_invest, 4;
  853.                     }
  854.                     else if ((.@gefgld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  855.                         // ·çÀ̳ª 1À§
  856.                         set $alde_invest_result, 3;
  857.                         set $2011_agit_invest, 4;
  858.                     }
  859.                     else if ((.@gefgld_res == .@aldegld_res) && (.@aldegld_res > 1999)) {
  860.                         // ºê¸®Å丮¾Æ vs ·çÀ̳ª ÀçÅõÇ¥
  861.                         set .@win, rand(1,2);
  862.             			if (.@win == 1) {
  863.             			    set $alde_invest_result, 3;
  864.             			}
  865.             			else {
  866.             			    set $gef_invest_result, 3;
  867.             			}
  868.             			set $2011_agit_invest, 4;
  869.                     }
  870.                     else {
  871.                         // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  872.                         set $2011_agit_invest, 4;
  873.                     }
  874.                 }
  875.                 else if (.@prtgld_res == .@gefgld_res) {
  876.                     if ((.@gefgld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  877.                         // ·çÀ̳ª 1À§
  878.                         set $alde_invest_result, 3;
  879.                         set $2011_agit_invest, 4;
  880.                     }
  881.                     else if ((.@gefgld_res > .@aldegld_res) && (.@gefgld_res > 1999)) {
  882.                         // ¹ßÅ°¸® vs ºê¸®Å丮¾Æ ÀçÅõÇ¥
  883.                         set .@win, rand(1,2);
  884.             			if (.@win == 1) {
  885.             			    set $prt_invest_result, 3;
  886.             			}
  887.             			else {
  888.             			    set $gef_invest_result, 3;
  889.             			}
  890.             			set $2011_agit_invest, 4;
  891.                     }
  892.                     else if ((.@gefgld_res == .@aldegld_res) && (.@gefgld_res > 1999)) {
  893.                         // ¹ßÅ°¸® vs ºê¸®Å丮¾Æ vs ·çÀ̳ª ÀçÅõÇ¥
  894.                         set .@win, rand(1,3);
  895.             			if (.@win == 1) {
  896.             			    set $gef_invest_result, 3;
  897.             			}
  898.             			else if (.@win == 2) {
  899.             			    set $alde_invest_result, 3;
  900.             			}
  901.             			else {
  902.             			    set $prt_invest_result, 3;
  903.             			}
  904.                     }
  905.                     else {
  906.                         // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  907.                         set $2011_agit_invest, 4;
  908.                     }
  909.                 }
  910.             }
  911.             else if (.@prtgld_res < .@paygld_res) {
  912.                 if (.@paygld_res > .@gefgld_res) {
  913.                     if ((.@paygld_res > .@aldegld_res) && (.@paygld_res > 1999)) {
  914.                         // û¸²È£¼ö 1À§
  915.                         set $pay_invest_result, 3;
  916.                         set $2011_agit_invest, 4;
  917.                     }
  918.                     else if ((.@paygld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  919.                         // ·çÀ̳ª 1À§
  920.                         set $alde_invest_result, 3;
  921.                         set $2011_agit_invest, 4;
  922.                     }
  923.                     else if ((.@paygld_res == .@aldegld_res) && (.@aldegld_res > 1999)) {
  924.                         // û¸²È£¼ö vs ·çÀ̳ª ÀçÅõÇ¥
  925.                         set .@win, rand(1,2);
  926.             			if (.@win == 1) {
  927.             			    set $pay_invest_result, 3;
  928.             			}
  929.             			else {
  930.             			    set $alde_invest_result, 3;
  931.             			}
  932.             			set $2011_agit_invest, 4;
  933.                     }
  934.                     else {
  935.                         // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  936.                         set $2011_agit_invest, 4;
  937.                     }
  938.                 }
  939.                 else if (.@paygld_res < .@gefgld_res) {
  940.                     if ((.@gefgld_res > .@aldegld_res) && (.@gefgld_res > 1999)) {
  941.                         //ºê¸®Å丮¾Æ 1À§
  942.                         set $gef_invest_result, 3;
  943.                         set $2011_agit_invest, 4;
  944.                     }
  945.                     else if ((.@gefgld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  946.                         // ·çÀ̳ª 1À§
  947.                         set $alde_invest_result, 3;
  948.                         set $2011_agit_invest, 4;
  949.                     }
  950.                     else if ((.@gefgld_res == .@aldegld_res) && (.@aldegld_res > 1999)) {
  951.                         // ºê¸®Å丮¾Æ vs ·çÀ̳ª ÀçÅõÇ¥
  952.                         set .@win, rand(1,2);
  953.             			if (.@win == 1) {
  954.             			    set $alde_invest_result, 3;
  955.             			}
  956.             			else {
  957.             			    set $gef_invest_result, 3;
  958.             			}
  959.             			set $2011_agit_invest, 4;
  960.                     }
  961.                     else {
  962.                         // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  963.                         set $2011_agit_invest, 4;
  964.                     }
  965.                 }
  966.                 else if (.@paygld_res == .@gefgld_res) {
  967.                     if ((.@gefgld_res > .@aldegld_res) && (.@gefgld_res > 1999)) {
  968.                         // û¸² vs ºê¸®Å丮¾Æ ÀçÅõÇ¥
  969.                         set .@win, rand(1,2);
  970.             			if (.@win == 1) {
  971.             			    set $pay_invest_result, 3;
  972.             			}
  973.             			else {
  974.             			    set $gef_invest_result, 3;
  975.             			}
  976.             			set $2011_agit_invest, 4;
  977.                     }
  978.                     else if ((.@gefgld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  979.                         // ·çÀ̳ª 1À§
  980.                         set $alde_invest_result, 3;
  981.                         set $2011_agit_invest, 4;
  982.                     }
  983.                     else if ((.@gefgld_res == .@aldegld_res) && (.@aldegld_res > 1999)) {
  984.                         // û¸² vs ºê¸®Å丮¾Æ vs ·çÀ̳ª ÀçÅõÇ¥
  985.                         set .@win, rand(1,3);
  986.             			if (.@win == 1) {
  987.             			    set $gef_invest_result, 3;
  988.             			}
  989.             			else if (.@win == 2) {
  990.             			    set $alde_invest_result, 3;
  991.             			}
  992.             			else {
  993.             			    set $pay_invest_result, 3;
  994.             			}
  995.             			set $2011_agit_invest, 4;
  996.                     }
  997.                     else {
  998.                         // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  999.                         set $2011_agit_invest, 4;
  1000.                     }
  1001.                 }
  1002.             }
  1003.             else if (.@prtgld_res == .@paygld_res) {
  1004.                 if (.@paygld_res < .@gefgld_res) {
  1005.                     if ((.@gefgld_res > .@aldegld_res) && (.@gefgld_res > 1999)) {
  1006.                         // ºê¸®Å丮¾Æ 1À§
  1007.                         set $gef_invest_result, 3;
  1008.                         set $2011_agit_invest, 4;
  1009.                     }
  1010.                     else if ((.@gefgld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  1011.                         // ·çÀ̳ª 1À§
  1012.                         set $alde_invest_result, 3;
  1013.                         set $2011_agit_invest, 4;
  1014.                     }
  1015.                     else if ((.@gefgld_res == .@aldegld_res) && (.@aldegld_res > 1999)) {
  1016.                         // ºê¸®Å丮¾Æ vs ·çÀ̳ª ÀçÅõÇ¥
  1017.                         set .@win, rand(1,2);
  1018.             			if (.@win == 1) {
  1019.             			    set $alde_invest_result, 3;
  1020.             			}
  1021.             			else {
  1022.             			    set $gef_invest_result, 3;
  1023.             			}
  1024.             			set $2011_agit_invest, 4;
  1025.                     }
  1026.                     else {
  1027.                         // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  1028.                         set $2011_agit_invest, 4;
  1029.                     }
  1030.                 } // prt = pay = gef;
  1031.                     if ((.@gefgld_res == .@aldegld_res) && (.@gefgld_res > 1999)) { // prt = pay = gef = alde > 1999;
  1032.                         // ¹ßÅ°¸® vs ·çÀ̳ª vs û¸² vs ºê¸®Å丮¾Æ ÀçÅõÇ¥
  1033.                         set .@win, rand(1,4);
  1034.             			if (.@win == 1) {
  1035.             			    set $gef_invest_result, 3;
  1036.             			}
  1037.             			else if (.@win == 2) {
  1038.             			    set $prt_invest_result, 3;
  1039.             			}
  1040.             			else if (.@win == 3) {
  1041.             			    set $alde_invest_result, 3;
  1042.             			}
  1043.             			else {
  1044.             			    set $pay_invest_result, 3;
  1045.             			}
  1046.             			set $2011_agit_invest, 4;
  1047.                     }
  1048.                     else if ((.@gefgld_res > .@aldegld_res) && (.@gefgld_res > 1999)) {
  1049.                         // ¹ßÅ°¸® vs û¸² vs ºê¸®Å丮¾Æ ÀçÅõÇ¥
  1050.                         set .@win, rand(1,3);
  1051.             			if (.@win == 1) {
  1052.             			    set $gef_invest_result, 3;
  1053.             			}
  1054.             			else if (.@win == 2) {
  1055.             			    set $pay_invest_result, 3;
  1056.             			}
  1057.             			else {
  1058.             			    set $prt_invest_result, 3;
  1059.             			}
  1060.             			set $2011_agit_invest, 4;
  1061.                     }
  1062.                     else if ((.@gefgld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  1063.                         // ·çÀ̳ª 1À§
  1064.                         set $alde_invest_result, 3;
  1065.                         set $2011_agit_invest, 4;
  1066.                     }
  1067.                     else {
  1068.                         // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  1069.                         set $2011_agit_invest, 4;
  1070.                     }
  1071.                 } // prt = pay > gef;
  1072.                     if ((.@paygld_res > .@aldegld_res) && (.@paygld_res > 1999)) {
  1073.                         // ¹ßÅ°¸® vs û¸² ÀçÅõÇ¥
  1074.                         set .@win, rand(1,2);
  1075.             			if (.@win == 1) {
  1076.             			    set $prt_invest_result, 3;
  1077.             			}
  1078.             			else {
  1079.             			    set $pay_invest_result, 3;
  1080.             			}
  1081.             			set $2011_agit_invest, 4;
  1082.                     }
  1083.                     else if ((.@paygld_res < .@aldegld_res) && (.@aldegld_res > 1999)) {
  1084.                         // ·çÀ̳ª 1À§
  1085.                         set $alde_invest_result, 3;
  1086.                         set $2011_agit_invest, 4;
  1087.                     }
  1088.                     else if ((.@paygld_res == .@aldegld_res) && (.@aldegld_res > 1999)) {
  1089.                         // ¹ßÅ°¸® vs û¸² vs ·çÀ̳ª ÀçÅõÇ¥
  1090.                         set .@win, rand(1,3);
  1091.             			if (.@win == 1) {
  1092.             			    set $alde_invest_result, 3;
  1093.             			}
  1094.             			else if (.@win == 2) {
  1095.             			    set $pay_invest_result, 3;
  1096.             			}
  1097.             			else {
  1098.             			    set $prt_invest_result, 3;
  1099.             			}
  1100.             			set $2011_agit_invest, 4;
  1101.                     }
  1102.                     else {
  1103.                         // Àü Áö¿ª ÅõÀÚ ½ÇÆÐ
  1104.                         set $2011_agit_invest, 4;
  1105.                     }
  1106.                 }
  1107.             }
  1108.         }
  1109.     }
  1110. end;
  1111. OnReset:
  1112.     set $2011_agit_invest, 0;
  1113.     donpcevent "Investment_total#fund00::OnReset";
  1114. end;
  1115. //---------------ÅõÀÚÁý°è-------------------------------------------------------
  1116. }
  1117.  
  1118. prt_gld,2,2,0	script	Investment_total#fund00	844,{
  1119.     mes "is this not working properly?";
  1120.     next;
  1121.     input .@input;
  1122.     if (.@input == 1854) {
  1123.         mes "if you think investment timer is dead, please adjust the timer.";
  1124.         next;
  1125.         switch (select("Turn on the timer:cancel")) {
  1126.             case 1:
  1127.                 donpcevent "Investment_total#fund00::OnTimer2";
  1128.                 mes "you've turned on the timer";
  1129.                 close2;
  1130.             break;
  1131.             case 2:
  1132.                 mes "cancel";
  1133.                 close2;
  1134.             break;
  1135.         }
  1136.     }
  1137.     else {
  1138.         mes "I don't need to adjust now.";
  1139.         close2;
  1140.     }
  1141. end;
  1142. //-------------------------------------ÀçÅõÇ¥-----------------------------------
  1143. //-- ÀçÅõÇ¥
  1144. OnInit:
  1145.     if (GetAgitInvestMsg == 1) {
  1146.         initnpctimer;
  1147.         set .@prt01res, $fund_prt01;
  1148.         set .@prt02res, $fund_prt02;
  1149.         set .@prt03res, $fund_prt03;
  1150.         set .@prt04res, $fund_prt04;
  1151.         set .@prt05res, $fund_prt05;
  1152.         set .@prt06res, $fund_prt_extra;
  1153. //        SetGlobalVar "vfund_prt01" prt01res
  1154. //        SetGlobalVar "vfund_prt02" prt02res
  1155. //        SetGlobalVar "vfund_prt03" prt03res
  1156. //        SetGlobalVar "vfund_prt04" prt04res
  1157. //        SetGlobalVar "vfund_prt05" prt05res
  1158. //        SetGlobalVar "vfund_prt_extra" prt06res
  1159.         set .@pay01res, $fund_pay01;
  1160.         set .@pay02res, $fund_pay02;
  1161.         set .@pay03res, $fund_pay03;
  1162.         set .@pay04res, $fund_pay04;
  1163.         set .@pay05res, $fund_pay05;
  1164.         set .@pay06res, $fund_pay_extra;
  1165. //        SetGlobalVar "vfund_pay01" pay01res
  1166. //        SetGlobalVar "vfund_pay02" pay02res
  1167. //        SetGlobalVar "vfund_pay03" pay03res
  1168. //        SetGlobalVar "vfund_pay04" pay04res
  1169. //        SetGlobalVar "vfund_pay05" pay05res
  1170. //        SetGlobalVar "vfund_pay_extra" pay06res
  1171.         set .@gef01res, $fund_gef01;
  1172.         set .@gef02res, $fund_gef02;
  1173.         set .@gef03res, $fund_gef03;
  1174.         set .@gef04res, $fund_gef04;
  1175.         set .@gef05res, $fund_gef05;
  1176.         set .@gef06res, $fund_gef_extra;
  1177. //        SetGlobalVar "vfund_gef01" gef01res
  1178. //        SetGlobalVar "vfund_gef02" gef02res
  1179. //        SetGlobalVar "vfund_gef03" gef03res
  1180. //        SetGlobalVar "vfund_gef04" gef04res
  1181. //        SetGlobalVar "vfund_gef05" gef05res
  1182. //        SetGlobalVar "vfund_gef_extra" gef06res
  1183.         set .@alde01res, $fund_alde01;
  1184.         set .@alde02res, $fund_alde02;
  1185.         set .@alde03res, $fund_alde03;
  1186.         set .@alde04res, $fund_alde04;
  1187.         set .@alde05res, $fund_alde05;
  1188.         set .@alde06res, $fund_alde_extra;
  1189. //        SetGlobalVar "vfund_alde01" alde01res
  1190. //        SetGlobalVar "vfund_alde02" alde02res
  1191. //        SetGlobalVar "vfund_alde03" alde03res
  1192. //        SetGlobalVar "vfund_alde04" alde04res
  1193. //        SetGlobalVar "vfund_alde05" alde05res
  1194. //        SetGlobalVar "vfund_alde_extra" alde06res
  1195.     }
  1196.     else {
  1197.         set $agit_result_timer, 0;
  1198.         set $agit_result_notice, 0;
  1199.     }
  1200. end;
  1201. OnEnable:
  1202.     set $agit_result_timer, 0;
  1203.     set $agit_result_notice, 0;
  1204.     initnpctimer;
  1205. end;
  1206. OnReset:
  1207.     set $agit_result_timer, 0;
  1208.     set $agit_result_notice, 0;
  1209.     stopnpctimer;
  1210. end;
  1211. OnTimer2:
  1212.     initnpctimer;
  1213. end;
  1214. OnTimer3600000:
  1215.     set .@time, $agit_result_timer;
  1216.     set .@notice, $agit_result_notice;
  1217.     if (GetAgitInvestMsg == 1) {
  1218.         if (.@time < 59) {
  1219. //            IncGlobalVar "agit_result_timer" 1
  1220.             set .@time1, $agit_result_timer;
  1221.             if ((.@time1 == 5) || (.@time1 == 10) || (.@time1 == 15) || (.@time1 == 20) || (.@time1 == 25) || (.@time1 == 30)) {
  1222. //                IncGlobalVar "agit_result_notice" 1
  1223.                 set .@prt01res, $fund_prt01;
  1224.                 set .@prt02res, $fund_prt02;
  1225.                 set .@prt03res, $fund_prt03;
  1226.                 set .@prt04res, $fund_prt04;
  1227.                 set .@prt05res, $fund_prt05;
  1228.                 set .@prt06res, $fund_prt_extra;
  1229. //                SetGlobalVar "vfund_prt01" prt01res
  1230. //                SetGlobalVar "vfund_prt02" prt02res
  1231. //                SetGlobalVar "vfund_prt03" prt03res
  1232. //                SetGlobalVar "vfund_prt04" prt04res
  1233. //                SetGlobalVar "vfund_prt05" prt05res
  1234. //                SetGlobalVar "vfund_prt_extra" prt06res
  1235.                 set .@pay01res, $fund_pay01;
  1236.                 set .@pay02res, $fund_pay02;
  1237.                 set .@pay03res, $fund_pay03;
  1238.                 set .@pay04res, $fund_pay04;
  1239.                 set .@pay05res, $fund_pay05;
  1240.                 set .@pay06res, $fund_pay_extra;
  1241. //                SetGlobalVar "vfund_pay01" pay01res
  1242. //                SetGlobalVar "vfund_pay02" pay02res
  1243. //                SetGlobalVar "vfund_pay03" pay03res
  1244. //                SetGlobalVar "vfund_pay04" pay04res
  1245. //                SetGlobalVar "vfund_pay05" pay05res
  1246. //                SetGlobalVar "vfund_pay_extra" pay06res
  1247.                 set .@gef01res, $fund_gef01;
  1248.                 set .@gef02res, $fund_gef02;
  1249.                 set .@gef03res, $fund_gef03;
  1250.                 set .@gef04res, $fund_gef04;
  1251.                 set .@gef05res, $fund_gef05;
  1252.                 set .@gef06res, $fund_gef_extra;
  1253. //                SetGlobalVar "vfund_gef01" gef01res
  1254. //                SetGlobalVar "vfund_gef02" gef02res
  1255. //                SetGlobalVar "vfund_gef03" gef03res
  1256. //                SetGlobalVar "vfund_gef04" gef04res
  1257. //                SetGlobalVar "vfund_gef05" gef05res
  1258. //                SetGlobalVar "vfund_gef_extra" gef06res
  1259.                 set .@alde01res, $fund_alde01;
  1260.                 set .@alde02res, $fund_alde02;
  1261.                 set .@alde03res, $fund_alde03;
  1262.                 set .@alde04res, $fund_alde04;
  1263.                 set .@alde05res, $fund_alde05;
  1264.                 set .@alde06res, $fund_alde_extra;
  1265. //                SetGlobalVar "vfund_alde01" alde01res
  1266. //                SetGlobalVar "vfund_alde02" alde02res
  1267. //                SetGlobalVar "vfund_alde03" alde03res
  1268. //                SetGlobalVar "vfund_alde04" alde04res
  1269. //                SetGlobalVar "vfund_alde05" alde05res
  1270. //                SetGlobalVar "vfund_alde_extra" alde06res
  1271.                 set .@notice, $agit_result_notice;
  1272.                 set .@notice2$, "No." + .@notice + " Interim statement is now available. You can check through Investment Status Board on each WOE area.";
  1273. //                broadcastserver "FF0000" FW_NORMAL 10 0 0 notice2
  1274.             }
  1275.             else if ((.@time1 == 35) || (.@time1 == 40) || (.@time1 == 45) || (.@time1 == 50) || (.@time1 == 55) || (.@time1 == 58)) {
  1276.                 set .@notice, $agit_result_notice;
  1277. //                IncGlobalVar "agit_result_notice" 1
  1278.                 set .@prt01res, $fund_prt01;
  1279.                 set .@prt02res, $fund_prt02;
  1280.                 set .@prt03res, $fund_prt03;
  1281.                 set .@prt04res, $fund_prt04;
  1282.                 set .@prt05res, $fund_prt05;
  1283.                 set .@prt06res, $fund_prt_extra;
  1284. //                SetGlobalVar "vfund_prt01" prt01res
  1285. //                SetGlobalVar "vfund_prt02" prt02res
  1286. //                SetGlobalVar "vfund_prt03" prt03res
  1287. //                SetGlobalVar "vfund_prt04" prt04res
  1288. //                SetGlobalVar "vfund_prt05" prt05res
  1289. //                SetGlobalVar "vfund_prt_extra" prt06res
  1290.                 set .@pay01res, $fund_pay01;
  1291.                 set .@pay02res, $fund_pay02;
  1292.                 set .@pay03res, $fund_pay03;
  1293.                 set .@pay04res, $fund_pay04;
  1294.                 set .@pay05res, $fund_pay05;
  1295.                 set .@pay06res, $fund_pay_extra;
  1296. //                SetGlobalVar "vfund_pay01" pay01res
  1297. //                SetGlobalVar "vfund_pay02" pay02res
  1298. //                SetGlobalVar "vfund_pay03" pay03res
  1299. //                SetGlobalVar "vfund_pay04" pay04res
  1300. //                SetGlobalVar "vfund_pay05" pay05res
  1301. //                SetGlobalVar "vfund_pay_extra" pay06res
  1302.                 set .@gef01res, $fund_gef01;
  1303.                 set .@gef02res, $fund_gef02;
  1304.                 set .@gef03res, $fund_gef03;
  1305.                 set .@gef04res, $fund_gef04;
  1306.                 set .@gef05res, $fund_gef05;
  1307.                 set .@gef06res, $fund_gef_extra;
  1308. //                SetGlobalVar "vfund_gef01" gef01res
  1309. //                SetGlobalVar "vfund_gef02" gef02res
  1310. //                SetGlobalVar "vfund_gef03" gef03res
  1311. //                SetGlobalVar "vfund_gef04" gef04res
  1312. //                SetGlobalVar "vfund_gef05" gef05res
  1313. //                SetGlobalVar "vfund_gef_extra" gef06res
  1314.                 set .@alde01res, $fund_alde01;
  1315.                 set .@alde02res, $fund_alde02;
  1316.                 set .@alde03res, $fund_alde03;
  1317.                 set .@alde04res, $fund_alde04;
  1318.                 set .@alde05res, $fund_alde05;
  1319.                 set .@alde06res, $fund_alde_extra;
  1320. //                SetGlobalVar "vfund_alde01" alde01res
  1321. //                SetGlobalVar "vfund_alde02" alde02res
  1322. //                SetGlobalVar "vfund_alde03" alde03res
  1323. //                SetGlobalVar "vfund_alde04" alde04res
  1324. //                SetGlobalVar "vfund_alde05" alde05res
  1325. //                SetGlobalVar "vfund_alde_extra" alde06res
  1326.                 set .@notice, $agit_result_notice;
  1327.                 set .@notice2$, "No." + .@notice + " Interim statement is now available. You can check through Investment Status Board on each WOE area.";
  1328. //                broadcastserver "FF0000" FW_NORMAL 10 0 0 notice2
  1329.             }
  1330.             donpcevent "Investment_total#fund00::OnTimer2";
  1331.         }
  1332.         else if (.@time > 59) {
  1333.             stopnpctimer;
  1334.         }
  1335.     }
  1336.     else {
  1337.         donpcevent "Investment_total#fund00::OnReset";
  1338.         end;
  1339.     }
  1340. end;
  1341. }
  1342.  
  1343. prt_gld,164,98,3	script	Revoting manager#Invest1	421,{
  1344.     mes "[Revoting manager]";
  1345.     mes "we are not accepting additional vote.";
  1346.     mes "please wait for our result announcement.";
  1347.     close;
  1348. //------------------------------------------------------------------------------
  1349. OnInit:
  1350.     set .@invest, $2011_agit_invest;
  1351.     set .@revote, $agit_revoting_timer;
  1352.     if ((GetAgitInvestMsg == 2) && (.@invest > 10) && (.@revote < 30)) {
  1353.         donpcevent "Revoting manager#Invest2::OnEnable";
  1354.         initnpctimer;
  1355.     }
  1356.     else if ((GetAgitInvestMsg == 3) && (.@invest > 10)) {
  1357.         if (.@invest == 11) {
  1358.     		//¹ßÅ°¸®·¼¸§ vs û¸²È£¼ö
  1359.     		set .@prt, $fund_prt_extra;
  1360.     		set .@pay, $fund_pay_extra;
  1361.     		if (.@prt > .@pay) {
  1362.     		    set $prt_invest_result, 3;
  1363.     		}
  1364.     		else if (.@prt < .@pay) {
  1365.     		    set $pay_invest_result, 3;
  1366.     		}
  1367.     		else {
  1368.     			set .@win, rand(1,2);
  1369.     			if (.@win == 1) {
  1370.     			    set $prt_invest_result, 3;
  1371.     			}
  1372.     			else {
  1373.     			    set $pay_invest_result, 3;
  1374.     			}
  1375.     		}
  1376.     	}
  1377.     	else if (.@invest == 12) {
  1378.     		// ¹ßÅ°¸®·¼¸§ vs ·çÀ̳ª
  1379.             set .@prt, $fund_prt_extra;
  1380.     		set .@alde, $fund_alde_extra;
  1381.     		if (.@prt > .@alde) {
  1382.     		    set $prt_invest_result, 3;
  1383.     		}
  1384.     		else if (.@prt < .@alde) {
  1385.     		    set $alde_invest_result, 3;
  1386.     		}
  1387.     		else {
  1388.     			set .@win, rand(1,2);
  1389.     			if (.@win == 1) {
  1390.     			    set $prt_invest_result, 3;
  1391.     			}
  1392.     			else {
  1393.     			    set $alde_invest_result, 3;
  1394.     			}
  1395.     		}
  1396.     	}
  1397.     	else if (.@invest == 13) {
  1398.     		// ¹ßÅ°¸®·¼¸§ vs ºê¸®Å丮¾Æ
  1399.     		set .@prt, $fund_prt_extra;
  1400.     		set .@gef, $fund_gef_extra;
  1401.     		if (.@prt > .@gef) {
  1402.     		    set $prt_invest_result, 3;
  1403.     		}
  1404.     		else if (.@prt < .@gef) {
  1405.     		    set $gef_invest_result, 3;
  1406.     		}
  1407.     		else {
  1408.     			set .@win, rand(1,2);
  1409.     			if (.@win == 1) {
  1410.     			    set $prt_invest_result, 3;
  1411.     			}
  1412.     			else {
  1413.     			    set $gef_invest_result, 3;
  1414.     			}
  1415.     		}
  1416.     	}
  1417.     	else if (.@invest == 14) {
  1418.     		// û¸²È£¼ö vs ·çÀ̳ª
  1419.     		set .@pay, $fund_pay_extra;
  1420.     		set .@alde, $fund_alde_extra;
  1421.     		if (.@pay > .@alde) {
  1422.     		    set $pay_invest_result, 3;
  1423.     		}
  1424.     		else if (.@pay < .@alde) {
  1425.     		    set $alde_invest_result, 3;
  1426.     		}
  1427.     		else {
  1428.     			set .@win, rand(1,2);
  1429.     			if (.@win == 1) {
  1430.     			    set $pay_invest_result, 3;
  1431.     			}
  1432.     			else {
  1433.     			    set $alde_invest_result, 3;
  1434.     			}
  1435.     		}
  1436.     	}
  1437.     	else if (.@invest == 15) {
  1438.     		// û¸²È£¼ö vs ºê¸®Å丮¾Æ
  1439.     		set .@pay, $fund_pay_extra;
  1440.     		set .@gef, $fund_gef_extra;
  1441.     		if (.@pay > .@gef) {
  1442.     		    set $pay_invest_result, 3;
  1443.     		}
  1444.     		else if (.@pay < .@gef) {
  1445.     		    set $gef_invest_result, 3;
  1446.     		}
  1447.     		else {
  1448.     			set .@win, rand(1,2);
  1449.     			if (.@win == 1) {
  1450.     			    set $pay_invest_result, 3;
  1451.     			}
  1452.     			else {
  1453.     			    set $gef_invest_result, 3;
  1454.     			}
  1455.     		}
  1456.     	}
  1457.     	else if (.@invest == 16) {
  1458.     		// ·çÀ̳ª vs ºê¸®Å丮¾Æ
  1459.     		set .@alde, $fund_alde_extra;
  1460.     		set .@gef, $fund_gef_extra;
  1461.     		if (.@alde > .@gef) {
  1462.     		    set $alde_invest_result, 3;
  1463.     		}
  1464.     		else if (.@alde < .@gef) {
  1465.     		    set $gef_invest_result, 3;
  1466.     		}
  1467.     		else {
  1468.     			set .@win, rand(1,2);
  1469.     			if (.@win == 1) {
  1470.     			    set $alde_invest_result, 3;
  1471.     			}
  1472.     			else {
  1473.     			    set $gef_invest_result, 3;
  1474.     			}
  1475.     		}
  1476.     	}
  1477.     	else if (.@invest == 17) {
  1478.     		// ¹ßÅ°¸®·¼¸§ vs û¸²È£¼ö vs ·çÀ̳ª
  1479.     		set .@alde, $fund_alde_extra;
  1480.     		set .@pay, $fund_pay_extra;
  1481.     		set .@prt, $fund_prt_extra;
  1482.     		if (.@prt > .@alde) {
  1483.     		    if (.@prt > .@pay) {
  1484.     		        set $prt_invest_result, 3;
  1485.     		    }
  1486.     		    else if (.@prt < .@pay) {
  1487.     		        set $pay_invest_result, 3;
  1488.     		    }
  1489.     		    else {
  1490.     		        set .@win, rand(1,2);
  1491.         			if (.@win == 1) {
  1492.         			    set $prt_invest_result, 3;
  1493.         			}
  1494.         			else {
  1495.         			    set $pay_invest_result, 3;
  1496.         			}
  1497.     		    }
  1498.     		}
  1499.     		else if (.@prt < .@alde) {
  1500.     		    if (.@alde > .@pay) {
  1501.     		        set $alde_invest_result, 3;
  1502.     		    }
  1503.     		    else if (.@alde < .@pay) {
  1504.     		        set $pay_invest_result, 3;
  1505.     		    }
  1506.     		    else {
  1507.     		        set .@win, rand(1,2);
  1508.         			if (.@win == 1) {
  1509.         			    set $alde_invest_result, 3;
  1510.         			}
  1511.         			else {
  1512.         			    set $pay_invest_result, 3;
  1513.         			}
  1514.     		    }
  1515.     		}
  1516.     		else {
  1517.     		    if (.@alde > .@pay) {
  1518.     		        set .@win, rand(1,2);
  1519.         			if (.@win == 1) {
  1520.         			    set $alde_invest_result, 3;
  1521.         			}
  1522.         			else {
  1523.         			    set $prt_invest_result, 3;
  1524.         			}
  1525.     		    }
  1526.     		    else if (.@alde < .@pay) {
  1527.     		         set $pay_invest_result, 3;
  1528.     		    }
  1529.     		    else {
  1530.     		        set .@win, rand(1,3);
  1531.         			if (.@win == 1) {
  1532.         			    set $alde_invest_result, 3;
  1533.         			}
  1534.         			else if (.@win == 2) {
  1535.         			    set $pay_invest_result, 3;
  1536.         			}
  1537.         			else {
  1538.         			    set $prt_invest_result, 3;
  1539.         			}
  1540.     		    }
  1541.     		}
  1542.     	}
  1543.     	else if (.@invest == 18) {
  1544.     		// ¹ßÅ°¸®·¼¸§ vs û¸²È£¼ö vs ºê¸®Å丮¾Æ
  1545.     		set .@gef, $fund_gef_extra;
  1546.     		set .@pay, $fund_pay_extra;
  1547.     		set .@prt, $fund_prt_extra;
  1548.     		if (.@prt > .@gef) {
  1549.     		    if (.@prt > .@pay) {
  1550.     		        set $prt_invest_result, 3;
  1551.     		    }
  1552.     		    else if (.@prt < .@pay) {
  1553.     		        set $pay_invest_result, 3;
  1554.     		    }
  1555.     		    else {
  1556.     		        set .@win, rand(1,2);
  1557.         			if (.@win == 1) {
  1558.         			    set $prt_invest_result, 3;
  1559.         			}
  1560.         			else {
  1561.         			    set $pay_invest_result, 3;
  1562.         			}
  1563.     		    }
  1564.     		}
  1565.     		else if (.@prt < .@gef) {
  1566.     		    if (.@gef > .@pay) {
  1567.     		        set $gef_invest_result, 3;
  1568.     		    }
  1569.     		    else if (.@gef < .@pay) {
  1570.     		        set $pay_invest_result, 3;
  1571.     		    }
  1572.     		    else {
  1573.     		        set .@win, rand(1,2);
  1574.         			if (.@win == 1) {
  1575.         			    set $gef_invest_result, 3;
  1576.         			}
  1577.         			else {
  1578.         			    set $pay_invest_result, 3;
  1579.         			}
  1580.     		    }
  1581.     		}
  1582.     		else {
  1583.     		    if (.@gef > .@pay) {
  1584.     		        set .@win, rand(1,2);
  1585.         			if (.@win == 1) {
  1586.         			    set $gef_invest_result, 3;
  1587.         			}
  1588.         			else {
  1589.         			    set $prt_invest_result, 3;
  1590.         			}
  1591.     		    }
  1592.     		    else if (.@gef < .@pay) {
  1593.     		         set $pay_invest_result, 3;
  1594.     		    }
  1595.     		    else {
  1596.     		        set .@win, rand(1,3);
  1597.         			if (.@win == 1) {
  1598.         			    set $gef_invest_result, 3;
  1599.         			}
  1600.         			else if (.@win == 2) {
  1601.         			    set $pay_invest_result, 3;
  1602.         			}
  1603.         			else {
  1604.         			    set $prt_invest_result, 3;
  1605.         			}
  1606.     		    }
  1607.     		}
  1608.     	}
  1609.     	else if (.@invest == 19) {
  1610.     		// ¹ßÅ°¸®·¼¸§ vs ·çÀ̳ª vs ºê¸®Å丮¾Æ
  1611.     		set .@gef, $fund_gef_extra;
  1612.     		set .@alde, $fund_alde_extra;
  1613.     		set .@prt, $fund_prt_extra;
  1614.     		if (.@prt > .@gef) {
  1615.     		    if (.@prt > .@alde) {
  1616.     		        set $prt_invest_result, 3;
  1617.     		    }
  1618.     		    else if (.@prt < .@alde) {
  1619.     		        set $alde_invest_result, 3;
  1620.     		    }
  1621.     		    else {
  1622.     		        set .@win, rand(1,2);
  1623.         			if (.@win == 1) {
  1624.         			    set $prt_invest_result, 3;
  1625.         			}
  1626.         			else {
  1627.         			    set $alde_invest_result, 3;
  1628.         			}
  1629.     		    }
  1630.     		}
  1631.     		else if (.@prt < .@gef) {
  1632.     		    if (.@gef > .@alde) {
  1633.     		        set $gef_invest_result, 3;
  1634.     		    }
  1635.     		    else if (.@gef < .@alde) {
  1636.     		        set $alde_invest_result, 3;
  1637.     		    }
  1638.     		    else {
  1639.     		        set .@win, rand(1,2);
  1640.         			if (.@win == 1) {
  1641.         			    set $gef_invest_result, 3;
  1642.         			}
  1643.         			else {
  1644.         			    set $alde_invest_result, 3;
  1645.         			}
  1646.     		    }
  1647.     		}
  1648.     		else {
  1649.     		    if (.@gef > .@alde) {
  1650.     		        set .@win, rand(1,2);
  1651.         			if (.@win == 1) {
  1652.         			    set $gef_invest_result, 3;
  1653.         			}
  1654.         			else {
  1655.         			    set $prt_invest_result, 3;
  1656.         			}
  1657.     		    }
  1658.     		    else if (.@gef < .@alde) {
  1659.     		         set $alde_invest_result, 3;
  1660.     		    }
  1661.     		    else {
  1662.     		        set .@win, rand(1,3);
  1663.         			if (.@win == 1) {
  1664.         			    set $gef_invest_result, 3;
  1665.         			}
  1666.         			else if (.@win == 2) {
  1667.         			    set $alde_invest_result, 3;
  1668.         			}
  1669.         			else {
  1670.         			    set $prt_invest_result, 3;
  1671.         			}
  1672.     		    }
  1673.     		}
  1674.     	}
  1675.     	else if (.@invest == 20) {
  1676.     		// ·çÀ̳ª vs û¸²È£¼ö vs ºê¸®Å丮¾Æ
  1677.     		set .@gef, $fund_gef_extra;
  1678.     		set .@alde, $fund_alde_extra;
  1679.     		set .@pay, $fund_pay_extra;
  1680.     		if (.@pay > .@gef) {
  1681.     		    if (.@pay > .@alde) {
  1682.     		        set $pay_invest_result, 3;
  1683.     		    }
  1684.     		    else if (.@pay < .@alde) {
  1685.     		        set $alde_invest_result, 3;
  1686.     		    }
  1687.     		    else {
  1688.     		        set .@win, rand(1,2);
  1689.         			if (.@win == 1) {
  1690.         			    set $pay_invest_result, 3;
  1691.         			}
  1692.         			else {
  1693.         			    set $alde_invest_result, 3;
  1694.         			}
  1695.     		    }
  1696.     		}
  1697.     		else if (.@pay < .@gef) {
  1698.     		    if (.@gef > .@alde) {
  1699.     		        set $gef_invest_result, 3;
  1700.     		    }
  1701.     		    else if (.@gef < .@alde) {
  1702.     		        set $alde_invest_result, 3;
  1703.     		    }
  1704.     		    else {
  1705.     		        set .@win, rand(1,2);
  1706.         			if (.@win == 1) {
  1707.         			    set $gef_invest_result, 3;
  1708.         			}
  1709.         			else {
  1710.         			    set $alde_invest_result, 3;
  1711.         			}
  1712.     		    }
  1713.     		}
  1714.     		else {
  1715.     		    if (.@gef > .@alde) {
  1716.     		        set .@win, rand(1,2);
  1717.         			if (.@win == 1) {
  1718.         			    set $gef_invest_result, 3;
  1719.         			}
  1720.         			else {
  1721.         			    set $pay_invest_result, 3;
  1722.         			}
  1723.     		    }
  1724.     		    else if (.@gef < .@alde) {
  1725.     		         set $alde_invest_result, 3;
  1726.     		    }
  1727.     		    else {
  1728.     		        set .@win, rand(1,3);
  1729.         			if (.@win == 1) {
  1730.         			    set $gef_invest_result, 3;
  1731.         			}
  1732.         			else if (.@win == 2) {
  1733.         			    set $alde_invest_result, 3;
  1734.         			}
  1735.         			else {
  1736.         			    set $pay_invest_result, 3;
  1737.         			}
  1738.     		    }
  1739.     		}
  1740.     	}
  1741.     	else if (.@invest == 21) {
  1742.     		// ¹ßÅ°¸®·¼¸§ vs û¸²È£¼ö vs ·çÀ̳ª vs ºê¸®Å丮¾Æ
  1743.     		set .@gef, $fund_gef_extra;
  1744.     		set .@alde, $fund_alde_extra;
  1745.     		set .@pay, $fund_pay_extra;
  1746.     		set .@prt, $fund_prt_extra;
  1747.     		if (.@prt > .@pay) {
  1748.     		    if (.@prt > .@alde) {
  1749.     		        if (.@prt > .@gef) {
  1750.     		            set $prt_invest_result, 3;
  1751.     		        }
  1752.     		        else if (.@prt < .@gef) {
  1753.     		            set $gef_invest_result, 3;
  1754.     		        }
  1755.     		        else {
  1756.     		            set .@wain, rand(1,2);
  1757.     		            if (.@win == 1) {
  1758.     		                set $prt_invest_result, 3;
  1759.     		            }
  1760.     		            else {
  1761.     		                set $gef_invest_result, 3;
  1762.     		            }
  1763.     		        }
  1764.     		    }
  1765.     		    else if (.@prt < .@alde) {
  1766.     		        if (.@alde > .@gef) {
  1767.     		            set $alde_invest_result, 3;
  1768.     		        }
  1769.     		        else if (.@alde < .@gef) {
  1770.     		            set $gef_invest_result, 3;
  1771.     		        }
  1772.     		        else {
  1773.     		            set .@wain, rand(1,2);
  1774.     		            if (.@win == 1) {
  1775.     		                set $alde_invest_result, 3;
  1776.     		            }
  1777.     		            else {
  1778.     		                set $gef_invest_result, 3;
  1779.     		            }
  1780.     		        }
  1781.     		    }
  1782.     		    else {
  1783.     		        if (.@alde > .@gef) {
  1784.     		            set $alde_invest_result, 3;
  1785.     		        }
  1786.     		        else if (.@alde < .@gef) {
  1787.     		            set $gef_invest_result, 3;
  1788.     		        }
  1789.     		        else {
  1790.     		            set .@win, rand(1,3);
  1791.             			if (.@win == 1) {
  1792.             			    set $gef_invest_result, 3;
  1793.             			}
  1794.             			else if (.@win == 2) {
  1795.             			    set $alde_invest_result, 3;
  1796.             			}
  1797.             			else {
  1798.             			    set $prt_invest_result, 3;
  1799.             			}
  1800.     		        }
  1801.     		    }
  1802.     		}
  1803.     		else if (.@prt < .@pay) {
  1804.     		    if (.@pay > .@alde) {
  1805.     		        if (.@pay > .@gef) {
  1806.     		            set $pay_invest_result, 3;
  1807.     		        }
  1808.     		        else if (.@pay < .@gef) {
  1809.     		            set $gef_invest_result, 3;
  1810.     		        }
  1811.     		        else {
  1812.     		            set .@wain, rand(1,2);
  1813.     		            if (.@win == 1) {
  1814.     		                set $pay_invest_result, 3;
  1815.     		            }
  1816.     		            else {
  1817.     		                set $gef_invest_result, 3;
  1818.     		            }
  1819.     		        }
  1820.     		    }
  1821.     		    else if (.@pay < .@alde) {
  1822.     		        if (.@alde > .@gef) {
  1823.     		            set $alde_invest_result, 3;
  1824.     		        }
  1825.     		        else if (.@alde < .@gef) {
  1826.     		            set $gef_invest_result, 3;
  1827.     		        }
  1828.     		        else {
  1829.     		            set .@wain, rand(1,2);
  1830.     		            if (.@win == 1) {
  1831.     		                set $alde_invest_result, 3;
  1832.     		            }
  1833.     		            else {
  1834.     		                set $gef_invest_result, 3;
  1835.     		            }
  1836.     		        }
  1837.     		    }
  1838.     		    else {
  1839.     		        if (.@alde < .@gef) {
  1840.     		            set $gef_invest_result, 3;
  1841.     		        }
  1842.     		        else if (.@alde > .@gef) {
  1843.     		            set .@wain, rand(1,2);
  1844.     		            if (.@win == 1) {
  1845.     		                set $pay_invest_result, 3;
  1846.     		            }
  1847.     		            else {
  1848.     		                set $alde_invest_result, 3;
  1849.     		            }
  1850.     		        }
  1851.     		        else {
  1852.     		            set .@win, rand(1,3);
  1853.             			if (.@win == 1) {
  1854.             			    set $gef_invest_result, 3;
  1855.             			}
  1856.             			else if (.@win == 2) {
  1857.             			    set $alde_invest_result, 3;
  1858.             			}
  1859.             			else {
  1860.             			    set $pay_invest_result, 3;
  1861.             			}
  1862.     		        }
  1863.     		    }
  1864.     		} // prt == pay;
  1865.     		    if (.@pay > .@alde) {
  1866.     		        if (.@pay > .@gef) {
  1867.     		            set .@wain, rand(1,2);
  1868.     		            if (.@win == 1) {
  1869.     		                set $pay_invest_result, 3;
  1870.     		            }
  1871.     		            else {
  1872.     		                set $prt_invest_result, 3;
  1873.     		            }
  1874.     		        }
  1875.     		        else if (.@pay < .@gef) {
  1876.     		            set $gef_invest_result, 3;
  1877.     		        } // prt == pay == gef > alde;
  1878.     		            set .@win, rand(1,3);
  1879.             			if (.@win == 1) {
  1880.             			    set $gef_invest_result, 3;
  1881.             			}
  1882.             			else if (.@win == 2) {
  1883.             			    set $prt_invest_result, 3;
  1884.             			}
  1885.             			else {
  1886.             			    set $pay_invest_result, 3;
  1887.             			}
  1888.     		        }
  1889.     		    }
  1890.     		    else if (.@pay < .@alde) {
  1891.     		        if (.@alde > .@gef) {
  1892.     		            set $alde_invest_result, 3;
  1893.     		        }
  1894.     		        else if (.@alde < .@gef) {
  1895.     		            set $gef_invest_result, 3;
  1896.     		        }
  1897.     		        else {
  1898.     		            set .@wain, rand(1,2);
  1899.     		            if (.@win == 1) {
  1900.     		                set $gef_invest_result, 3;
  1901.     		            }
  1902.     		            else {
  1903.     		                set $alde_invest_result, 3;
  1904.     		            }
  1905.     		        }
  1906.     		    } // prt = pay = alde;
  1907.     		        if (.@alde > .@gef) {
  1908.     		            set .@win, rand(1,3);
  1909.             			if (.@win == 1) {
  1910.             			    set $alde_invest_result, 3;
  1911.             			}
  1912.             			else if (.@win == 2) {
  1913.             			    set $prt_invest_result, 3;
  1914.             			}
  1915.             			else {
  1916.             			    set $pay_invest_result, 3;
  1917.             			}
  1918.     		        }
  1919.     		        else if (.@alde < .@gef) {
  1920.     		            set $gef_invest_result, 3;
  1921.     		        } // prt = pay = alde = gef;
  1922.     		            set .@win, rand(1,4);
  1923.             			if (.@win == 1) {
  1924.             			    set $gef_invest_result, 3;
  1925.             			}
  1926.             			else if (.@win == 2) {
  1927.             			    set $prt_invest_result, 3;
  1928.             			}
  1929.             			else if (.@win == 3) {
  1930.             			    set $alde_invest_result, 3;
  1931.             			}
  1932.             			else {
  1933.             			    set $pay_invest_result, 3;
  1934.             			}
  1935.     		        }
  1936.     		    }
  1937.     		}
  1938.     	}
  1939.         set $2011_agit_invest, 4;
  1940.         set $agit_revoting_timer, 0;
  1941.     }
  1942. 	hideonnpc "Revoting manager#Invest1";
  1943. end;
  1944. OnEnable:
  1945. 	hideoffnpc "Revoting manager#Invest1";
  1946. end;
  1947. OnDisable:
  1948. 	hideonnpc "Revoting manager#Invest1";
  1949. end;
  1950. OnStart:
  1951. 	initnpctimer;
  1952. 	donpcevent "Revoting manager#Invest2::OnNotice_on";
  1953. end;
  1954. OnEnd:
  1955. 	stopnpctimer;
  1956. 	hideonnpc "Revoting manager#Invest1";
  1957. end;
  1958. OnTimer2:
  1959.     initnpctimer;
  1960. end;
  1961. OnTimer60000:
  1962.     set .@revote, $agit_revoting_timer;
  1963.     if (.@revote < 30) {
  1964. //        IncGlobalVar "agit_revoting_timer" 1
  1965.         donpcevent "Revoting manager#Invest1::OnTimer2";
  1966.     }
  1967.     else if (.@revote == 30) {
  1968. //        broadcastserver "FF0000" FW_NORMAL 10 0 0 "Cat paw merchant guild Prontera branch manager: Now, we are going to close additional vote. We will announce the result in soon."
  1969.     	donpcevent "Revoting manager#Invest2::OnDisable";
  1970.     	hideoffnpc "Revoting manager#Invest1";
  1971. //    	IncGlobalVar "agit_revoting_timer" 1
  1972.         donpcevent "Revoting manager#Invest1::OnTimer2";
  1973.     }
  1974.     else if (.@revote == 31) {
  1975.     	set .@invest, $2011_agit_invest;
  1976.     	if (.@invest == 11) {
  1977.     		//¹ßÅ°¸®·¼¸§ vs û¸²È£¼ö
  1978.     		set .@prt, $fund_prt_extra;
  1979.     		set .@pay, $fund_pay_extra;
  1980.     		if (.@prt > .@pay) {
  1981.     		    set $prt_invest_result, 3;
  1982.     		}
  1983.     		else if (.@prt < .@pay) {
  1984.     		    set $pay_invest_result, 3;
  1985.     		}
  1986.     		else {
  1987.     			set .@win, rand(1,2);
  1988.     			if (.@win == 1) {
  1989.     			    set $prt_invest_result, 3;
  1990.     			}
  1991.     			else {
  1992.     			    set $pay_invest_result, 3;
  1993.     			}
  1994.     		}
  1995.     	}
  1996.     	else if (.@invest == 12) {
  1997.     		// ¹ßÅ°¸®·¼¸§ vs ·çÀ̳ª
  1998.             set .@prt, $fund_prt_extra;
  1999.     		set .@alde, $fund_alde_extra;
  2000.     		if (.@prt > .@alde) {
  2001.     		    set $prt_invest_result, 3;
  2002.     		}
  2003.     		else if (.@prt < .@alde) {
  2004.     		    set $alde_invest_result, 3;
  2005.     		}
  2006.     		else {
  2007.     			set .@win, rand(1,2);
  2008.     			if (.@win == 1) {
  2009.     			    set $prt_invest_result, 3;
  2010.     			}
  2011.     			else {
  2012.     			    set $alde_invest_result, 3;
  2013.     			}
  2014.     		}
  2015.     	}
  2016.     	else if (.@invest == 13) {
  2017.     		// ¹ßÅ°¸®·¼¸§ vs ºê¸®Å丮¾Æ
  2018.     		set .@prt, $fund_prt_extra;
  2019.     		set .@gef, $fund_gef_extra;
  2020.     		if (.@prt > .@gef) {
  2021.     		    set $prt_invest_result, 3;
  2022.     		}
  2023.     		else if (.@prt < .@gef) {
  2024.     		    set $gef_invest_result, 3;
  2025.     		}
  2026.     		else {
  2027.     			set .@win, rand(1,2);
  2028.     			if (.@win == 1) {
  2029.     			    set $prt_invest_result, 3;
  2030.     			}
  2031.     			else {
  2032.     			    set $gef_invest_result, 3;
  2033.     			}
  2034.     		}
  2035.     	}
  2036.     	else if (.@invest == 14) {
  2037.     		// û¸²È£¼ö vs ·çÀ̳ª
  2038.     		set .@pay, $fund_pay_extra;
  2039.     		set .@alde, $fund_alde_extra;
  2040.     		if (.@pay > .@alde) {
  2041.     		    set $pay_invest_result, 3;
  2042.     		}
  2043.     		else if (.@pay < .@alde) {
  2044.     		    set $alde_invest_result, 3;
  2045.     		}
  2046.     		else {
  2047.     			set .@win, rand(1,2);
  2048.     			if (.@win == 1) {
  2049.     			    set $pay_invest_result, 3;
  2050.     			}
  2051.     			else {
  2052.     			    set $alde_invest_result, 3;
  2053.     			}
  2054.     		}
  2055.     	}
  2056.     	else if (.@invest == 15) {
  2057.     		// û¸²È£¼ö vs ºê¸®Å丮¾Æ
  2058.     		set .@pay, $fund_pay_extra;
  2059.     		set .@gef, $fund_gef_extra;
  2060.     		if (.@pay > .@gef) {
  2061.     		    set $pay_invest_result, 3;
  2062.     		}
  2063.     		else if (.@pay < .@gef) {
  2064.     		    set $gef_invest_result, 3;
  2065.     		}
  2066.     		else {
  2067.     			set .@win, rand(1,2);
  2068.     			if (.@win == 1) {
  2069.     			    set $pay_invest_result, 3;
  2070.     			}
  2071.     			else {
  2072.     			    set $gef_invest_result, 3;
  2073.     			}
  2074.     		}
  2075.     	}
  2076.     	else if (.@invest == 16) {
  2077.     		// ·çÀ̳ª vs ºê¸®Å丮¾Æ
  2078.     		set .@alde, $fund_alde_extra;
  2079.     		set .@gef, $fund_gef_extra;
  2080.     		if (.@alde > .@gef) {
  2081.     		    set $alde_invest_result, 3;
  2082.     		}
  2083.     		else if (.@alde < .@gef) {
  2084.     		    set $gef_invest_result, 3;
  2085.     		}
  2086.     		else {
  2087.     			set .@win, rand(1,2);
  2088.     			if (.@win == 1) {
  2089.     			    set $alde_invest_result, 3;
  2090.     			}
  2091.     			else {
  2092.     			    set $gef_invest_result, 3;
  2093.     			}
  2094.     		}
  2095.     	}
  2096.     	else if (.@invest == 17) {
  2097.     		// ¹ßÅ°¸®·¼¸§ vs û¸²È£¼ö vs ·çÀ̳ª
  2098.     		set .@alde, $fund_alde_extra;
  2099.     		set .@pay, $fund_pay_extra;
  2100.     		set .@prt, $fund_prt_extra;
  2101.     		if (.@prt > .@alde) {
  2102.     		    if (.@prt > .@pay) {
  2103.     		        set $prt_invest_result, 3;
  2104.     		    }
  2105.     		    else if (.@prt < .@pay) {
  2106.     		        set $pay_invest_result, 3;
  2107.     		    }
  2108.     		    else {
  2109.     		        set .@win, rand(1,2);
  2110.         			if (.@win == 1) {
  2111.         			    set $prt_invest_result, 3;
  2112.         			}
  2113.         			else {
  2114.         			    set $pay_invest_result, 3;
  2115.         			}
  2116.     		    }
  2117.     		}
  2118.     		else if (.@prt < .@alde) {
  2119.     		    if (.@alde > .@pay) {
  2120.     		        set $alde_invest_result, 3;
  2121.     		    }
  2122.     		    else if (.@alde < .@pay) {
  2123.     		        set $pay_invest_result, 3;
  2124.     		    }
  2125.     		    else {
  2126.     		        set .@win, rand(1,2);
  2127.         			if (.@win == 1) {
  2128.         			    set $alde_invest_result, 3;
  2129.         			}
  2130.         			else {
  2131.         			    set $pay_invest_result, 3;
  2132.         			}
  2133.     		    }
  2134.     		}
  2135.     		else {
  2136.     		    if (.@alde > .@pay) {
  2137.     		        set .@win, rand(1,2);
  2138.         			if (.@win == 1) {
  2139.         			    set $alde_invest_result, 3;
  2140.         			}
  2141.         			else {
  2142.         			    set $prt_invest_result, 3;
  2143.         			}
  2144.     		    }
  2145.     		    else if (.@alde < .@pay) {
  2146.     		         set $pay_invest_result, 3;
  2147.     		    }
  2148.     		    else {
  2149.     		        set .@win, rand(1,3);
  2150.         			if (.@win == 1) {
  2151.         			    set $alde_invest_result, 3;
  2152.         			}
  2153.         			else if (.@win == 2) {
  2154.         			    set $pay_invest_result, 3;
  2155.         			}
  2156.         			else {
  2157.         			    set $prt_invest_result, 3;
  2158.         			}
  2159.     		    }
  2160.     		}
  2161.     	}
  2162.     	else if (.@invest == 18) {
  2163.     		// ¹ßÅ°¸®·¼¸§ vs û¸²È£¼ö vs ºê¸®Å丮¾Æ
  2164.     		set .@gef, $fund_gef_extra;
  2165.     		set .@pay, $fund_pay_extra;
  2166.     		set .@prt, $fund_prt_extra;
  2167.     		if (.@prt > .@gef) {
  2168.     		    if (.@prt > .@pay) {
  2169.     		        set $prt_invest_result, 3;
  2170.     		    }
  2171.     		    else if (.@prt < .@pay) {
  2172.     		        set $pay_invest_result, 3;
  2173.     		    }
  2174.     		    else {
  2175.     		        set .@win, rand(1,2);
  2176.         			if (.@win == 1) {
  2177.         			    set $prt_invest_result, 3;
  2178.         			}
  2179.         			else {
  2180.         			    set $pay_invest_result, 3;
  2181.         			}
  2182.     		    }
  2183.     		}
  2184.     		else if (.@prt < .@gef) {
  2185.     		    if (.@gef > .@pay) {
  2186.     		        set $gef_invest_result, 3;
  2187.     		    }
  2188.     		    else if (.@gef < .@pay) {
  2189.     		        set $pay_invest_result, 3;
  2190.     		    }
  2191.     		    else {
  2192.     		        set .@win, rand(1,2);
  2193.         			if (.@win == 1) {
  2194.         			    set $gef_invest_result, 3;
  2195.         			}
  2196.         			else {
  2197.         			    set $pay_invest_result, 3;
  2198.         			}
  2199.     		    }
  2200.     		}
  2201.     		else {
  2202.     		    if (.@gef > .@pay) {
  2203.     		        set .@win, rand(1,2);
  2204.         			if (.@win == 1) {
  2205.         			    set $gef_invest_result, 3;
  2206.         			}
  2207.         			else {
  2208.         			    set $prt_invest_result, 3;
  2209.         			}
  2210.     		    }
  2211.     		    else if (.@gef < .@pay) {
  2212.     		         set $pay_invest_result, 3;
  2213.     		    }
  2214.     		    else {
  2215.     		        set .@win, rand(1,3);
  2216.         			if (.@win == 1) {
  2217.         			    set $gef_invest_result, 3;
  2218.         			}
  2219.         			else if (.@win == 2) {
  2220.         			    set $pay_invest_result, 3;
  2221.         			}
  2222.         			else {
  2223.         			    set $prt_invest_result, 3;
  2224.         			}
  2225.     		    }
  2226.     		}
  2227.     	}
  2228.     	else if (.@invest == 19) {
  2229.     		// ¹ßÅ°¸®·¼¸§ vs ·çÀ̳ª vs ºê¸®Å丮¾Æ
  2230.     		set .@gef, $fund_gef_extra;
  2231.     		set .@alde, $fund_alde_extra;
  2232.     		set .@prt, $fund_prt_extra;
  2233.     		if (.@prt > .@gef) {
  2234.     		    if (.@prt > .@alde) {
  2235.     		        set $prt_invest_result, 3;
  2236.     		    }
  2237.     		    else if (.@prt < .@alde) {
  2238.     		        set $alde_invest_result, 3;
  2239.     		    }
  2240.     		    else {
  2241.     		        set .@win, rand(1,2);
  2242.         			if (.@win == 1) {
  2243.         			    set $prt_invest_result, 3;
  2244.         			}
  2245.         			else {
  2246.         			    set $alde_invest_result, 3;
  2247.         			}
  2248.     		    }
  2249.     		}
  2250.     		else if (.@prt < .@gef) {
  2251.     		    if (.@gef > .@alde) {
  2252.     		        set $gef_invest_result, 3;
  2253.     		    }
  2254.     		    else if (.@gef < .@alde) {
  2255.     		        set $alde_invest_result, 3;
  2256.     		    }
  2257.     		    else {
  2258.     		        set .@win, rand(1,2);
  2259.         			if (.@win == 1) {
  2260.         			    set $gef_invest_result, 3;
  2261.         			}
  2262.         			else {
  2263.         			    set $alde_invest_result, 3;
  2264.         			}
  2265.     		    }
  2266.     		}
  2267.     		else {
  2268.     		    if (.@gef > .@alde) {
  2269.     		        set .@win, rand(1,2);
  2270.         			if (.@win == 1) {
  2271.         			    set $gef_invest_result, 3;
  2272.         			}
  2273.         			else {
  2274.         			    set $prt_invest_result, 3;
  2275.         			}
  2276.     		    }
  2277.     		    else if (.@gef < .@alde) {
  2278.     		         set $alde_invest_result, 3;
  2279.     		    }
  2280.     		    else {
  2281.     		        set .@win, rand(1,3);
  2282.         			if (.@win == 1) {
  2283.         			    set $gef_invest_result, 3;
  2284.         			}
  2285.         			else if (.@win == 2) {
  2286.         			    set $alde_invest_result, 3;
  2287.         			}
  2288.         			else {
  2289.         			    set $prt_invest_result, 3;
  2290.         			}
  2291.     		    }
  2292.     		}
  2293.     	}
  2294.     	else if (.@invest == 20) {
  2295.     		// ·çÀ̳ª vs û¸²È£¼ö vs ºê¸®Å丮¾Æ
  2296.     		set .@gef, $fund_gef_extra;
  2297.     		set .@alde, $fund_alde_extra;
  2298.     		set .@pay, $fund_pay_extra;
  2299.     		if (.@pay > .@gef) {
  2300.     		    if (.@pay > .@alde) {
  2301.     		        set $pay_invest_result, 3;
  2302.     		    }
  2303.     		    else if (.@pay < .@alde) {
  2304.     		        set $alde_invest_result, 3;
  2305.     		    }
  2306.     		    else {
  2307.     		        set .@win, rand(1,2);
  2308.         			if (.@win == 1) {
  2309.         			    set $pay_invest_result, 3;
  2310.         			}
  2311.         			else {
  2312.         			    set $alde_invest_result, 3;
  2313.         			}
  2314.     		    }
  2315.     		}
  2316.     		else if (.@pay < .@gef) {
  2317.     		    if (.@gef > .@alde) {
  2318.     		        set $gef_invest_result, 3;
  2319.     		    }
  2320.     		    else if (.@gef < .@alde) {
  2321.     		        set $alde_invest_result, 3;
  2322.     		    }
  2323.     		    else {
  2324.     		        set .@win, rand(1,2);
  2325.         			if (.@win == 1) {
  2326.         			    set $gef_invest_result, 3;
  2327.         			}
  2328.         			else {
  2329.         			    set $alde_invest_result, 3;
  2330.         			}
  2331.     		    }
  2332.     		}
  2333.     		else {
  2334.     		    if (.@gef > .@alde) {
  2335.     		        set .@win, rand(1,2);
  2336.         			if (.@win == 1) {
  2337.         			    set $gef_invest_result, 3;
  2338.         			}
  2339.         			else {
  2340.         			    set $pay_invest_result, 3;
  2341.         			}
  2342.     		    }
  2343.     		    else if (.@gef < .@alde) {
  2344.     		         set $alde_invest_result, 3;
  2345.     		    }
  2346.     		    else {
  2347.     		        set .@win, rand(1,3);
  2348.         			if (.@win == 1) {
  2349.         			    set $gef_invest_result, 3;
  2350.         			}
  2351.         			else if (.@win == 2) {
  2352.         			    set $alde_invest_result, 3;
  2353.         			}
  2354.         			else {
  2355.         			    set $pay_invest_result, 3;
  2356.         			}
  2357.     		    }
  2358.     		}
  2359.     	}
  2360.     	else if (.@invest == 21) {
  2361.     		// ¹ßÅ°¸®·¼¸§ vs û¸²È£¼ö vs ·çÀ̳ª vs ºê¸®Å丮¾Æ
  2362.     		set .@gef, $fund_gef_extra;
  2363.     		set .@alde, $fund_alde_extra;
  2364.     		set .@pay, $fund_pay_extra;
  2365.     		set .@prt, $fund_prt_extra;
  2366.     		if (.@prt > .@pay) {
  2367.     		    if (.@prt > .@alde) {
  2368.     		        if (.@prt > .@gef) {
  2369.     		            set $prt_invest_result, 3;
  2370.     		        }
  2371.     		        else if (.@prt < .@gef) {
  2372.     		            set $gef_invest_result, 3;
  2373.     		        }
  2374.     		        else {
  2375.     		            set .@wain, rand(1,2);
  2376.     		            if (.@win == 1) {
  2377.     		                set $prt_invest_result, 3;
  2378.     		            }
  2379.     		            else {
  2380.     		                set $gef_invest_result, 3;
  2381.     		            }
  2382.     		        }
  2383.     		    }
  2384.     		    else if (.@prt < .@alde) {
  2385.     		        if (.@alde > .@gef) {
  2386.     		            set $alde_invest_result, 3;
  2387.     		        }
  2388.     		        else if (.@alde < .@gef) {
  2389.     		            set $gef_invest_result, 3;
  2390.     		        }
  2391.     		        else {
  2392.     		            set .@wain, rand(1,2);
  2393.     		            if (.@win == 1) {
  2394.     		                set $alde_invest_result, 3;
  2395.     		            }
  2396.     		            else {
  2397.     		                set $gef_invest_result, 3;
  2398.     		            }
  2399.     		        }
  2400.     		    }
  2401.     		    else {
  2402.     		        if (.@alde > .@gef) {
  2403.     		            set $alde_invest_result, 3;
  2404.     		        }
  2405.     		        else if (.@alde < .@gef) {
  2406.     		            set $gef_invest_result, 3;
  2407.     		        }
  2408.     		        else {
  2409.     		            set .@win, rand(1,3);
  2410.             			if (.@win == 1) {
  2411.             			    set $gef_invest_result, 3;
  2412.             			}
  2413.             			else if (.@win == 2) {
  2414.             			    set $alde_invest_result, 3;
  2415.             			}
  2416.             			else {
  2417.             			    set $prt_invest_result, 3;
  2418.             			}
  2419.     		        }
  2420.     		    }
  2421.     		}
  2422.     		else if (.@prt < .@pay) {
  2423.     		    if (.@pay > .@alde) {
  2424.     		        if (.@pay > .@gef) {
  2425.     		            set $pay_invest_result, 3;
  2426.     		        }
  2427.     		        else if (.@pay < .@gef) {
  2428.     		            set $gef_invest_result, 3;
  2429.     		        }
  2430.     		        else {
  2431.     		            set .@wain, rand(1,2);
  2432.     		            if (.@win == 1) {
  2433.     		                set $pay_invest_result, 3;
  2434.     		            }
  2435.     		            else {
  2436.     		                set $gef_invest_result, 3;
  2437.     		            }
  2438.     		        }
  2439.     		    }
  2440.     		    else if (.@pay < .@alde) {
  2441.     		        if (.@alde > .@gef) {
  2442.     		            set $alde_invest_result, 3;
  2443.     		        }
  2444.     		        else if (.@alde < .@gef) {
  2445.     		            set $gef_invest_result, 3;
  2446.     		        }
  2447.     		        else {
  2448.     		            set .@wain, rand(1,2);
  2449.     		            if (.@win == 1) {
  2450.     		                set $alde_invest_result, 3;
  2451.     		            }
  2452.     		            else {
  2453.     		                set $gef_invest_result, 3;
  2454.     		            }
  2455.     		        }
  2456.     		    }
  2457.     		    else {
  2458.     		        if (.@alde < .@gef) {
  2459.     		            set $gef_invest_result, 3;
  2460.     		        }
  2461.     		        else if (.@alde > .@gef) {
  2462.     		            set .@wain, rand(1,2);
  2463.     		            if (.@win == 1) {
  2464.     		                set $pay_invest_result, 3;
  2465.     		            }
  2466.     		            else {
  2467.     		                set $alde_invest_result, 3;
  2468.     		            }
  2469.     		        }
  2470.     		        else {
  2471.     		            set .@win, rand(1,3);
  2472.             			if (.@win == 1) {
  2473.             			    set $gef_invest_result, 3;
  2474.             			}
  2475.             			else if (.@win == 2) {
  2476.             			    set $alde_invest_result, 3;
  2477.             			}
  2478.             			else {
  2479.             			    set $pay_invest_result, 3;
  2480.             			}
  2481.     		        }
  2482.     		    }
  2483.     		} // prt == pay;
  2484.     		    if (.@pay > .@alde) {
  2485.     		        if (.@pay > .@gef) {
  2486.     		            set .@wain, rand(1,2);
  2487.     		            if (.@win == 1) {
  2488.     		                set $pay_invest_result, 3;
  2489.     		            }
  2490.     		            else {
  2491.     		                set $prt_invest_result, 3;
  2492.     		            }
  2493.     		        }
  2494.     		        else if (.@pay < .@gef) {
  2495.     		            set $gef_invest_result, 3;
  2496.     		        } // prt == pay == gef > alde;
  2497.     		            set .@win, rand(1,3);
  2498.             			if (.@win == 1) {
  2499.             			    set $gef_invest_result, 3;
  2500.             			}
  2501.             			else if (.@win == 2) {
  2502.             			    set $prt_invest_result, 3;
  2503.             			}
  2504.             			else {
  2505.             			    set $pay_invest_result, 3;
  2506.             			}
  2507.     		        }
  2508.     		    }
  2509.     		    else if (.@pay < .@alde) {
  2510.     		        if (.@alde > .@gef) {
  2511.     		            set $alde_invest_result, 3;
  2512.     		        }
  2513.     		        else if (.@alde < .@gef) {
  2514.     		            set $gef_invest_result, 3;
  2515.     		        }
  2516.     		        else {
  2517.     		            set .@wain, rand(1,2);
  2518.     		            if (.@win == 1) {
  2519.     		                set $gef_invest_result, 3;
  2520.     		            }
  2521.     		            else {
  2522.     		                set $alde_invest_result, 3;
  2523.     		            }
  2524.     		        }
  2525.     		    } // prt = pay = alde;
  2526.     		        if (.@alde > .@gef) {
  2527.     		            set .@win, rand(1,3);
  2528.             			if (.@win == 1) {
  2529.             			    set $alde_invest_result, 3;
  2530.             			}
  2531.             			else if (.@win == 2) {
  2532.             			    set $prt_invest_result, 3;
  2533.             			}
  2534.             			else {
  2535.             			    set $pay_invest_result, 3;
  2536.             			}
  2537.     		        }
  2538.     		        else if (.@alde < .@gef) {
  2539.     		            set $gef_invest_result, 3;
  2540.     		        } // prt = pay = alde = gef;
  2541.     		            set .@win, rand(1,4);
  2542.             			if (.@win == 1) {
  2543.             			    set $gef_invest_result, 3;
  2544.             			}
  2545.             			else if (.@win == 2) {
  2546.             			    set $prt_invest_result, 3;
  2547.             			}
  2548.             			else if (.@win == 3) {
  2549.             			    set $alde_invest_result, 3;
  2550.             			}
  2551.             			else {
  2552.             			    set $pay_invest_result, 3;
  2553.             			}
  2554.     		        }
  2555.     		    }
  2556.     		}
  2557.     	}
  2558.         set $2011_agit_invest, 4;
  2559.         set $agit_revoting_timer, 0;
  2560.         hideonnpc "Revoting manager#Invest1";
  2561.         stopnpctimer;
  2562.         end;
  2563.     }
  2564.     else {
  2565.         hideonnpc "Revoting manager#Invest1";
  2566.         stopnpctimer;
  2567.     }
  2568. end;
  2569. }
  2570.  
  2571. prt_gld,164,98,3	script	Revoting manager#Invest2	421,{
  2572.     set .@invest, $2011_agit_invest;
  2573. //-- ÅõÇ¥½Ã°£ÀÌ ¾Æ´Ñµ¥ ÄÑÁ®ÀÖ´Ù. ¾î?--------------------------------------------
  2574.     if (.@invest < 11) {
  2575.         mes "[Revoting manager]";
  2576.         mes "No!, this is not the time to take a revote.";
  2577.         close2;
  2578.         hideonnpc "Revoting manager#Invest2";
  2579.         end;
  2580.     }
  2581. //------------------------------------------------------------------------------
  2582. 	if (checkquest_playtime 7349 == 1) {
  2583. 	    mes "[Revoting manager]";
  2584. 	    mes "you've already participated to the vote.";
  2585. 	    mes "please relax and wait for the result.";
  2586. 	    close2;
  2587. 	}
  2588. 	else {
  2589. 	    if (checkquest_playtime 7349 == 3) {
  2590. //	        recall_completequest 7349
  2591. 	    }
  2592. 	    erasequest 7349;
  2593. 	    mes "[Revoting manager]";
  2594. 	    mes "Would you participate to the vote for choosing place where to connect 'Abyss gate'?";
  2595. 	    next;
  2596. 	    switch (select("participate to the vote:skip at this time.")) {
  2597. 	        case 1:
  2598. 	            mes "[Revoting manager]";
  2599. 	            mes "you can vote once and you don't need to invest for your choice.";
  2600. 	            mes "plesae choose one WOE area.";
  2601. 	            next;
  2602. 	            if (.@invest == 11) {
  2603.                     switch (select("Valkyrie realm:Green lake")) {
  2604.                         case 1:
  2605.                             mes "[Revoting manager]";
  2606.                             mes "You've voted for Valkyrie realm.";
  2607.                             mes "Thanks for voting.";
  2608.                             setquest 7349;
  2609. //                            IncGlobalVar "fund_prt_extra" 1
  2610.                             close2;
  2611.                         break;
  2612.                         case 2:
  2613.                             mes "[Revoting manager]";
  2614.                             mes "You've voted for Green lake.";
  2615.                             mes "Thanks for voting.";
  2616.                             setquest 7349;
  2617. //                            IncGlobalVar "fund_pay_extra" 1
  2618.                             close2;
  2619.                         break;
  2620.                     }
  2621.                 }
  2622.                 else if (.@invest == 12) {
  2623.                     switch (select("Valkyrie realm:Luina")) {
  2624.                         case 1:
  2625.                             mes "[Revoting manager]";
  2626.                             mes "You've voted for Valkyrie realm.";
  2627.                             mes "Thanks for voting.";
  2628.                             setquest 7349;
  2629. //                            IncGlobalVar "fund_prt_extra" 1
  2630.                             close2;
  2631.                         break;
  2632.                         case 2:
  2633.                             mes "[Revoting manager]";
  2634.                             mes "You've voted for Luina.";
  2635.                             mes "Thanks for voting.";
  2636.                             setquest 7349;
  2637. //                            IncGlobalVar "fund_alde_extra" 1
  2638.                             close2;
  2639.                         break;
  2640.                     }
  2641.                 }
  2642.                 else if (.@invest == 13) {
  2643.                     switch (select("Valkyrie realm:Britoniah")) {
  2644.                         case 1:
  2645.                             mes "[Revoting manager]";
  2646.                             mes "You've voted for Valkyrie realm.";
  2647.                             mes "Thanks for voting.";
  2648.                             setquest 7349;
  2649. //                            IncGlobalVar "fund_prt_extra" 1
  2650.                             close2;
  2651.                         break;
  2652.                         case 2:
  2653.                             mes "[Revoting manager]";
  2654.                             mes "You've voted for Britoniah.";
  2655.                             mes "Thanks for voting.";
  2656.                             setquest 7349;
  2657. //                            IncGlobalVar "fund_gef_extra" 1
  2658.                             close2;
  2659.                         break;
  2660.                     }
  2661.                 }
  2662.                 else if (.@invest == 14) {
  2663.                     switch (select("Luina:Green lake")) {
  2664.                         case 1:
  2665.                             mes "[Revoting manager]";
  2666.                             mes "You've voted for Luina.";
  2667.                             mes "Thanks for voting.";
  2668.                             setquest 7349;
  2669. //                            IncGlobalVar "fund_alde_extra" 1
  2670.                             close2;
  2671.                         break;
  2672.                         case 2:
  2673.                             mes "[Revoting manager]";
  2674.                             mes "You've voted for Green lake.";
  2675.                             mes "Thanks for voting.";
  2676.                             setquest 7349;
  2677. //                            IncGlobalVar "fund_pay_extra" 1
  2678.                             close2;
  2679.                         break;
  2680.                     }
  2681.                 }
  2682.                 else if (.@invest == 15) {
  2683.                     switch (select("Britoniah:Green lake")) {
  2684.                         case 1:
  2685.                             mes "[Revoting manager]";
  2686.                             mes "You've voted for Britoniah.";
  2687.                             mes "Thanks for voting.";
  2688.                             setquest 7349;
  2689. //                            IncGlobalVar "fund_gef_extra" 1
  2690.                             close2;
  2691.                         break;
  2692.                         case 2:
  2693.                             mes "[Revoting manager]";
  2694.                             mes "You've voted for Green lake.";
  2695.                             mes "Thanks for voting.";
  2696.                             setquest 7349;
  2697. //                            IncGlobalVar "fund_pay_extra" 1
  2698.                             close2;
  2699.                         break;
  2700.                     }
  2701.                 }
  2702.                 else if (.@invest == 16) {
  2703.                     switch (select("Luina:Britoniah")) {
  2704.                         case 1:
  2705.                             mes "[Revoting manager]";
  2706.                             mes "You've voted for Luina.";
  2707.                             mes "Thanks for voting.";
  2708.                             setquest 7349;
  2709. //                            IncGlobalVar "fund_alde_extra" 1
  2710.                             close2;
  2711.                         break;
  2712.                         case 2:
  2713.                             mes "[Revoting manager]";
  2714.                             mes "You've voted for Britoniah.";
  2715.                             mes "Thanks for voting.";
  2716.                             setquest 7349;
  2717. //                            IncGlobalVar "fund_gef_extra" 1
  2718.                             close2;
  2719.                         break;
  2720.                     }
  2721.                 }
  2722.                 else if (.@invest == 17) {
  2723.                     switch (select("Valkyrie realm:Green lake:Luina")) {
  2724.                         case 1:
  2725.                             mes "[Revoting manager]";
  2726.                             mes "You've voted for Valkyrie realm.";
  2727.                             mes "Thanks for voting.";
  2728.                             setquest 7349;
  2729. //                            IncGlobalVar "fund_prt_extra" 1
  2730.                             close2;
  2731.                         break;
  2732.                         case 2:
  2733.                             mes "[Revoting manager]";
  2734.                             mes "You've voted for Green lake.";
  2735.                             mes "Thanks for voting.";
  2736.                             setquest 7349;
  2737. //                            IncGlobalVar "fund_pay_extra" 1
  2738.                             close2;
  2739.                         break;
  2740.                         case 3:
  2741.                             mes "[Revoting manager]";
  2742.                             mes "You've voted for Luina.";
  2743.                             mes "Thanks for voting.";
  2744.                             setquest 7349;
  2745. //                            IncGlobalVar "fund_alde_extra" 1
  2746.                             close2;
  2747.                         break;
  2748.                     }
  2749.                 }
  2750.                 else if (.@invest == 18) {
  2751.                     switch (select("Valkyrie realm:Green lake:Britoniah")) {
  2752.                         case 1:
  2753.                             mes "[Revoting manager]";
  2754.                             mes "You've voted for Valkyrie realm.";
  2755.                             mes "Thanks for voting.";
  2756.                             setquest 7349;
  2757. //                            IncGlobalVar "fund_prt_extra" 1
  2758.                             close2;
  2759.                         break;
  2760.                         case 2:
  2761.                             mes "[Revoting manager]";
  2762.                             mes "You've voted for Green lake.";
  2763.                             mes "Thanks for voting.";
  2764.                             setquest 7349;
  2765. //                            IncGlobalVar "fund_pay_extra" 1
  2766.                             close2;
  2767.                         break;
  2768.                         case 3:
  2769.                             mes "[Revoting manager]";
  2770.                             mes "You've voted for Britoniah.";
  2771.                             mes "Thanks for voting.";
  2772.                             setquest 7349;
  2773. //                            IncGlobalVar "fund_gef_extra" 1
  2774.                             close2;
  2775.                         break;
  2776.                     }
  2777.                 }
  2778.                 else if (.@invest == 19) {
  2779.                     switch (select("Valkyrie realm:Luina:Britoniah")) {
  2780.                         case 1:
  2781.                             mes "[Revoting manager]";
  2782.                             mes "You've voted for Valkyrie realm.";
  2783.                             mes "Thanks for voting.";
  2784.                             setquest 7349;
  2785. //                            IncGlobalVar "fund_prt_extra" 1
  2786.                             close2;
  2787.                         break;
  2788.                         case 2:
  2789.                             mes "[Revoting manager]";
  2790.                             mes "You've voted for Luina.";
  2791.                             mes "Thanks for voting.";
  2792.                             setquest 7349;
  2793. //                            IncGlobalVar "fund_alde_extra" 1
  2794.                             close2;
  2795.                         break;
  2796.                         case 3:
  2797.                             mes "[Revoting manager]";
  2798.                             mes "You've voted for Britoniah.";
  2799.                             mes "Thanks for voting.";
  2800.                             setquest 7349;
  2801. //                            IncGlobalVar "fund_gef_extra" 1
  2802.                             close2;
  2803.                         break;
  2804.                     }
  2805.                 }
  2806.                 else if (.@invest == 20) {
  2807.                     switch (select("Luina:Green lake:Britoniah")) {
  2808.                         case 1:
  2809.                             mes "[Revoting manager]";
  2810.                             mes "You've voted for Luina.";
  2811.                             mes "Thanks for voting.";
  2812.                             setquest 7349;
  2813. //                            IncGlobalVar "fund_alde_extra" 1
  2814.                             close2;
  2815.                         break;
  2816.                         case 2:
  2817.                             mes "[Revoting manager]";
  2818.                             mes "You've voted for Green lake.";
  2819.                             mes "Thanks for voting.";
  2820.                             setquest 7349;
  2821. //                            IncGlobalVar "fund_pay_extra" 1
  2822.                             close2;
  2823.                         break;
  2824.                         case 3:
  2825.                             mes "[Revoting manager]";
  2826.                             mes "You've voted for Britoniah.";
  2827.                             mes "Thanks for voting.";
  2828.                             setquest 7349;
  2829. //                            IncGlobalVar "fund_gef_extra" 1
  2830.                             close2;
  2831.                         break;
  2832.                     }
  2833.                 }
  2834.                 else if (.@invest == 21) {
  2835.                     switch (select("Valkyrie realm:Green lake:Luina:Britoniah")) {
  2836.                         case 1:
  2837.                             mes "[Revoting manager]";
  2838.                             mes "You've voted for Valkyrie realm.";
  2839.                             mes "Thanks for voting.";
  2840.                             setquest 7349;
  2841. //                            IncGlobalVar "fund_prt_extra" 1
  2842.                             close2;
  2843.                         break;
  2844.                         case 2:
  2845.                             mes "[Revoting manager]";
  2846.                             mes "You've voted for Green lake.";
  2847.                             mes "Thanks for voting.";
  2848.                             setquest 7349;
  2849. //                            IncGlobalVar "fund_pay_extra" 1
  2850.                             close2;
  2851.                         break;
  2852.                         case 3:
  2853.                             mes "[Revoting manager]";
  2854.                             mes "You've voted for Luina.";
  2855.                             mes "Thanks for voting.";
  2856.                             setquest 7349;
  2857. //                            IncGlobalVar "fund_alde_extra" 1
  2858.                             close2;
  2859.                         break;
  2860.                         case 4:
  2861.                             mes "[Revoting manager]";
  2862.                             mes "You've voted for Britoniah.";
  2863.                             mes "Thanks for voting.";
  2864.                             setquest 7349;
  2865. //                            IncGlobalVar "fund_gef_extra" 1
  2866.                             close2;
  2867.                         break;
  2868.                     }
  2869.                 }
  2870. 	        break;
  2871. 	        case 2:
  2872. 	            mes "[Revoting manager]";
  2873. 	            mes "You've canceled the vote.";
  2874. 	            close2;
  2875. 	        break;
  2876. 	    }
  2877. 	}
  2878. end;
  2879. //------------ Å×½ºÆ®±¸°£
  2880. OnInit:
  2881.     hideonnpc "Revoting manager#Invest2";
  2882. end;
  2883. OnEnable:
  2884.     hideoffnpc "Revoting manager#Invest2";
  2885. end;
  2886. OnDisable:
  2887.     hideonnpc "Revoting manager#Invest2";
  2888.     stopnpctimer;
  2889. end;
  2890. OnNotice_on:
  2891.     initnpctimer;
  2892. end;
  2893. OnTimer5000:
  2894. //	broadcastserver "FF0000" FW_NORMAL 10 0 0 "Cat paw merchant guild Prontera branch manager: As there was no WOE area reached maximum invesment level to connect 'Abyss gate'"
  2895. end;
  2896. OnTimer8000:
  2897. //	broadcastserver "FF0000" FW_NORMAL 10 0 0 "Cat paw merchant guild Prontera branch manager: we were about to connect Abyss gate on WOE area where invested most."
  2898. end;
  2899. OnTimer11000:
  2900. //	broadcastserver "FF0000" FW_NORMAL 10 0 0 "Cat paw merchant guild Prontera branch manager: however there were area which invested same amount. So we will put them to a vote."
  2901. end;
  2902. OnTimer14000:
  2903. //	broadcastserver "FF0000" FW_NORMAL 10 0 0 "Cat paw merchant guild Prontera branch manager: Additional vote will be avaliable for 30 min. you can vote on 'Valkyrie realm' field."
  2904. end;
  2905. OnTimer20000:
  2906. 	set .@invest, $2011_agit_invest;
  2907. 	if (.@invest == 11) {
  2908. 		set .@notice$, "Cat paw merchant guild Prontera branch manager: the candidate for additional vote are,  Valkyrie realm vs Green lake.";
  2909. 	}
  2910. 	else if (.@invest == 12) {
  2911. 		set .@notice$, "Cat paw merchant guild Prontera branch manager: the candidate for additional vote are,  Valkyrie realm vs Luina.";
  2912. 	}
  2913. 	else if (.@invest == 13) {
  2914. 		set .@notice$, "Cat paw merchant guild Prontera branch manager: the candidate for additional vote are,  Valkyrie realm vs Britoniah.";
  2915. 	}
  2916. 	else if (.@invest == 14) {
  2917. 		set .@notice$, "Cat paw merchant guild Prontera branch manager: the candidate for additional vote are,  Green lake vs Luina.";
  2918. 	}
  2919. 	else if (.@invest == 15) {
  2920. 		set .@notice$, "Cat paw merchant guild Prontera branch manager: the candidate for additional vote are,  Green lake vs Britoniah.";
  2921. 	}
  2922. 	else if (.@invest == 16) {
  2923. 		set .@notice$, "Cat paw merchant guild Prontera branch manager: the candidate for additional vote are,  Luina vs Britoniah.";
  2924. 	}
  2925. 	else if (.@invest == 17) {
  2926. 		set .@notice$, "Cat paw merchant guild Prontera branch manager: the candidate for additional vote are,  Valkyrie realm vs Green lake vs Luina.";
  2927. 	}
  2928. 	else if (.@invest == 18) {
  2929. 		set .@notice$, "Cat paw merchant guild Prontera branch manager: the candidate for additional vote are,  Valkyrie realm vs Green lake vs Britoniah.";
  2930. 	}
  2931. 	else if (.@invest == 19) {
  2932. 		set .@notice$, "Cat paw merchant guild Prontera branch manager: the candidate for additional vote are,  Valkyrie realm vs Luina vs Britoniah.";
  2933. 	}
  2934. 	else if (.@invest == 20) {
  2935. 		set .@notice$, "Cat paw merchant guild Prontera branch manager: the candidate for additional vote are,  Luina vs Green lake vs Britoniah.";
  2936. 	}
  2937. 	else if (.@invest == 21) {
  2938. 		set .@notice$, "Cat paw merchant guild Prontera branch manager: the candidate for additional vote are,  Valkyrie realm vs Green lake vs Luina vs Britoniah.";
  2939. 	}
  2940. //	broadcastserver "FF0000" FW_NORMAL 10 0 0 notice
  2941. //--- ÀçÅõÇ¥¸¦ ÇÒ °æ¿ì ¿¢½ºÆ®¶ó ºÎºÐ ÅõÀÚ±Ý ÃʱâÈ­
  2942. 	set $fund_prt_extra, 0;
  2943. 	set $fund_pay_extra, 0;
  2944. 	set $fund_gef_extra, 0;
  2945. 	set $fund_alde_extra, 0;
  2946. 	set $agit_revoting_timer, 0;
  2947. 	donpcevent "Revoting manager#Invest2::OnEnable";
  2948. 	stopnpctimer;
  2949. end;
  2950. }
  2951.  
  2952. prt_gld,3,2,3	script	checking message.	844,{
  2953.     mes "showing msg now" + GetAgitInvestMsg + ".";
  2954.     close;
  2955. }
  2956.  
  2957. sec_in02,15,35,3	script	check global Var	124,{
  2958.  
  2959. OnAgitInvest:
  2960.     if (GetAgitInvestMsg == 1) {
  2961.         set $2011_agit_invest, 1;
  2962.         donpcevent "#fund_master::OnInvest_start";
  2963.     }
  2964.     else if (GetAgitInvestMsg == 2) {
  2965.         set $2011_agit_invest, 2;
  2966.         donpcevent "#fund_master::OnInvest_stop";
  2967.     }
  2968.     else if (GetAgitInvestMsg == 3) {
  2969.         donpcevent "#fund_master::OnResult";
  2970.     }
  2971.     else if (GetAgitInvestMsg == 0) {
  2972.         set $2011_agit_invest, 0;
  2973.         donpcevent "#fund_master::OnReset";
  2974.     }
  2975. end;
  2976. //OnClick:
  2977.     mes "I should quit my steward job.";
  2978.     close;
  2979. //*/
  2980. //--------------------------------------------------¾ÆÁöÆ® ÅõÀÚ Ãß°¡ Á¾·á-------
  2981. //--------------------------------------------------°ÔÆæÁý»ç ±Þ ȸ»ý------------
  2982. }
  2983.  
  2984. gefg_cas01,1,3,0	script	Brito01	844,{
  2985.     mes "Now, it is" + GetAgitInvestMsg + "...";
  2986.     close;
  2987. //-- °¢ Áö¿ªÀÇ ¸Þ¼¼Áö¸¦ È®ÀÎÇÕ´Ï´Ù.
  2988. }
  2989.  
  2990. gefg_cas02,1,3,0	script	Brito02	844,{
  2991.     mes "Now, it is" + GetAgitInvestMsg + "...";
  2992.     close;
  2993. }
  2994.  
  2995. gefg_cas03,1,3,0	script	Brito03	844,{
  2996.     mes "Now, it is" + GetAgitInvestMsg + "...";
  2997.     close;
  2998. }
  2999.  
  3000. gefg_cas04,1,3,0	script	Brito04	844,{
  3001.     mes "Now, it is" + GetAgitInvestMsg + "...";
  3002.     close;
  3003. }
  3004.  
  3005. gefg_cas05,1,3,0	script	Brito05	844,{
  3006.     mes "Now, it is" + GetAgitInvestMsg + "...";
  3007.     close;
  3008. }
  3009.  
  3010. gef_fild13,1,3,0	script	Britopill	844,{
  3011.     mes "Now, it is" + GetAgitInvestMsg + "...";
  3012.     close;
  3013. }
  3014.  
  3015. payg_cas01,1,3,0	script	Green lake01	844,{
  3016.     mes "Now, it is" + GetAgitInvestMsg + "...";
  3017.     close;
  3018. }
  3019.  
  3020. payg_cas02,1,3,0	script	Green lake02	844,{
  3021.     mes "Now, it is" + GetAgitInvestMsg + "...";
  3022.     close;
  3023. }
  3024.  
  3025. payg_cas03,1,3,0	script	Green lake03	844,{
  3026.     mes "Now, it is" + GetAgitInvestMsg + "...";
  3027.     close;
  3028. }
  3029.  
  3030. payg_cas04,1,3,0	script	Green lake04	844,{
  3031.     mes "Now, it is" + GetAgitInvestMsg + "...";
  3032.     close;
  3033. }
  3034.  
  3035. payg_cas05,1,3,0	script	Green lake05	844,{
  3036.     mes "Now, it is" + GetAgitInvestMsg + "...";
  3037.     close;
  3038. }
  3039.  
  3040. pay_gld,1,3,0	script	Green lake00	844,{
  3041.     mes "Now, it is" + GetAgitInvestMsg + "...";
  3042.     close;
  3043. }
  3044.  
  3045. alde_gld,1,3,0	script	Alde00	844,{
  3046.     mes "Now, it is" + GetAgitInvestMsg + "...";
  3047.     close;
  3048. }
  3049.  
  3050. aldeg_cas01,1,3,0	script	Alde01	844,{
  3051.     mes "Now, it is" + GetAgitInvestMsg + "...";
  3052.     close;
  3053. }
  3054.  
  3055. aldeg_cas02,1,3,0	script	Alde02	844,{
  3056.     mes "Now, it is" + GetAgitInvestMsg + "...";
  3057.     close;
  3058. }
  3059.  
  3060. aldeg_cas03,1,3,0	script	Alde03	844,{
  3061.     mes "Now, it is" + GetAgitInvestMsg + "...";
  3062.     close;
  3063. }
  3064.  
  3065. aldeg_cas04,1,3,0	script	Alde04	844,{
  3066.     mes "Now, it is" + GetAgitInvestMsg + "...";
  3067.     close;
  3068. }
  3069.  
  3070. aldeg_cas05,1,3,0	script	Alde05	844,{
  3071.     mes "Now, it is" + GetAgitInvestMsg + "...";
  3072.     close;
  3073. }
  3074.  
  3075. prtg_cas01,1,3,0	script	Valkyrie01	844,{
  3076.     mes "Now, it is" + GetAgitInvestMsg + "...";
  3077.     close;
  3078. }
  3079.  
  3080. prtg_cas02,1,3,0	script	Valkyrie02	844,{
  3081.     mes "Now, it is" + GetAgitInvestMsg + "...";
  3082.     close;
  3083. }
  3084.  
  3085. prtg_cas03,1,3,0	script	Valkyrie03	844,{
  3086.     mes "Now, it is" + GetAgitInvestMsg + "...";
  3087.     close;
  3088. }
  3089.  
  3090. prtg_cas04,1,3,0	script	Valkyrie04	844,{
  3091.     mes "Now, it is" + GetAgitInvestMsg + "...";
  3092.     close;
  3093. }
  3094.  
  3095. prtg_cas05,1,3,0	script	Valkyrie05	844,{
  3096.     mes "Now, it is" + GetAgitInvestMsg + "...";
  3097.     close;
  3098. }
  3099.  
Viewed 458 times, submitted by unknown.