Jump to content

Recommended Posts

Posted

Updated Version 3.2

 

Hello to all.

Here we go for my 2nd share. A laboratory for what you wan ^^

I use it for craft pots, ...

 

Here is the code updated in java for Hi5 server. For use it, you need to creat a folder Laboratory in custom folder of your server.

After that, add the java file in scripts.cfg

 

custom/Laboratory/Laboratory.java

 

For my labo, i use Ralford npc in ivory tower, but u can creat a new one, or use another npc.

Just add this lign in the html file of your npc:

 

<a action="bypass -h npc_%objectId%_Quest Laboratory">Laboratory</a><br1>

 

/*
* Packages: A Java package is a mechanism for organizing Java classes into namespaces similar to the modules of Modula.
* Java packages can be stored in compressed files called JAR files, allowing classes to download faster as a group rather than one at a time.
* Programmers also typically use packages to organize classes belonging to the same category or providing similar functionality.
* 
* This is the package declaration:
*/
package custom.Laboratory;

import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.datatables.MultiSell;


public class Laboratory extends Quest 
{
private static final String qn = "Laboratory";

private static final int RALFORD = 30165;
static int m = 400000000;
private static final int ORACLES_PP = m+5;
private static final int ORACLES_PP_3 = m+19;
private static final int SUMMONERS_2 = m+6;
private static final int SUMMONERS_3 = m+15;
private static final int HEALER_2 = m+1;
private static final int HEALER_3 = m+12;
private static final int SUMMONERS_TEL_2 = m+16;
private static final int SUMMONERS_TEL_3 = m+18;
private static final int SUMMONERS_TEL_HEALER_2_ORC = m+17;

/*
 * Laboratory by Darknessneo
 *      Shirya server
 *         v3.2
 */	public Laboratory(int questId, String name, String descr)
{
	super(questId, name, descr);

	addStartNpc(RALFORD);
	addTalkId(RALFORD);
}

@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
	if (player.isGM()) return "maingm.htm";
	switch (player.getClassId().getId())
	{
		case 13: // Necromancer
			MultiSell.getInstance().separateAndSend(SUMMONERS_2, player, npc, false);
			break;
		case 14: // Warlock
			MultiSell.getInstance().separateAndSend(SUMMONERS_TEL_2, player, npc, false);
			break;
		case 15: // Cleric
			MultiSell.getInstance().separateAndSend(ORACLES_PP, player, npc, false);
			break;
		case 16: // Bishop
			MultiSell.getInstance().separateAndSend(HEALER_2, player, npc, false);
			break;
		case 17: // Prophet
			MultiSell.getInstance().separateAndSend(ORACLES_PP, player, npc, false);
			break;
		case 28: // Elemental Summoner
			MultiSell.getInstance().separateAndSend(SUMMONERS_TEL_2, player, npc, false);
			break;
		case 29: // Oracle
			MultiSell.getInstance().separateAndSend(ORACLES_PP, player, npc, false);
			break;
		case 30: // Elder
			MultiSell.getInstance().separateAndSend(HEALER_2, player, npc, false);
			break;
		case 41: // Phantom Summoner
			MultiSell.getInstance().separateAndSend(SUMMONERS_TEL_2, player, npc, false);
			break;
		case 42: // Shillien Oracle
			MultiSell.getInstance().separateAndSend(ORACLES_PP, player, npc, false);
			break;
		case 43: // Shillien Elder
			MultiSell.getInstance().separateAndSend(HEALER_2, player, npc, false);
			break;
		case 50: // Shaman
			MultiSell.getInstance().separateAndSend(ORACLES_PP, player, npc, false);
			break;
		case 51: // Overlord
			MultiSell.getInstance().separateAndSend(HEALER_2, player, npc, false);
			break;
		case 52: // Warcryer
			MultiSell.getInstance().separateAndSend(SUMMONERS_TEL_HEALER_2_ORC, player, npc, false);
			break;
		case 95: // Soultaker
			MultiSell.getInstance().separateAndSend(SUMMONERS_3, player, npc, false);
			break;
		case 96: // Arcana Lord
			MultiSell.getInstance().separateAndSend(SUMMONERS_TEL_3, player, npc, false);
			break;
		case 97: // Cardinal
			MultiSell.getInstance().separateAndSend(HEALER_3, player, npc, false);
			break;
		case 98: // Hierophant
			MultiSell.getInstance().separateAndSend(ORACLES_PP, player, npc, false);
			break;
		case 104: // Elemental Master
			MultiSell.getInstance().separateAndSend(SUMMONERS_TEL_3, player, npc, false);
			break;
		case 105: // Eva's Saint
			MultiSell.getInstance().separateAndSend(HEALER_3, player, npc, false);
			break;
		case 111: // Spectral Master
			MultiSell.getInstance().separateAndSend(SUMMONERS_TEL_3, player, npc, false);
			break;
		case 112: // Shillien Saint
			MultiSell.getInstance().separateAndSend(HEALER_3, player, npc, false);
			break;
		case 115: // Dominator
			MultiSell.getInstance().separateAndSend(HEALER_3, player, npc, false);
			break;
		case 116: // Doomcryer
			MultiSell.getInstance().separateAndSend(ORACLES_PP_3, player, npc, false);
			break;
		default:
			return "nolab.htm";
	}
	return super.onTalk(npc, player);
}

