Commit 2bcc7148 authored by Akhmad Fakhoni Listiyan Dede's avatar Akhmad Fakhoni Listiyan Dede
Browse files

Masih error di pickField. Kembaliannya masih 0 semua

parent d019e888
......@@ -85,19 +85,19 @@ public class Database {
// System.out.println(saveOfferToTradeBox("553b64d23c892b2d5b772c74", 4, 5, 6, 2));
addItemToInventory("553b6adc3c892b2edffa877c", 3);
addItemToInventory("553b6adc3c892b2edffa877c", 2);
addItemToInventory("553b6adc3c892b2edffa877c", 3);
addItemToInventory("553b6adc3c892b2edffa877c", 5);
addItemToInventory("553b6adc3c892b2edffa877c", 5);
addItemToInventory("553b6adc3c892b2edffa877c", 5);
// addItemToInventory("553b6adc3c892b2edffa877c", 3);
// addItemToInventory("553b6adc3c892b2edffa877c", 2);
// addItemToInventory("553b6adc3c892b2edffa877c", 3);
// addItemToInventory("553b6adc3c892b2edffa877c", 5);
// addItemToInventory("553b6adc3c892b2edffa877c", 5);
// addItemToInventory("553b6adc3c892b2edffa877c", 5);
//
// System.out.println(saveOfferToTradeBox("553b6adc3c892b2edffa877c", 4, 1, 5, 3));
// getTradebox("553b64d23c892b2d5b772c74");
// changeLocalTradeboxToFalse("553c36143c892b1bbf7723d6");
// System.out.println(isExist("sijc"));
System.out.println(getInventory("553cd35d3c892b2c6768f77d"));
}
/**
......
......@@ -75,7 +75,10 @@ public class Message {
// System.out.println("Mix item: " + mixItem("553b6adc3c892b2edffa877c", 4, 5));
// System.out.println("Get inventory: " + getInventory("553b6adc3c892b2edffa877c"));
// System.out.println("Get tradebox: " + getTradeBox("553a1674179bf4356b7198d5"));
System.out.println(receive("{\"item\": 0, \"method\": \"findoffer\"}"));
// System.out.println(receive("{\"item\": 0, \"method\": \"findoffer\"}"));
// System.out.println(move("553cd35d3c892b2c6768f77d", 4, 4));
// System.out.println(receive("{\"method\":\"field\",\"token\":\"553cd35d3c892b2c6768f77d\"}"));
System.out.println(receive("{\"method\":\"inventory\",\"token\":\"553cd35d3c892b2c6768f77d\"}"));
}
public static String callURL(String myURL) {
......@@ -374,11 +377,7 @@ public class Message {
int honey = 0, herbs = 0, clay = 0, mineral = 0, potion = 0, incense = 0, gems = 0, elixir = 0, crystal = 0, stone = 0;
/* Get masing masing item dari database */
String inv = "[" + honey + "," + herbs + "," + clay + "," + mineral + "," + potion +
"," + incense + "," + gems + "," + elixir + "," + crystal + "," + stone + "]";
if(log)
System.out.println("Inventory = " + inv);
ArrayList<Integer> inv = Database.getInventory(token);
JSONObject jsonObj = new JSONObject();
try {
......@@ -531,8 +530,8 @@ public class Message {
JSONObject jsonPosition = Database.getCurrentPosition(token);
int x;
int y;
String [][] map = Store.getMap();
Store.generateMap();
int item;
String response;
try {
......
......@@ -27,7 +27,7 @@ public class Store {
private static final String Mana = "R32";
private static final String Stone = "R41";
private static void generateMap()
public static void generateMap()
{
map[0][0] = Honey;
map[0][1] = Mineral;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment