Skip to content

request join party

Featured Replies

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);
		}
	}

 

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. 

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. 

16 minutes ago, tazerman2 said:

tnx guys fixed lock topic :)

Locked.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.