Thread: [Snippet] Spawn Party balloons

Results 1 to 5 of 5
  1. #1 [Snippet] Spawn Party balloons 
    Banned
    Join Date
    Mar 2018
    Posts
    43
    Thanks given
    16
    Thanks received
    1
    Rep Power
    0
    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.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Selseus's Avatar
    Join Date
    Aug 2017
    Posts
    386
    Thanks given
    11
    Thanks received
    73
    Rep Power
    84
    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.
    Reply With Quote  
     

  3. #3  
    Banned

    Join Date
    Jul 2011
    Posts
    1,767
    Thanks given
    493
    Thanks received
    425
    Rep Power
    0
    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
    Reply With Quote  
     

  4. #4  
    Demon dylan002
    Guest
    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
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Oct 2012
    Posts
    142
    Thanks given
    37
    Thanks received
    60
    Rep Power
    122
    Do

    Code:
    int rn = ran.nextInt(rareItems.length);
    Instead of nextInt(10);

    Because if you ever update the size of the array you will have to manually update the size of the randomised integer.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [508] working Falador Drop party!
    By dakotascape in forum Configuration
    Replies: 62
    Last Post: 11-14-2009, 03:19 PM
  2. The Biggest Drop Party!
    By Divide in forum Media
    Replies: 72
    Last Post: 04-12-2009, 06:34 PM
  3. drop party (req)
    By g0dx in forum Requests
    Replies: 4
    Last Post: 11-25-2008, 03:35 AM
  4. Quit RS Drop Party BGS ALL BARROWS
    By Bulby Strife in forum Media
    Replies: 6
    Last Post: 10-13-2008, 03:11 AM
  5. Drop party room
    By i penguin i in forum Tutorials
    Replies: 9
    Last Post: 09-29-2008, 11:39 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •