diff options
Diffstat (limited to 'npc/functions/fishing.txt')
-rw-r--r-- | npc/functions/fishing.txt | 32 |
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) { |