Jump to content
  • 0

Olympiad Period For Acis


Question

Posted (edited)

someone would have this code for ACIS? because I got a topic here in mxc but it does not work to the place: / if someone has could share? thank you.

http://www.maxcheaters.com/topic/177158-olympiad-period-end-time-when-char-login/

 

 

Attached Thumbnails

  • post-135130-0-19927400-1395168174_thumb.
Edited by кααy

5 answers to this question

Recommended Posts

  • 0
Posted (edited)

 

someone would have this code for ACIS? because I got a topic here in mxc but it does not work to the place: / if someone has could share? thank you.

 

Honey you mean this code:

public void olympiadEnd(L2PcInstance player)
{
		long milliToEnd;
		if(_period == 0)
		{
			milliToEnd = getMillisToOlympiadEnd();
		}
		else
		{
			milliToEnd = getMillisToValidationEnd();
		}

		double numSecs = milliToEnd / 1000 % 60;
		double countDown = (milliToEnd / 1000 - numSecs) / 60;
		int numMins = (int) Math.floor(countDown % 60);
		countDown = (countDown - numMins) / 60;
		int numHours = (int) Math.floor(countDown % 24);
		int numDays = (int) Math.floor((countDown - numHours) / 24);

		CreatureSay cs = new CreatureSay(0, Say2.ANNOUNCEMENT, "", "Olympiad period ends in " + numDays + " days, " + numHours + " hours and " + numMins + " mins.");
		player.sendPacket(cs);
}

No working?

Edited by AccessDenied
  • 0
Posted (edited)

enterworld.java

private static final String LOAD_PLAYER_QUESTS = "SELECT name,var,value FROM character_quests WHERE charId=?";
+ protected static int _period;

