Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Occorrente:
- game.py
- uiwhisper.py
- Aprite il file uiwhisper.py e cercate la stringa
- PHP:
- def OpenWithTarget(self, targetName)
- Sotto noterete
- PHP:
- self.ignoreButton.Hide()
- bene, sostituitelo con:
- PHP:
- pnblock = open("blacklist.txt", "r")
- pnauslese = pnblock.read()
- pnblock.close()
- if pnauslese.find(targetName) !=-1:
- self.ignoreButton.Hide()
- else:
- self.ignoreButton.Show()
- Poi sotto cercate:
- PHP:
- def OpenWithoutTarget(self, event)
- e troverete:
- PHP:
- self.ignoreButton.Hide()
- Sostituite Hide() con Show()
- Ora cercate:
- PHP:
- def IgnoreTarget(self)
- e troverete questo:
- PHP:
- def IgnoreTarget(self):
- net.SendChatPacket("/ignore " + self.targetName)
- Sostituite il tutto cosi:
- PHP:
- ignoredplayer = self.targetName + "\n"
- out_file = open("blacklist.txt", "a")
- out_file.write(ignoredplayer)
- out_file.close()
- chat.AppendChat(chat.CHAT_TYPE_INFO, "L' utente " + self.targetName + " è stato bloccato e non può più inviarti pm.")
- chat.AppendChat(chat.CHAT_TYPE_INFO, "Per sbloccarlo rimuovi il suo nome blacklist.txt nella cartella del client.")
- self.ignoreButton.Hide()
- Con li file uiwhisper.py abbiamo finito.
- Ora aprite il file game.py e cercate:
- PHP:
- def OnRecvWhisper(self, mode, name, line)
- Modificate tutta la funzione con questo:
- PHP:
- def OnRecvWhisper(self, mode, name, line)
- pnblock = open("blacklist.txt", "r")
- pnauslese = pnblock.read()
- pnblock.close()
- if pnauslese.find(name) !=-1 and pname[0] != "[":
- if name.find("[") !=-1:
- chat.AppendWhisper(mode, name, line)
- self.interface.RecvWhisper(name)
- else:
- chat.AppendChat(chat.CHAT_TYPE_INFO, "Il giocatore bloccato " + name + " ha cercato di contattarti")
- net.SendWhisperPacket(name, "Sei stato bloccato.")
- if mode == chat.WHISPER_TYPE_GM:
- self.interface.RegisterGameMasterName(name)
- chat.AppendWhisper(mode, name, line)
- Finito.
- Ora create un file chiamato blacklist.txt nella directory principale del client ed avrete terminato...
Advertisement
Add Comment
Please, Sign In to add comment