Thread: Removing object after click.

Results 1 to 2 of 2
  1. #1 Removing object after click. 
    Registered Member
    Join Date
    May 2013
    Posts
    16
    Thanks given
    4
    Thanks received
    5
    Rep Power
    26
    Ok, so I know how to add a case that removes an object after being click as demonstrated here:

    --clickObject.java--
    case 122:
    c.startAnimation(794);
    c.getItems().addItem(c.getPA().objectClicked2(), 1);
    c.sendMessage("Thanks for donating, here is one free item!");
    c.sendMessage("This can only be clicked once, hope you got something good!");
    c.getPA().checkObjectSpawn(-1, 3305, 2759, 0, 10); //Donor balloons!

    Clicking that calls this, then the balloons disappear (Ballons are 122):

    public static int objectClicked[] = {11732, 4087, 3140, 4151, 6585, 11283, 11235, 20072, 2643, 13736};

    public int objectClicked2() {
    return objectClicked[(int)(Math.random()*objectClicked.length)];
    }

    Although, when you teleport back to the area, logout, or dc of some sort, the balloons spawn back and you're able to click them again. I want to know how to have the balloons vanish forever when clicked by each individual person. Has anyone got ANY ideas?
    Reply With Quote  
     

  2. #2  
    need java lessons
    Eclipse's Avatar
    Join Date
    Aug 2012
    Posts
    4,436
    Thanks given
    686
    Thanks received
    898
    Rep Power
    490
    Quote Originally Posted by NicknKickn View Post
    Ok, so I know how to add a case that removes an object after being click as demonstrated here:

    --clickObject.java--
    case 122:
    c.startAnimation(794);
    c.getItems().addItem(c.getPA().objectClicked2(), 1);
    c.sendMessage("Thanks for donating, here is one free item!");
    c.sendMessage("This can only be clicked once, hope you got something good!");
    c.getPA().checkObjectSpawn(-1, 3305, 2759, 0, 10); //Donor balloons!

    Clicking that calls this, then the balloons disappear (Ballons are 122):

    public static int objectClicked[] = {11732, 4087, 3140, 4151, 6585, 11283, 11235, 20072, 2643, 13736};

    public int objectClicked2() {
    return objectClicked[(int)(Math.random()*objectClicked.length)];
    }

    Although, when you teleport back to the area, logout, or dc of some sort, the balloons spawn back and you're able to click them again. I want to know how to have the balloons vanish forever when clicked by each individual person. Has anyone got ANY ideas?

    Add a boolean saved to the player's char file.

    Quote Originally Posted by jerryrocks317 View Post
    i am 14 and have my own laptop im on almost 24/7 currently creating rsps lol so please get off my thread lol
    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. Replies: 1
    Last Post: 05-01-2011, 04:09 AM
  2. Replies: 20
    Last Post: 12-14-2010, 03:39 AM
  3. Right click remove object?
    By Devilaz in forum Help
    Replies: 4
    Last Post: 04-06-2010, 10:22 AM
  4. Removing Objects in Dev 7 Souce?????
    By helcast in forum Tutorials
    Replies: 4
    Last Post: 01-26-2008, 08:12 AM
  5. Removing Objects In An Area (UNTESTED)
    By Llama in forum Tutorials
    Replies: 10
    Last Post: 06-21-2007, 09:33 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
  •