So, could you have it like a UnOpenable door that can be replaced by an Openable one?
|
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:
Step 2:Code:public int Replace = 0;
Add this to process
This will make so if its 1 or higher it will go down by 1.Code:if(replace > 0) { replace -= 1; }
Step 3:
So now u could make something like this:
so add to processCode:public void rock() { if(replace == 1) { AddGlobalObj(2932, 3240, 3042, 0, 10); } }
and lets say u making copper rock so add to object click oneCode:rock();
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.Code:case 3042: replace = 20; addItem(995, 1); AddGlobalObj(2932, 3240, 450, 0, 10); break;
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
lol for make a door open just add to object click one:
something like that but instead of addglobalobject use replaceobject void.Code:Case doorID: AddGlobalObj(cordsX, cordsY, doorid, 0, 10); break;
thanks for comments
Pownagee :L
Use arrays:
Then probably in process: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?????? */ }
cant be fucked to finish it off..Code:for(int[] objs : replacedGlobalObjects) { if(objs[5] > 0) objs[5]--; if(objs[5] == 0) { creatsomecrappygaylikefuckedupobject...s.d.ad.a.sd.as.d.asd. } }
do it yourself and learn something..
and last time:
USE JAVA CONVENTIONS ASS HOLE
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..
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |