SHARE
TWEET

(rAthena) Fishing

existence_dev92 May 31st, 2020 977 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. brasilis,309,72,1   shop    Fisher Shop 564,5317:1000000000,2550:1000000000,2443:1000000000,2764:1000000000,2775:10000
  2.  
  3. -   script  Fishing Spot    -1,{
  4.     disable_items;
  5.  
  6.     if (@Fishing)
  7.         end;
  8.  
  9.     @Fishing = 1;
  10.     pcblockmove getcharid(3),1;
  11.     while (1)
  12.     {
  13.         if (getstatus(SC_WEIGHT90))
  14.         {
  15.             message strcharinfo(0), "You have carried to much weight, please remove some of item from your inventory";
  16.             break;
  17.         }
  18.  
  19.         if (!isequipped(.Fisher_Rod))
  20.         {
  21.             message strcharinfo(0), "Fishing Spot : You need to equip Fishing Rod to begin fishing.";
  22.             break;
  23.         }
  24.  
  25.         if (.isBaitDeleted && countitem(.Fisher_Bait) < 1)
  26.         {
  27.             message strcharinfo(0), "Fishing Spot : You don't have Fishing Bait to begin fishing.";
  28.             break;
  29.         }
  30.         else if (.isBaitEquiped && !isequipped(.Fisher_Bait))
  31.         {
  32.             message strcharinfo(0), "Fishing Spot : You need to equip Fishing Bait to begin fishing.";
  33.             break;
  34.         }
  35.  
  36.         .@waiting = 20;
  37.         if (isequipped(5317))
  38.             .@waiting -= 3;
  39.         if (isequipped(2550))
  40.             .@waiting -= 2;
  41.         if (isequipped(2443))
  42.             .@waiting -= 2;
  43.         if (isequipped(2764))
  44.             .@waiting -= 3;
  45.  
  46.        
  47.         specialeffect2 EF_BEGINSPELL;
  48.         specialeffect2 EF_BEGINSPELL2;
  49.         specialeffect2 EF_LOCKON;
  50.         specialeffect EF_LOCKON;
  51.         progressbar "FF0000", 1;
  52.         specialeffect EF_HIT2;
  53.         specialeffect EF_BUBBLE;
  54.        
  55.         for(.@i = 0; .@i < .@waiting; .@i++)
  56.         {
  57.             emotion ET_DELIGHT, getcharid(3);
  58.             sleep2 1250;
  59.         }
  60.  
  61.        
  62.         .@rate = rand(10000);
  63.         for (.@i = 0; .@i < .n; .@i++)
  64.         {
  65.             if (.@rate < .Fisher_Drops_R[.@i])
  66.             {
  67.                 .@caught_fish[.@caught] = .Fisher_Drops_I[.@i];
  68.                 .@caught++;
  69.             }
  70.         }
  71.         if (.@caught)
  72.         {
  73.             showscript "Got something on the hook..";
  74.             emotion ET_BIGTHROB, getcharid(3);
  75.             if (.@caught == 1)
  76.             {
  77.                 getitem .@caught_fish, 1;
  78.             }
  79.             else
  80.             {
  81.                 .@r = rand(.@caught);
  82.                 getitem .@caught_fish[.@r], 1;
  83.                
  84.             }
  85.             if (.isBaitDeleted)
  86.                 delitem .Fisher_Bait, 1;
  87.             sleep2 1000;
  88.         }
  89.         else
  90.         {
  91.             emotion ET_BIGTHROB, getcharid(3);
  92.             sleep2 1000;
  93.             showscript "Sigh.. Nothing caught, Excited for nothing..";
  94.         }
  95.     }
  96.     @Fishing = 0;
  97.     pcblockmove getcharid(3),0;
  98.     end;
  99.  
  100. OnInit:
  101.     .Fisher_Rod = 2764;
  102.     .Fisher_Bait = 2775;
  103.  
  104.     // is bait will be deleted when getting drops?
  105.     .isBaitDeleted = 0;
  106.  
  107.     // is bait equiped or item ?
  108.     // Equiped bait taking priority to item that will be deleted.
  109.     .isBaitEquiped = 1;
  110.  
  111.     /*
  112.     Example :
  113.         Add(nameid, rate);
  114.     Legends :
  115.         - nameid : item id that will be gained when fishing.
  116.         - rate   : 10000 as 100%, 1000 as 10%...
  117.     */
  118.     function Add;
  119.     freeloop(1);
  120.     Add(501, 10000);
  121.     Add(502,  1000);
  122.     Add(503,  1100);
  123.     Add(504,  2000);
  124.     Add(505,   130);
  125.     Add(506,  7400);
  126.     freeloop(0);
  127.    
  128.     if (.isBaitEquiped)
  129.         .isBaitDeleted = 0;
  130.     end;
  131.  
  132. function    Add {
  133.     .@id = getarg(0, 0);
  134.     .@rate = getarg(1, 0);
  135.     if (.@rate < 1)
  136.         return;
  137.     if (getitemname(.@id) == "null")
  138.         return;
  139.     .Fisher_Drops_I[.n] = .@id;
  140.     .Fisher_Drops_R[.n] = .@rate;
  141.     .n++;
  142.     return;
  143. }
  144.  
  145. }
  146.  
  147. brasilis,312,106,1  duplicate(Fishing Spot) Fishing Spot#1  10237
  148. brasilis,312,97,1   duplicate(Fishing Spot) Fishing Spot#2  10237
  149. brasilis,312,89,1   duplicate(Fishing Spot) Fishing Spot#3  10237
  150. brasilis,325,79,1   duplicate(Fishing Spot) Fishing Spot#4  10237
  151. brasilis,325,67,1   duplicate(Fishing Spot) Fishing Spot#5  10237
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top