Hello im doing one custom thing now but Im wondering how to create Instance for each player with stats that will be hold until shutdown/restart. For example im calling function DoSomething() in doDie from L2PcInstance in which I want to read or create if not exist Instance for each player(killer) with few statics for example I want hold there pvp stats, if something happens im raising it or reseting.
Im thinking to do something similar like they have done in l2jFrozen:
public class CustomPvpSystem{
public CustomPvpSystem(L2PcInstance killer, L2PcInstance victim){
Will something like this work with this return instance ? Or can I do this easier?
And the second question, how can I random array ? For example I have ex[] = {1,2,3,4} and I want to random this array but inside, NOT like to get random from this array.
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
Xmas Wolf Chariot Mount | Lineage 2 Mod
Celebrate the holiday spirit in Lineage 2 with this festive Xmas Wolf Chariot Mount! Created for protocol 166, this unique modification features majestic wolf mounts with holiday-themed harnesses pulling a decorative chariot.
If you have questions or want to add this updated skill to your game, feel free to contact me via Skype or Discord.
Download or in Discord Client Dev channel https://discord.gg/XdCb9dmTtf
06/12/2024 21:00 GMT +2
High Five - PvP server x45 - Aria Victoria Style 2004
NPC Buffer & Enchanted NPC Buffer.
Global Gatekeeper.
Clan Hall Teleports & Clan GM Shop (-20%).
Offline Shop.
GM shop up to B Grade.
Auto Farm system.
TvT - CTF - DM - Party Farm - Event Boss
Craftable Hero Weapon.
Instances Solo and Party, weekly and daily.
No kamael.
More informations can be found on our website including a "how to connect" greek guide
Valkyria is based on aCis
https://l2valkyria.com
Question
Archagnel
Hello im doing one custom thing now but Im wondering how to create Instance for each player with stats that will be hold until shutdown/restart. For example im calling function DoSomething() in doDie from L2PcInstance in which I want to read or create if not exist Instance for each player(killer) with few statics for example I want hold there pvp stats, if something happens im raising it or reseting.
Im thinking to do something similar like they have done in l2jFrozen:
public class CustomPvpSystem{
public CustomPvpSystem(L2PcInstance killer, L2PcInstance victim){
this.setKiller(killer);
this.setVictim(victim);
...
Pvp pvp = PvpTable.getInstance().getPvp(killer.getObjectId(), victim.getObjectId(), systemDay);
...
and in pvptable class:
...
private static PvpTable _instance = null;
...
public static PvpTable getInstance(){
if(_instance == null){
_instance = new PvpTable();
}
return _instance;
}
Will something like this work with this return instance ? Or can I do this easier?
And the second question, how can I random array ? For example I have ex[] = {1,2,3,4} and I want to random this array but inside, NOT like to get random from this array.
7 answers to this question
Recommended Posts