summaryrefslogtreecommitdiff
path: root/npc/functions/fishing.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-12-18 12:29:09 -0200
committerJesusaves <cpntb1@ymail.com>2018-12-18 12:29:09 -0200
commit4eb9c2b59dfd77fd0b155dd25571ee5b1c9af658 (patch)
tree00de656212255352b45db489e31fb0db2a476d6d /npc/functions/fishing.txt
parente60627c86c5e4d45482eb731cfc0404029c1b68e (diff)
downloadserverdata-4eb9c2b59dfd77fd0b155dd25571ee5b1c9af658.tar.gz
serverdata-4eb9c2b59dfd77fd0b155dd25571ee5b1c9af658.tar.bz2
serverdata-4eb9c2b59dfd77fd0b155dd25571ee5b1c9af658.tar.xz
serverdata-4eb9c2b59dfd77fd0b155dd25571ee5b1c9af658.zip
Try a tweak on fishing to see if it works
Diffstat (limited to 'npc/functions/fishing.txt')
-rw-r--r--npc/functions/fishing.txt32
1 files changed, 16 insertions, 16 deletions
diff --git a/npc/functions/fishing.txt b/npc/functions/fishing.txt
index e9d52d41f..f3942de79 100644
--- a/npc/functions/fishing.txt
+++ b/npc/functions/fishing.txt
@@ -52,10 +52,26 @@ OnPCLogoutEvent:
end;
}
+// Syntax: fishing()
+// Syntax: fishing ( COMMON, RARE, BAITS )
function script fishing {
///////////////////////////////////////////
// Var initialization
+ .@common_fish=getarg(0, 0);
+ .@rare_fish=getarg(0, 0);
+ if (getarraysize(.@common_fish) < 1 || .@common_fish == 0) {
+ // default fishes
+ setarray .@common_fish,
+ CommonCarp;
+ }
+
+ if (getarraysize(.@rare_fish) < 1 || .@rare_fish == 0) {
+ // default fishes
+ setarray .@rare_fish,
+ GrassCarp;
+ }
+ debugmes("[FISH] Initialized with %d common and %d rare fishes", getarraysize(.@common_fish), getarraysize(.@rare_fish));
.@npc$ = strnpcinfo(0); // the full name of the fishing spot
@@ -105,22 +121,6 @@ function script fishing {
.@fish_id = CommonCarp; // failsafe
- .@common_fish=getvariableofnpc(.common_fish, .@npc$);
- if (getarraysize(.@common_fish) < 1)
- {
- // default fishes
- setarray .@common_fish,
- CommonCarp;
- }
-
- .@rare_fish=getvariableofnpc(.rare_fish, .@npc$);
- if (getarraysize(.@rare_fish) < 1)
- {
- // default fishes
- setarray .@rare_fish,
- GrassCarp;
- }
- debugmes("[FISH] Initialized with %d common and %d rare fishes", getarraysize(.@common_fish), getarraysize(.@rare_fish));
if (getvariableofnpc(.bait_ids[0], .@npc$) < 1)
{