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.



×
×
  • Create New...