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.

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
Answer this question...

×   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

    • whats password from the archivie ?
    • All that shit are false positives of the vanganth cliext, sources are well and who sell it is a big scammer
    • Information Selling a premium Lineage 2 High Five (L2J) project with active development, available by subscription. Includes Git support and access to compiled or full source code. Ideal for serious server owners seeking stability and performance, uniqueness and well-done features.   General Project Specifications: JDK Version: 23 -> 24 Chronicle: HighFive Structure: Core & Datapack merged into a single project Database: MariaDB Database Driver: HicariCP GIT Website: gitlab.com   Features include (but are not limited to):   1. Tournament Single & Party (Check Youtube Video) 2. Faction (Check Youtube Video) 3. Event Engine (Check Youtube Video) 4. Sell Buff System (Check Youtube Video) 5. Start UP System (Check Youtube Video) 6. User Panel 7. Visual - Dress me System 8. Donate Store 9. Automatic Farm System (Check Youtube Video) 10. Captcha (Anti-BOT) (Check Youtube Video) 11. Auction (Check Youtube Video) 12. Vote (API) 13. Admin Real Time Balance (Check Youtube Video) 14. Achievements (Check Youtube Video) 15. Daily Mission (Check Youtube Video) 16. A.I. Bot (Check Youtube Video) 17. Rebirth 18. Daily Reward  19. Skill Tree - Ability System 20. Craft System 21. Twitch Automatic Reward (Check Youtube Video) 22. Quiz Game (Check Youtube Video) 23. Automatic Item Enchant (Check Youtube Video) 24. Secondary Auth Using Google Authenticator (Check Youtube Video) 25. Gm Shop - Gatekeeper - Scheme Buffer   How to get Access (Payment Subscription): To get Access you either pay monthly subscription to GIT for source or Compiled. Project is currently active and has at least 1-2 commit / day.  Clients in both Compiled & Source subscription can request features or any addon in already existing mods inside discord.   Price per Month (Source) in GIT: 250 Eur Price per Month (Compiled) in GIT: 100 Eur   Contact: To get Access or ask further information join discord  https://discord.gg/gKAsAhJNuq      
    • We're officially closing the current season today. While we focus on refining the Essence project, our resources will temporarily shift toward supporting the Classic server.
  • Topics

×
×
  • Create New...