Fishing Championship Tournament.
This commit is contained in:
parent
6e0be1da25
commit
b6bdcefdfa
18
trunk/dist/game/config/General.properties
vendored
18
trunk/dist/game/config/General.properties
vendored
@ -686,6 +686,24 @@ AltLottery3NumberRate = 0.2
|
||||
AltLottery2and1NumberPrize = 200
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Fishing Tournament
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Enable or disable the Fishing Tournament system
|
||||
AltFishChampionshipEnabled = True
|
||||
|
||||
# Item Id used as reward
|
||||
AltFishChampionshipRewardItemId = 57
|
||||
|
||||
# Item count used as reward (for the 5 first winners)
|
||||
AltFishChampionshipReward1 = 800000
|
||||
AltFishChampionshipReward2 = 500000
|
||||
AltFishChampionshipReward3 = 300000
|
||||
AltFishChampionshipReward4 = 200000
|
||||
AltFishChampionshipReward5 = 100000
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Item Auction
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -2,7 +2,7 @@
|
||||
Nice to meet you! Interested in learning about fishing?<br>
|
||||
There's no better way to enjoy a warm summer day, I can promise you that!<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3156200">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<html><body>Fishing Guild Member Perelin:<br>
|
||||
If you're a nature lover, fishing is the thing for you. Fresh air, warm sun, cool water -- it's perfect!<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3156300">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<html><body>Fishing Guild Member Mishini:<br>
|
||||
Welcome! Care to take a reel and try your luck? This is the best season for fishing in these parts!<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3156400">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<html><body>Fishing Guild Member Ogord:<br>
|
||||
Welcome! Interested in learning how to fish? I warn you, it's an addictive hobby!<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3156500">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -2,7 +2,7 @@
|
||||
Have you ever caught a fish? No? Want to learn? There's no more enjoyable hobby, I promise you.<br>
|
||||
It can also be profitable -- I'll buy anything you don't want to keep!<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3156600">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -2,7 +2,7 @@
|
||||
Nice to meet you! I am a Fishing Guild Member Bleaker.<br>
|
||||
In addition to selling fishing equipment, I also teach various fishing techniques. Ah, and I can take your fish, too. Whatever your fishing needs, you've come to the right place!<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3156700">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<html><body>Fishing Guild Member Pamfus:<br>
|
||||
Do you like fishing? You know I do! Nothing else calms your mind and spirit like spending a quiet afternoon with a fine rod and reel.<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3156800">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -2,7 +2,7 @@
|
||||
Gludin Harbor is one of the best places for beginners to learn how to fish. Head on down to the beach and try your luck!<br>
|
||||
I sell bait, and if you catch any fish I'll be happy to buy them from you.<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3156900">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -3,7 +3,7 @@ So did you hook a big one?<br>
|
||||
Fishing isn't as easy as it looks. If you want to be successful, you need to use the right bait at the right spot at the right time.<br>
|
||||
Come see me when you need the right equipment and I'll set you up.<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3157000">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -2,7 +2,7 @@
|
||||
Welcome! Want to learn how to fish?<br>
|
||||
There's no better way to spend a leisurely afternoon, matching wits and muscles with some elusive quarry...<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3157100">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -2,7 +2,7 @@
|
||||
Everything is plentiful here in Giran, which is why so many people spend their leisure time fishing. Care to try it?<br>
|
||||
Ah, pardon me -- I forgot to introduce myself! I am Ofulle, the only officially licensed fishing professional in this territory! Come see me whenever you need bait, fishing gear or want to sell the fish you've caught. I'll by anything...except mermaids, that is! Ha ha ha!<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3157200">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -2,7 +2,7 @@
|
||||
Nice to meet you! I am Monakan.<br>
|
||||
Besides teaching you how to fish, I also sell the fishing gear you'll need. Oh, and I'll buy any fish you catch. In other words, this is your one-stop fishing shop!<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3157300">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<html><body>Fishing Guild Member Willeri:<br>
|
||||
Fishing has become all the rage in these parts! Of course, there are the serious fishermen, and then there are those who just want an excuse to daydream drowsily in the sun. Which one are you, I wonder?<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3157400">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -2,7 +2,7 @@
|
||||
There's no better place for fishing than Innadril. Wet and warm all year round, beautiful scenery, exotic locales. Best place in the whole world!<br>
|
||||
I mean, how can you go wrong in a place that boasts a "city of water"!<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3157500">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -2,7 +2,7 @@
|
||||
It's a mistake to think that there are only hunters here, just because the name of this place is "Hunter's Village." Many great fisherman have also come from here! Including me! Ha ha ha!<br>
|
||||
Well, care to go fishing? Let's not waste a minute of this beautiful weather!<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3157600">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -2,7 +2,7 @@
|
||||
You know, the king is an avid fisherman himself -- and quite a good one, in fact.<br>
|
||||
Aden is filled with prime fishing spots. How about spending this beautiful day on the shores of one of them?<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3157700">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -2,7 +2,7 @@
|
||||
Welcome, my young friend! Nice to meet you! It's a great day to go fishing!<br>
|
||||
My family have been members of the fishing guild since my great-grandfather joined. In fact, that's why I was sent here to Rune. Not only is the fishing particularly challenging here, but it's become something of a hobby among the elite.<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3157800">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<html><body>Fishing Guild Member Klaw:<br>
|
||||
Thanks to its many mountain streams and lakes, Goddard is a prime fishing spot. People come from all over to test their skill and try their luck here. You interested?<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3157900">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -2,7 +2,7 @@
|
||||
The fishing spots near here are the only ones in Elmore from which you can catch actual sea fish. Back during the Elmoreden Empire, they were famous throughout the kingdom. Now the lack of ships has revitalized them.<br>
|
||||
Care to give it a try? If you catch something good, be sure to show it to me!<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3169600">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -2,7 +2,7 @@
|
||||
Do you know about these hot springs? The effects of the nearby Forge of Gods has created a whole network of them around here. Even more surprising, <font color="LEVEL">there are special species of fish living in these hot springs. How can any fisherman worth the name ignore an opportunity like that!</font><br>
|
||||
Enjoy the fishing here and let me know if you need anything!<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3169700">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -2,7 +2,7 @@
|
||||
Hey, good to see you! You came here to fish, right?<br>
|
||||
Well, it's a better way to spend an afternoon than breaking your back in some dark and dank mine!<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3198900">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<html><body>Fishing Guild Member Galba:<br>
|
||||
Excellent! If you have anything else this good, bring it to me right away!<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3198900">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 517">Sell fish.</a>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<html><body>Fishing Guild Member Galba:<br>
|
||||
If you want to catch the biggest, use the best -- that's my motto. When you want to upgrade your gear, come find me.<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3198900">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 517">Sell fish.</a>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<html><body>Fishing Guild Member Galba:<br>
|
||||
Pal, you seem to have made a mistake. There's nothing here to buy!<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3198900">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 517">Sell fish.</a>
|
||||
|
@ -2,7 +2,7 @@
|
||||
Rainbow Springs is a fishing heaven! There's no place like it.<br>
|
||||
Not only are the fish large and fat, but <font color="LEVEL">several fisherman have even fished up a Clan Hall War Decree</font>. Before you start fishing, let me know if you need any gear or have anything to sell.<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3200700">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
@ -2,7 +2,7 @@
|
||||
Some call me the "doctor of fishing," some think I'm just all wet. Ha ha!<br>
|
||||
Of course, I sell fishing gear and teach a variety of fishing techniques. I'll also buy any fish you've caught!<br>
|
||||
<a action="bypass player_help 7561.htm#7561">Ask how to fish.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Fishing Contest</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishingChampionship">Fishing Contest.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_FishSkillList">Learn fishing skill.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Buy 3234800">Buy/Sell/Refund.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 009">Sell fish.</a><br>
|
||||
|
44
trunk/dist/game/data/html/fisherman/championship/fish_event001.htm
vendored
Normal file
44
trunk/dist/game/data/html/fisherman/championship/fish_event001.htm
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
<html><title>The Fishing King Championship Tournament</title><body>
|
||||
Fishing Guild Member:<br>
|
||||
The Fishing King Championship Tournament is currently underway! In case you haven't heard, the tournament is an event funded by members of the Fishing Guild to promote the sport of fishing. Anyone who catches a big fish during the competition will be awarded prizes.<br>
|
||||
After the event is over, those of you who appear on the winners list can claim your prize money from a Fishing Guild member. Remember, you must claim your prize no later than <font color="LEVEL">one week after the event ends</font>!<br>
|
||||
This list will be updated in %refresh% minute(s)! <br>
|
||||
<center><a action="bypass -h npc_%objectId%_FishingReward">Claim Prize</a><br>
|
||||
<font color="LEVEL">Fishing King Rankings</font></center>
|
||||
<table width=280>
|
||||
<tr>
|
||||
<td width=70 align=center>Ranking</td>
|
||||
<td width=110 align=center>Fisherman</td>
|
||||
<td width=80 align=center>Length</td>
|
||||
</tr>
|
||||
%TABLE%
|
||||
</table><br>
|
||||
<center><font color="LEVEL">List of Prize Items</font></center>
|
||||
<table width=280>
|
||||
<tr>
|
||||
<td width=70 align=center>Ranking</td>
|
||||
<td width=110 align=center>Reward Item</td>
|
||||
<td width=80 align=center>Quantity</td>
|
||||
</tr><tr>
|
||||
<td width=70 align=center>1st</td>
|
||||
<td width=110 align=center>%prizeItem%</td>
|
||||
<td width=80 align=center>%prizeFirst%</td>
|
||||
</tr><tr>
|
||||
<td width=70 align=center>2nd</td>
|
||||
<td width=110 align=center>%prizeItem%</td>
|
||||
<td width=80 align=center>%prizeTwo%</td>
|
||||
</tr><tr>
|
||||
<td width=70 align=center>3rd</td>
|
||||
<td width=110 align=center>%prizeItem%</td>
|
||||
<td width=80 align=center>%prizeThree%</td>
|
||||
</tr><tr>
|
||||
<td width=70 align=center>4th</td>
|
||||
<td width=110 align=center>%prizeItem%</td>
|
||||
<td width=80 align=center>%prizeFour%</td>
|
||||
</tr><tr>
|
||||
<td width=70 align=center>5th</td>
|
||||
<td width=110 align=center>%prizeItem%</td>
|
||||
<td width=80 align=center>%prizeFive%</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body></html>
|
43
trunk/dist/game/data/html/fisherman/championship/fish_event002.htm
vendored
Normal file
43
trunk/dist/game/data/html/fisherman/championship/fish_event002.htm
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
<html><title>The Fishing King Championship Tournament</title><body>
|
||||
Ahoy! Here are the results of last week's Fishing King Championship Tournament!<br>
|
||||
Do you see your name on the list? If you do, claim your prize money!<br>
|
||||
Remember, you have only <font color="LEVEL">one week</font> to claim your prize.<br>
|
||||
Don't fret if your name isn't listed this time. Next week, there will be a new group of winners!<br>
|
||||
<font color="LEVEL">Fishing King Rankings</font></center>
|
||||
<table width=280>
|
||||
<tr>
|
||||
<td width=70 align=center>Ranking</td>
|
||||
<td width=110 align=center>Fisherman</td>
|
||||
<td width=80 align=center>Length</td>
|
||||
</tr>
|
||||
%TABLE%
|
||||
</table><br>
|
||||
<center><font color="LEVEL">List of Prize Items</font></center>
|
||||
<table width=280>
|
||||
<tr>
|
||||
<td width=70 align=center>Ranking</td>
|
||||
<td width=110 align=center>Reward Item</td>
|
||||
<td width=80 align=center>Quantity</td>
|
||||
</tr><tr>
|
||||
<td width=70 align=center>1st</td>
|
||||
<td width=110 align=center>%prizeItem%</td>
|
||||
<td width=80 align=center>%prizeFirst%</td>
|
||||
</tr><tr>
|
||||
<td width=70 align=center>2nd</td>
|
||||
<td width=110 align=center>%prizeItem%</td>
|
||||
<td width=80 align=center>%prizeTwo%</td>
|
||||
</tr><tr>
|
||||
<td width=70 align=center>3rd</td>
|
||||
<td width=110 align=center>%prizeItem%</td>
|
||||
<td width=80 align=center>%prizeThree%</td>
|
||||
</tr><tr>
|
||||
<td width=70 align=center>4th</td>
|
||||
<td width=110 align=center>%prizeItem%</td>
|
||||
<td width=80 align=center>%prizeFour%</td>
|
||||
</tr><tr>
|
||||
<td width=70 align=center>5th</td>
|
||||
<td width=110 align=center>%prizeItem%</td>
|
||||
<td width=80 align=center>%prizeFive%</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body></html>
|
4
trunk/dist/game/data/html/fisherman/championship/fish_event003.htm
vendored
Normal file
4
trunk/dist/game/data/html/fisherman/championship/fish_event003.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><title>The Fishing King Championship Tournament</title><body>
|
||||
The winners of the Fishing King Championship Tournament are currently being determined.<br>
|
||||
Results will be posted shortly.
|
||||
</body></html>
|
5
trunk/dist/game/data/html/fisherman/championship/fish_event_reward001.htm
vendored
Normal file
5
trunk/dist/game/data/html/fisherman/championship/fish_event_reward001.htm
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><title>The Fishing King Championship Tournament</title><body>
|
||||
Congratulations!<br>
|
||||
Here's your prize! You're a true fisherman!<br>
|
||||
Good luck next week!
|
||||
</body></html>
|
4
trunk/dist/game/data/html/fisherman/championship/no_fish_event001.htm
vendored
Normal file
4
trunk/dist/game/data/html/fisherman/championship/no_fish_event001.htm
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<html><title>The Fishing King Championship Tournament</title><body>
|
||||
There are currently no recorded results available.<br>
|
||||
Please try again at a later date.
|
||||
</body></html>
|
5
trunk/dist/game/data/html/fisherman/championship/no_fish_event_reward001.htm
vendored
Normal file
5
trunk/dist/game/data/html/fisherman/championship/no_fish_event_reward001.htm
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
<html><title>The Fishing King Championship Tournament</title><body>
|
||||
Sorry, but I can't find your name on the winners' list.<br>
|
||||
Unfortunately, I can't offer you a prize at this time.<br>
|
||||
<font color="LEVEL">I wish you a better luck in the next Fishing King Championship Tournament!</font>
|
||||
</body></html>
|
@ -1,40 +0,0 @@
|
||||
<html>
|
||||
<title>Fishing King Championship Tournament</title>
|
||||
<body>
|
||||
Fishing Guild Member:<br><br>
|
||||
Ahoy! Here are the results of last week's Fishing King Championship Tournament!<br>
|
||||
Do you see your name on the list? If you do, claim your prize money!<br>
|
||||
Remember, you have only <font color="LEVEL">one week</font> to claim your prize.<br>
|
||||
Don't fret if your name isn't listed this time. Next week, there will be a new group of winners!<br>
|
||||
This list will be updated in 0 minute(s)!<br><br>
|
||||
<center>
|
||||
<a action="bypass -h npc_%objectId%_Link fisherman/fishing_championship.htm">Claim Prize</a><br>
|
||||
</center>
|
||||
<center>
|
||||
<table width=270 border=0 bgcolor="111111">
|
||||
<tr>
|
||||
<td width=50 align=center>Ranking </td><td width=150 align=center>Fisherman </td><td width=70 align=center>Length </td>
|
||||
</tr></table>
|
||||
<table width=270 border=0>
|
||||
<tr><td width=50></td><td width=150></td><td width=70></td></tr>
|
||||
<tr><td width=50 align=center>1st </td><td width=150 align=center>Not Working</td><td width=70 align=center>00.00</td></tr>
|
||||
<tr><td width=50 align=center>2nd </td><td width=150 align=center>Not Working</td><td width=70 align=center>00.00</td></tr>
|
||||
<tr><td width=50 align=center>3rd </td><td width=150 align=center>Not Working</td><td width=70 align=center>00.00</td></tr>
|
||||
<tr><td width=50 align=center>4th </td><td width=150 align=center>Not Working</td><td width=70 align=center>00.00</td></tr>
|
||||
<tr><td width=50 align=center>5th </td><td width=150 align=center>Not Working</td><td width=70 align=center>00.00</td></tr>
|
||||
</table></center><br>
|
||||
List of Prize Items
|
||||
<center>
|
||||
<table width=270 border=0 bgcolor="111111">
|
||||
<tr><td width=50 align=center>Ranking </td><td width=150 align=center>Reward Item </td><td width=70 align=center>Quantity </td>
|
||||
</tr></table>
|
||||
<table width=270 border=0>
|
||||
<tr><td width=50></td><td width=150></td><td width=70></td></tr>
|
||||
<tr><td width=50 align=center>1st </td><td align=center width=150>Adena </td><td width=70 align=center>800000</td></tr>
|
||||
<tr><td width=50 align=center>2nd </td><td align=center width=150>Adena </td><td width=70 align=center>500000</td></tr>
|
||||
<tr><td width=50 align=center>3rd </td><td align=center width=150>Adena </td><td width=70 align=center>300000</td></tr>
|
||||
<tr><td width=50 align=center>4th </td><td align=center width=150>Adena </td><td width=70 align=center>200000</td></tr>
|
||||
<tr><td width=50 align=center>5th </td><td align=center width=150>Adena </td><td width=70 align=center>100000</td></tr>
|
||||
</table>
|
||||
</center>
|
||||
</body></html>
|
6
trunk/dist/sql/game/fishing_championship.sql
vendored
Normal file
6
trunk/dist/sql/game/fishing_championship.sql
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
DROP TABLE IF EXISTS `fishing_championship`;
|
||||
CREATE TABLE IF NOT EXISTS `fishing_championship` (
|
||||
`player_name` VARCHAR(35) NOT NULL,
|
||||
`fish_length` DOUBLE(10,3) NOT NULL,
|
||||
`rewarded` INT(1) NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
@ -610,6 +610,13 @@ public final class Config
|
||||
public static float ALT_LOTTERY_4_NUMBER_RATE;
|
||||
public static float ALT_LOTTERY_3_NUMBER_RATE;
|
||||
public static long ALT_LOTTERY_2_AND_1_NUMBER_PRIZE;
|
||||
public static boolean ALT_FISH_CHAMPIONSHIP_ENABLED;
|
||||
public static int ALT_FISH_CHAMPIONSHIP_REWARD_ITEM;
|
||||
public static int ALT_FISH_CHAMPIONSHIP_REWARD_1;
|
||||
public static int ALT_FISH_CHAMPIONSHIP_REWARD_2;
|
||||
public static int ALT_FISH_CHAMPIONSHIP_REWARD_3;
|
||||
public static int ALT_FISH_CHAMPIONSHIP_REWARD_4;
|
||||
public static int ALT_FISH_CHAMPIONSHIP_REWARD_5;
|
||||
public static boolean ALT_ITEM_AUCTION_ENABLED;
|
||||
public static int ALT_ITEM_AUCTION_EXPIRED_AFTER;
|
||||
public static long ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID;
|
||||
@ -1930,6 +1937,13 @@ public final class Config
|
||||
ALT_LOTTERY_4_NUMBER_RATE = General.getFloat("AltLottery4NumberRate", 0.2f);
|
||||
ALT_LOTTERY_3_NUMBER_RATE = General.getFloat("AltLottery3NumberRate", 0.2f);
|
||||
ALT_LOTTERY_2_AND_1_NUMBER_PRIZE = General.getLong("AltLottery2and1NumberPrize", 200);
|
||||
ALT_FISH_CHAMPIONSHIP_ENABLED = General.getBoolean("AltFishChampionshipEnabled", true);
|
||||
ALT_FISH_CHAMPIONSHIP_REWARD_ITEM = General.getInt("AltFishChampionshipRewardItemId", 57);
|
||||
ALT_FISH_CHAMPIONSHIP_REWARD_1 = General.getInt("AltFishChampionshipReward1", 800000);
|
||||
ALT_FISH_CHAMPIONSHIP_REWARD_2 = General.getInt("AltFishChampionshipReward2", 500000);
|
||||
ALT_FISH_CHAMPIONSHIP_REWARD_3 = General.getInt("AltFishChampionshipReward3", 300000);
|
||||
ALT_FISH_CHAMPIONSHIP_REWARD_4 = General.getInt("AltFishChampionshipReward4", 200000);
|
||||
ALT_FISH_CHAMPIONSHIP_REWARD_5 = General.getInt("AltFishChampionshipReward5", 100000);
|
||||
ALT_ITEM_AUCTION_ENABLED = General.getBoolean("AltItemAuctionEnabled", true);
|
||||
ALT_ITEM_AUCTION_EXPIRED_AFTER = General.getInt("AltItemAuctionExpiredAfter", 14);
|
||||
ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID = General.getInt("AltItemAuctionTimeExtendsOnBid", 0) * 1000;
|
||||
|
@ -108,6 +108,7 @@ import com.l2jserver.gameserver.instancemanager.ClanHallManager;
|
||||
import com.l2jserver.gameserver.instancemanager.CoupleManager;
|
||||
import com.l2jserver.gameserver.instancemanager.CursedWeaponsManager;
|
||||
import com.l2jserver.gameserver.instancemanager.DayNightSpawnManager;
|
||||
import com.l2jserver.gameserver.instancemanager.FishingChampionshipManager;
|
||||
import com.l2jserver.gameserver.instancemanager.FortManager;
|
||||
import com.l2jserver.gameserver.instancemanager.FortSiegeManager;
|
||||
import com.l2jserver.gameserver.instancemanager.FourSepulchersManager;
|
||||
@ -362,6 +363,11 @@ public class GameServer
|
||||
CoupleManager.getInstance();
|
||||
}
|
||||
|
||||
if (Config.ALT_FISH_CHAMPIONSHIP_ENABLED)
|
||||
{
|
||||
FishingChampionshipManager.getInstance();
|
||||
}
|
||||
|
||||
TaskManager.getInstance();
|
||||
|
||||
AntiFeedManager.getInstance().registerEvent(AntiFeedManager.GAME_ID);
|
||||
|
@ -30,6 +30,7 @@ import com.l2jserver.gameserver.datatables.OfflineTradersTable;
|
||||
import com.l2jserver.gameserver.instancemanager.CHSiegeManager;
|
||||
import com.l2jserver.gameserver.instancemanager.CastleManorManager;
|
||||
import com.l2jserver.gameserver.instancemanager.CursedWeaponsManager;
|
||||
import com.l2jserver.gameserver.instancemanager.FishingChampionshipManager;
|
||||
import com.l2jserver.gameserver.instancemanager.GlobalVariablesManager;
|
||||
import com.l2jserver.gameserver.instancemanager.GrandBossManager;
|
||||
import com.l2jserver.gameserver.instancemanager.ItemAuctionManager;
|
||||
@ -541,6 +542,13 @@ public class Shutdown extends Thread
|
||||
GlobalVariablesManager.getInstance().storeMe();
|
||||
_log.info("Global Variables Manager: Variables saved(" + tc.getEstimatedTimeAndRestartCounter() + "ms).");
|
||||
|
||||
// Save Fishing tournament data
|
||||
if (Config.ALT_FISH_CHAMPIONSHIP_ENABLED)
|
||||
{
|
||||
FishingChampionshipManager.getInstance().shutdown();
|
||||
_log.info("Fishing Championship data has been saved.");
|
||||
}
|
||||
|
||||
// Save items on ground before closing
|
||||
if (Config.SAVE_DROPPED_ITEM)
|
||||
{
|
||||
|
@ -0,0 +1,549 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.instancemanager;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.datatables.ItemTable;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2NpcInstance;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jserver.util.Rnd;
|
||||
|
||||
/**
|
||||
* @author n0nam3
|
||||
* @date 08/08/2010 15:11
|
||||
*/
|
||||
public class FishingChampionshipManager
|
||||
{
|
||||
protected static final Logger _log = Logger.getLogger(FishingChampionshipManager.class.getName());
|
||||
|
||||
private static final String INSERT = "INSERT INTO fishing_championship(player_name,fish_length,rewarded) VALUES (?,?,?)";
|
||||
private static final String DELETE = "DELETE FROM fishing_championship";
|
||||
private static final String SELECT = "SELECT `player_name`, `fish_length`, `rewarded` FROM fishing_championship";
|
||||
|
||||
private static final FishingChampionshipManager _instance = new FishingChampionshipManager();
|
||||
|
||||
public static FishingChampionshipManager getInstance()
|
||||
{
|
||||
return _instance;
|
||||
}
|
||||
|
||||
protected long _enddate = 0;
|
||||
protected final List<String> _playersName = new ArrayList<>();
|
||||
protected final List<String> _fishLength = new ArrayList<>();
|
||||
protected final List<String> _winPlayersName = new ArrayList<>();
|
||||
protected final List<String> _winFishLength = new ArrayList<>();
|
||||
protected final List<Fisher> _tmpPlayers = new ArrayList<>();
|
||||
protected final List<Fisher> _winPlayers = new ArrayList<>();
|
||||
protected double _minFishLength = 0;
|
||||
protected boolean _needRefresh = true;
|
||||
|
||||
private FishingChampionshipManager()
|
||||
{
|
||||
restoreData();
|
||||
refreshWinResult();
|
||||
recalculateMinLength();
|
||||
|
||||
if (_enddate <= System.currentTimeMillis())
|
||||
{
|
||||
_enddate = System.currentTimeMillis();
|
||||
new finishChamp().run();
|
||||
}
|
||||
else
|
||||
{
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(new finishChamp(), _enddate - System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
|
||||
protected void setEndOfChamp()
|
||||
{
|
||||
Calendar finishtime = Calendar.getInstance();
|
||||
finishtime.setTimeInMillis(_enddate);
|
||||
finishtime.set(Calendar.MINUTE, 0);
|
||||
finishtime.set(Calendar.SECOND, 0);
|
||||
finishtime.add(Calendar.DAY_OF_MONTH, 6);
|
||||
finishtime.set(Calendar.DAY_OF_WEEK, 3);
|
||||
finishtime.set(Calendar.HOUR_OF_DAY, 19);
|
||||
_enddate = finishtime.getTimeInMillis();
|
||||
}
|
||||
|
||||
private void restoreData()
|
||||
{
|
||||
_enddate = GlobalVariablesManager.getInstance().getLong("fishChampionshipEnd", 0);
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection())
|
||||
{
|
||||
PreparedStatement statement = con.prepareStatement(SELECT);
|
||||
ResultSet rs = statement.executeQuery();
|
||||
while (rs.next())
|
||||
{
|
||||
int rewarded = rs.getInt("rewarded");
|
||||
if (rewarded == 0)
|
||||
{
|
||||
_tmpPlayers.add(new Fisher(rs.getString("player_name"), rs.getDouble("fish_length"), 0));
|
||||
}
|
||||
else if (rewarded > 0)
|
||||
{
|
||||
_winPlayers.add(new Fisher(rs.getString("player_name"), rs.getDouble("fish_length"), rewarded));
|
||||
}
|
||||
}
|
||||
rs.close();
|
||||
statement.close();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
_log.log(Level.WARNING, "FishingChampionshipManager: can't restore fishing championship info: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void newFish(L2PcInstance pl, int lureId)
|
||||
{
|
||||
if (!Config.ALT_FISH_CHAMPIONSHIP_ENABLED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
double len = Rnd.get(60, 89) + (Rnd.get(0, 1000) / 1000.);
|
||||
if ((lureId >= 8484) && (lureId <= 8486))
|
||||
{
|
||||
len += Rnd.get(0, 3000) / 1000.;
|
||||
}
|
||||
|
||||
pl.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_CAUGHT_A_FISH_S1_IN_LENGTH).addString(String.valueOf(len)));
|
||||
|
||||
if (_tmpPlayers.size() < 5)
|
||||
{
|
||||
for (Fisher fisher : _tmpPlayers)
|
||||
{
|
||||
if (fisher.getName().equalsIgnoreCase(pl.getName()))
|
||||
{
|
||||
if (fisher.getLength() < len)
|
||||
{
|
||||
fisher.setLength(len);
|
||||
pl.sendPacket(SystemMessageId.BECAUSE_OF_THE_SIZE_OF_FISH_CAUGHT_YOU_WILL_BE_REGISTERED_IN_THE_RANKING);
|
||||
recalculateMinLength();
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
_tmpPlayers.add(new Fisher(pl.getName(), len, 0));
|
||||
pl.sendPacket(SystemMessageId.BECAUSE_OF_THE_SIZE_OF_FISH_CAUGHT_YOU_WILL_BE_REGISTERED_IN_THE_RANKING);
|
||||
recalculateMinLength();
|
||||
}
|
||||
else if (_minFishLength < len)
|
||||
{
|
||||
for (Fisher fisher : _tmpPlayers)
|
||||
{
|
||||
if (fisher.getName().equalsIgnoreCase(pl.getName()))
|
||||
{
|
||||
if (fisher.getLength() < len)
|
||||
{
|
||||
fisher.setLength(len);
|
||||
pl.sendPacket(SystemMessageId.BECAUSE_OF_THE_SIZE_OF_FISH_CAUGHT_YOU_WILL_BE_REGISTERED_IN_THE_RANKING);
|
||||
recalculateMinLength();
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Fisher minFisher = null;
|
||||
double minLen = 99999.;
|
||||
for (Fisher fisher : _tmpPlayers)
|
||||
{
|
||||
if (fisher.getLength() < minLen)
|
||||
{
|
||||
minFisher = fisher;
|
||||
minLen = minFisher.getLength();
|
||||
}
|
||||
}
|
||||
_tmpPlayers.remove(minFisher);
|
||||
_tmpPlayers.add(new Fisher(pl.getName(), len, 0));
|
||||
pl.sendPacket(SystemMessageId.BECAUSE_OF_THE_SIZE_OF_FISH_CAUGHT_YOU_WILL_BE_REGISTERED_IN_THE_RANKING);
|
||||
recalculateMinLength();
|
||||
}
|
||||
}
|
||||
|
||||
private void recalculateMinLength()
|
||||
{
|
||||
double minLen = 99999.;
|
||||
for (Fisher fisher : _tmpPlayers)
|
||||
{
|
||||
if (fisher.getLength() < minLen)
|
||||
{
|
||||
minLen = fisher.getLength();
|
||||
}
|
||||
}
|
||||
_minFishLength = minLen;
|
||||
}
|
||||
|
||||
public long getTimeRemaining()
|
||||
{
|
||||
return (_enddate - System.currentTimeMillis()) / 60000;
|
||||
}
|
||||
|
||||
public String getWinnerName(int par)
|
||||
{
|
||||
if (_winPlayersName.size() >= par)
|
||||
{
|
||||
return _winPlayersName.get(par - 1);
|
||||
}
|
||||
|
||||
return "None";
|
||||
}
|
||||
|
||||
public String getCurrentName(int par)
|
||||
{
|
||||
if (_playersName.size() >= par)
|
||||
{
|
||||
return _playersName.get(par - 1);
|
||||
}
|
||||
|
||||
return "None";
|
||||
}
|
||||
|
||||
public String getFishLength(int par)
|
||||
{
|
||||
if (_winFishLength.size() >= par)
|
||||
{
|
||||
return _winFishLength.get(par - 1);
|
||||
}
|
||||
|
||||
return "0";
|
||||
}
|
||||
|
||||
public String getCurrentFishLength(int par)
|
||||
{
|
||||
if (_fishLength.size() >= par)
|
||||
{
|
||||
return _fishLength.get(par - 1);
|
||||
}
|
||||
|
||||
return "0";
|
||||
}
|
||||
|
||||
public boolean isWinner(String playerName)
|
||||
{
|
||||
for (String name : _winPlayersName)
|
||||
{
|
||||
if (name.equals(playerName))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void getReward(L2PcInstance pl)
|
||||
{
|
||||
for (Fisher fisher : _winPlayers)
|
||||
{
|
||||
if (fisher.getName().equalsIgnoreCase(pl.getName()))
|
||||
{
|
||||
if (fisher.getRewardType() != 2)
|
||||
{
|
||||
int rewardCnt = 0;
|
||||
for (int x = 0; x < _winPlayersName.size(); x++)
|
||||
{
|
||||
if (_winPlayersName.get(x).equalsIgnoreCase(pl.getName()))
|
||||
{
|
||||
switch (x)
|
||||
{
|
||||
case 0:
|
||||
rewardCnt = Config.ALT_FISH_CHAMPIONSHIP_REWARD_1;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
rewardCnt = Config.ALT_FISH_CHAMPIONSHIP_REWARD_2;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
rewardCnt = Config.ALT_FISH_CHAMPIONSHIP_REWARD_3;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
rewardCnt = Config.ALT_FISH_CHAMPIONSHIP_REWARD_4;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
rewardCnt = Config.ALT_FISH_CHAMPIONSHIP_REWARD_5;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
fisher.setRewardType(2);
|
||||
if (rewardCnt > 0)
|
||||
{
|
||||
pl.addItem("fishing_reward", Config.ALT_FISH_CHAMPIONSHIP_REWARD_ITEM, rewardCnt, null, true);
|
||||
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage();
|
||||
html.setFile(pl.getHtmlPrefix(), "data/html/fisherman/championship/fish_event_reward001.htm");
|
||||
pl.sendPacket(html);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void showMidResult(L2PcInstance pl)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage();
|
||||
|
||||
if (_needRefresh)
|
||||
{
|
||||
html.setFile(pl.getHtmlPrefix(), "data/html/fisherman/championship/fish_event003.htm");
|
||||
pl.sendPacket(html);
|
||||
|
||||
refreshResult();
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(new needRefresh(), 60000);
|
||||
return;
|
||||
}
|
||||
|
||||
html.setFile(pl.getHtmlPrefix(), "data/html/fisherman/championship/fish_event002.htm");
|
||||
|
||||
String str = null;
|
||||
for (int x = 1; x <= 5; x++)
|
||||
{
|
||||
str += "<tr><td width=70 align=center>" + x + "</td>";
|
||||
str += "<td width=110 align=center>" + getCurrentName(x) + "</td>";
|
||||
str += "<td width=80 align=center>" + getCurrentFishLength(x) + "</td></tr>";
|
||||
}
|
||||
html.replace("%TABLE%", str);
|
||||
html.replace("%prizeItem%", ItemTable.getInstance().getTemplate(Config.ALT_FISH_CHAMPIONSHIP_REWARD_ITEM).getName());
|
||||
html.replace("%prizeFirst%", String.valueOf(Config.ALT_FISH_CHAMPIONSHIP_REWARD_1));
|
||||
html.replace("%prizeTwo%", String.valueOf(Config.ALT_FISH_CHAMPIONSHIP_REWARD_2));
|
||||
html.replace("%prizeThree%", String.valueOf(Config.ALT_FISH_CHAMPIONSHIP_REWARD_3));
|
||||
html.replace("%prizeFour%", String.valueOf(Config.ALT_FISH_CHAMPIONSHIP_REWARD_4));
|
||||
html.replace("%prizeFive%", String.valueOf(Config.ALT_FISH_CHAMPIONSHIP_REWARD_5));
|
||||
pl.sendPacket(html);
|
||||
}
|
||||
|
||||
public void showChampScreen(L2PcInstance pl, L2NpcInstance npc)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage();
|
||||
html.setFile(pl.getHtmlPrefix(), "data/html/fisherman/championship/fish_event001.htm");
|
||||
|
||||
String str = null;
|
||||
for (int x = 1; x <= 5; x++)
|
||||
{
|
||||
str += "<tr><td width=70 align=center>" + x + "</td>";
|
||||
str += "<td width=110 align=center>" + getWinnerName(x) + "</td>";
|
||||
str += "<td width=80 align=center>" + getFishLength(x) + "</td></tr>";
|
||||
}
|
||||
html.replace("%TABLE%", str);
|
||||
html.replace("%prizeItem%", ItemTable.getInstance().getTemplate(Config.ALT_FISH_CHAMPIONSHIP_REWARD_ITEM).getName());
|
||||
html.replace("%prizeFirst%", String.valueOf(Config.ALT_FISH_CHAMPIONSHIP_REWARD_1));
|
||||
html.replace("%prizeTwo%", String.valueOf(Config.ALT_FISH_CHAMPIONSHIP_REWARD_2));
|
||||
html.replace("%prizeThree%", String.valueOf(Config.ALT_FISH_CHAMPIONSHIP_REWARD_3));
|
||||
html.replace("%prizeFour%", String.valueOf(Config.ALT_FISH_CHAMPIONSHIP_REWARD_4));
|
||||
html.replace("%prizeFive%", String.valueOf(Config.ALT_FISH_CHAMPIONSHIP_REWARD_5));
|
||||
html.replace("%refresh%", String.valueOf(getTimeRemaining()));
|
||||
html.replace("%objectId%", String.valueOf(npc.getObjectId()));
|
||||
pl.sendPacket(html);
|
||||
}
|
||||
|
||||
public void shutdown()
|
||||
{
|
||||
GlobalVariablesManager.getInstance().set("fishChampionshipEnd", _enddate);
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection())
|
||||
{
|
||||
PreparedStatement statement = con.prepareStatement(DELETE);
|
||||
statement.execute();
|
||||
statement.close();
|
||||
|
||||
for (Fisher fisher : _winPlayers)
|
||||
{
|
||||
statement = con.prepareStatement(INSERT);
|
||||
statement.setString(1, fisher.getName());
|
||||
statement.setDouble(2, fisher.getLength());
|
||||
statement.setInt(3, fisher.getRewardType());
|
||||
statement.execute();
|
||||
statement.close();
|
||||
}
|
||||
|
||||
for (Fisher fisher : _tmpPlayers)
|
||||
{
|
||||
statement = con.prepareStatement(INSERT);
|
||||
statement.setString(1, fisher.getName());
|
||||
statement.setDouble(2, fisher.getLength());
|
||||
statement.setInt(3, 0);
|
||||
statement.execute();
|
||||
statement.close();
|
||||
}
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
_log.log(Level.WARNING, "FishingChampionshipManager: can't update infos: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void refreshResult()
|
||||
{
|
||||
_needRefresh = false;
|
||||
|
||||
_playersName.clear();
|
||||
_fishLength.clear();
|
||||
|
||||
Fisher fisher1;
|
||||
Fisher fisher2;
|
||||
|
||||
for (int x = 0; x <= (_tmpPlayers.size() - 1); x++)
|
||||
{
|
||||
for (int y = 0; y <= (_tmpPlayers.size() - 2); y++)
|
||||
{
|
||||
fisher1 = _tmpPlayers.get(y);
|
||||
fisher2 = _tmpPlayers.get(y + 1);
|
||||
if (fisher1.getLength() < fisher2.getLength())
|
||||
{
|
||||
_tmpPlayers.set(y, fisher2);
|
||||
_tmpPlayers.set(y + 1, fisher1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int x = 0; x <= (_tmpPlayers.size() - 1); x++)
|
||||
{
|
||||
_playersName.add(_tmpPlayers.get(x).getName());
|
||||
_fishLength.add(String.valueOf(_tmpPlayers.get(x).getLength()));
|
||||
}
|
||||
}
|
||||
|
||||
protected void refreshWinResult()
|
||||
{
|
||||
_winPlayersName.clear();
|
||||
_winFishLength.clear();
|
||||
|
||||
Fisher fisher1;
|
||||
Fisher fisher2;
|
||||
|
||||
for (int x = 0; x <= (_winPlayers.size() - 1); x++)
|
||||
{
|
||||
for (int y = 0; y <= (_winPlayers.size() - 2); y++)
|
||||
{
|
||||
fisher1 = _winPlayers.get(y);
|
||||
fisher2 = _winPlayers.get(y + 1);
|
||||
if (fisher1.getLength() < fisher2.getLength())
|
||||
{
|
||||
_winPlayers.set(y, fisher2);
|
||||
_winPlayers.set(y + 1, fisher1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int x = 0; x <= (_winPlayers.size() - 1); x++)
|
||||
{
|
||||
_winPlayersName.add(_winPlayers.get(x).getName());
|
||||
_winFishLength.add(String.valueOf(_winPlayers.get(x).getLength()));
|
||||
}
|
||||
}
|
||||
|
||||
private class finishChamp implements Runnable
|
||||
{
|
||||
protected finishChamp()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
_winPlayers.clear();
|
||||
for (Fisher fisher : _tmpPlayers)
|
||||
{
|
||||
fisher.setRewardType(1);
|
||||
_winPlayers.add(fisher);
|
||||
}
|
||||
_tmpPlayers.clear();
|
||||
|
||||
refreshWinResult();
|
||||
setEndOfChamp();
|
||||
shutdown();
|
||||
|
||||
_log.info("FishingChampionshipManager : new event period start.");
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(new finishChamp(), _enddate - System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
|
||||
private class needRefresh implements Runnable
|
||||
{
|
||||
protected needRefresh()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
_needRefresh = true;
|
||||
}
|
||||
}
|
||||
|
||||
private class Fisher
|
||||
{
|
||||
private double _length;
|
||||
private final String _name;
|
||||
private int _reward;
|
||||
|
||||
public Fisher(String name, double length, int rewardType)
|
||||
{
|
||||
_name = name;
|
||||
_length = length;
|
||||
_reward = rewardType;
|
||||
}
|
||||
|
||||
public void setLength(double value)
|
||||
{
|
||||
_length = value;
|
||||
}
|
||||
|
||||
public void setRewardType(int value)
|
||||
{
|
||||
_reward = value;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return _name;
|
||||
}
|
||||
|
||||
public int getRewardType()
|
||||
{
|
||||
return _reward;
|
||||
}
|
||||
|
||||
public double getLength()
|
||||
{
|
||||
return _length;
|
||||
}
|
||||
}
|
||||
}
|
@ -20,13 +20,17 @@ package com.l2jserver.gameserver.model.actor.instance;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.datatables.SkillTreesData;
|
||||
import com.l2jserver.gameserver.enums.InstanceType;
|
||||
import com.l2jserver.gameserver.instancemanager.FishingChampionshipManager;
|
||||
import com.l2jserver.gameserver.model.L2SkillLearn;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
import com.l2jserver.gameserver.model.base.AcquireSkillType;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExAcquirableSkillListByClass;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
public final class L2FishermanInstance extends L2MerchantInstance
|
||||
@ -61,6 +65,35 @@ public final class L2FishermanInstance extends L2MerchantInstance
|
||||
{
|
||||
showFishSkillList(player);
|
||||
}
|
||||
else if (command.startsWith("FishingChampionship"))
|
||||
{
|
||||
if (Config.ALT_FISH_CHAMPIONSHIP_ENABLED)
|
||||
{
|
||||
FishingChampionshipManager.getInstance().showChampScreen(player, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
sendHtml(player, this, "no_fish_event001.htm");
|
||||
}
|
||||
}
|
||||
else if (command.startsWith("FishingReward"))
|
||||
{
|
||||
if (Config.ALT_FISH_CHAMPIONSHIP_ENABLED)
|
||||
{
|
||||
if (FishingChampionshipManager.getInstance().isWinner(player.getName()))
|
||||
{
|
||||
FishingChampionshipManager.getInstance().getReward(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
sendHtml(player, this, "no_fish_event_reward001.htm");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sendHtml(player, this, "no_fish_event001.htm");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
super.onBypassFeedback(player, command);
|
||||
@ -90,4 +123,11 @@ public final class L2FishermanInstance extends L2MerchantInstance
|
||||
player.sendPacket(new ExAcquirableSkillListByClass(skills, AcquireSkillType.FISHING));
|
||||
}
|
||||
}
|
||||
|
||||
private static void sendHtml(L2PcInstance player, L2Npc npc, String htmlName)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/fisherman/championship/" + htmlName);
|
||||
player.sendPacket(html);
|
||||
}
|
||||
}
|
||||
|
@ -11938,7 +11938,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
public void startFishCombat(boolean isNoob, boolean isUpperGrade)
|
||||
{
|
||||
_fishCombat = new L2Fishing(this, _fish, isNoob, isUpperGrade);
|
||||
_fishCombat = new L2Fishing(this, _fish, isNoob, isUpperGrade, _lure.getId());
|
||||
}
|
||||
|
||||
public void endFishing(boolean win)
|
||||
|
@ -22,6 +22,7 @@ import java.util.concurrent.Future;
|
||||
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.datatables.FishingMonstersData;
|
||||
import com.l2jserver.gameserver.instancemanager.FishingChampionshipManager;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.events.AbstractScript;
|
||||
@ -49,6 +50,7 @@ public class L2Fishing implements Runnable
|
||||
private int _fishCurHp;
|
||||
private final double _regenHp;
|
||||
private final boolean _isUpperGrade;
|
||||
private final int _lureId;
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
@ -76,7 +78,7 @@ public class L2Fishing implements Runnable
|
||||
}
|
||||
}
|
||||
|
||||
public L2Fishing(L2PcInstance Fisher, L2Fish fish, boolean isNoob, boolean isUpperGrade)
|
||||
public L2Fishing(L2PcInstance Fisher, L2Fish fish, boolean isNoob, boolean isUpperGrade, int lureId)
|
||||
{
|
||||
_fisher = Fisher;
|
||||
_fishMaxHp = fish.getFishHp();
|
||||
@ -85,6 +87,7 @@ public class L2Fishing implements Runnable
|
||||
_fishId = fish.getItemId();
|
||||
_time = fish.getCombatDuration();
|
||||
_isUpperGrade = isUpperGrade;
|
||||
_lureId = lureId;
|
||||
final int lureType;
|
||||
if (isUpperGrade)
|
||||
{
|
||||
@ -160,6 +163,7 @@ public class L2Fishing implements Runnable
|
||||
{
|
||||
_fisher.sendPacket(SystemMessageId.YOU_CAUGHT_SOMETHING);
|
||||
_fisher.addItem("Fishing", _fishId, 1, null, true);
|
||||
FishingChampionshipManager.getInstance().newFish(_fisher, _lureId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,6 +18,10 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.clientpackets;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.instancemanager.FishingChampionshipManager;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
/**
|
||||
* Format: (ch) just a trigger
|
||||
* @author -Wooden-
|
||||
@ -35,7 +39,16 @@ public final class RequestExFishRanking extends L2GameClientPacket
|
||||
@Override
|
||||
protected void runImpl()
|
||||
{
|
||||
_log.info("C5: RequestExFishRanking");
|
||||
final L2PcInstance activeChar = getClient().getActiveChar();
|
||||
if (activeChar == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (Config.ALT_FISH_CHAMPIONSHIP_ENABLED)
|
||||
{
|
||||
FishingChampionshipManager.getInstance().showMidResult(activeChar);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -43,4 +56,4 @@ public final class RequestExFishRanking extends L2GameClientPacket
|
||||
{
|
||||
return _C__D0_18_REQUESTEXFISHRANKING;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user