Code:
public void handlePortal(int req, int x, int y, int h, int[] additems, int[] quantity) {
if (c.dungKills >= req) {
c.getPA().movePlayer(x, y, h);
for (int i=0;i<additems.length;i++) {
c.getItems().addItem(additems[i], quantity[i]);
}
setNew();
} else {
int left = req - c.dungKills;
c.sendMessage("You need "+left+" more kills to move on to the next floor.");
return;
}
}
Code:
case 2466://portal 2
c.dungeon().handlePortal(15, 2977, 5107, 1, new int[] {6570,7462,397}, new int[] {1,1,5});
break;
Code:
package server.content;
import java.io.*;
import java.util.*;
/**
* @author Arno/Articron
* Handling the un-spawnable items from a .txt list
*/
public class BadItems {
public static int maxAmount = 300; //ONLY THING TO EDIT!
public static int[] badItems = new int[maxAmount];
private Scanner txtInput;
public BadItems() {
for (int i=0;i<maxAmount;i++) {
BadItems.badItems[i] = 0;
}
startLoad("./Data/itemconfig/restrictedItems.txt");
}
private void startLoad(String Path) {
try {
txtInput = new Scanner(new File(Path));
putInArray();
}
catch (Exception e) {
System.out.println("Something is wrong with restricted Items!");
}
}
private void putInArray() {
for (int i=0;i<maxAmount;i++) {
BadItems.badItems[i] = txtInput.nextInt();
}
closeScanner();
}
private void closeScanner() {
txtInput.close();
}
}
Code:
package server.content;
/**
* @author Arno
* Custom yelltags
* Format: NAME("Name","Yelltag")
*/
public enum Yell {
ARNO("Arno", "@red@[317 Engineer]@bla@"),
BRETT("Hi im brett", "@red@[Owner & Coder]@bla@"),
TAYLOR("Taylor h", "@yel@[Head Administrator]@bla@"),
TANNER("Call me", "@red@[#1 Reject]@bla@");
private final String yelltag, player;
public static int index;
public static void flickIndex() {
if (index >= 1)
index = 0;
}
/**
* @param playername temporary hold of String
* @param yellTitle temporary hold of String
*/
private Yell (String playername, String yellTitle) {
player = playername;
yelltag = yellTitle;
}
/**
* Printout permanent String
*/
public String getName() {
return player;
}
public String getTag() {
return yelltag;
}
}
You got me added boi