Jump to content

block function in map


Recommended Posts

In the Server src:
char.cpp search:
 

void CHARACTER::PartyInvite(LPCHARACTER pchInvitee)

add under:

else if (pchInvitee->IsBlockMode(BLOCK_PARTY_INVITE))
    {
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<ÆÄƼ> %s ´ÔÀÌ ÆÄƼ °ÅºÎ »óÅÂÀÔ´Ï´Ù."), pchInvitee->GetName());
        return;
    }

this:
 

if (ch->GetMapIndex() == 333)

return false;

 

 

this is not testet !

Link to comment
Share on other sites

Milder version..

Open game.py.

#Search:

self.onClickKeyDict=onClickKeyDict


 

#Add a row below:

def Checking_Maps(self):

	        import background
	        list_maps = [
	            "season1/metin2_map_oxevent",
				#"season3/your maps etc etc",
	        ]
	        if str(background.GetCurrentMapName()) in list_maps:
	            return TRUE
	        return FALSE

 

#Search:

 

def RecvPartyInviteQuestion(self, leaderVID, leaderName):


 

#Change with:  

def RecvPartyInviteQuestion(self, leaderVID, leaderName):
	        if self.Checking_Maps():        
	            return
	        else:
	            partyInviteQuestionDialog = uiCommon.QuestionDialog()
	            partyInviteQuestionDialog.SetText(leaderName + localeInfo.PARTY_DO_YOU_JOIN)
	            partyInviteQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.AnswerPartyInvite(arg))
	            partyInviteQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.AnswerPartyInvite(arg))
	            partyInviteQuestionDialog.Open()
	            partyInviteQuestionDialog.partyLeaderVID = leaderVID
	            self.partyInviteQuestionDialog = partyInviteQuestionDialog

 

#Search:

    

def StartExchange(self):

 

#Change with:

def StartExchange(self):
	        if self.Checking_Maps():        
	            return    
	        else:
	            self.interface.StartExchange()


 

#Search:

def OnMessengerAddFriendQuestion(self, name):

 

#Change with:

def OnMessengerAddFriendQuestion(self, name):
	        if self.Checking_Maps():        
	            return    
	        else:
	            messengerAddFriendQuestion = uiCommon.QuestionDialog2()
	            messengerAddFriendQuestion.SetText1(localeInfo.MESSENGER_DO_YOU_ACCEPT_ADD_FRIEND_1 % (name))
	            messengerAddFriendQuestion.SetText2(localeInfo.MESSENGER_DO_YOU_ACCEPT_ADD_FRIEND_2)
	            messengerAddFriendQuestion.SetAcceptEvent(ui.__mem_func__(self.OnAcceptAddFriend))
	            messengerAddFriendQuestion.SetCancelEvent(ui.__mem_func__(self.OnDenyAddFriend))
	            messengerAddFriendQuestion.Open()
	            messengerAddFriendQuestion.name = name
	            self.messengerAddFriendQuestion = messengerAddFriendQuestion

 

#Search:

def RecvGuildInviteQuestion(self, guildID, guildName):

 

#Change with:

def RecvGuildInviteQuestion(self, guildID, guildName):
	        if self.Checking_Maps():        
	            return    
	        else:
	            guildInviteQuestionDialog = uiCommon.QuestionDialog()
	            guildInviteQuestionDialog.SetText(guildName + localeInfo.GUILD_DO_YOU_JOIN)
	            guildInviteQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.AnswerGuildInvite(arg))
	            guildInviteQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.AnswerGuildInvite(arg))
	            guildInviteQuestionDialog.Open()
	            guildInviteQuestionDialog.guildID = guildID
	            self.guildInviteQuestionDialog = guildInviteQuestionDialog

 

#Search:

def StartShop(self, vid):


 

#Change with:

def StartShop(self, vid):
	        if self.Checking_Maps():        
	            return    
	        else:
	            self.interface.OpenShopDialog(vid)

 

#Search:

def StartOfflineShop(self, vid):

 

#Change with:

def StartOfflineShop(self, vid):
	        if self.Checking_Maps():        
	            return
	        else:
	            self.interface.OpenOfflineShopDialog(vid)

 

Other:

def OnRecvWhisperSystemMessage(self, mode, name, line):
	        if self.Checking_Maps():        
	            return
	        else:
	            chat.AppendWhisper(chat.WHISPER_TYPE_SYSTEM, name, line)
	            self.interface.RecvWhisper(name)

 
def OpenSafeboxWindow(self, size):
	        if self.Checking_Maps():        
	            return
	        else:
	            self.interface.OpenSafeboxWindow(size)

 
def OpenMallWindow(self, size):
	        if self.Checking_Maps():        
	            return
	        else:
	            self.interface.OpenMallWindow(size)

 
  • Love 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.