Newbie Spellweaver
- Joined
- Oct 21, 2017
- Messages
- 71
- Reaction score
- 0
Fixed.
Last edited:
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature currently requires accessing the site using the built-in Safari browser.
no erorsWhen you compile it, no errors in the netbeans console?
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.
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/