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.
Where to look for this symbol in the launch file LoginServer.bat or in the database file? Maybe someone can throw off their server that was actually launched. Or a file to register the server. I downloaded the server and inserted the MSQL password everywhere. I don't understand the rest. Help please.
GameServer.
I apologize, I managed to launch it without errors. I moved the server from the desktop to the root of the C drive and it launched without errors. Thank you very much. If anyone has the RegisterGameServer.bat file, I would be very grateful.
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