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.
This person is a scammer. don't do any business with him. he scammed me out of $35 USD...
he using this paypal address: mgemayel1987 under the name Michael Gemayel
This person is a scammer. don't do any business with him. he scammed me out of $35 USD...
he using this paypal address: mgemayel1987 under the name Michael Gemayel
Just saying that even when he refunded, he still invested his time debugging and what not.
You can't go to a repairmen, ask him to do stuff, then half way through you call him saying you dont need his services anymore, take your car and go without paying the invested time.
That's not how the world works.
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.
Link to comment
Share on other sites
7 answers to this question
Recommended Posts