Very poor way of handling party balloon handling. Maybe rename the thread to party balloon event command or something.
I guess this could be really easy to add to an object for sure.
|
Hey guys found something that was kinda fun for me and my little cousin.
I've only done this on a 667 but im sure this is REALLY easy to convert to any 317 (if a conversion is even needed)
any player that can use the ;; object command will be able to spawn these balloons.
Issues:
make a better random item list if you love your eco haha.
CBA to find the correct stomp animation im sure its easy to find though.
1. Open ObjectHandler.java (or what ever handles your ingame object options)
2. Add this code inside of 'handleOption1()' (or whatever method handles the first option of every object)
Code:else if(id == 121) { player.setNextAnimation(new Animation(902)); player.addWalkStep(object.getX(), object.getY(), player.getX(), player.getY(), true); World.destroySpawnedObject(object, false); int[] rareItems = {512, 512, 512, /*fury*/6585, 512, /*phat*/1042, 512, /*dclaw*/14484, 512, 512, 512}; Random ran = new Random(); int rn = ran.nextInt(10); Item item = new Item(rareItems[rn]); World.addGroundItem(item, object.getLocation(), player, false, 20L, true); }
3. type ;; object 121 ingame and watch your players go crazy lol.
Very poor way of handling party balloon handling. Maybe rename the thread to party balloon event command or something.
I guess this could be really easy to add to an object for sure.
some code is unnecessary, but hey, it's a beginning i'm glad to see that contribution is done! I hope you feel proud, you should be from your accomplishment!
if you want to know what code could be improved, feel free to add me on skype or discord
You could easily add the full thing. make a container that will add player items then an object to initiate the timer then a timer for them to drop. when they are opened remove the item from the container. Pretty easy
Do
Instead of nextInt(10);Code:int rn = ran.nextInt(rareItems.length);
Because if you ever update the size of the array you will have to manually update the size of the randomised integer.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |