Jump to content
  • 0

Question

Posted

hello guys i try to make this code to ask join party. but i can't and now is make a party without ask

hello guys i try to make this code to ask join party. but i can't. and now i have make a party without ask

how to make it join party only if player click ok in ask;

my code is this.

	
	private static void createNewParty(PcInstance receiver, PcInstance requestor)
	{
		// Joining Party
		if (!receiver.isProcessingRequest())
		{
            Party party = receiver.getParty();
            if (party == null)
            	receiver.setParty(party = new Party(receiver, requestor, LootRule.ITEM_RANDOM_SPOIL));
            requestor.joinParty(party);
		}
		else
		{
			requestor.sendPacket(SystemMessageId.WAITING_FOR_ANOTHER_REPLY);
		}
	}

 

4 answers to this question

Recommended Posts

  • 0
Posted
8 hours ago, tazerman2 said:

hello guys i try to make this code to ask join party. but i can't and now is make a party without ask

hello guys i try to make this code to ask join party. but i can't. and now i have make a party without ask

how to make it join party only if player click ok in ask;

my code is this.


	
	private static void createNewParty(PcInstance receiver, PcInstance requestor)
	{
		// Joining Party
		if (!receiver.isProcessingRequest())
		{
            Party party = receiver.getParty();
            if (party == null)
            	receiver.setParty(party = new Party(receiver, requestor, LootRule.ITEM_RANDOM_SPOIL));
            requestor.joinParty(party);
		}
		else
		{
			requestor.sendPacket(SystemMessageId.WAITING_FOR_ANOTHER_REPLY);
		}
	}

 

 

"Ask" thing is relative to wedding system which use the DlgAnswer.java packet. 

  • 0
Posted

You get party, bcs you use setParty there, which should be under answer. You should send there only the request using DlgAnswer, then it redirect to the method where you handle the answer. As Access said, check wedding request. 

Guest
This topic is now closed to further replies.


×
×
  • Create New...