Switch to edit mode.
Name(s): Cast1: Loc = this:Loc(player)
2: if (!(player in this.connected))
3: return player:tell("You must be connected to cast. Type \"connect\" to connect.")
4: elseif (player in this.casts)
5: return player:tell("You've already casted. Type \"reel\" to reel in your line.")
6: elseif (this.fisherstats[player in this.fishers][10] == 0)
7: return player:tell("You're out of worms. You'll have to go to island at (3, 3) and dig up some more.")
8: endif
9: this.casts = {@this.casts, player}
10: this.fisherstats[player in this.fishers][10] = this.fisherstats[player in this.fishers][10] - 1
11: player:tell("You cast out your line.")
12: this:announce(player.name, " casts out a line.")
13: NewRan = random(4)
14: while (player in this.casts)
15: suspend(random(8))
16: if (NewRan == 1)
17: if (!(player in this.casts))
18: return
19: endif
20: fish = this.fish[Loc[1]][Loc[2]]
21: if (fish)
22: caughtfish = fish[random($)]
23: player:tell({"You feel a sharp tug on the line!", "You feel a tug on the line!", "Suddenly, something pulls on the line!", "You feel a slight tug on the line."}[random($)])
24: this:announce("Something tugs on ", player.name, "'s line.")
25: this.catching = {@this.catching, {player, caughtfish}}
26: this.fish[Loc[1]][Loc[2]] = listdelete(this.fish[Loc[1]][Loc[2]], caughtfish in fish)
27: NewLoc = {random(10), random(10)}
28: this.Fish[NewLoc[1]][NewLoc[2]] = {@this.Fish[NewLoc[1]][NewLoc[2]], caughtfish}
29: suspend(random(5) + 2)
30: if (player in this.casts)
31: player:tell("The tension on the line drops, and you realize the fish is gone.")
32: this:announce("The tension on ", player.name, "'s line drops, and the fish is gone.")
33: this.catching = setremove(this.catching, {player, caughtfish})
34: return this.casts = setremove(this.casts, player)
35: endif
36: this.Casts = setremove(this.Casts, player)
37: return
38: endif
39: endif
40: NewRan = random(4)
41: endwhile
42: "Last modified by James (#6397) on Wed May 27 17:17:51 1998 EDT."