Advertisement
Guest User

fishing RO v1.2

a guest
May 1st, 2015
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 8.41 KB | None | 0 0
  1. -   script  FishingFunctions    -1,{
  2. function Fishing; function Calculate;
  3. function Show; function Level;
  4. function Bait; function CalculateExp;
  5.  
  6. OnFishing:
  7.     Level ( cur_Level );
  8.     Bait ( @baitselect );
  9.     Fishing( @fishingMap, cur_Level, @level_Modifier, $@fishing_Exp, @amount, @level_Mode );
  10.     end;
  11.    
  12. OnShowin:
  13.     Show( cur_Level, @level_Modifier, $@fishing_Exp );
  14.     end;
  15.  
  16. OnInit:
  17. setarray $@FishingLevel[0], 50, 125, 175, 220, 300, 450, 525, 600;
  18. setarray $@Drop[0], 7227, 7228, 7229;
  19. setarray $@defaultDrop[0], 910, 911, 912, 501, 502, 503, 504, 505, 608;
  20. setarray $@baitID[0], 915, 908, 903, 632;
  21. $@fishing_Exp = 1; // 1 = x1 rates.
  22. end;
  23. function    Level   {
  24.     if(getarg(0) >= 600) {
  25.         if(!@level_Mode ) @level_Mode = 1;
  26.         //dispbottom "Ваш навык рыбной ловли уже максимальный. Вы будете получать только Ваш улов, и базовую экспу (если вы не 175)";
  27.     }
  28.     return;
  29. }
  30. function    Bait    {
  31.     @new_item = 0;
  32.     @level_Modifier = 0;
  33.     if(@baitselect == 903) {
  34.         message strcharinfo(0), "Отлично, сейчас испытаем эту новую наживку!!";
  35.         @level_Modifier += 1;
  36.     }
  37.     if(countitem(5317)) {
  38.         dispbottom "У тебя крутая шапка рыбака!";
  39.         @level_Modifier += 1;  
  40.     }
  41.     if(@baitselect == 632) {
  42.         message strcharinfo(0), "Отлично, сейчас испытаем эту новую наживку!!";
  43.         @level_Modifier += 2;
  44.         @new_item = 1;
  45.     }
  46.     return @level_Modifier;
  47. }
  48. function Fishing {
  49.     if( !getarg(0) ) end; //cheat?:D
  50.     if( getarg(0) == 1) { //izlude fishing guild
  51.        
  52.         if( !getarg(3) ) $@fishing_Exp = 1; //default x1
  53.         if( !getarg(2) ) @level_Modifier = $@fishing_Exp; //default
  54.        
  55.         @loop = getarg(4);
  56.         while(@loop) {
  57.             Level ( cur_Level );
  58.             if(!countitem(@baitselect)) {
  59.                 message strcharinfo(0), "У меня нет этого предмета.";
  60.                 @loop = 0;
  61.                 end;
  62.             }
  63.             message strcharinfo(0), "закидываааааааааааааааю!!";
  64.             cutin "2013_summer_fish_1",3;
  65.             sleep2 500;
  66.             cutin "2013_summer_fish_2",3;
  67.             sleep2 100;
  68.             cutin "2013_summer_fish_3",3;
  69.             sleep2 100;
  70.             cutin "2013_summer_fish_4",3;
  71.             sleep2 100;
  72.             dispbottom "Осталось наживки : "+ @loop;
  73.             progressbar "green", rand(3,5);
  74.             switch(rand(1,8)) {            
  75.                 case 1: // ничего
  76.                     @loop -= 1;
  77.                     cutin "2013_summer_fish_6",3;
  78.                     message strcharinfo(0), "Сорвалось...";
  79.                     delitem @baitselect, 1;
  80.                     emotion e_sob;
  81.                     break;
  82.                 case 2: // простая добыча
  83.                     cutin "", 255;
  84.                     @loop -= 1;
  85.                     @get_item = $@defaultDrop[rand(7)];
  86.                     delitem @baitselect, 1;
  87.                     @defaultExp = 1;
  88.                     message strcharinfo(0), "Что-то есть! Сейчас глянем!";
  89.                     cutin "2013_summer_fish_5",3;
  90.                     getitem @get_item, 1;
  91.                     Calculate ( @defaultExp, getarg(2), getarg(3), getarg(5) );
  92.                     break;
  93.                 case 3:
  94.                     @loop -= 1;
  95.                     cutin "2013_summer_fish_6",3;
  96.                     message strcharinfo(0), "Сапог? САПОГ! Рваный сапог... Но увы, он утонул...";
  97.                     emotion e_heh;
  98.                     delitem @baitselect, 1;
  99.                     break;
  100.                 case 4:
  101.                     @loop -= 1;
  102.                     cutin "2013_summer_fish_5",3;
  103.                     message strcharinfo(0), "О, мешочек с золотом!!";
  104.                     zeny += rand(1000);
  105.                     @defaultExp = 1;
  106.                     Calculate ( @defaultExp, getarg(2), getarg(3), getarg(5) );
  107.                     delitem @baitselect, 1;
  108.                     break;
  109.                 case 5:
  110.                     @loop -= 1;
  111.                     @get_item = $@Drop[rand(2)];
  112.                     delitem @baitselect, 1;
  113.                     @defaultExp = 2;
  114.                     if(rand(1,3) == 2) {
  115.                         cutin "2013_summer_fish_5",3;
  116.                         message strcharinfo(0), "оО! Большой куш..., мне это нравится!";
  117.                         getitem @get_item, 1;
  118.                     } else {
  119.                         cutin "2013_summer_fish_6",3;
  120.                         message strcharinfo(0), "оО! Большой куш...сорвался!";
  121.                     }
  122.                     Calculate ( @defaultExp, getarg(2), getarg(3), getarg(5) );
  123.                     break;
  124.                 case 6:
  125.                     @loop -= 1;
  126.                     cutin "2013_summer_fish_6",3;
  127.                     message strcharinfo(0), "Опять сорвалось, ну что за!";
  128.                     emotion e_omg;
  129.                     delitem @baitselect, 1;
  130.                     break;
  131.                 case 7:
  132.                     @loop -= 1;
  133.                     cutin "2013_summer_fish_5",3;
  134.                     message strcharinfo(0), "На этот раз сапог от меня не убежит!!";
  135.                     emotion e_ag;
  136.                     @get_item = 2405;
  137.                     delitem @baitselect, 1;
  138.                     @defaultExp = 1;
  139.                     getitem @get_item, 1;
  140.                     Calculate ( @defaultExp, getarg(2), getarg(3), getarg(5) );
  141.                     break;
  142.                 case 8:
  143.                     @loop -= 1;
  144.                     if(rand(1,4) == 3) {
  145.                         cutin "2013_summer_fish_5",3;
  146.                         message strcharinfo(0), "Оооочень большой улов!!";
  147.                         emotion e_ag;
  148.                         if(rand(1,2) == 1) {
  149.                             if(@new_item) @get_item = 6380;
  150.                             if(!@new_item) @get_item = $@Drop[rand(2)];
  151.                             getitem @get_item, 1;
  152.                         } else {
  153.                             cutin "2013_summer_fish_5",3;
  154.                             zeny += rand(50000,75000);
  155.                         }
  156.                     } else {
  157.                         cutin "2013_summer_fish_6",3;
  158.                         message strcharinfo(0), "Оооочень большой улов сорвался...";
  159.                     }
  160.                     delitem @baitselect, 1;
  161.                     @defaultExp = 3;
  162.                     Calculate ( @defaultExp, getarg(2), getarg(3), getarg(5) );
  163.                     break;             
  164.                 default:
  165.                     message strcharinfo(0), "Я даже наживку насадить немогу!";
  166.                     break;
  167.             }
  168.            
  169.             if(@error) {
  170.                 message strcharinfo(0), "ошибка. обратитесь к администрации.";
  171.             }
  172.         sleep2 2000;   
  173.         }
  174.         cutin "", 255;
  175.         message strcharinfo(0), "наживка закончилась";
  176.         end;
  177.     }
  178.  
  179.     OnCancel:
  180.         cutin "", 255;
  181.         end;   
  182. }
  183.  
  184. function    Calculate   {
  185.     if(!getarg(0)) return @error = 1;
  186.     if(!getarg(1)) return @error = 1;
  187.     if(!getarg(2)) return @error = 1;
  188.     if(BaseLevel != 175 && JobLevel != 70) CalculateExp ( BaseLevel, @level_Modifier );
  189.     if(getarg(3) > 0) return;
  190.     @levelMod += getarg(0) * ( getarg(1) + getarg(2) );
  191.     @myLevel = cur_Level + @levelMod;
  192.     if(@myLevel > 600) @levelMod = 1;
  193.     cur_Level += @levelMod;
  194.     dispbottom "[Рыбная Ловля] + "+@levelMod+". Всего ("+cur_Level+" / "+$@FishingLevel[7]+").";
  195.     return;
  196. }
  197.  
  198. function    CalculateExp    {
  199.     if(getarg(0) > 10 && getarg(0) < 50) @bExp += rand(30,50) * (getarg(1) + getarg(1));
  200.     if(getarg(0) > 49 && getarg(0) < 100) @bExp += rand(150,200) * (getarg(1) + getarg(0) * getarg(1));
  201.     if(getarg(0) > 99 && getarg(0) <= 175) @bExp += rand(1500,2000) * (getarg(1) + getarg(0) * getarg(1) + 5000);
  202.     getexp @bExp, 0;
  203.     return;
  204. }
  205. function    Show    {
  206.     mes "[Рыбная Ловля] Всего ("+cur_Level+" / "+$@FishingLevel[7]+").";
  207.     if(cur_Level > 0 && cur_Level < 200) {
  208.         @color$ = "^FF0000";
  209.         @message$ = "[" + @color$ + "||||^000000|||||||||||||||||||||||||||||]";
  210.     }
  211.     if(cur_Level > 199 && cur_Level < 400) {
  212.         @color$ = "^00FF00";
  213.         @message$ = "[" + @color$ + "||||||||||||||||||^000000|||||||||||||||]";
  214.     }
  215.     if(cur_Level > 399 && cur_Level <= 599) {
  216.         @color$ = "^0000FF";
  217.         @message$ = "[" + @color$ + "|||||||||||||||||||||||||^000000||||||||]";
  218.     }
  219.     if(cur_Level == 600) {
  220.         @color$ = "^66DD99";
  221.         @message$ = "[" + @color$ + "|||||||||||||||||||||||||||||||||^000000]";
  222.     }
  223.     mes @message$;
  224.     mes "Рейты : х^FF0000"+$@fishing_Exp+"^000000";
  225.     mes "Ваши улучшения : +^FF0000"+@level_Modifier+"^000000";
  226.     mes " ";
  227.     mes ":::[Другие улучшения]:::";
  228.     mes "^0000FF" + getitemname(5317) +"^000000 + x1";
  229.     close;
  230. }
  231. }
  232. izlude,140,78,6 script  Место для Рыбалки    723,{
  233.     OnStartFishing:
  234.     switch(select("Рыбная Ловля:Покажите мне мои достижения!")){
  235.         case 1:
  236.             mes "На что будем ловить, босс?";
  237.             set .@menu$, "";
  238.             for(set .@i,0; .@i < 4; set .@i, .@i +1){
  239.                 if($@baitID[.@i] != 0) {
  240.                     set .@menu$, .@menu$ + "> ^0000FF "+getitemname($@baitID[.@i])+" ^000000 x"+countitem($@baitID[.@i])+"";
  241.                     set .@menu$, .@menu$ + ":";
  242.                 }
  243.             }      
  244.             set @bait,select(.@menu$)-1;
  245.             if(!countitem($@baitID[@bait])) {
  246.                 message strcharinfo(0), "У меня нет этого предмета.";
  247.                 end;
  248.             }
  249.             @baitselect = $@baitID[@bait];
  250.             @amount = countitem($@baitID[@bait]);
  251.             @fishingMap = 1;
  252.             close2;
  253.             doevent "FishingFunctions::OnFishing";
  254.             end;
  255.         case 2:
  256.             doevent "FishingFunctions::OnShowin";
  257.             end;
  258.     }
  259.    
  260.     OnInit:
  261.     waitingroom "Место для рыбалки",0,strnpcinfo(0) + "::OnStartFishing";
  262.     end;
  263. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement