Guest User

Untitled

a guest
Jan 20th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.46 KB | None | 0 0
  1. findPlayer("pc:2763207").addWeapon(name);
  2. //#CLIENTSIDE
  3. function onWeaponFired() {
  4.     if (!player.fishing) {
  5.         //check if fishing in water
  6.         player.reeling = false;
  7.         player.fishing = true;
  8.         disabledefmovement();
  9.         setani("miracleman4_fishing2_cast", NULL);
  10.         settimer(int(random(3, 10)));
  11.     }
  12. }
  13.  
  14. function onTimeout() {
  15.     if (!player.reeling) {
  16.         player.chat = "Reel it in!";
  17.         player.reeling = true;
  18.         settimer(1);
  19.     }
  20.     sleep(1);
  21.     if (player.reeling) {
  22.         gotAway();
  23.         player.reeling = false;
  24.     }
  25. }
  26.  
  27. function GraalControl.onKeyDown(code, key) {
  28.     if (key == "s" && player.reeling == true) {
  29.         player.reeling = false;
  30.         if (int(random(1, 5)) == 2) {
  31.             gotAway();
  32.         } else {
  33.             caughtFish();
  34.             setani("miracleman4_fishing2_catch", NULL);
  35.         }
  36.     } else if (key == "s" && !player.reeling && player.fishing) {
  37.         gotAway();
  38.     }
  39. }
  40.  
  41. function caughtFish() {
  42.     temp.fishtype = "Pike";
  43.     player.fishing = false;
  44.     enabledefmovement();
  45.     setani("idle", NULL);
  46.     player.chat = "You caught a "@temp.fishtype@"!";
  47. }
  48.  
  49. function gotAway() {
  50.     player.fishing = false;
  51.     enabledefmovement();
  52.     setani("idle", NULL);
  53.     player.chat = "It got away!";
  54. }
  55.  
  56. function noNibble() {
  57.     player.fishing = false;
  58.     enabledefmovement();
  59.     setani("idle", NULL);
  60.     player.chat = "Not even a nibble...";
  61. }
Add Comment
Please, Sign In to add comment