Jump to content
  • 0

[Help] I try to find check about teleport


Question

Posted

Hello there  as tittle say.. i m looking for teleport check , what i mean..

 

One check like olympiad teleport check if players inside teleport to different arena

 

 

i was searching all day on google and in my eclipse and i dint found something.. exist any quest already with that check?

 

  elif cond==1 :
         if st.getQuestItemsCount(BOX_OF_COOKIES)>=200 :
            htmltext = "30078-04.htm"
            st.getPlayer().teleToLocation(143209,43968,-3038)
            st.takeItems(BOX_OF_COOKIES,200)
            self.addSpawn(31859,143209,43968,-3038,0,False,900000)
            st.exitQuest(1)

 

example

 

  elif cond==1 :
         if st.getQuestItemsCount(BOX_OF_COOKIES)>=200 :
            htmltext = "30078-04.htm"
        
    st.getPlayer().teleToLocation(143209,43968,-3038)
          if players insidezone 12030
       st.getPlayer().teleToLocation(233209,13968,-2038)

  st.takeItems(BOX_OF_COOKIES,200)
            self.addSpawn(31859,143209,43968,-3038,0,False,900000)
            st.exitQuest(1)

7 answers to this question

Recommended Posts

  • 0
Posted

I don't get it, what do you want to check more exactly?

 

i wanna one player get 1 quest and whn is to finish teleport to some spots i need check for that spots if is players inside..

 

like olympiad if fight to 1st arena teleport to second arena..

 

 

i try to write 1 unique custom quest  :/

 

  • 0
Posted

Read all methods names of L2ZoneType until you find something useful.

 

i cant undestand how check olympiad , i cant find that check , i search all zone types nothing :/

  • 0
Posted

Olympiads is definitively not the good system to check.

 

Olys store players, it's easy to do whatever you want with them, and it's not even related to zone system (isInOlympiad() check).

 

I gave you the file which got methods related to zone system. You got isInsideZone() and many others. Read Javadoc of every method, generally reading the method name is enough to see what it does.

  • 0
Posted

i cant undestand how check olympiad , i cant find that check , i search all zone types nothing :/

 

My suggestion is to use connections to database [noblesse like...]

Here is example, make column in "Characters"  to be something like "CompleteQ", make connection check to database.

EXAMPLE:

You can modify it for GK check.

	if(Player inside zone.... bla bla bla))
	{
		int CompleteQ = -1;
		try 
		{
		Connection con = L2DatabaseFactory.getInstance().getConnection();
		{
			PreparedStatement statement = con.prepareStatement("SELECT CompleteQ FROM characters WHERE charId=?");
			statement.setInt(1, player.getObjectId());

			ResultSet rset = statement.executeQuery();

			while (rset.next())
			{
				CompleteQ = rset.getInt("CompleteQ");
			}				
			if (CompleteQ == 1)
			 	player.sendMessage("You are now in zone!");	
				L2DatabaseFactory.close(con);

			else if (CompleteQ == 0)
			{
			 	player.sendMessage("You can't use GK if you didn't make the quest...");	
				L2DatabaseFactory.close(con);

 

 

And add in quest when finish...

 

				try
	     	{
			Connection con1 = L2DatabaseFactory.getInstance().getConnection();
	    	{
	        	PreparedStatement statement1 = con1.prepareStatement("UPDATE characters SET completeQ=1 WHERE charId=?");
		        statement1.setInt(1, player.getObjectId());
		        statement1.execute();
				statement1.close();
				L2DatabaseFactory.close(con1);
	    	}

 

You will also need to edit L2PcInstance.java

add where

private static final String UPDATE_CHARACTER

completeQ=?

private static final String RESTORE_CHARACTER

completeQ

 

 

Hope i help.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • L2Elixir – Patch 4 Is Live!   We’re working non-stop, day and night, to deliver the best possible quality and bring back what made L2Elixir special. This project is built with passion, not shortcuts — for the old-school players who remember, and the new ones who want to experience it properly. Thank you for being part of the journey. Together, we’re making L2Elixir great again ❤️ The legends never fade.    ⚙️ General Enabled Class Change service (same class type only) ALT + B → Services → Character Development Enabled Shift + Click on Treasure Chests Players can now identify real chests (Adena, scroll drops) and use Key / Unlock Event deaths now cancel only debuffs, All self buffs are preserved, fixes issues with Root and similar effects Bladedancer class can now log in even when Max Clients (2) is reached. Since an active Bladedancer is not available for every damage dealer and some players tried to abuse this via VPN or a second PC, this feature was added to keep things fair. protections applies, requires testing!    🎒 Items Crystallizing enchanted items now gives the correct increased crystal amount (retail-like behavior) Removed Agathion Seal Bracelet: Rudolph from Santa rewards (Gracia Final item) Added Dualsword Craft Stamp into Milestone Exchange list    🧙 Skills Fixed Banish Undead lethal chance Hot Springs Malaria and similar effects now level up faster while being attacked
    • thats new SEO level tricks you know nothing of noob - bottom line: exposed.
    • Warning: This guy is a big scammer, trying to sell everything, advertising for servers etc. That's his mail address evgesha.nrnr@gmail.com , stay away!   @Atom @Celestine
    • Warning: This guy is a big scammer, trying to sell everything, advertising for servers etc. That's his mail address evgesha.nrnr@gmail.com , stay away! @Celestine @Atom
  • Topics

×
×
  • 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