public static void main(String[] args)
{
	new Laboratory(-1, qn, "custom");
}
}

 

Wan see how he work?

shot00001s.png

The GM text

shot00002im.png

The labo for potions.

shot00003f.png

The text for healers (not GM)

shot00004wh.png

For all other class

Posted

Just a tip:

You can improve your code by changing

if id == 42 or id == 15 or id == 17 or id == 29 or id == 50 or id == 52 or id == 98 or id == 116 :

to

if id in [15,17,29,42,50,52,98,116] :

Posted

Just a tip:

You can improve your code by changing

if id == 42 or id == 15 or id == 17 or id == 29 or id == 50 or id == 52 or id == 98 or id == 116 :

to

if id in [15,17,29,42,50,52,98,116] :

Thx for your comment. Guide and screens updated, archive too. Thx for your help, i added your pseudo in the credit of the file.

  • 5 months later...
Posted

OMG.. I was searching everywhere, this! Atleast how to make show htm for some class, and finaly, You madet it! Awesome. :) Now i can slee well, and dont think how to make it :))) Realy thx :)

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Opening December 6th at 19:00 (GMT +3)! Open Beta Test from November 30th!   https://l2soe.com/   🌟 Introducing L2 Saga of Eternia: A Revolution in Lineage 2 High Five! 🌟   Dear Lineage 2 enthusiasts, Prepare to witness the future of private servers! L2 Saga of Eternia is not just another High Five project—it’s a game-changing experience designed to compete with the giants of the Lineage 2 private server scene. Built for the community, by the community, we’re here to raise the bar in quality, innovation, and longevity. What Sets Us Apart? 💎 No Wipes, Ever Say goodbye to the fear of losing your progress. Our server is built to last and will never close. Stability and consistency are our promises to you. ⚔️ Weekly New Content Our dedicated development team ensures fresh challenges, events, and updates every week. From custom quests to exclusive features, there will always be something exciting to explore. 💰 No Pay-to-Win Skill and strategy matter most here. Enjoy a balanced gameplay environment where your achievements come from effort, not your wallet. 🌍 A Massive Community With 2000+ players expected, join a vibrant and active community of like-minded adventurers ready to conquer the world of Aden. 🏆 Fair and Competitive Gameplay Our systems are designed to promote healthy competition while avoiding abusive mechanics and exploits. 🔧 Professional Development From advanced bug fixes to carefully curated content, we pride ourselves on smooth performance, no lag, and unparalleled server quality. Key Features Chronicle: High Five with unique interface Rate: Dynamic x10 rates Class Balance: Carefully fine-tuned for a fair experience PvP Focused: PvP Ranking & aura display effect for 3 Top PvPers every week Custom Events: Seasonal and permanent events to keep you engaged Additional Features:   Custom Endgame Content: Introduce unique dungeons, raids, or zones unavailable in other servers. Player-Driven Economy: Implement a strong market system and avoid overinflated drops or rewards. Epic Siege Battles: Announce special large-scale sieges and PvP events. Incentives for Streamers and Clans: Attract influencers and big clans to boost server publicity. Roadmap Transparency: Share a public roadmap of planned updates to build trust and excitemen   Here you can read all the features: https://l2soe.com/features   Video preview: Join the Revolution! This is your chance to be part of something legendary. L2 Saga of Eternia is not just a server; it’s a movement to redefine what Lineage 2 can be. Whether you’re a seasoned veteran or a newcomer to the world of Aden, we invite you to experience Lineage 2 at its finest.   Official Launch Date: December 6th 2024 Website: https://l2soe.com/ Facebook: https://www.facebook.com/l2soe Discord: https://discord.com/invite/l2eternia   Let’s build the ultimate Lineage 2 experience together. See you in-game! 🎮
    • That's like a tutorial on how to run l2 on MacOS Xd but good job for the investigation. 
    • small update: dc robe set sold   wts adena 1kk = 1.5$ 
    • 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
    • Why adena in this sever so expensive 🙂
  • Topics

×
×
  • Create New...