Hallo liebe epvp Com wie der title schon sagt hab ich eine frage beziehungsweise ein problem mit der python lua client quest kommunikation
ich habe eine quest erstellt die sieht so aus :
quest dueltargetboard begin
state start begin
when login begin
cmdchat("target_quest_qid "..q.getcurrentquestindex())
end
when info or button begin
cmdchat("get_input_start")
local vid = input(cmdchat("get_input_value"))
cmdchat("get_input_end")
local old_pc = pc.select(vid)
local level = pc.get_level()
local hp = pc.get_hp()
local max_hp = pc.get_max_hp()
local mp = pc.get_sp()
local max_mp = pc.get_max_sp()
local job = pc.get_job()
local sex = pc.get_sex()
local name = pc.get_name()
pc.select(old_pc)
cmdchat("SetTargetInfos "..level.."|"..hp.."|"..max_hp.."|"..mp.."|"..max_ mp.."|"..job.."|"..sex.."|"..name)
end
end
end
dann in der game.py das gemacht
def SetTargetBoardInfos(self, data):
dane = data.split("|")
constInfo.PLAYER_LEVEL = str(dane[0])
constInfo.PLAYER_HP = int(dane[1])
constInfo.PLAYER_MAX_HP = int(dane[2])
constInfo.PLAYER_SP = int(dane[3])
constInfo.PLAYER_MAX_SP = int(dane[4])
constInfo.PLAYER_JOB = int(dane[5])
constInfo.PLAYER_SEX = int(dane[6])
constInfo.PLAYER_NAME = str(dane[7])
"target_quest_qid" : self.SetTargetBoardQID,
"SetTargetInfos" : self.SetTargetBoardInfos,
und in der constinfo hab ich das gemacht:
VID = 0
TargetBoardQID = 0
PLAYER_HP = 0
PLAYER_MAX_HP = 0
PLAYER_SP = 0
PLAYER_MAX_SP = 0
PLAYER_LEVEL = 0
PLAYER_NAME = ""
PLAYER_SEX = 0
PLAYER_JOB = 0
nun wollte ich im handelsfenster char render + name + level machen das hat bei mir selber auch funktioniert nur wenn ich nun die daten des anderen herausfinden möchte verändern sich die werte der constInfo nicht sondern bleiben 0 und ""
mein code in uiexchange sieht so aus:
if constInfo.PLAYER_SEX == 0 and constInfo.PLAYER_JOB == 0:
self.CharRender2.LoadImage("icon/face/warrior_m.tga")
elif constInfo.PLAYER_SEX == 0 and constInfo.PLAYER_JOB == 1:
self.CharRender2.LoadImage("icon/face/assassin_m.tga")
elif constInfo.PLAYER_SEX == 0 and constInfo.PLAYER_JOB == 2:
self.CharRender2.LoadImage("icon/face/sura_m.tga")
elif constInfo.PLAYER_SEX == 0 and constInfo.PLAYER_JOB == 3:
self.CharRender2.LoadImage("icon/face/shaman_m.tga")
elif constInfo.PLAYER_JOB == 4:
self.CharRender2.LoadImage("icon/face/wolfman_m.tga")
elif constInfo.PLAYER_SEX == 1 and constInfo.PLAYER_JOB == 0:
self.CharRender2.LoadImage("icon/face/warrior_w.tga")
elif constInfo.PLAYER_SEX == 1 and constInfo.PLAYER_JOB == 1:
self.CharRender2.LoadImage("icon/face/assassin_w.tga")
elif constInfo.PLAYER_SEX == 1 and constInfo.PLAYER_JOB == 2:
self.CharRender2.LoadImage("icon/face/sura_w.tga")
elif constInfo.PLAYER_SEX == 1 and constInfo.PLAYER_JOB == 3:
self.CharRender2.LoadImage("icon/face/shaman_w.tga")
CharRender_2 = ui.ImageBox()
self.CharRender2 = CharRender_2
self.CharRender2.SetParent(self.targetboard)
self.CharRender2.SetPosition(5, 5)
self.CharRender2.Show()
self.target_level = self.GetChild("target_level")
self.target_name = self.GetChild("target_name")
self.target_level.SetText("Level: " + str(constInfo.PLAYER_LEVEL) + ":")
self.target_name.SetText(str(constInfo.PLAYER_NAME )
so sieht das ganze aus :
Ich hoffe mir kann jemand helfen den ic hweiß echt nicht mehr weiter ich habe alles versucht.. , es gibt noch zu sagen das die gleichen Variablen von der Constinfo im duell verwendet werden um tp etc des gegners anzuzeigen lassen dort funktioniert es einwandfrei ich habe auch schon versucht eine eigene quest + PYTHOn part zu machen für mein handelsfenster leider vergebens funktioniert auch nich
ich freue mich über jeden hinweis
Mfg Gerald