Sveiki visi, cia jums atiduodu koda savo daryta kuri galesite panaudoti savo serveryje, aiskus jai ismatote java.
Ka jis daro:
Apsaugo nuo item-dupes, nebereikia anti-phx apsaugu pirkti uz 600lt ar daugiau.
Instrukcija:
- Methodose kur yra [b]wear, bankItem, addItem[/b]: iskvieciam AntiDupe.addKnownItem
- Methodose kur yra [b]remove, fromBank, deleteItem[/b]: AntiDupe.deleteKnownItem
- Judate i client.java ir sudetat sia funkcija, iskvieciat [b]AntiDupe = new AntiDupe(this);
- Methoduose kur yra [b]wear, bankItem, addItem, remove, fromBank, deleteItem[/b] iskvieciam AntiDupe.checkLegit
- Paketuose kur naudoja itemus ant [b]object, npcs, items[/b] iskvieciam: AntiDupe.checkLegit
- Methoduose kur yra [b]highalch, lowalch[/b] irgi iskvieciame AntiDupe.checkLegit
- Iskvieciam [b]Call loadKnownItems()[/b] methode: [b]initialize()[/b]
Patarimai:
- Kur tu nori patikrinti uzdupintus itemus rasai: AntiDupe.checkLegit
/**
* @author: ChillOut
*/
public class AntiDupe {
public void loadKnownItems() {
for (int i = 0; i 0) {
knownItems[itemID] += itemsToDelete;
itemsToDelete = 0;
}
return;
}
if (totalItems(itemID) < knownItems[itemID]) {
knownItems[itemID] = totalItems(itemID);
return;
}
}
public int totalItems(int itemID) {
int tItems = 0;
for (int i = 0; i < c.playerEquipment.length; i++) {
if (c.playerEquipment[i] == itemID) {
tItems += c.playerEquipmentN[i];
}
}
for (int i = 0; i < c.playerItems.length; i++) {
if (c.playerItems[i]-1 == itemID) {
tItems += c.playerItemsN[i];
}
}
for (int i = 0; i < c.bankItems.length; i++) {
if (c.bankItems[i]-1 == itemID) {
tItems += c.bankItemsN[i];
}
}
return tItems;
}
public AntiDupe(client c) {
this.c = c;
}
private client c;
}
100% Pure coding..
Made by ChillOut!