Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*protected final static int [][] ITEMS_DATA = new int[][]
- {
- //итемИд,кол-во,уровень точки
- {6673, Rng.get(1,100), 0},
- {9889, 1, 0},
- {24601, 1, 30},
- {24600, 1, 30},
- {24716, 1, Rnd.get(1,20)}
- };*/
- private static int[] ITEM_IDS =
- {
- 6673, //0
- 9889, //1
- 24601, //2
- 24600, //3
- 24716 //4
- // ...
- };
- if(Rnd.get(100) <= 90)
- {
- //String html = "<html><title>Hellsing Loto</title><body><br>";
- html += "Вы проиграли! Выпало неудачное число: <font color=LEVEL>" + Rnd.get(1,1000) + "</font><br>";
- html += "<a action=\"bypass -h Quest gmshop loto_game\">Сыграть ещё</a>";
- return html;
- }
- else
- {
- int reward_item = ITEM_IDS[Rnd.get(ITEM_IDS.length)]; // достаем случайный ID
- boolean isEnchanted = false;
- int enc;
- if(reward_item == ITEM_IDS[0] || reward_item == ITEM_IDS[1]){
- enc = 0;
- }else if(reward_item == ITEM_IDS[2] || reward_item == ITEM_IDS[3]){
- enc = 30;
- isEnchanted = true;
- }else if(reward_item == ITEM_IDS[4]){
- enc = Rnd.get(1,20);
- isEnchanted = true;
- }
- // itemId, amount, enchant
- String reward = String.valueOf(reward_item) + ","
- + String.valueOf(reward_item == 6673 ? Rnd.get(1,100) : 1) + ","
- + String.valueOf(enc);
- String[] sep = reward.split(",");
- sep[2] = "+" + sep[2];
- //html+="Поздравляем,вы выиграли: <font color=LEVEL>"+ItemTable.getInstance().getTemplate(ITEMS_DATA[i][i]).getName()+"</font><br>";
- html += "Поздравляем,вы выиграли: <font color=LEVEL>"
- + (Integer.parseInt(sep[1]) > 1 ? sep[1] : "")
- + ItemTable.getInstance().getTemplate(Integer.parseInt(sep[0])).getName()
- + (isEnchanted ? sep[2] : "")
- + "</font><br>";
- html+="<a action=\"bypass -h Quest gmshop loto_game\">Сыграть ещё</a>";
- return html;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement