diff options
author | Reid <reidyaro@gmail.com> | 2016-06-20 03:01:48 +0200 |
---|---|---|
committer | Reid <reidyaro@gmail.com> | 2016-06-20 03:27:31 +0200 |
commit | 8ca2baf6b75d49989818ae292d792ca6821bbaad (patch) | |
tree | 48e4392d06271739900802abe1090a81f1df77fb | |
parent | 38e2112581340e83107fb61f69967be592e87752 (diff) | |
download | serverdata-8ca2baf6b75d49989818ae292d792ca6821bbaad.tar.gz serverdata-8ca2baf6b75d49989818ae292d792ca6821bbaad.tar.bz2 serverdata-8ca2baf6b75d49989818ae292d792ca6821bbaad.tar.xz serverdata-8ca2baf6b75d49989818ae292d792ca6821bbaad.zip |
Fix a repeat issue on the fishing script.
-rw-r--r-- | npc/functions/fishing.txt | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/npc/functions/fishing.txt b/npc/functions/fishing.txt index 8083e375..d36e9ed1 100644 --- a/npc/functions/fishing.txt +++ b/npc/functions/fishing.txt @@ -6,6 +6,18 @@ function script fishing { + if (countitem(FishingRod) < 1) + { + narrator + l("You don't have a @@.", getitemlink(FishingRod)); + return -1; + } + if (Fishing_Tick > gettimetick(2) - 20) + { + closedialog; + return -3; + } + .@wait_time_min = 8000; .@wait_time_max = 35000; .@pull_rand_max = 800; @@ -17,12 +29,6 @@ function script fishing { setarray .@bait_ids[0], SmallTentacles, Bread, Aquada, UrchinMeat, TortugaTongue, Tentacles; - if (countitem(FishingRod) < 1) - { - narrator - l("You don't have a @@.", getitemlink(FishingRod)); - return -1; - } L_ChooseBait: .@curr_wait_times = 0; @@ -60,6 +66,7 @@ L_ChooseBait: return 0; } + Fishing_Tick = gettimetick(2); .@bait = .@user_items[.@idx - 1]; delitem .@bait, 1; @@ -72,6 +79,7 @@ L_Wait: sleep2 rand(.@wait_time_min, .@wait_time_max); .@tick = gettimetick(0); + Fishing_Tick = 0; getmapxy (.@mapbis$, .@xbis, .@ybis, 0); if (.@xbis != .@x || .@ybis != .@y || !compare (.@map$, .@mapbis$)) |