ex:
constInfo.quest_send
constInfo.new_feature_datas
questlib.LIB_variable_add_player
and some phyton scipts for uiinventory or game or uitooltip.py (I guess)
I Try to run this board but i cant run it.
Please help me.
Thank you for your helps
In Turkish:
Ben bu sistemin eksiklerini gidermeye çalıştım fakat kayıp şeyler var. Yardım edebilirmisiniz ? Çünkü bu sistemi hepimiz kullanacağız.
Örneğin:
constInfo.quest_send
constInfo.new_feature_datas
questlib.LIB_variable_add_player
ve bazı phyton girdileri. Mesela uiinventory.py uitooltip.py vb. Eksikler var.(emin değilim)
Bu ekranı çalıştırmayı denedim fakat başarızız oldum.
Yardımlarınız İçin Teşekkür Ederim...
Sorry for my bad English.
uielement.py
PHP Code:
import ui
import chat
import app
import player
import snd
import item
import net
import constInfo
import game
import mouseModule
import uiToolTip
import wndMgr
is_active = 0
remain_time = 0
class Dialog(ui.ScriptWindow):
Slot = {}
def __init__(self):
#ui.ScriptWindow.__init__(self)
self.LoadUI()
def Destroy(self):
self.Board = None
def LoadUI(self):
self.Board = ui.BoardWithTitleBar()
self.Board.SetSize(290, 340)
self.Board.SetCenterPosition()
self.Board.AddFlag("movable")
self.Board.SetTitleName("Diaconis Simyası")
self.Board.SetCloseEvent(self.__del__)
self.itemtooltip = uiToolTip.ItemToolTip()
self.itemtooltip.HideToolTip()
# self.logo_pic = ui.ImageBox()
# self.logo_pic.SetParent(self.Board)
# self.logo_pic.AddFlag("not_pick")
# self.logo_pic.LoadImage("d:/ymir work/ui/public/element.tga")
# self.logo_pic.SetPosition(45, 30)
# self.logo_pic.Show()
data = [
{"x":int(30), "y":int(50),"farbe":"d:/elite works/slotblue.tga"}, #oben links
{"x":int(240), "y":int(50),"farbe":"d:/elite works/slotred.tga"}, #oben rechts
{"x":int(30), "y":int(230),"farbe":"d:/elite works/slotgreen.tga"}, #unten links
{"x":int(240), "y":int(230),"farbe":"d:/elite works/slotyellow.tga"}, #unten rechts
{"x":int(135), "y":int(135),"farbe":"d:/elite works/slotbase.tga"}] #mitte
i = 0
w = 1
while i < 5:
x = data [i]["x"]
y = data [i]["y"]
farbe = data [i]["farbe"]
self.Slot[w*10] = ui.ImageBox()
self.Slot[w*10].SetParent(self.Board)
self.Slot[w*10].LoadImage(str(farbe))
self.Slot[w*10].Show()
self.Slot[w*10].SetPosition(x, y)
self.Slot[w*100] = ui.SlotWindow()
self.Slot[w*100].SetParent(self.Board)
self.Slot[w*100].AppendSlot(w,0,0,0,0)
self.Slot[w*100].SetPosition(x, y)
self.Slot[w*100].Show()
self.Slot[w] = ui.GridSlotWindow()
self.Slot[w].SetParent(self.Board)
self.Slot[w].ArrangeSlot(w,1,1,32,32,0,0)
self.Slot[w].SetPosition(x, y)
self.Slot[w].SetOverInItemEvent(ui.__mem_func__(self.ShowToolTip))
self.Slot[w].SetOverOutItemEvent(ui.__mem_func__(self.HideToolTip))
self.Slot[w].SetSelectEmptySlotEvent(ui.__mem_func__(self.add_slot))
self.Slot[w].SetSelectItemSlotEvent(ui.__mem_func__(self.del_slot))
self.Slot[w].Show()
w = w + 1
i = i + 1
self.yolobutton = ui.Button()
self.yolobutton.SetParent(self.Board)
self.yolobutton.SetPosition(110, 300)
self.yolobutton.SetUpVisual("d:/ymir work/ui/public/large_button_01.sub")
self.yolobutton.SetOverVisual("d:/ymir work/ui/public/large_button_02.sub")
self.yolobutton.SetDownVisual("d:/ymir work/ui/public/large_button_03.sub")
self.yolobutton.SetText("Aktive Et")
self.yolobutton.SetEvent(self.activee)
self.yolobutton.Show()
def Run(self):
if self.Board.IsShow() :
self.Board.Hide()
else:
self.Board.Show()
def __del__(self):
#ui.ScriptWindow.__del__(self)
self.Board.Hide()
def activee(self):
constInfo.quest_send = "diaconissystem#active#0"
self.highlights()
def highlights(self):
data = constInfo.new_feature_datas
if len(data) < 5:
return
i = 1
global is_active
while i <= 5:
slot1 = data.split("!")[i]
slot1_index = slot1.split(":")[0]
slot1_vnum = slot1.split(":")[1]
if is_active >= 1 and slot1_vnum >= 1:
self.Slot[i*100].ActivateSlot(i)
else:
self.Slot[i*100].DeactivateSlot(i)
i = i + 1
def ShowToolTip(self, slotIndex):
if mouseModule.mouseController.isAttached():
return
self.itemtooltip.ClearToolTip()
global is_active
data = constInfo.new_feature_datas
if len(data) < 5:
return
i = 1
while i <= 5:
slot1 = data.split("!")[i]
slot1_index = slot1.split(":")[0]
slot1_vnum = slot1.split(":")[1]
if slotIndex == i:
self.itemtooltip.AddItemData(int(slot1_vnum), [0, 0, 0])
self.itemtooltip.AppendSpace(5)
i = i + 1
if slotIndex == 5:
self.itemtooltip.AppendSpace(5)
self.itemtooltip.AppendTextLine("Zeit bis das XX erneut")
self.itemtooltip.AppendTextLine("Aktiviert werden kann.")
#if is_active >= 1:
self.itemtooltip.AppendMallItemLastTime(remain_time + 3)
#else:
# self.itemtooltip.AppendMallItemLastTime(remain_time - app.GetGlobalTimeStamp())
self.itemtooltip.ShowToolTip()
def add_slot(self,slotIndex):
global is_active
if is_active >= 1:
chat.AppendChat(chat.CHAT_TYPE_INFO,"Simya aktifken taş ekleyemezsin.")
return
isAttached = mouseModule.mouseController.isAttached()
if isAttached:
attachedSlotType = mouseModule.mouseController.GetAttachedType()
attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
mouseModule.mouseController.DeattachObject()
if player.SLOT_TYPE_INVENTORY != attachedSlotType:
return
itemvnum = player.GetItemIndex(attachedSlotPos)
item.SelectItem(itemvnum)
constInfo.quest_send = "diaconissystem#ADD#" +str(slotIndex) + "#" + str(attachedSlotPos)
def reload(self):
#data = "!0:0!1:27993!2:27992!3:27994!4:27993"
data = constInfo.new_feature_datas
if len(data) < 5:
return
i = 1
while i <= 5:
slot1 = data.split("!")[i]
slot1_index = slot1.split(":")[0]
slot1_vnum = slot1.split(":")[1]
self.Slot[i].ClearSlot(i)
if slot1_vnum >= 1:
self.Slot[i].SetItemSlot(i, int(slot1_vnum), 1)
self.Slot[i*100].SetItemSlot(i, int(slot1_vnum), 1)
self.Slot[i].RefreshSlot()
i = i + 1
self.highlights()
def del_slot(self,slotIndex):
global is_active
if is_active >= 1:
chat.AppendChat(chat.CHAT_TYPE_INFO,"Simya aktifken taş çıkartamazsın.")
return
constInfo.quest_send = "diaconissystem#DEL#" +str(slotIndex)
def HideToolTip(self):
self.itemtooltip.HideToolTip()
PHP Code:
function LIB_send_client_diaconissystem_infos()
--if is_calc_to_globaltime_new_feature == true then
LIB_client_app("diaconissystem","!1:"..pc.getf("diaconissystem","slotindex_1").."!2:"..pc.getf("diaconissystem","slotindex_2").."!3:"..pc.getf("diaconissystem","slotindex_3").."!4:"..pc.getf("diaconissystem","slotindex_4").."!5:"..pc.getf("diaconissystem","slotindex_5").."",pc.getf("diaconissystem","active"),pc.getf("diaconissystem","remain_time_5") + get_global_time(),LIB_variable_get_player("new_feature_clicket"))
--else
-- LIB_client_app("diaconissystem","!1:"..pc.getf("diaconissystem","slotindex_1").."!2:"..pc.getf("diaconissystem","slotindex_2").."!3:"..pc.getf("diaconissystem","slotindex_3").."!4:"..pc.getf("diaconissystem","slotindex_4").."!5:"..pc.getf("diaconissystem","slotindex_5").."",pc.getf("diaconissystem","active"),pc.getf("diaconissystem","remain_time_5"),LIB_variable_get_player("new_feature_clicket"))
--end
LIB_variable_add_player("new_feature_clicket",0)
end
is_calc_to_globaltime_new_feature = true
function CLIENTCOM_diaconissystem(data)
local input_comming = data
if input_comming[2] == nil then
return
end
if input_comming[3] == nil then
return
end
if input_comming[2] == "active" then
-- chat("debug active: "..pc.getf("diaconissystem","active").."")
if pc.getf("diaconissystem","active") == 1 then
-- syschat("System ist aktiviert")
return
end
if pc.getf("diaconissystem","slotindex_5") == 0 then
chat("Du hast kein Zeit Elixier drinne. Abbruch")
return
end
if pc.getf("diaconissystem","slotindex_1") == 0 and pc.getf("diaconissystem","slotindex_2") == 0 and pc.getf("diaconissystem","slotindex_3") == 0 and pc.getf("diaconissystem","slotindex_4") == 0 then
chat("Du hast keinerlei stein gesetzt. Abbruch")
return
end
local t = pc.getf("diaconissystem","remain_time_5")
for i = 1, 4, 1 do
--chat("CHECK SLOT "..i.." "..pc.getf("diaconissystem","slotindex_"..i.."").."")
local v = pc.getf("diaconissystem","slotindex_"..i.."")
if v >= 1 then
local d = mysql_query("SELECT applytype0,applyvalue0,applytype1,applyvalue1,applytype2,applyvalue2 from player.item_proto where vnum = '"..v.."' limit 1")
chat("Slot "..i.." hat bonis: applytype0: "..d[1][1].." applyvalue0: "..d[1][2].." applytype1,: "..d[1][3].." applyvalue1: "..d[1][4].." applytype2: "..d[1][5].." applyvalue2: "..d[1][6].."")
affect.add_collect(d[1][1],d[1][2],t)
end
end
pc.setf("diaconissystem","remain_time_5",t)
-- chat("Setzte zeit für "..t.." Sekunden")
pc.setf("diaconissystem","active",1)
--pc.setf("diaconissystem","remain_time",number(100,500))
--chat("Dauer: vnum: "..pc.getf("diaconissystem","slotindex_5").."")
LIB_variable_add_player("new_feature_clicket",1)
LIB_send_client_diaconissystem_infos()
end
if input_comming[2] == "DEL" then
local s = tonumber(input_comming[3])
local vnums = pc.getf("diaconissystem","slotindex_"..s.."")
if s >= 1 and s <= 5 and vnums >= 1 then
--pc.give_item2(vnums,1)
--pc.setf("diaconissystem","slotindex_"..s.."",0)
-- LIB_send_client_diaconissystem_infos()
--elseif s == 5 then
--if pc.getf("diaconissystem","slotindex_5") >= 1 then
pc.give_item2_select(vnums,1)
--if is_calc_to_globaltime_new_feature == true then
item.set_socket(0,pc.getf("diaconissystem","remain_time_"..s.."") + get_global_time())
-- else
--item.set_socket(0,pc.getf("diaconissystem","remain_time_"..s..""))
--end
pc.setf("diaconissystem","slotindex_"..s.."",0)
LIB_variable_add_player("new_feature_clicket",1)
LIB_send_client_diaconissystem_infos()
--end
else
syschat("Fehler beim rausnehmen! ERROR #451514")
end
--setskin(NOWINDOW)
end
if input_comming[4] == nil then
return
end
if input_comming[2] == "ADD" then
local s = tonumber(input_comming[3])
local cell = input_comming[4]
item.select_cell(cell)
-- local rr;
--if is_calc_to_globaltime_new_feature == true then
local rr = item.get_socket(0) - get_global_time()
--else
-- rr = item.get_socket(0)
--end
local vnum = item.get_vnum()
--say("ADD vnum: "..vnum.."")
local remove_item_from_pos_old_id = 0
local value = tonumber(item.get_value(0))
if vnum >= 831000 and vnum <= 831900 or (vnum >= 100000 and vnum <= 100002) then
local vnums = pc.getf("diaconissystem","slotindex_"..s.."")
if value == s then
if remove_item_from_pos_old_id ~= item.get_id() then
item.remove()
local vnums = pc.getf("diaconissystem","slotindex_"..value.."")
if vnums >= 1 then
pc.setf("diaconissystem","slotindex_"..value.."",0) --nit wichtig
LIB_send_client_diaconissystem_infos() --nict wichtig
pc.give_item2_select(vnums,1)
item.set_socket(0,pc.getf("diaconissystem","remain_time_"..s.."") + get_global_time())
end
pc.setf("diaconissystem","remain_time_"..value.."",rr)
pc.setf("diaconissystem","slotindex_"..value.."",vnum)
LIB_variable_add_player("new_feature_clicket",1)
LIB_send_client_diaconissystem_infos()
return true
else
return false
end
else
syschat("Fehler beim hinzufügen! ERROR #754855")
end
else
syschat("Fehler beim hinzufügen! Dieser Gegenstand kommt nicht dorthn")
end
--setskin(NOWINDOW)
end
end
PHP Code:
LIB_send_client_diaconissystem_infos
CLIENTCOM_diaconissystem
PHP Code:
quest diaconissystem begin
state start begin
when 20001.chat."Diaconis Simyası" begin
pc.setf("diaconissystem","active",0)
LIB_send_client_diaconissystem_infos()
setskin(NOWINDOW)
end
when 831000.use or
831001.use or
831002.use or
831003.use or
831004.use or
831005.use or
831006.use or
831007.use or
831008.use or
831009.use or
831010.use or
831011.use or
831012.use or
831013.use or
831014.use or
831015.use or
831016.use or
831017.use or
831018.use or
831019.use or
831020.use or
831021.use or
831022.use or
831023.use or
831024.use or
831025.use or
831026.use or
831027.use or
831028.use or
831029.use or
831100.use or
831101.use or
831102.use or
831103.use or
831104.use or
831105.use or
831106.use or
831107.use or
831108.use or
831109.use or
831110.use or
831111.use or
831112.use or
831113.use or
831114.use or
831115.use or
831116.use or
831117.use or
831118.use or
831119.use or
831120.use or
831121.use or
831122.use or
831123.use or
831124.use or
831125.use or
831126.use or
831127.use or
831128.use or
831129.use or
831200.use or
831201.use or
831202.use or
831203.use or
831204.use or
831205.use or
831206.use or
831207.use or
831208.use or
831209.use or
831210.use or
831211.use or
831212.use or
831213.use or
831214.use or
831215.use or
831216.use or
831217.use or
831218.use or
831219.use or
831220.use or
831221.use or
831222.use or
831223.use or
831224.use or
831225.use or
831226.use or
831227.use or
831228.use or
831229.use or
831300.use or
831301.use or
831302.use or
831303.use or
831304.use or
831305.use or
831306.use or
831307.use or
831308.use or
831309.use or
831310.use or
831311.use or
831312.use or
831313.use or
831314.use or
831315.use or
831316.use or
831317.use or
831318.use or
831319.use or
831320.use or
831321.use or
831322.use or
831323.use or
831324.use or
831325.use or
831326.use or
831327.use or
831328.use or
831329.use
begin
if pc.getf("diaconissystem","active") == 1 then
return
end
local vnum = item.get_vnum()
local value = item.get_value(0)
local cell = item.get_cell()
LIB_variable_add_player("new_feature_clicket",1)
CLIENTCOM_diaconissystem({"nix","ADD",value,cell})
end
when login begin
loop_timer("check",15)
end
when check.timer begin
if pc.getf("diaconissystem","active") == 1 then
local s = pc.getf("diaconissystem","remain_time_5") -15
if tonumber(s) < tonumber(0) then
for i = 1,5 do
pc.setf("diaconissystem","remain_time_"..i.."",0)
pc.setf("diaconissystem","slotindex_"..i.."",0)
pc.setf("diaconissystem","active",0)
end
end
pc.setf("diaconissystem","remain_time_5",s)
--chat("debug new feature time: "..s.."")
if pc.getf("diaconissystem","slotindex_1") == 0
and pc.getf("diaconissystem","slotindex_2") == 0
and pc.getf("diaconissystem","slotindex_3") == 0
and pc.getf("diaconissystem","slotindex_4") == 0 then
pc.setf("diaconissystem","active",0)
end
end
LIB_variable_add_player("new_feature_clicket",1)
LIB_send_client_diaconissystem_infos()
end
end
end






