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.
DISCORD :
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/hood-services
https://campsite.bio/utchihaamkt
hello everyone !
I need help with a l2script Rev H5-Salvation/Classic build. I compiled the project, installed everything but I can't log in to the server, it won't log me in. I tried a thousand ways without good results. I leave you the error when logging in either with the H5-Salvation Client.
ERROR ---> WARN: IPBANMANAGER ---> IP !!!!
I'm waiting for help! Thank you!
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...
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.