Greetings.
Wrote a small gui programm for the ip loader.
You need Tibia Client and the Loader in the same folder.
Loader should have the name loader.
Because I don't have a rapidshare account or stuff like that and nobody would check the file from my server here is the code.
(I wrote it for a new one on Linux)
File called TkTibiaLoader.py
I hope you enjoy the programm. I also got a Install Script.
File called Installation.py
And you also need a bash file for full installation
You need all file in one folder.
Just start Installation.py and after install you just need to type TkTibiaLoader into the Terminal. Wola Finish.
Farewell
Clintfish
PS: Im not the best programmer and got a ugly style
Wrote a small gui programm for the ip loader.
You need Tibia Client and the Loader in the same folder.
Loader should have the name loader.
Because I don't have a rapidshare account or stuff like that and nobody would check the file from my server here is the code.
(I wrote it for a new one on Linux)
File called TkTibiaLoader.py
Python:
#!/usr/bin/python
from Tkinter import *
import tkFileDialog
import os
class TkTibiaLoader:
def __init__(self):
self.window = Tk()
self.window.title("TkTibiaLoader")
self.frame = Frame(self.window)
self.frame.pack()
self.path_frame = Frame(self.frame)
self.path_frame.pack()
self.path_label = Label(self.path_frame, text="Path to Loader")
self.path_label.pack(side=LEFT)
self.path_entry = Entry(self.path_frame)
self.path_entry.pack(side=LEFT)
self.path_button = Button(self.path_frame, text="Path", command=self.get_path)
self.path_button.pack(side=RIGHT)
self.ip_frame = Frame(self.frame)
self.ip_frame.pack()
self.ip_label = Label(self.ip_frame, text="Adress")
self.ip_label.pack(side=LEFT)
self.ip_entry = Entry(self.ip_frame)
self.ip_entry.pack(side=RIGHT)
self.port_frame = Frame(self.frame)
self.port_frame.pack()
self.port_label = Label(self.port_frame, text="Port")
self.port_label.pack(side=LEFT)
self.port_entry = Entry(self.port_frame)
self.port_entry.pack(side=RIGHT)
self.ok_button = Button(self.window, text="Connect", command=self.connect)
self.ok_button.pack()
self.window.mainloop()
def connect(self):
address = self.ip_entry.get()
port = self.port_entry.get()
path = self.path_entry.get()
os.chdir(path)
os.system("./loader %s %s" % (address, port))
def get_path(self):
home = os.getenv("HOME")
path2 = tkFileDialog.askdirectory(initialdir=home)
self.path_entry.delete(0,END)
self.path_entry.insert(END, path2)
if __name__ == "__main__":
TkTibiaLoader()
I hope you enjoy the programm. I also got a Install Script.
File called Installation.py
Python:
#!/usr/bin/python
from Tkinter import *
import tkMessageBox
import os
class Installation:
def __init__(self):
self.window = Tk()
self.window.title("Installation of TkTibiaLoader")
self.window.protocol("WM_DELETE_WINDOW", self.cancel_command)
self.frame = Frame(self.window)
self.frame.pack()
self.information = Label(self.frame, text="Do install this programm you need root rights. \n This Programm works with just ONE Tibia Version. \n (Will support more Version in next Release) \n Just click on INSTALL. It will copy the important files\n to/usr/local/lib and /usr/local/bin. \n After installation just type TkTibiaLoader into the terminal \n and the programm will start. \n", justify=LEFT)
self.information.pack()
self.button_frame = Frame(self.frame)
self.button_frame.pack(expand=1)
self.install_button = Button(self.button_frame, text="INSTALL", command=self.install_command)
self.install_button.pack(side=LEFT)
self.cancel_button = Button(self.button_frame, text="CANCEL", command=self.cancel_command)
self.cancel_button.pack(side=RIGHT)
self.window.mainloop()
def install_command(self):
os.system("gksudo cp TkTibiaLoader.py /usr/local/lib")
os.system("gksudo cp TkTibiaLoader /usr/local/bin")
if tkMessageBox.showinfo("Finish", "Installation is finish!\nClick OK to quit"):
self.window.destroy()
def cancel_command(self):
if tkMessageBox.askokcancel("Quit", "Do you really want to abort installation?",icon="warning"):
self.window.destroy()
if __name__ == "__main__":
Installation()
And you also need a bash file for full installation
Bash:
#!/bin/bash
cd /usr/local/lib
python TkTibiaLoader.py
You need all file in one folder.
Just start Installation.py and after install you just need to type TkTibiaLoader into the Terminal. Wola Finish.
Farewell
Clintfish
PS: Im not the best programmer and got a ugly style