activeChar.sendPacket(SystemMessageId.PAYMENT_FOR_YOUR_CLAN_HALL_HAS_NOT_BEEN

+if(Config.OLYMPIAD_END_ANNOUNE && activeChar.isNoble()) 
+ { 
+ long milliToEnd; 
+ if(_period == 0) 
+ { 
+ milliToEnd = Olympiad.getMillisToOlympiadEnd(); 
+ } 
+ else 
+ { 
+ milliToEnd = Olympiad.getMillisToValidationEnd(); 
+ } 
+ 
+ double numSecs = milliToEnd / 1000 % 60; 
+ double countDown = (milliToEnd / 1000 - numSecs) / 60; 
+ int numMins = (int) Math.floor(countDown % 60); 
+ countDown = (countDown - numMins) / 60; 
+ int numHours = (int) Math.floor(countDown % 24); 
+ int numDays = (int) Math.floor((countDown - numHours) / 24); 
+ 
+ activeChar.sendPacket(new CreatureSay(0, Say2.ANNOUNCEMENT, "", "Olympiad period ends in " + numDays + " days, " + numHours + " hours and " + numMins + " mins.")); 
+
+ }

Olympiad.java

	-protected long _olympiadEnd;
	-protected long _validationEnd;

	+protected static long _olympiadEnd;
	+protected static long _validationEnd;


	-public long getMillisToOlympiadEnd()
	-{
	-	return (_olympiadEnd - Calendar.getInstance().getTimeInMillis());
	-}

	+public static long getMillisToOlympiadEnd()
	+{
	+	return (_olympiadEnd - Calendar.getInstance().getTimeInMillis());
	+}

	-public long getMillisToValidationEnd()
	-{
	-	if (_validationEnd > Calendar.getInstance().getTimeInMillis())
	-		return (_validationEnd - Calendar.getInstance().getTimeInMillis());
	-	
	-	return 10L;
	-}

	+public static long getMillisToValidationEnd()
	+{
	+	if (_validationEnd > Calendar.getInstance().getTimeInMillis())
	+		return (_validationEnd - Calendar.getInstance().getTimeInMillis());
	+	
	+	return 10L;
	+}
Edited by tazerman2
  • 0
Posted

Honey you mean this code:

public void olympiadEnd(L2PcInstance player)
{
		long milliToEnd;
		if(_period == 0)
		{
			milliToEnd = getMillisToOlympiadEnd();
		}
		else
		{
			milliToEnd = getMillisToValidationEnd();
		}

		double numSecs = milliToEnd / 1000 % 60;
		double countDown = (milliToEnd / 1000 - numSecs) / 60;
		int numMins = (int) Math.floor(countDown % 60);
		countDown = (countDown - numMins) / 60;
		int numHours = (int) Math.floor(countDown % 24);
		int numDays = (int) Math.floor((countDown - numHours) / 24);

		CreatureSay cs = new CreatureSay(0, Say2.ANNOUNCEMENT, "", "Olympiad period ends in " + numDays + " days, " + numHours + " hours and " + numMins + " mins.");
		player.sendPacket(cs);
}

No working?

thx u

Guest
This topic is now closed to further replies.


  • Posts

    • If you need in L2off i can hook you up! many people know me here and the work i offer. Live example https://l2exalta.org
    • Almost 16 years, you never know when a random Korean finds this topic and shares it.
    • Update: Version 3.1.2: * Improved compaction: deleting even a few textures now always reduces the file (previously small deletions could still slightly grow some packages, such as fonts); Version 3.1.1: * Deleting textures now actually shrinks the package: on save it is automatically compacted, reclaiming the space of the deleted textures (format and encryption preserved); Version 3.1.0: * La2Tools now checks for updates on startup and lets you know when a newer version is available on the site; Version 3.0.9: * Fixed textures that appeared blank in some clients (their object carries an embedded shader the reader mis-parsed) — they now decode and display correctly; * ShaderCode is now editable: Texture Properties → Material → ShaderCode shows the texture's real HLSL shader (was a fixed placeholder before); edit it and Apply — works across client formats (Interlude-era through Essence 542); Version 3.0.8: * BMP now imports as a native format, like UnrealEd: 8-bit BMP becomes a P8 (paletted) texture with a real Engine.Palette, 24/32-bit becomes RGBA8, 16-bit becomes G16; * Compress to P8 — adaptive 256-color palette (median-cut quantization); P8 is also selectable as an import "Convert to" target; * Copy / Cut / Paste now works for P8 (paletted) textures; * Non-power-of-two textures are highlighted in red (tiles and table) with a tooltip; new "Fix texture size" menu item pads them to a power of two while keeping the displayed size; * Reads "broken" packages that were tampered to block editors (corrupted size fields) — the client still loads them and now so does La2Tools; * "Repair package" — shown only for a tampered package (its tab is marked red) and restores the corrupted size fields; * Added client license 30 support (reads and imports its textures); * Import dialog now auto-resizes to fit its content; Version 3.0.7: * Import: the file name is now parsed smartly — package.group.name automatically fills the Group and Name fields (the package prefix is ignored); * Import: live name validation with an inline hint and tooltip — OK is blocked until the name is valid (allows - + ' etc., forbids only characters illegal in file names); * Import: textures whose size is not a power of two are now auto-padded for ALL formats (DDS/TGA/BMP too, not only PNG/JPG/GIF) — padded to a power of two with UClamp/VClamp preserving the original display size; * Texture filter now has a clear (×) button; * Light theme: visible Chrome-style tab outlines; Version 3.0.6: * "Save as..." — toolbar button and tab-menu item: save a package under a new name to any folder, choosing the format (Old/New) and Lineage2Ver121 encryption; the tab switches to the saved file; * Tab right-click menu reworked: Save, Save as... and Settings on top; Copy path and Open in Explorer at the bottom; Version 3.0.5: * Animation grouping now follows AnimNext links instead of frame names — chains group correctly with any naming (mixed prefixes, non-sequential or 0-/1-based numbers); * GIF import: animation parameters (frame rate) and TotalFrameNum are now written only to the first frame, the rest keep just the AnimNext link — matches the game's own format; same fix applied to "Create animation"; Version 3.0.4: * Clipboard <-> Explorer: Ctrl+C in the browser then Ctrl+V in Explorer pastes the textures as files; copy files in Explorer then Ctrl+V in the browser imports them; * Rename a package right from Package settings (handles Lineage2Ver121 re-keying); * Hotkeys: F1 (About), F2 (rename), F5 (reload from disk, asks if unsaved), Delete, Enter (Properties), Ctrl+W (close tab); * The application icon now appears in the title bar of every dialog and sub-window; * Fixed flipped preview when importing TGA files;  Download (Installer) |  Download (Portable)
    • Hello! I am creating a new L2 Editor version with most bugs fixed and new features added. PM me for more info!
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..