Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Fishing System V62

Junior Spellweaver
Joined
Sep 16, 2017
Messages
156
Reaction score
36
First of all, note that the guide you're following explicitly says that the add-on is for v75+ servers, while yours is a v62. Make sure that all those packets, constants and functions are also present in your server (for example, do you have the static function catchMonster in MaplePacketCreator.java? Or, how did your UseChairHandler.java look, before? Are you sure this is compatible?).

Now for the actual code; you need to check those functions some more. A few points:
- You have a function called getRandomItem(), but it's never used, since there's no calls to it.
- Math.Random()*3 can return 0, 1 or 2. You should handle this last case aswell.
- You can remove that empty switch with chr.getWorld(), as it's a call to a function that ends up doing nothing, so a (extremely minor, but still) waste of calculations.
- You should remove those two overrides in UseChairHandler and CancelChairHandler, as they'd only throw an error.


This just as a basic read from the code. There may be something more that I didn't notice yet. Besides, there's some code optimization to be done there (that iteration on the whole server every 30 seconds feels potentially painful), but let's focus on the bugs, first, shall we.
 
Upvote 0
Newbie Spellweaver
Joined
Oct 21, 2017
Messages
71
Reaction score
0
First of all, note that the guide you're following explicitly says that the add-on is for v75+ servers, while yours is a v62. Make sure that all those packets, constants and functions are also present in your server (for example, do you have the static function catchMonster in MaplePacketCreator.java? Or, how did your UseChairHandler.java look, before? Are you sure this is compatible?).

Now for the actual code; you need to check those functions some more. A few points:
- You have a function called getRandomItem(), but it's never used, since there's no calls to it.
- Math.Random()*3 can return 0, 1 or 2. You should handle this last case aswell.
- You can remove that empty switch with chr.getWorld(), as it's a call to a function that ends up doing nothing, so a (extremely minor, but still) waste of calculations.
- You should remove those two overrides in UseChairHandler and CancelChairHandler, as they'd only throw an error.


This just as a basic read from the code. There may be something more that I didn't notice yet. Besides, there's some code optimization to be done there (that iteration on the whole server every 30 seconds feels potentially painful), but let's focus on the bugs, first, shall we.

Thank you !
So how i add it to v62 ?
I use leaderms v2 ,
What i need to add for fishing system work?
 
Upvote 0
Junior Spellweaver
Joined
Oct 6, 2009
Messages
196
Reaction score
10
Upvote 0
Newbie Spellweaver
Joined
Oct 21, 2017
Messages
71
Reaction score
0
i've worked on a fishing system a while back and got it to a point where it worked the way i wanted. i made a thread about it when i was working on it to get some help. maybe you could read through it as it might give you some insight on this. remember not to bump the threads as they are kind of old now ;)

http://forum.ragezone.com/f566/maplesolaxia-fishing-system-1134484/
http://forum.ragezone.com/f566/issue-timermanager-1134554/

Thank you !
and its can work for v62 to?
 
Upvote 0
Back
Top