Thread: Replace object for some time

Page 1 of 3 123 LastLast
Results 1 to 10 of 25
  1. #1 Replace object for some time 
    I LOVE CHEESE


    Join Date
    Oct 2007
    Age
    29
    Posts
    1,153
    Thanks given
    7
    Thanks received
    8
    Rep Power
    104
    Purpose: To show how to replace an object for some time.
    Difficult: 0
    Tested Source: pimpscape, should work in all.
    Classes modified: Client.java

    Step 1:
    Declare this:
    Code:
    public int Replace = 0;
    Step 2:
    Add this to process
    Code:
    if(replace > 0) {
    		replace -= 1;
    }
    This will make so if its 1 or higher it will go down by 1.
    Step 3:
    So now u could make something like this:
    Code:
    public void rock() {
    if(replace == 1) {
    AddGlobalObj(2932, 3240, 3042, 0, 10);
    }
    }
    so add to process
    Code:
    rock();
    and lets say u making copper rock so add to object click one
    Code:
    case 3042:
    replace = 20;
    addItem(995, 1);
    AddGlobalObj(2932, 3240, 450, 0, 10);
    break;
    So when timer get to 1 it will go back to copper rock and dosent matter when it goes to 0 copper rock will still be there till u mine again and get replaced with an empty rock.
    This can help to thieving, mining or other thing u want to replace xD
    i guess this will hlp a bit but u can make better than this.

    Credits: 99% Requa, 1% me


    Reply With Quote  
     

  2. #2  
    DeltaScape is Pro!!

    Join Date
    Feb 2008
    Age
    29
    Posts
    743
    Thanks given
    4
    Thanks received
    5
    Rep Power
    77
    So, could you have it like a UnOpenable door that can be replaced by an Openable one?
    Reply With Quote  
     

  3. #3  
    Registered Member
    Lil Str Kid's Avatar
    Join Date
    Jul 2007
    Age
    31
    Posts
    1,302
    Thanks given
    169
    Thanks received
    71
    Rep Power
    260
    Quote Originally Posted by T0X1C View Post
    So, could you have it like a UnOpenable door that can be replaced by an Openable one?
    Toxic ud need to do more then that for what u want..


    Reply With Quote  
     

  4. #4  
    I LOVE CHEESE


    Join Date
    Oct 2007
    Age
    29
    Posts
    1,153
    Thanks given
    7
    Thanks received
    8
    Rep Power
    104
    lol for make a door open just add to object click one:
    Code:
    Case doorID:
    AddGlobalObj(cordsX, cordsY, doorid, 0, 10);
    break;
    something like that but instead of addglobalobject use replaceobject void.


    Reply With Quote  
     

  5. #5  
    Registered Member
    Lil Str Kid's Avatar
    Join Date
    Jul 2007
    Age
    31
    Posts
    1,302
    Thanks given
    169
    Thanks received
    71
    Rep Power
    260
    yep correct SODIO


    Reply With Quote  
     

  6. #6  
    I LOVE CHEESE


    Join Date
    Oct 2007
    Age
    29
    Posts
    1,153
    Thanks given
    7
    Thanks received
    8
    Rep Power
    104
    thanks for comments


    Reply With Quote  
     

  7. #7  
    Registered Member E . J . E's Avatar
    Join Date
    Jul 2008
    Age
    29
    Posts
    248
    Thanks given
    1
    Thanks received
    0
    Rep Power
    27
    Pownagee :L
    Шιтн Rєgαяds,
    Σlιαs Jσяdαп Σlbαққαlι; 010'

    Reply With Quote  
     

  8. #8  
    Registered Member
    wizzyt21's Avatar
    Join Date
    Aug 2007
    Posts
    1,167
    Thanks given
    49
    Thanks received
    12
    Rep Power
    156
    Use arrays:
    Code:
    pubic int[][] replacedGlobalObjects = new int[500];
    public void startReplaceOfObject(int objectId, int[] coords, int replaceId)
    {
        int index = Tools.getFreeArrayIndex(replacedGlobalObjects);
        if (index <= -1) return;
        replacedGlobalObjects[index][0] = objectId;
        replacedGlobalObjects[index][1] = coords[0];
        replacedGlobalObjects[index][2] = coords[1];
        replacedGlobalObjects[index][3] = coords[2];
        replacedGlobalObjects[index][4] = replaceId;
        replacedGlobalObjects[index][5] = 120;/* The FUKIN timer K?????? */
    }
    Then probably in process:
    Code:
    for(int[] objs : replacedGlobalObjects)
    {
            if(objs[5] > 0) objs[5]--;
            if(objs[5] == 0)
            {
                  creatsomecrappygaylikefuckedupobject...s.d.ad.a.sd.as.d.asd.
             }
    }
    cant be fucked to finish it off..
    do it yourself and learn something..

    and last time:
    USE JAVA CONVENTIONS ASS HOLE
    YOU JUST GOT KNOCKED THE F*CK UP.
    Reply With Quote  
     

  9. #9  
    I LOVE CHEESE


    Join Date
    Oct 2007
    Age
    29
    Posts
    1,153
    Thanks given
    7
    Thanks received
    8
    Rep Power
    104
    why would i waste my time making code to be realesed if some1 wants some arrays get them their self?


    Reply With Quote  
     

  10. #10  
    Registered Member
    wizzyt21's Avatar
    Join Date
    Aug 2007
    Posts
    1,167
    Thanks given
    49
    Thanks received
    12
    Rep Power
    156
    Quote Originally Posted by SODIO View Post
    why would i waste my time making code to be realesed if some1 wants some arrays get them their self?
    1. You're gonna be fukin using 900 gay timers on your fucked up server and waste your time..
    2. Lagg like hell I don't give a ****..
    3. 1 Timer for 1 object? I don't think anyone would be that stupid to fuckin do that..
    4. Mine = easier to use and more convenient..
    5. I'm 5 years more experienced than you in either any programming language, I know what I'm doing..
    YOU JUST GOT KNOCKED THE F*CK UP.
    Reply With Quote  
     

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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •