Hello guys, i have L2day event script and try to configure and change it, but don't know now how make 2 rewards :) 1 item 100% and other by chance...
When i collect word "Chronicle" or "Lineage II" and pres to npc i wanna get 1 item 100% (unique item "Letter Collector's Gift") and + one item from the list...
package l2f.gameserver.scripts.events.l2day;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import l2f.gameserver.model.reward.RewardData;
public class l2day extends LettersCollection
{
static
{
_name = "l2day";
_msgStarted = "scripts.events.l2day.AnnounceEventStarted";
_msgEnded = "scripts.events.l2day.AnnounceEventStoped";
EVENT_MANAGERS = new int[][] {{ 83720, 149720, -3430, 49151 }};
_words.put("LineageII", new Integer[][] { { L, 1 }, { I, 1 }, { N, 1 }, { E, 2 }, { A, 1 }, { G, 1 }, { II, 1 } });
_rewards.put("LineageII", new RewardData[] {
// Reward list
new RewardData(0, 1, 1, 1000000), // 100%
new RewardData(0, 1, 1, 750000), // 75%
new RewardData(0, 1, 1, 500000), // 50%
new RewardData(0, 1, 1, 250000), // 25%
new RewardData(0, 1, 1, 100000), // 10%
new RewardData(0, 1, 1, 50000), // 5%
new RewardData(0, 1, 1, 5000), // 0.5%
new RewardData(0, 1, 1, 1000), // 0.1%
new RewardData(0, 1, 1, 100), }); // 0.01%
_words.put("Chronicle", new Integer[][] { { C, 2 }, { H, 1 }, { R, 1 }, { O, 1 }, { N, 1 }, { I, 1 }, { L, 1 }, { E, 1 } });
_rewards.put("Chronicle", new RewardData[] {
// Reward list
new RewardData(0, 1, 1, 1000000), // 100%
new RewardData(0, 1, 1, 750000), // 75%
new RewardData(0, 1, 1, 500000), // 50%
new RewardData(0, 1, 1, 250000), // 25%
new RewardData(0, 1, 1, 100000), // 10%
new RewardData(0, 1, 1, 50000), // 5%
new RewardData(0, 1, 1, 5000), // 0.5%
new RewardData(0, 1, 1, 1000), // 0.1%
new RewardData(0, 1, 1, 100), }); // 0.01%
final int DROP_MULT = 3;
Map<Integer, Integer> temp = new HashMap <Integer, Integer>();
for(Integer[][] ii : _words.values())
for(Integer[] i : ii)
{
Integer curr = temp.get(i[0]);
if(curr == null)
temp.put(i[0], i[1]);
else
temp.put(i[0], curr + i[1]);
}
letters = new int[temp.size()][2];
int i = 0;
for(Entry<Integer, Integer> e : temp.entrySet())
letters[i++] = new int[] { e.getKey(), e.getValue() * DROP_MULT };
}
}
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Hello,
I have 5-6 armor set from l2jbrazil but i can't add them in my server since armorgrp is little bit different and can't save them.
I think it has to do with lines, they should be for freya and need adjust for Hi5.
In the files i download it says freya/hi5 working.
If someone can fix them for me and i pay for your job.
Thanks
MidnightSell team WTB/WTS GOLD TWW EU/US all servers
Cataclysm all servers
Payment Visa/Master/Btc/Eth/Trc-20/Erc-20 (all payments within 10 min)
For all question pls dm
Discord https://discord.gg/h8AN57qJjK
Or Telegram @MidnightSell
Question
Celsas
Hello guys, i have L2day event script and try to configure and change it, but don't know now how make 2 rewards :) 1 item 100% and other by chance...
When i collect word "Chronicle" or "Lineage II" and pres to npc i wanna get 1 item 100% (unique item "Letter Collector's Gift") and + one item from the list...
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.