Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - script FishingFunctions -1,{
- function Fishing; function Calculate;
- function Show; function Level;
- function Bait; function CalculateExp;
- OnFishing:
- Level ( cur_Level );
- Bait ( @baitselect );
- Fishing( @fishingMap, cur_Level, @level_Modifier, $@fishing_Exp, @amount, @level_Mode );
- end;
- OnShowin:
- Show( cur_Level, @level_Modifier, $@fishing_Exp );
- end;
- OnInit:
- setarray $@FishingLevel[0], 50, 125, 175, 220, 300, 450, 525, 600;
- setarray $@Drop[0], 7227, 7228, 7229;
- setarray $@defaultDrop[0], 910, 911, 912, 501, 502, 503, 504, 505, 608;
- setarray $@baitID[0], 915, 908, 903, 632;
- $@fishing_Exp = 1; // 1 = x1 rates.
- end;
- function Level {
- if(getarg(0) >= 600) {
- if(!@level_Mode ) @level_Mode = 1;
- //dispbottom "Ваш навык рыбной ловли уже максимальный. Вы будете получать только Ваш улов, и базовую экспу (если вы не 175)";
- }
- return;
- }
- function Bait {
- @new_item = 0;
- @level_Modifier = 0;
- if(@baitselect == 903) {
- message strcharinfo(0), "Отлично, сейчас испытаем эту новую наживку!!";
- @level_Modifier += 1;
- }
- if(countitem(5317)) {
- dispbottom "У тебя крутая шапка рыбака!";
- @level_Modifier += 1;
- }
- if(@baitselect == 632) {
- message strcharinfo(0), "Отлично, сейчас испытаем эту новую наживку!!";
- @level_Modifier += 2;
- @new_item = 1;
- }
- return @level_Modifier;
- }
- function Fishing {
- if( !getarg(0) ) end; //cheat?:D
- if( getarg(0) == 1) { //izlude fishing guild
- if( !getarg(3) ) $@fishing_Exp = 1; //default x1
- if( !getarg(2) ) @level_Modifier = $@fishing_Exp; //default
- @loop = getarg(4);
- while(@loop) {
- Level ( cur_Level );
- if(!countitem(@baitselect)) {
- message strcharinfo(0), "У меня нет этого предмета.";
- @loop = 0;
- end;
- }
- message strcharinfo(0), "закидываааааааааааааааю!!";
- cutin "2013_summer_fish_1",3;
- sleep2 500;
- cutin "2013_summer_fish_2",3;
- sleep2 100;
- cutin "2013_summer_fish_3",3;
- sleep2 100;
- cutin "2013_summer_fish_4",3;
- sleep2 100;
- dispbottom "Осталось наживки : "+ @loop;
- progressbar "green", rand(3,5);
- switch(rand(1,8)) {
- case 1: // ничего
- @loop -= 1;
- cutin "2013_summer_fish_6",3;
- message strcharinfo(0), "Сорвалось...";
- delitem @baitselect, 1;
- emotion e_sob;
- break;
- case 2: // простая добыча
- cutin "", 255;
- @loop -= 1;
- @get_item = $@defaultDrop[rand(7)];
- delitem @baitselect, 1;
- @defaultExp = 1;
- message strcharinfo(0), "Что-то есть! Сейчас глянем!";
- cutin "2013_summer_fish_5",3;
- getitem @get_item, 1;
- Calculate ( @defaultExp, getarg(2), getarg(3), getarg(5) );
- break;
- case 3:
- @loop -= 1;
- cutin "2013_summer_fish_6",3;
- message strcharinfo(0), "Сапог? САПОГ! Рваный сапог... Но увы, он утонул...";
- emotion e_heh;
- delitem @baitselect, 1;
- break;
- case 4:
- @loop -= 1;
- cutin "2013_summer_fish_5",3;
- message strcharinfo(0), "О, мешочек с золотом!!";
- zeny += rand(1000);
- @defaultExp = 1;
- Calculate ( @defaultExp, getarg(2), getarg(3), getarg(5) );
- delitem @baitselect, 1;
- break;
- case 5:
- @loop -= 1;
- @get_item = $@Drop[rand(2)];
- delitem @baitselect, 1;
- @defaultExp = 2;
- if(rand(1,3) == 2) {
- cutin "2013_summer_fish_5",3;
- message strcharinfo(0), "оО! Большой куш..., мне это нравится!";
- getitem @get_item, 1;
- } else {
- cutin "2013_summer_fish_6",3;
- message strcharinfo(0), "оО! Большой куш...сорвался!";
- }
- Calculate ( @defaultExp, getarg(2), getarg(3), getarg(5) );
- break;
- case 6:
- @loop -= 1;
- cutin "2013_summer_fish_6",3;
- message strcharinfo(0), "Опять сорвалось, ну что за!";
- emotion e_omg;
- delitem @baitselect, 1;
- break;
- case 7:
- @loop -= 1;
- cutin "2013_summer_fish_5",3;
- message strcharinfo(0), "На этот раз сапог от меня не убежит!!";
- emotion e_ag;
- @get_item = 2405;
- delitem @baitselect, 1;
- @defaultExp = 1;
- getitem @get_item, 1;
- Calculate ( @defaultExp, getarg(2), getarg(3), getarg(5) );
- break;
- case 8:
- @loop -= 1;
- if(rand(1,4) == 3) {
- cutin "2013_summer_fish_5",3;
- message strcharinfo(0), "Оооочень большой улов!!";
- emotion e_ag;
- if(rand(1,2) == 1) {
- if(@new_item) @get_item = 6380;
- if(!@new_item) @get_item = $@Drop[rand(2)];
- getitem @get_item, 1;
- } else {
- cutin "2013_summer_fish_5",3;
- zeny += rand(50000,75000);
- }
- } else {
- cutin "2013_summer_fish_6",3;
- message strcharinfo(0), "Оооочень большой улов сорвался...";
- }
- delitem @baitselect, 1;
- @defaultExp = 3;
- Calculate ( @defaultExp, getarg(2), getarg(3), getarg(5) );
- break;
- default:
- message strcharinfo(0), "Я даже наживку насадить немогу!";
- break;
- }
- if(@error) {
- message strcharinfo(0), "ошибка. обратитесь к администрации.";
- }
- sleep2 2000;
- }
- cutin "", 255;
- message strcharinfo(0), "наживка закончилась";
- end;
- }
- OnCancel:
- cutin "", 255;
- end;
- }
- function Calculate {
- if(!getarg(0)) return @error = 1;
- if(!getarg(1)) return @error = 1;
- if(!getarg(2)) return @error = 1;
- if(BaseLevel != 175 && JobLevel != 70) CalculateExp ( BaseLevel, @level_Modifier );
- if(getarg(3) > 0) return;
- @levelMod += getarg(0) * ( getarg(1) + getarg(2) );
- @myLevel = cur_Level + @levelMod;
- if(@myLevel > 600) @levelMod = 1;
- cur_Level += @levelMod;
- dispbottom "[Рыбная Ловля] + "+@levelMod+". Всего ("+cur_Level+" / "+$@FishingLevel[7]+").";
- return;
- }
- function CalculateExp {
- if(getarg(0) > 10 && getarg(0) < 50) @bExp += rand(30,50) * (getarg(1) + getarg(1));
- if(getarg(0) > 49 && getarg(0) < 100) @bExp += rand(150,200) * (getarg(1) + getarg(0) * getarg(1));
- if(getarg(0) > 99 && getarg(0) <= 175) @bExp += rand(1500,2000) * (getarg(1) + getarg(0) * getarg(1) + 5000);
- getexp @bExp, 0;
- return;
- }
- function Show {
- mes "[Рыбная Ловля] Всего ("+cur_Level+" / "+$@FishingLevel[7]+").";
- if(cur_Level > 0 && cur_Level < 200) {
- @color$ = "^FF0000";
- @message$ = "[" + @color$ + "||||^000000|||||||||||||||||||||||||||||]";
- }
- if(cur_Level > 199 && cur_Level < 400) {
- @color$ = "^00FF00";
- @message$ = "[" + @color$ + "||||||||||||||||||^000000|||||||||||||||]";
- }
- if(cur_Level > 399 && cur_Level <= 599) {
- @color$ = "^0000FF";
- @message$ = "[" + @color$ + "|||||||||||||||||||||||||^000000||||||||]";
- }
- if(cur_Level == 600) {
- @color$ = "^66DD99";
- @message$ = "[" + @color$ + "|||||||||||||||||||||||||||||||||^000000]";
- }
- mes @message$;
- mes "Рейты : х^FF0000"+$@fishing_Exp+"^000000";
- mes "Ваши улучшения : +^FF0000"+@level_Modifier+"^000000";
- mes " ";
- mes ":::[Другие улучшения]:::";
- mes "^0000FF" + getitemname(5317) +"^000000 + x1";
- close;
- }
- }
- izlude,140,78,6 script Место для Рыбалки 723,{
- OnStartFishing:
- switch(select("Рыбная Ловля:Покажите мне мои достижения!")){
- case 1:
- mes "На что будем ловить, босс?";
- set .@menu$, "";
- for(set .@i,0; .@i < 4; set .@i, .@i +1){
- if($@baitID[.@i] != 0) {
- set .@menu$, .@menu$ + "> ^0000FF "+getitemname($@baitID[.@i])+" ^000000 x"+countitem($@baitID[.@i])+"";
- set .@menu$, .@menu$ + ":";
- }
- }
- set @bait,select(.@menu$)-1;
- if(!countitem($@baitID[@bait])) {
- message strcharinfo(0), "У меня нет этого предмета.";
- end;
- }
- @baitselect = $@baitID[@bait];
- @amount = countitem($@baitID[@bait]);
- @fishingMap = 1;
- close2;
- doevent "FishingFunctions::OnFishing";
- end;
- case 2:
- doevent "FishingFunctions::OnShowin";
- end;
- }
- OnInit:
- waitingroom "Место для рыбалки",0,strnpcinfo(0) + "::OnStartFishing";
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement