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;
- OnFishing:
- Level ( cur_Level );
- Bait ( @baitselect );
- Fishing( @fishingMap, cur_Level, @level_Modifier, $@fishing_Exp, @amount );
- 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;
- setarray $@baitID[0], 909, 908, 903;
- $@fishing_Exp = 1; // 1 = x1 rates.
- end;
- function Level {
- if(getarg(0) == 600) end;
- }
- function Bait {
- if(@baitselect == 903) {
- dispbottom "Отлично, ты используешь крутую наживку!";
- return @level_Modifier = 2;
- }
- return;
- }
- 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) {
- if(!countitem(@baitselect)) {
- dispbottom "нет наживки";
- @loop = 0;
- end;
- }
- message strcharinfo(0), "Осталось наживки : "+ @loop;
- progressbar "green", rand(3,5);
- switch(rand(1,5)) {
- case 1: // ничего
- @loop -= 1;
- dispbottom "Сорвалось :< ";
- delitem @baitselect, 1;
- break;
- case 2: // простая добыча
- @loop -= 1;
- @get_item = $@defaultDrop[rand(2)];
- dispbottom "default drop1";
- delitem @baitselect, 1;
- @defaultExp = 1;
- getitem @get_item, 1;
- Calculate ( @defaultExp, getarg(2), getarg(3) );
- break;
- case 3:
- @loop -= 1;
- dispbottom "Сорвалось :< ";
- delitem @baitselect, 1;
- break;
- case 4:
- @loop -= 1;
- dispbottom "Сорвалось :< ";
- delitem @baitselect, 1;
- break;
- case 5:
- @loop -= 1;
- @get_item = $@Drop[rand(2)];
- dispbottom "default drop2";
- delitem @baitselect, 1;
- @defaultExp = 2;
- getitem @get_item, 1;
- Calculate ( @defaultExp, getarg(2), getarg(3) );
- break;
- default:
- dispbottom "Я даже наживку насадить немогу!";
- break;
- }
- if(@error) {
- dispbottom "ошибка. обратитесь к администрации.";
- }
- }
- message strcharinfo(0), "наживка закончилась";
- end;
- }
- }
- function Calculate {
- if(!getarg(0)) return @error = 1;
- if(!getarg(1)) return @error = 1;
- if(!getarg(2)) return @error = 1;
- @levelMod += getarg(0) * ( getarg(1) + getarg(2) );
- if(cur_Level + @levelMod > 600) @levelMod += 1;
- cur_Level += @levelMod;
- dispbottom "[Рыбная Ловля] + "+@levelMod+". Всего ("+cur_Level+" / "+$@FishingLevel[7]+").";
- 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 <= 600) {
- @color$ = "^0000FF";
- @message$ = "[" + @color$ + "|||||||||||||||||||||||||||||||||^000000]";
- }
- mes @message$;
- mes "Рейты : х"+$@fishing_Exp;
- mes "Ваши улучшения : +"+@level_Modifier;
- close;
- }
- }
- izlude,134,74,6 script Fisher 100,{
- switch(select("Fishing:Show")){
- case 1:
- mes "Выберите наживку";
- set .@menu$, "";
- for(set .@i,0; .@i < 3; 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])) {
- dispbottom "нет наживки";
- end;
- }
- @baitselect = $@baitID[@bait];
- @amount = countitem($@baitID[@bait]);
- @fishingMap = 1;
- doevent "FishingFunctions::OnFishing";
- end;
- case 2:
- doevent "FishingFunctions::OnShowin";
- end;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement