Thread: Simple Minigame - Puppet Problems

Page 1 of 3 123 LastLast
Results 1 to 10 of 29
  1. #1 Puppet Problems - Updated with Workshop. 
    Whitey
    Guest
    --Minigame - Making Marionettes. By Whitey.--
    Purpose: To add a Small Minigame, In Which you make Marionettes.
    Difficulty: about 3.5/5
    Classes Modified: Client.java
    Source Base and Compatability: Project 16, Probably any.
    Time to Complete: about 5 mins
    Backup Needed? could do, Theres a bit of Code.

    Tutorial:
    Firstly, Make a backup of Client.Java if wanted, Just Incase you add something Wrongly.

    Then, Now, Our Minigame will be called 'puppet problems', So to help new people, we need to add this void
    Code:
    public void PuppetProblems() //puppet problems guide, for newbies!
        {
                                            sendQuest("@[email protected] Problems", 8144);  //Title
                        clearQuestInterface();
                        sendQuest("@[email protected] to Puppet Problems.", 8145);
                        sendQuest("@[email protected] seems that diango has been having a little trouble,", 8147);
                        sendQuest("@[email protected]'s started making Marionettes too Late!", 8148);
                        sendQuest("@[email protected] Requires someone to Help,", 8149);
                        sendQuest("@[email protected] it Looks Like your Just Great for the Job!", 8150);
                        sendQuest("@[email protected] Simple really,", 8152);
                        sendQuest("@[email protected] a torso from one of the boxes, then A Head.", 8153);
                        sendQuest("@[email protected] Arms, Then Legs.", 8154);
                        sendQuest("@[email protected] use the unstrung marionette on the Spinning wheel.", 8155);
                        sendQuest("@[email protected] you've made a marionette, Type its finishing command.", 8157);
                        sendQuest("@[email protected] Finishing command is ::COLOURreward, e.g ::Greenreward", 8158);
                        sendQuest("@[email protected]'ll then get your Xmas Reward! =D", 8158);
                        sendQuestSomething(8143);
                                 showInterface(8134);
                        flushOutStream();
            }
    This void is a help interface that shows up once the user tpyes a command, or whenever you want it to. to make it appear, Just type
    Code:
    PuppetProblems();
    the void can be placed anywhere out of others, I recommend placing it above public boolean process().

    Now, add these commands.
    Code:
    if (command.equalsIgnoreCase("greenreward"))
        {
    if (playerHasItem(6866))
    {
    addItem(Item.randomxmas(), 1);
    deleteItem(6866, getItemSlot(6866), 1);
    }
    else{
    sendMessage("You Need a finished green marionette to do this!");
    }
        }
    
    if (command.equalsIgnoreCase("redreward"))
        {
    if (playerHasItem(6867))
    {
    addItem(Item.randomxmas(), 1);
    deleteItem(6867, getItemSlot(6867), 1);
    }
    else{
    sendMessage("You Need a finished Red marionette to do this!");
    }
        }
    
    if (command.equalsIgnoreCase("bluereward"))
        {
    if (playerHasItem(6865))
    {
    addItem(Item.randomxmas(), 1);
    deleteItem(6865, getItemSlot(6865), 1);
    }
    else{
    sendMessage("You Need a finished blue marionette to do this!");
    }
        }
    These are for when the user has a finished marionette that they want a reward for.

    Next, add these commands
    Code:
        if (command.equalsIgnoreCase("draynor"))
                 {
            teleportToX = 3080;
                    teleportToY = 3249;
            updateRequired = true;
            appearanceUpdateRequired = true;
               sendMessage("Welcome to Draynor, Home of Puppet Problems.");
            sendMessage("Do ::Puppetproblems for help on the Minigame.");
        }
        if (command.equalsIgnoreCase("PuppetProblems"))
            {
                PuppetProblems();
            }
    They allows the person to view the help menu we added earlier, and to teleport to Draynor.

    Now we need the marionette Boxes, use thise code
    Code:
            AddGlobalObject(3078, 3246, 10686, 0, 10); // Blue Heads
            AddGlobalObject(3079, 3246, 10687, 0, 10); // Blue torsos
            AddGlobalObject(3081, 3246, 10688, 0, 10); // Blue arms
            AddGlobalObject(3082, 3246, 10689, 0, 10); // Blue Legs
    
            AddGlobalObject(3075, 3247, 10690, 0, 10); // Red Heads
            AddGlobalObject(3075, 3248, 10691, -1, 10); // Red torsos
            AddGlobalObject(3075, 3250, 10692, 0, 10); // Red arms
            AddGlobalObject(3075, 3251, 10693, 0, 10); // Red legs
    
            AddGlobalObject(3078, 3253, 10694, 0, 10); // Green heads
            AddGlobalObject(3079, 3253, 10695, 0, 10); // Green torsos
            AddGlobalObject(3081, 3253, 10696, 0, 10); // Green arms
            AddGlobalObject(3082, 3253, 10697, 0, 10); // Green heads
    
            AddGlobalObject(3085, 3251, 2644, 0, 10); //Spinning Wheel number one.
            AddGlobalObject(3083, 3249, 11626, 0, 10); // Counter
    Or, Just get the item i'ds and locations and adapt them to your Adding Objects Method.
    The Item id's are
    Code:
    /*ID: 10686 = Puppet heads            1x1    "Box containing blue puppet heads."
    ID: 10687 = Puppet torsos            2x1    "Box containing blue puppet torsos."
    ID: 10688 = Puppet arms                1x1    "Box containing blue puppet arms."
    ID: 10689 = Puppet legs                1x1    "Box containing blue puppet legs."
    ID: 10690 = Puppet heads            1x1    "Box containing red puppet heads."
    ID: 10691 = Puppet torsos            2x1    "Box containing red puppet torsos."
    ID: 10692 = Puppet arms                1x1    "Box containing red puppet arms."
    ID: 10693 = Puppet legs                1x1    "Box containing red puppet legs."
    ID: 10694 = Puppet heads            1x1    "Box containing green puppet heads."
    ID: 10695 = Puppet torsos            2x1    "Box containing green puppet torsos."
    ID: 10696 = Puppet arms                1x1    "Box containing green puppet arms."
    ID: 10697 = Puppet legs                1x1    "Box containing green puppet legs."
    */
    [br]Posted on: July 24, 2007, 04:21:53 AM[hr]Under
    Code:
    switch(objectID) {
    of Object Click one, add
    Code:
    //Puppet Problems
    //Red Puppets.
    case 10691:
    addItem(6871, 1);
    sendMessage("You Grab a Red Torso.");
    break;
    
    case 10690:
    if (playerHasItem(6871))
    {
    addItem(6872, 1);
    deleteItem(6871, getItemSlot(6871), 1);
    }
    else{
    sendMessage("You Need to get a Torso, Then Head, Then Arms, Then legs.");
    }
    break;
    
    case 10692:
    if (playerHasItem(6872))
    {
    addItem(6873, 1);
    deleteItem(6872, getItemSlot(6872), 1);
    }
    else{
    sendMessage("You Need to get a Torso, Then Head, Then Arms, Then legs.");
    }
    break;
    
    case 10693:
    if (playerHasItem(6873))
    {
    addItem(6874, 1);
    deleteItem(6873, getItemSlot(6873), 1);
    }
    else{
    sendMessage("You Need to get a Torso, Then Head, Then Arms, Then legs.");
    }
    
    break;
    
    
    //Blue
    
    case 10687:
    addItem(6875, 1);
    sendMessage("You Grab a Blue Torso.");
    break;
    
    case 10686:
    if (playerHasItem(6875))
    {
    addItem(6876, 1);
    deleteItem(6875, getItemSlot(6875), 1);
    }
    else{
    sendMessage("You Need to get a Torso, Then Head, Then Arms, Then legs.");
    }
    break;
    
    case 10688:
    if (playerHasItem(6876))
    {
    addItem(6877, 1);
    deleteItem(6876, getItemSlot(6876), 1);
    }
    else{
    sendMessage("You Need to get a Torso, Then Head, Then Arms, Then legs.");
    }
    break;
    
    case 10689:
    if (playerHasItem(6877))
    {
    addItem(6878, 1);
    deleteItem(6877, getItemSlot(6877), 1);
    }
    else{
    sendMessage("You Need to get a Torso, Then Head, Then Arms, Then legs.");
    }
    
    break;
    
    
    
    //Green
    
    case 10695:
    addItem(6879, 1);
    sendMessage("You Grab a Green Torso.");
    break;
    
    case 10694:
    if (playerHasItem(6879))
    {
    addItem(6880, 1);
    deleteItem(6879, getItemSlot(6879), 1);
    }
    else{
    sendMessage("You Need to get a Torso, Then Head, Then Arms, Then legs.");
    }
    break;
    
    case 10696:
    if (playerHasItem(6880))
    {
    addItem(6881, 1);
    deleteItem(6880, getItemSlot(6880), 1);
    }
    else{
    sendMessage("You Need to get a Torso, Then Head, Then Arms, Then legs.");
    }
    break;
    
    case 10697:
    if (playerHasItem(6881))
    {
    addItem(6882, 1);
    deleteItem(6881, getItemSlot(6881), 1);
    }
    else{
    sendMessage("You Need to get a Torso, Then Head, Then Arms, Then legs.");
    }
    
    break;
    this handles clicking the boxes, and makes sure the player has the Marionette needed before getting another Part.

    find
    Code:
                                    if (useItemID == 4151 && atObjectID == 1531)
                                    {
                                    sendMessage("Works fool.");
                                    if(foundz[2] == 0){
                                    sendMessage("Hidden found");
                                    sendMessage("You gain a hidden point!");
                                    hiddenPoints += 1;
                                    foundz[2] = 1;
                                    }
                                    }
    and Under it add
    Code:
    else if(useItemID == 6865 && atObjectID == 11626) // Blue Marionette on Counter
                    {
                    addItem(Item.randomxmas(), 1);
                                    sendMessage("You place the marionette on the counter, you Take one of Diangos rewards.");
                                    deleteItem(6865,getItemSlot(6865), 1);
                    }
    
                    else if(useItemID == 6867 && atObjectID == 11626) // Red Marionette on Counter
                    {
                    addItem(Item.randomxmas(), 1);
                                    sendMessage("You place the marionette on the counter, you Take one of Diangos rewards.");
                                    deleteItem(6867,getItemSlot(6867), 1);
                    }
                    
                    else if(useItemID == 6866 && atObjectID == 11626) // Green Marionette on Counter
                    {
                    addItem(Item.randomxmas(), 1);
                                    sendMessage("You place the marionette on the counter, you Take one of Diangos rewards.");
                                    deleteItem(6866,getItemSlot(6866), 1);
                    }
    this doesnt work for all servers, so you may need to just have the command for a reward, rather than using on the table.
    Then Under
    Code:
                                       else if(useItemID == 4832 && atObjectID == 5284) // Bone grinding
                    {
                                    sendMessage("You grind the "+GetItemName(4832)+" and recieve prayer xp.");
                                    addSkillXP((190*playerLevel[5]), 5);
                                    deleteItem(4832,getItemSlot(4832), 1);
                    }
    add
    Code:
    else if(useItemID == 6878 && atObjectID == 2644) // Blue Marionette on Flax Wheel
                    {
                                    sendMessage("You Spin the Marionette onto a String using the Spinning wheel.");
                                    addItem(6865, 1);
                                    deleteItem(6878,getItemSlot(6878), 1);
                    setAnimation(894);
                    }
    
                    else if(useItemID == 6874 && atObjectID == 2644) // Red Marionette on Flax Wheel
                    {
                                    sendMessage("You Spin the Marionette onto a String using the Spinning wheel.");
                                    addItem(6867, 1);
                                    deleteItem(6874,getItemSlot(6874), 1);
                    setAnimation(894);
                    }
                    
                    else if(useItemID == 6882 && atObjectID == 2644) // Green Marionette on Flax Wheel
                    {
                                    sendMessage("You Spin the Marionette onto a String using the Spinning wheel.");
                                    addItem(6866, 1);
                                    deleteItem(6882,getItemSlot(6882), 1);
                    setAnimation(894);
                    }
    This is the bit about strining the marionette.

    Just Before the Last } in Item.java, Add
    Code:
    public static int xmas[] = {6856,6857,6858,6859,6860,6861,6862,6863};
        public static int randomxmas()
        {
            return xmas[(int)(Math.random()*xmas.length)];
        }
    Now your done. Just do :raynor and read the instructions using :uppetproblems.

    Credits 100% me.

    Preview:

    Rep Appreciated, if only for posting the tut, that was the hardest bit.

    To adapt to The Workshop:
    add These Make/Delete Objects, This allows us to Get to the Trapdoor
    Code:
    makeGlobalObject(3090, 3275, 10698, 0, 10); //Trapdoor
    deletethatobject(3092, 3274);//Delete door.
    makeGlobalObject(2009, 4439, 2644, 0, 10); //Spinning Wheel number one.
    makeGlobalObject(2004, 4438, 11626, 0, 10); // Counter
    add These cases in Object Click 1
    Code:
    case 10707:
    teleportToX = 2005;
    teleportToY = 4431;
    heightLevel = 1;
    
    break;
    
    case 10708:
    teleportToX = 2007;
    teleportToY = 4431;
    heightLevel = 0;
    
    break;
    
    case 10699:
    teleportToX = 3091;
    teleportToY = 3275;
    heightLevel = 0;
    break;
    
    case 10698:
    teleportToX = 2004;
    teleportToY = 4427;
    heightLevel = 1;
    PuppetProblems();
    break;
    Now the Command to get in
    Code:
    if (command.equalsIgnoreCase("Workshop"))
    {
    teleportToX = 2007;
    teleportToY = 4431;
    }
    You can just use the Trapdoor, but this is quicker.

    And Now, Just Use The Workshop for the Minigame, I'll make a proper Command and Stuff for it later, when I make Bauble Painting.


    In the Workshop.
     

  2. #2  
    ferter
    Guest
    wow very nice
     

  3. #3  
    Whitey
    Guest
    Thanks, It took longer to make the tut then it did for me to design it
     

  4. #4  
    Registered Member range pk's Avatar
    Join Date
    Sep 2006
    Age
    27
    Posts
    245
    Thanks given
    0
    Thanks received
    3
    Rep Power
    16
    Rep + dude it R.O.C.K
     

  5. #5  
    Whitey
    Guest
    Thanks man.
     

  6. #6  
    Whitey
    Guest
    Note: you Can add Partyhats or other rewards By adding its item code to {6863}, so like {6863,1042}
     

  7. #7  
    Registered Member
    Alex's Avatar
    Join Date
    Apr 2007
    Posts
    1,658
    Thanks given
    0
    Thanks received
    0
    Rep Power
    284
    OWANGE MAN!Rep
    Your password is 354 days old, and has therefore expired.


    Fail
     

  8. #8  
    Whitey
    Guest
    Thanks ^-^ Took ages to write this one lol
     

  9. #9  
    Registered Member 0x19's Avatar
    Join Date
    Jul 2007
    Posts
    84
    Thanks given
    19
    Thanks received
    2
    Rep Power
    1
    Nice i like it
     

  10. #10  
    Whitey
    Guest
    Thanks, thats the Main thing about it, making people like it
     

Page 1 of 3 123 LastLast

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. Simple Orb Minigame
    By john4593 in forum Snippets
    Replies: 3
    Last Post: 05-08-2010, 07:16 PM
  2. Minigame w/ HashMaps (VERY SIMPLE BASE)
    By Andys1481 in forum Tutorials
    Replies: 7
    Last Post: 04-14-2009, 09:13 AM
  3. [525] Simple Problems rep++
    By White. in forum Help
    Replies: 0
    Last Post: 04-10-2009, 04:05 PM
  4. Replies: 11
    Last Post: 03-04-2009, 04:47 PM
  5. God Gladiator Minigame (Simple)
    By Alex_NL in forum Tutorials
    Replies: 5
    Last Post: 09-03-2007, 03: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
  •