Jump to content
  • 0

[Request] Daily status, please all good devs come here!


NumL0ck
 Share

Question

Hello MXC!

Who can make java code for interlude, then you wrote .getstats to you show

Today [PVP] : 0 [Deaths] : 0 [PK] : 0

and...

Cancel Skill after x time you receive back your loosing buffs.

Big big thanks!!! Big big thanks!!! Big big thanks!!! Big big thanks!!!

Link to comment
Share on other sites

Recommended Posts

  • 0

Hello MXC!

Who can make java code for interlude, then you wrote .getstats to you show

Today [PVP] : 0 [Deaths] : 0 [PK] : 0

and...

Cancel Skill after x time you receive back your loosing buffs.

Big big thanks!!! Big big thanks!!! Big big thanks!!! Big big thanks!!!

 

i need only this

then you wrote .getstats to you show

Today [PVP] : 0 [Deaths] : 0 [PK] : 0

please make it! :P

 

Please make it ? That's not a fucking forum that gonna give you all for nothing . Just try and if doesn't works ask us .

Link to comment
Share on other sites

  • 0

i need only this

then you wrote .getstats to you show

Today [PVP] : 0 [Deaths] : 0 [PK] : 0

please make it! :P

for voiced command search in forum, inside it u need to write player.sendMessage("[PVP] :"+ 0 +"[Deaths] :"+ 0 +"[PK] :"+ 0);

Hmm about daily pvps, if server wouldnt be restarted at all or at midnight, it would be very easy, but we want high quality code so we will need to also use database.

To not touch stupid characters table, i suggest u to make new one columns: "object_id", "daily_pvp", "daily_pk", "daily_death"

Now we are in half way, lets create new class that will handle daily things.

Inside it create variables: L2PcInstance _player, int pvps, int pks, int deaths.

make such constructor (L2PcInstance player) and inside{} add _player = player, getVarsFromDatabase();

 

now inside getVars from database, u will need to SELECT field where object_id = player.getObjectId(), and set _pvps, _pks, _deaths as vars from database.

If such record doesnt exist, Insert new one and set _pvps, _pks and _deaths as 0.

 

during shutdown u will need to UPDATE every variable in database, so thats easy.

 

u will need to make 3 new methods, add pvp, add pk and add death, they will increase this variables by 1 and will be run during character gaining this points.

 

Now we are almost done, we just need to make this variables reset at midnight everyday, i suggets u to make new Thread connected with Class SchedulingPattern, inside thread u will need to reset every variable(not needed in database), so make new loop.

 

Last thing is creating in L2PcInstance new variable DailyVariables(or however u called it) _dailyvars = new DailyVariables(this);

and make new method getDailyVariables() {return _dailyvars;}

 

That was easy :) hf

 

Link to comment
Share on other sites

  • 0

for voiced command search in forum, inside it u need to write player.sendMessage("[PVP] :"+ 0 +"[Deaths] :"+ 0 +"[PK] :"+ 0);

Hmm about daily pvps, if server wouldnt be restarted at all or at midnight, it would be very easy, but we want high quality code so we will need to also use database.

To not touch stupid characters table, i suggest u to make new one columns: "object_id", "daily_pvp", "daily_pk", "daily_death"

Now we are in half way, lets create new class that will handle daily things.

Inside it create variables: L2PcInstance _player, int pvps, int pks, int deaths.

make such constructor (L2PcInstance player) and inside{} add _player = player, getVarsFromDatabase();

 

now inside getVars from database, u will need to SELECT field where object_id = player.getObjectId(), and set _pvps, _pks, _deaths as vars from database.

If such record doesnt exist, Insert new one and set _pvps, _pks and _deaths as 0.

 

during shutdown u will need to UPDATE every variable in database, so thats easy.

 

u will need to make 3 new methods, add pvp, add pk and add death, they will increase this variables by 1 and will be run during character gaining this points.

 

Now we are almost done, we just need to make this variables reset at midnight everyday, i suggets u to make new Thread connected with Class SchedulingPattern, inside thread u will need to reset every variable(not needed in database), so make new loop.

 

Last thing is creating in L2PcInstance new variable DailyVariables(or however u called it) _dailyvars = new DailyVariables(this);

and make new method getDailyVariables() {return _dailyvars;}

 

That was easy :) hf

 

 

Tru'.That's the best idea . Congrats !

Link to comment
Share on other sites

  • 0

but i need only today, not all pvp, death and pk. how make it, because i'm java newbie:(

Take time to read others answers, else I gonna lock that thread.

 

vampir said it all, if you got problems with his answer, then say where, he/others ppl gonna answer/explain back, until you succeed. For instant patch, make an ask on Marketplace.

Link to comment
Share on other sites

  • 0

but i need only today, not all pvp, death and pk. how make it, because i'm java newbie:(

I wrote suggestions for code for daily pvps, not all :)

Link to comment
Share on other sites

  • 0

okey, so then i go to l2pcinstance and i change this

private static final String UPDATE_CHARACTER

and this

private static final String RESTORE_CHARACTER

i can't create charachter, why ? i'm using frozen, and all is good, but then i remove code, and use l2pcinstance before instalation it's allright and i can create char, but then i touch

private static final String UPDATE_CHARACTER

and this

private static final String RESTORE_CHARACTER

boom, i can't create char.

please help me, and sorry for my bad english...

Link to comment
Share on other sites

  • 0

why are u editing UPDATE_CHARACTER and RESTORE_CHARACTER? it is statement that connect with "characters" table, and u should create new table as i wrote :)

Link to comment
Share on other sites

  • 0

because in this http://maxcheaters.com/forum/index.php?topic=238056.msg2145283#msg2145283 - pvp lord engine show

or not need this update and restore? i wanna pvp lord engine to operate without problems

-    private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=? WHERE obj_id=?";
-    private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, acc, crit, evasion, mAtk, mDef, mSpd, pAtk, pDef, pSpd, runSpd, walkSpd, str, con, dex, _int, men, wit, face, hairStyle, hairColor, sex, heading, x, y, z, movement_multiplier, attack_speed_multiplier, colRad, colHeight, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, in_jail, jail_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level FROM characters WHERE obj_id=?";

+    private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,todaypvps=?,pvplord=? WHERE obj_id=?";
+    private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, acc, crit, evasion, mAtk, mDef, mSpd, pAtk, pDef, pSpd, runSpd, walkSpd, str, con, dex, _int, men, wit, face, hairStyle, hairColor, sex, heading, x, y, z, movement_multiplier, attack_speed_multiplier, colRad, colHeight, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, in_jail, jail_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,todaypvps,pvplord FROM characters WHERE obj_id=?";

vampir i wanna this code and your help with todays pvp,death,pk:)

Link to comment
Share on other sites

  • 0

so if u want this way, u need to add todaypvps, todaypks and today deaths to characters, add same thing to this 2 statements but also u need to change every method that is connecting with this statement, use search in L2PcInstance and find methods that use RESTORE_CHARACTER and UPDATE_CHARACTER and update them.

Link to comment
Share on other sites

  • 0

Open navicat, your connection, your database, table named characters.sql, file, design table, then add todaypvps and pvplord as int with lenght from 2 to 5 (depends how many players you have because they can make 10.000 pvp's in 1 day ), save it, restart server, and try create another character.

 

Follow these steps and it gonna work .

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share




×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock