AuctionHouse

Închis
Avatar utilizator
C.Marius
Nivel 4

Nivel 4
Mesaje: 689
Membru din: 28 Sep 2014, 16:21
Server: orice
Regat: Jinno
Aprecieri: 7  
Mulţumiri: 1027  
 Contact:
Medalii

Imagine
Imagine
costinfo.py
Adauga la inceput

Cod: Selectaţi tot

HANDELSCENTER_CONFIG = { "index":0, "CMD": "", "YANG":0, "ITEMS" : [], "OWN_ITEMS" : [], "LOGS": []}
game.py
Adauga la inceput:

Cod: Selectaţi tot

import handelscenter
import event
Cauta:

Cod: Selectaţi tot

def __init__(self, stream):
Adauga:

Cod: Selectaţi tot

self.wndHandelscenter = handelscenter.Handelscenter()
Cauta:

Cod: Selectaţi tot

def Close(self):
Adauga:

Cod: Selectaţi tot

if self.wndHandelscenter.IsShow():
			self.wndHandelscenter.Open()
Cauta:

Cod: Selectaţi tot

def __ServerCommand_Build(self):
Adauga:

Cod: Selectaţi tot

"Handelscenter"				: self.__Handelscenter,
Adauga asta la sfarsit de tot:

Cod: Selectaţi tot

def __Handelscenter(self, info):
		CMD = info.split("/")
		if CMD[0]=="itemvonliste":
			self.wndHandelscenter.SetPercantage(int(CMD[27]), int(CMD[28]))
			constInfo.HANDELSCENTER_CONFIG[CMD[1]].append({"id": CMD[2], "vnum" : int(CMD[3]), "anzahl" : CMD[4], "yang" : CMD[5], "owner" : CMD[6], "boni1" : [int(CMD[7]), int(CMD[8])], "boni2" : [int(CMD[9]), int(CMD[10])], "boni3" : [int(CMD[11]), int(CMD[12])], "boni4" : [int(CMD[13]), int(CMD[14])], "boni5" : [int(CMD[15]), int(CMD[16])], "boni6" : [int(CMD[17]), int(CMD[18])], "boni7" : [int(CMD[19]), int(CMD[20])], "socket0" : int(CMD[21]), "socket1" : int(CMD[22]), "socket2" : int(CMD[23]), "socket3" : int(CMD[24]), "socket4" : int(CMD[25]), "socket5" : int(CMD[26])})
		elif CMD[0]=="logs":
			constInfo.HANDELSCENTER_CONFIG["LOGS"].append({"owner" : CMD[1], "vnum": CMD[2], "count" : CMD[3], "preis": CMD[4], "buyer":CMD[5], "date": CMD[6]})
		elif CMD[0]=="finishlogs":
			self.wndHandelscenter.AddToLog()
		elif CMD[0]=="yangingui":
			constInfo.HANDELSCENTER_CONFIG["YANG"] = int(CMD[1])
		elif CMD[0]=="index":
			constInfo.HANDELSCENTER_CONFIG["index"] = int(CMD[1])
		elif CMD[0]=="noitems":
			constInfo.HANDELSCENTER_CONFIG[CMD[1]] = []
			self.wndHandelscenter.Scrollbar()
		elif CMD[0]=="remove":
			constInfo.HANDELSCENTER_CONFIG[CMD[1]].pop(int(CMD[2]))
			self.wndHandelscenter.Scrollbar()
		elif CMD[0]=="input":
			net.SendQuestInputStringPacket(str(constInfo.HANDELSCENTER_CONFIG["CMD"]))
		elif CMD[0]=="finishsending":
			self.wndHandelscenter.Scrollbar()
		elif CMD[0]=="nologs":
			self.wndHandelscenter.NoLogs()
Pentru a inchide/deschide:

Cod: Selectaţi tot

if self.wndHandelscenter.IsShow():
			self.wndHandelscenter.Open()
		else:
			self.wndHandelscenter.Open()
			constInfo.HANDELSCENTER_CONFIG["CMD"] = "open"
			event.QuestButtonClick(constInfo.HANDELSCENTER_CONFIG["index"])
Atentie :-! sqlfile.sql il rulati in player
Update
Deschidere script cu F7
In game.py cautati:

Cod: Selectaţi tot

onPressKeyDict[app.DIK_F4]	= lambda : self.__PressQuickSlot(7)
Adaugati dupa:

Cod: Selectaţi tot

onPressKeyDict[app.DIK_F7]	= lambda : self.__guinameOPEN() # use different function names!
Apoi la final adaugati:

Cod: Selectaţi tot

def __guinameOPEN(self): # use different function names!
		self.Roulette.Open() # naturally use the code which is provided for the GUI
Deschidere script cu quest
In game.py cauta:

Cod: Selectaţi tot

def __ServerCommand_Build(self):
Adauga:

Cod: Selectaţi tot

"OpenRouletteGui"				: self.__guinameOPEN,
Iar la final:

Cod: Selectaţi tot

def __guinameOPEN(self): # The choosen function name.
		self.Roulette.Open() # naturally use the code which is provided for the GUI
Quest

Cod: Selectaţi tot

quest Rouletteopen begin -- Change to your GUINAMEopen
	state start begin
		when 9012.chat."Drachenroulett Fenster" begin -- Id and Text of npc!
			say_title(mob_name(npc.get_race())..":") --
			say("")
			say("Do you want to open the gui!?")
			if select ("Yes","No")==2 then return end
			cmdchat("OpenRoulleteGui") -- That's the name of the servercommand_build which is in the ""!
		end
	end
end
[Sursa=]Tm[/Sursa]
Ultima oară modificat 20 Iun 2017, 21:19 de către C.Marius, modificat 1 dată în total.
Avatar utilizator
sorrellboss
Nivel 3

Nivel 3
Mesaje: 461
Membru din: 29 Iun 2014, 09:51
Server: Metin2Gorj
Regat: Shinsoo
Aprecieri: 45  
Mulţumiri: 4  
Medalii

l-a incercat cineva?
Avatar utilizator
ManiacRobert
Developer

Developer
Mesaje: 1526
Membru din: 09 Dec 2013, 09:51
Server: Canary-World
Regat: Shinsoo
Aprecieri: 310  
Mulţumiri: 687  
Discord: Copiază ID
 Contact:
Medalii

Este full?
Imagine
Imagine
Imagine
Imagine
Afișează semnătura
Avatar utilizator
Gaz3rNr1
Nivel 6

Nivel 6
Mesaje: 983
Membru din: 19 Oct 2015, 19:13
Server: Se lucrează !
Regat: Jinno
Aprecieri: 1  
Mulţumiri: 571  
 Contact:
Medalii

Puteai să pui taburi pentru cei care nu știu cum să aranjeze if-urile și else-urile și def-urile.. Etc
Nu imi place realitatea, de asta trăiesc în lumea mea !
Afișează semnătura
Avatar utilizator
Bituse
Nou Venit

Nou Venit
Mesaje: 27
Membru din: 15 Feb 2015, 11:25
Server: Lumious
Regat: Jinno
Aprecieri: 44  
Mulţumiri: 0
Medalii

0527 00:30:57318 :: File "handelscenter.py", line 30, in BuildWindow

0527 00:30:57318 :: AttributeError
0527 00:30:57318 :: :
0527 00:30:57318 :: 'module' object has no attribute 'HANDELSCENTER_CONFIG'
0527 00:30:57318 ::



HELP!!
Thanks.
Avatar utilizator
CaMperMihai
Nivel 1

Nivel 1
Mesaje: 92
Membru din: 02 Ian 2015, 17:28
Aprecieri: 70  
Mulţumiri: 0
Medalii

Am adaugat tot, dar cand intru in metin mi l baga automat de 100 de ori si imi apare si dispare si nu mai pot face nimic decat sa scot metinul din task manager.. vreo idee?
Avatar utilizator
FastReview
Veteran

Veteran
Mesaje: 2624
Membru din: 25 Oct 2015, 00:01
Aprecieri: 77  
Mulţumiri: 111  
Discord: Copiază ID
Medalii

Link-ul de download nu mai este valabil, arhivat.
Închis
Răspunsuri
0
Vizualizări
233

Înapoi la “Arhivă”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 16 vizitatori