tazerman2 Posted October 30, 2017 Posted October 30, 2017 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); } }
0 Kara Posted October 30, 2017 Posted October 30, 2017 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 SweeTs Posted October 30, 2017 Posted October 30, 2017 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.
0 Celestine Posted October 30, 2017 Posted October 30, 2017 16 minutes ago, tazerman2 said: tnx guys fixed lock topic :) Locked.
Question
tazerman2
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