Version 1.0
My First Python Project 
Allgemeine Informationen:
- Man kann entscheiden zwischen dem Modus "Normal" und "Rufchat"
- Delay kann man selbst bestimmt werden
- Ist mehrfach startbar, Hidden und sollte eig. auf jedem Server funktionieren, da er in Python geschrieben wurde
Anleitung:
1. "m2PythonLoader.mix" in euren Metin2 Client verschieben
2. Metin starten und dann im Python Loader auf Select klicken
3. "Spambot.py" auswählen und auf "Run" klicken
Screens:
Credits:
.United: hat mit den Einstieg in Python gezeigt und ich habe sein Messagebot als kleine Vorlage genommen
Danke an:
Slait: hat mir einige Fragen beantwortet/tipps gegeben
SandMann: hat mir einige Fragen beantwortet/tipps gegeben
Allgemeine Informationen:
- Man kann entscheiden zwischen dem Modus "Normal" und "Rufchat"
- Delay kann man selbst bestimmt werden
- Ist mehrfach startbar, Hidden und sollte eig. auf jedem Server funktionieren, da er in Python geschrieben wurde
Anleitung:
1. "m2PythonLoader.mix" in euren Metin2 Client verschieben
2. Metin starten und dann im Python Loader auf Select klicken
3. "Spambot.py" auswählen und auf "Run" klicken
Screens:
Credits:
.United: hat mit den Einstieg in Python gezeigt und ich habe sein Messagebot als kleine Vorlage genommen
Danke an:
Slait: hat mir einige Fragen beantwortet/tipps gegeben
SandMann: hat mir einige Fragen beantwortet/tipps gegeben
PHP Code:
import chat
import chr
import ui
import time
import player
import net
import app
spamming = 0
modus = 1
SpambotButton = ui.Button()
SpambotLine = ui.TextLine()
ShortButton = ui.Button()
ShortLine = ui.TextLine()
class Spamdialog(ui.ThinBoard):
def __init__(self):
ui.ThinBoard.__init__(self)
self.LoadGui()
def __del__(self):
ui.ThinBoard.__del__(self)
def LoadGui(self):
self.SetPosition(575, 210)
self.SetSize(200, 200)
#self.AddFlag("movable")
chat.AppendChat(chat.CHAT_TYPE_NOTICE, "Spambot by 123klo")
chat.AppendChat(chat.CHAT_TYPE_NOTICE, "Mit einem Klick auf den Button kann man den Bot einstellen")
chat.AppendChat(chat.CHAT_TYPE_NOTICE, "Mit X versteckt man ihn wieder")
self.LoadText()
self.LoadInput()
self.LoadButton()
def Show(self):
ui.ThinBoard.Show(self)
def Close(self):
global SetBase
SetBase = ""
self.Hide()
return TRUE
def OnPressEscapeKey(self):
self.Hide()
return TRUE
def LoadText(self):
self.MainLabel = ui.TextLine()
self.MainLabel.SetParent(self)
self.MainLabel.SetDefaultFontName()
self.MainLabel.SetPosition(-70, 4)
self.MainLabel.SetFeather()
self.MainLabel.SetWindowHorizontalAlignCenter()
self.MainLabel.SetText("Metin2 Spambot by 123klo")
self.MainLabel.SetFontColor(1.0, 0.8, 0)
self.MainLabel.SetOutline()
self.MainLabel.Show()
self.SpamtextLabel = ui.TextLine()
self.SpamtextLabel.SetParent(self)
self.SpamtextLabel.SetDefaultFontName()
self.SpamtextLabel.SetPosition(-90, 40)
self.SpamtextLabel.SetFeather()
self.SpamtextLabel.SetWindowHorizontalAlignCenter()
self.SpamtextLabel.SetText("Spamtext:")
self.SpamtextLabel.SetFontColor(1.0, 0.8, 0)
self.SpamtextLabel.SetOutline()
self.SpamtextLabel.Show()
self.DelayLabel = ui.TextLine()
self.DelayLabel.SetParent(self)
self.DelayLabel.SetDefaultFontName()
self.DelayLabel.SetPosition(-90, 95)
self.DelayLabel.SetFeather()
self.DelayLabel.SetWindowHorizontalAlignCenter()
self.DelayLabel.SetText("Delay:")
self.DelayLabel.SetFontColor(1.0, 0.8, 0)
self.DelayLabel.SetOutline()
self.DelayLabel.Show()
self.ModusLabel = ui.TextLine()
self.ModusLabel.SetParent(self)
self.ModusLabel.SetDefaultFontName()
self.ModusLabel.SetPosition(-90, 130)
self.ModusLabel.SetFeather()
self.ModusLabel.SetWindowHorizontalAlignCenter()
self.ModusLabel.SetText("Modus:")
self.ModusLabel.SetFontColor(1.0, 0.8, 0)
self.ModusLabel.SetOutline()
self.ModusLabel.Show()
def LoadInput(self):
self.SlotwahlSlotBar = ui.SlotBar()
self.SlotwahlSlotBar.SetParent(self)
self.SlotwahlSlotBar.SetSize(130, 50)
self.SlotwahlSlotBar.SetPosition(25, 40)
self.SlotwahlSlotBar.SetWindowHorizontalAlignCenter()
self.SlotwahlSlotBar.Show()
self.InputText = ui.EditLine()
self.InputText.SetParent(self.SlotwahlSlotBar)
self.InputText.SetSize(130, 39)
self.InputText.SetPosition(4, 2)
self.InputText.SetMax(70)
self.InputText.SetText("Spamtext")
self.InputText.SetFocus()
self.InputText.Show()
self.SlotwahlSlotBar2 = ui.SlotBar()
self.SlotwahlSlotBar2.SetParent(self)
self.SlotwahlSlotBar2.SetSize(130, 18)
self.SlotwahlSlotBar2.SetPosition(25, 95)
self.SlotwahlSlotBar2.SetWindowHorizontalAlignCenter()
self.SlotwahlSlotBar2.Show()
self.InputDelay = ui.EditLine()
self.InputDelay.SetParent(self.SlotwahlSlotBar2)
self.InputDelay.SetSize(130, 25)
self.InputDelay.SetPosition(2, 2)
self.InputDelay.SetNumberMode()
self.InputDelay.SetMax(4)
self.InputDelay.SetText("15")
self.InputDelay.SetFocus()
self.InputDelay.Show()
def LoadButton(self):
self.CloseButton = ui.Button()
self.CloseButton.SetParent(self)
self.CloseButton.SetPosition(170, 5)
self.CloseButton.SetUpVisual("d:/ymir work/ui/public/close_button_01.sub")
self.CloseButton.SetOverVisual("d:/ymir work/ui/public/close_button_02.sub")
self.CloseButton.SetDownVisual("d:/ymir work/ui/public/close_button_03.sub")
self.CloseButton.SetToolTipText("Hide Window")
self.CloseButton.SetEvent(ui.__mem_func__(self.Close))
self.CloseButton.Show()
self.ModeButton = ui.Button()
self.ModeButton.SetParent(self)
self.ModeButton.SetUpVisual("d:/ymir work/ui/public/middle_button_01.sub")
self.ModeButton.SetOverVisual("d:/ymir work/ui/public/middle_button_02.sub")
self.ModeButton.SetDownVisual("d:/ymir work/ui/public/middle_button_03.sub")
self.ModeButton.SetToolTipText("Spam-Modus")
self.ModeButton.SetText("Normal")
self.ModeButton.SetPosition(70, 125)
self.ModeButton.SetEvent(ui.__mem_func__(self.Mode))
self.ModeButton.Show()
self.StartButton = ui.Button()
self.StartButton.SetParent(self)
self.StartButton.SetPosition(10, 160)
self.StartButton.SetUpVisual("d:/ymir work/ui/public/large_button_01.sub")
self.StartButton.SetOverVisual("d:/ymir work/ui/public/large_button_02.sub")
self.StartButton.SetDownVisual("d:/ymir work/ui/public/large_button_03.sub")
self.StartButton.SetEvent(ui.__mem_func__(self.BotStart))
self.StartButton.SetText("Start")
self.StartButton.Show()
self.StopButton = ui.Button()
self.StopButton.SetParent(self)
self.StopButton.SetPosition(100, 160)
self.StopButton.SetUpVisual("d:/ymir work/ui/public/large_button_01.sub")
self.StopButton.SetOverVisual("d:/ymir work/ui/public/large_button_02.sub")
self.StopButton.SetDownVisual("d:/ymir work/ui/public/large_button_03.sub")
self.StopButton.SetEvent(ui.__mem_func__(self.BotStop))
self.StopButton.SetText("Stop")
self.StopButton.Show()
global SpambotButton
SpambotButton.SetText("")
SpambotButton.SetPosition(wndMgr.GetScreenWidth()-85,158)
SpambotButton.SetSize(88,21)
SpambotButton.SetEvent(self.Show)
SpambotButton.SetUpVisual("d:/ymir work/ui/public/small_button_01.sub")
SpambotButton.SetOverVisual("d:/ymir work/ui/public/small_button_02.sub")
SpambotButton.SetDownVisual("d:/ymir work/ui/public/small_button_03.sub")
SpambotButton.Show()
global SpambotLine
SpambotLine.SetParent(SpambotButton)
SpambotLine.SetPosition(22,10)
SpambotLine.SetVerticalAlignCenter()
SpambotLine.SetHorizontalAlignCenter()
SpambotLine.SetText("Show")
SpambotLine.Show()
global ShortButton
ShortButton.SetText("")
ShortButton.SetPosition(wndMgr.GetScreenWidth()-85,180)
ShortButton.SetSize(88,21)
ShortButton.SetEvent(self.Short)
ShortButton.SetUpVisual("d:/ymir work/ui/public/small_button_01.sub")
ShortButton.SetOverVisual("d:/ymir work/ui/public/small_button_02.sub")
ShortButton.SetDownVisual("d:/ymir work/ui/public/small_button_03.sub")
ShortButton.Show()
global ShortLine
ShortLine.SetParent(ShortButton)
ShortLine.SetPosition(23,10)
ShortLine.SetVerticalAlignCenter()
ShortLine.SetHorizontalAlignCenter()
ShortLine.SetText("Spam 1x")
ShortLine.Show()
############################# ############################# #############################
def Mode(self):
global modus
if modus == 1:
modus = 0
self.ModeButton.SetText("Rufchat")
elif modus == 0:
modus = 1
self.ModeButton.SetText("Normal")
def BotStart(self):
global spamming
global modus
if spamming == 1 and modus == 1:
spamming = 1
if spamming == 0 and modus == 1:
spamming = 1
chat.AppendChat(chat.CHAT_TYPE_INFO, "Normaler Spammer aktiviert")
self.NormalSpam()
if spamming == 1 and modus == 0:
spamming = 1
if spamming == 0 and modus == 0:
spamming = 1
chat.AppendChat(chat.CHAT_TYPE_INFO, "Rufchat Spammer aktiviert")
self.RufchatSpam()
def Short(self):
global modus
chattext = self.InputText.GetText()
if modus == 1:
net.SendChatPacket(chattext, chat.CHAT_TYPE_TALKING)
if modus == 0:
net.SendChatPacket(chattext, chat.CHAT_TYPE_SHOUT)
def BotStop(self):
global spamming
if spamming == 0:
spamming = 0
if spamming == 1:
spamming = 0
chat.AppendChat(chat.CHAT_TYPE_INFO, "Spamer deaktiviert")
self.dela = WaitingDialog()
self.dela.Open(99999999999999999999999999999999999999999999999999999999999999999999)
############################# ############################# #############################
def NormalSpam(self):
chattext = self.InputText.GetText()
chatdelay = self.InputDelay.GetText()
net.SendChatPacket(chattext, chat.CHAT_TYPE_TALKING)
self.dela = WaitingDialog()
self.dela.Open(int(chatdelay))
self.dela.SAFE_SetTimeOverEvent(self.NormalSpam)
def RufchatSpam(self):
chattext = self.InputText.GetText()
chatdelay = self.InputDelay.GetText()
net.SendChatPacket(chattext, chat.CHAT_TYPE_SHOUT)
self.dela = WaitingDialog()
self.dela.Open(int(chatdelay))
self.dela.SAFE_SetTimeOverEvent(self.RufchatSpam)
############################# ############################# #############################
class WaitingDialog(ui.ScriptWindow):
def __init__(self):
ui.ScriptWindow.__init__(self)
self.eventTimeOver = lambda *arg: None
self.eventExit = lambda *arg: None
def __del__(self):
ui.ScriptWindow.__del__(self)
def Open(self, waitTime):
curTime = time.clock()
self.endTime = curTime + waitTime
self.Show()
def Close(self):
self.Hide()
def Destroy(self):
self.Hide()
def SAFE_SetTimeOverEvent(self, event):
self.eventTimeOver = ui.__mem_func__(event)
def SAFE_SetExitEvent(self, event):
self.eventExit = ui.__mem_func__(event)
def OnUpdate(self):
lastTime = max(0, self.endTime - time.clock())
if 0 == lastTime:
self.Close()
self.eventTimeOver()
else:
return
StartDialog = Spamdialog()
StartDialog.Hide()
Version 2.0
Screen:
Anleitung/Instructions:
In the ReadMe.txt
Only for Pservers!

Version 2.0
03.09.13






