-
Posts
276 -
Joined
-
Last visited
-
Days Won
7 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Shang
-
-
45 minutes ago, VegaS said:
s_Color = [0xffFFC700, 0xffFFC700] if (12010 <= itemVnum and itemVnum <= 12019): # 12010 | 12011 | 12012 | 12013 | 12014 | 12015 | 12016 | 12017 | 12018 | 12019 self.AppendTextLine("Description for item 12019 <= 12019!", s_Color[0]) if (1 <= itemVnum and itemVnum <= 20009): # 1 | 2 | 3 | 4 | 5 etc etc...max 20009 self.AppendTextLine("Description for all items!", s_Color[1])
if (12010 <= itemVnum and itemVnum <= 12019): # 12010 | 12011 | 12012 | 12013 | 12014 | 12015 | 12016 | 12017 | 12018 | 12019 if (1 <= itemVnum and itemVnum <= 20009): # 1 | 2 | 3 | 4 | 5 etc etc...max 20009
Hmm... 12010 <= it checks values less than 12010 too. The same with the other conditional.
-
-
1 minute ago, MrLibya said:
open your eyes
and slotNumber in self.listUnusableSlot:
Look at your shit code bro. If the slotnumber isn't in the list and the slot have to be usable?
If you delete this: and slotNumber in self.listUnusableSlot: you'll see working anyway.
-
Why are you appending the slots in a list if you don't use the list?
-
36 minutes ago, OceanusPT said:
i belive this will work with txt. Cuz there u can mark itens with ANTIFLAG_GIVE but its complicate do set this in mysql, right?
Man, when server loads the txt it converts string to numbers (like mysql) ANTIFLAG_GIVE is an antiflag number.
-
Hi devs, today i'm going to release a simple TextLink. It works like a button but without a button, only with text. Let's see.
SpoilerIt has Close event.
The python code:
Spoilerclass TextLink(ui.Window):
## COLORS
NORMAL_COLOR = grp.GenerateColor(0.7607, 0.7607, 0.7607, 1.0)
OVER_COLOR = 0xff1457c7
DOWN_COLOR = 0xff0f3e8c
def __init__(self):
ui.Window.__init__(self)
self.eventFunc = None
self.eventArgs = None
self.text = ui.TextLine()
self.text.SetParent(self)
self.text.Show()self.underline = ui.Line()
self.underline.SetParent(self)
self.underline.SetColor(self.NORMAL_COLOR)
self.underline.Hide()
def __del__(self):
ui.Window.__del__(self)
def SetText(self, text):
self.text.SetText(text)
self.SetSize(self.text.GetTextSize()[0], self.text.GetTextSize()[1])
self.underline.SetPosition(0, self.text.GetTextSize()[1])
self.underline.SetWindowHorizontalAlignCenter()
self.underline.SetSize(self.text.GetTextSize()[0], 0)
def OnMouseOverIn(self):
self.text.SetPackedFontColor(self.OVER_COLOR)
self.underline.SetColor(self.OVER_COLOR)
self.underline.Show()
def OnMouseOverOut(self):
self.text.SetPackedFontColor(self.NORMAL_COLOR)
self.underline.Hide()
def OnMouseLeftButtonDown(self):
self.text.SetPackedFontColor(self.DOWN_COLOR)
self.underline.SetColor(self.DOWN_COLOR)
self.underline.Show()
def OnMouseLeftButtonUp(self):
if self.eventFunc:
apply(self.eventFunc, self.eventArgs)
self.OnMouseOverOut()
def SetEvent(self, event, *args):
self.eventFunc = event
self.eventArgs = argsShitty spoiler deletes the tabs. Be carefull about tabs. Or go to pastebin: http://pastebin.com/CkNXmeAm
- 7
- 1
- 8
-
From uiToolTip.py.
-
item.set_attribute_type already exists with name item.set_value.
Syntax: item.set_value(num(0,6), type, value)
item.get_attr here you have @PACI's function:
Spoilerint item_get_attribute(lua_State* L) { LPITEM item = CQuestManager::instance().GetCurrentItem(); // If there's no item, it'll return 0 if (!item) { lua_pushnumber(L, 0); return 1; } // If the function argument isn't a number, returns a syserr error if (!lua_isnumber(L, 1)) { sys_err("item_get_attr_type error!! index must be a number"); return 1; } // Saves the attribute type and value in integer variables int attrType = item->GetAttributeType(lua_tonumber(L,1)); int attrValue = item->GetAttributeValue(lua_tonumber(L,1)); // Creates a lua table lua_newtable( L ); // Gets and inserts the item attribute type into the lua table lua_pushnumber(L, attrType); lua_rawseti(L, -2, 1); // Gets and inserts the item attribute value into the lua table lua_pushnumber(L, attrValue); lua_rawseti(L, -2, 2); return 1; } { "get_attr", item_get_attribute}
Syntax:
item.get_attr(num(0,6))[1] - gets the bonus type
item.get_attr(num(0,6))[2] - gets the bonus value
-
-
Damn this script is only a query ._.
-
You have to set in socket0 the global timestamp plus the time of costume duration.
Example 1h of costume:
lua: get_time()+3600
py: app.GetGlobalTimeStamp()+3600
-
To ban sashes in guildstorage put the vnums of sashed inside this table in quest:
local blackListItem = {50821,50822,50823,50824,50825,50826,51002}
And replace def OverInItem with this:
def OverInItem(self, index):
items = constInfo.GUILDSTORAGE["slots"]["TAB"+str(self.tab)]
attrs = [(items[index][8],items[index][9]),(items[index][10],items[index][11]),(items[index][12],items[index][13]),(items[index][14],items[index][15]),(items[index][16],items[index][17]),(items[index][18],items[index][19]),(items[index][20],items[index][21])]
attrs += [(0,0)]*8
self.toolTip.ClearToolTip()
self.toolTip.AddRefineItemData(items[index][0], [items[index][2],items[index][3],items[index][4],items[index][5],items[index][6],items[index][7]], attrs)Tell if works.
- 2
-
Shoulder sash system has more bonuses. You have to add these bonuses values to quest and to recieve ingame.
-
2 hours ago, kodepiko said:
Yeah, I tried it but still got OnMouseOverIn() takes exactly 1 argument (2 given) I don't pass any arguments with this function so crazy thing..
My uirefine: http://pastebin.com/jp6iFezF
Pastebin not available. Can you share your ui.py?
- 1
-
41 minutes ago, kodepiko said:
Hello,
I'm trying to add MouseIn tooltip to ImageBox at uiRefine.py
(I want hover tooltip with item description on refine materials icon for ex. red pearl etc)I try this code at AppendMaterial()
slot = self.__MakeSlot() slot.SetParent(self) slot.SetPosition(15, self.dialogHeight)
itemImage = self.__MakeItemImage() itemImage.SetParent(slot) item.SelectItem(vnum) itemImage.LoadImage(item.GetIconImageFileName())
# self.itemImage = itemImage # this is defined somewhere else self.itemImage.OnMouseOverIn(self.ShowTip()) self.itemImage.OnMouseOverOut(self.HideTip())
I init tooltip at def Open():
self.txttooltip = uiToolTip.ToolTip() self.txttooltip.HideToolTip()
but get syserr:
0529 13:54:42313 :: TypeError 0529 13:54:42313 :: : 0529 13:54:42313 :: OnMouseOverIn() takes exactly 1 argument (2 given) 0529 13:54:42313 ::
When I do self.itemImage.OnMouseOverIn = self.ShowTip() syserr is clear but there's no tooltip, so I think it's bad use of this function
My defs:
def ShowTip(self): self.txttooltip.ClearToolTip() self.txttooltip.AppendTextLine("Description") self.txttooltip.Show() def HideTip(self): self.txttooltip.Hide()
Anyone know how to do this?
Greetings.self.itemImage.OnMouseOverIn(self.ShowTip)
self.itemImage.OnMouseOverOut(self.HideTip)- 1
-
Because the height of the taskbar img. It is transparent img but not ingame.
-
self.txttooltip = uiToolTip.ToolTip()
self.txttooltip.AutoAppendTextLine(text)
self.txttooltip.HideToolTip()self.image.SAFE_SetEvent("MOUSE_OVER_IN", self.txttooltip.ShowToolTip)
self.image.SAFE_SetEvent("MOUSE_OVER_OUT", self.txttooltip.HideToolTip)- 3
-
It isn't a problem. Just find RecvGuildSafeboxPacket: subHeader in client source and comment the line, it's a TraceError (a debug method).
-
Try this:
self.isActiveRotation = False
self.button.SetMouseClickEvent(self.ActiveRotation)
self.button.SetMouseButtonUpEvent(self.DeactiveRotation)def ActiveRotation(self):
self.isActiveRotation = True
def DeactiveRotation(self):
self.isActiveRotation = False
def OnUpdate(self):
if self.isActiveRotation:
self.Rotation -= 1
chr.SetRotation(self.Rotation)- 1
-
28 minutes ago, Haruka said:
If you want i can sell you nice source
He want to download not to buy...
-
self.button.SetToolTipText('text') or 'tooltip_text' : 'text'
-
3 hours ago, AlCapone said:
Ty and this what means?
#define TIME_OVER_PONG_DOWN_RATE 50000
#define TIME_OVER_LOGIN_DOWN_RATE 10000I don't know sorry
-
It is unix timestamp format. You can convert it here: http://www.unixtimestamp.com/
- 1
-
Use pc.give_item2_select(vnum, count) instead of pc.give_item2.
- 2
[Old][Archive] - [Official] Unpacked Updates Metin2.de
in Guides & HowTo
Posted
Can someone upload 16.3 patches?