You last visited: Today at 10:24
Advertisement
[KOSTÜM-SYSTEM] 2013er Client (by .tehSource)
Discussion on [KOSTÜM-SYSTEM] 2013er Client (by .tehSource) within the Metin2 Private Server forum part of the Metin2 category.
05/18/2013, 15:17
#1
elite*gold: 29
Join Date: Aug 2010
Posts: 855
Received Thanks: 522
[KOSTÜM-SYSTEM] 2013er Client (by .tehSource)
Ich besitze den 2013er Client von .tehSource und ich verwende
Kostüm-System. Mein Problem ist jetzt, dass ich die Kostüme im Inventar sehe, aber wenn ich diese anziehe verschwinden sie aus dem Inventar, was ja eigentlich auch so sein soll. Die Kostüme gehen aber nicht in das vorgesehene Kostümfenster, dieses bleibt einfach leer und somit kann ich die dann auch nicht mehr ausziehen..
Screen:
Es wurde schon mal ein Thema zu genau diesem Problem gepostet, jedoch ohne vernünftige Antwort.
Ich hoffe ihr könnt mir weiterhelfen.
MfG SliceR
05/18/2013, 15:22
#2
elite*gold: 0
Join Date: Jan 2011
Posts: 2,504
Received Thanks: 870
kann es sein das es am type liegt? binn mir nicht sicher aber er solte auf 18 sein wen ich mich nicht irre
05/18/2013, 15:26
#3
elite*gold: 29
Join Date: Aug 2010
Posts: 855
Received Thanks: 522
Ja dieser ist auf 18.. Es liegt am Client. Serverside ist alles korrekt, sonst könnte ich diese ja überhaupt nicht benutzen.
05/18/2013, 15:31
#4
elite*gold: 150
Join Date: Sep 2010
Posts: 1,071
Received Thanks: 556
Zu deinem Satz: "Es wurde schon mal ein Thema zu genau diesem Problem gepostet, jedoch ohne vernünftige Antwort." Stimmt nicht ganz, es gibt einen Unterschied. Du hast die Liteversion(Quest), ich habe die Vollversion (Ohne Quest).
Aber nun zu deinem Problem, lade mal deine costumewindow.py (Aus uiscript) hoch.
Dann kann ich dir eventuell helfen.
05/18/2013, 15:56
#5
elite*gold: 4
Join Date: Feb 2013
Posts: 572
Received Thanks: 1,037
Quote:
Originally Posted by
.SliceR
Ich besitze den 2013er Client von .tehSource und ich verwende
Kostüm-System. Mein Problem ist jetzt, dass ich die Kostüme im Inventar sehe, aber wenn ich diese anziehe verschwinden sie aus dem Inventar, was ja eigentlich auch so sein soll. Die Kostüme gehen aber nicht in das vorgesehene Kostümfenster, dieses bleibt einfach leer und somit kann ich die dann auch nicht mehr ausziehen..
Screen:
Es wurde schon mal ein Thema zu genau diesem Problem gepostet, jedoch ohne vernünftige Antwort.
Ich hoffe ihr könnt mir weiterhelfen.
MfG SliceR
Hab das selbe Problem. Haha
05/18/2013, 15:59
#6
elite*gold: 29
Join Date: Aug 2010
Posts: 855
Received Thanks: 522
Quote:
Originally Posted by
[SA]Con
Zu deinem Satz: "Es wurde schon mal ein Thema zu genau diesem Problem gepostet, jedoch ohne vernünftige Antwort." Stimmt nicht ganz, es gibt einen Unterschied. Du hast die Liteversion(Quest), ich habe die Vollversion (Ohne Quest).
Aber nun zu deinem Problem, lade mal deine costumewindow.py (Aus uiscript) hoch.
Dann kann ich dir eventuell helfen.
Ok das stimmt.^^
Hier die costumewindow.py
Code:
[import uiScriptLocale
import item
COSTUME_START_INDEX = item.COSTUME_SLOT_START
window = {
"name" : "CostumeWindow",
"x" : SCREEN_WIDTH - 175 - 140,
"y" : SCREEN_HEIGHT - 37 - 565,
"style" : ("movable", "float",),
"width" : 140,
"height" : 180,
"children" :
(
{
"name" : "board",
"type" : "board",
"style" : ("attach",),
"x" : 0,
"y" : 0,
"width" : 140,
"height" : 180,
"children" :
(
## Title
{
"name" : "TitleBar",
"type" : "titlebar",
"style" : ("attach",),
"x" : 6,
"y" : 6,
"width" : 130,
"color" : "yellow",
"children" :
(
{ "name":"TitleName", "type":"text", "x":60, "y":3, "text":uiScriptLocale.COSTUME_WINDOW_TITLE, "text_horizontal_align":"center" },
),
},
## Equipment Slot
{
"name" : "Costume_Base",
"type" : "image",
"x" : 13,
"y" : 38,
"image" : uiScriptLocale.LOCALE_UISCRIPT_PATH + "costume/costume_bg.jpg",
"children" :
(
{
"name" : "CostumeSlot",
"type" : "slot",
"x" : 3,
"y" : 3,
"width" : 127,
"height" : 145,
"slot" : (
{"index":COSTUME_START_INDEX+0, "x":61, "y":45, "width":32, "height":64},
{"index":COSTUME_START_INDEX+1, "x":61, "y": 8, "width":32, "height":32},
{"index":COSTUME_START_INDEX+2, "x":5, "y":145, "width":32, "height":32},
),
},
),
},
),
},
),
}
05/18/2013, 16:06
#7
elite*gold: 150
Join Date: Sep 2010
Posts: 1,071
Received Thanks: 556
Quote:
Originally Posted by
.SliceR
Ok das stimmt.^^
Hier die costumewindow.py
Code:
[import uiScriptLocale
import item
COSTUME_START_INDEX = item.COSTUME_SLOT_START
window = {
"name" : "CostumeWindow",
"x" : SCREEN_WIDTH - 175 - 140,
"y" : SCREEN_HEIGHT - 37 - 565,
"style" : ("movable", "float",),
"width" : 140,
"height" : 180,
"children" :
(
{
"name" : "board",
"type" : "board",
"style" : ("attach",),
"x" : 0,
"y" : 0,
"width" : 140,
"height" : 180,
"children" :
(
## Title
{
"name" : "TitleBar",
"type" : "titlebar",
"style" : ("attach",),
"x" : 6,
"y" : 6,
"width" : 130,
"color" : "yellow",
"children" :
(
{ "name":"TitleName", "type":"text", "x":60, "y":3, "text":uiScriptLocale.COSTUME_WINDOW_TITLE, "text_horizontal_align":"center" },
),
},
## Equipment Slot
{
"name" : "Costume_Base",
"type" : "image",
"x" : 13,
"y" : 38,
"image" : uiScriptLocale.LOCALE_UISCRIPT_PATH + "costume/costume_bg.jpg",
"children" :
(
{
"name" : "CostumeSlot",
"type" : "slot",
"x" : 3,
"y" : 3,
"width" : 127,
"height" : 145,
"slot" : (
{"index":COSTUME_START_INDEX+0, "x":61, "y":45, "width":32, "height":64},
{"index":COSTUME_START_INDEX+1, "x":61, "y": 8, "width":32, "height":32},
{"index":COSTUME_START_INDEX+2, "x":5, "y":145, "width":32, "height":32},
),
},
),
},
),
},
),
}
Sehe da jetzt auf die schnelle keinen Fehler.
Lade mal deine constinfo.py auch hoch.
05/18/2013, 16:20
#8
elite*gold: 4
Join Date: Feb 2013
Posts: 572
Received Thanks: 1,037
Quote:
Originally Posted by
[SA]Con
Sehe da jetzt auf die schnelle keinen Fehler.
Lade mal deine constinfo.py auch hoch.
Ich glaube, dass ich das selbe System wie er hat, also lad ich mal meine Hoch :'o
Doch nicht das selbe Sys..
Code:
# GLOBAL OPTIONS
IN_GAME_SHOP_ENABLE = 1
CONSOLE_ENABLE = 0
PVPMODE_ENABLE = 1
PVPMODE_TEST_ENABLE = 0
PVPMODE_ACCELKEY_ENABLE = 1
PVPMODE_ACCELKEY_DELAY = 0.5
PVPMODE_PROTECTED_LEVEL = 30
Costume_Index = 0
Costume_hair_Index = 0
COSTUME_VNUM = 0
COSTUME_VNUM_HAIR = 0
COSTUME_SYSTEM_MAIN = 0
COSTUME_SYSTEM_HAIR = 0
COSTUME_SYSTEM_MAIN_ICON = ""
COSTUME_SYSTEM_HAIR_ICON = ""
FOG_LEVEL0 = 4800.0
FOG_LEVEL1 = 9600.0
FOG_LEVEL2 = 12800.0
FOG_LEVEL = FOG_LEVEL0
FOG_LEVEL_LIST=[FOG_LEVEL0, FOG_LEVEL1, FOG_LEVEL2]
CAMERA_MAX_DISTANCE_SHORT = 2500.0
CAMERA_MAX_DISTANCE_LONG = 3500.0
CAMERA_MAX_DISTANCE_LIST = [CAMERA_MAX_DISTANCE_SHORT, CAMERA_MAX_DISTANCE_LONG]
CAMERA_MAX_DISTANCE = CAMERA_MAX_DISTANCE_SHORT
CHRNAME_COLOR_INDEX = 0
GM_MARK = 0
ENERGY = 0
ENERGY_END_TIME = 0
ENERGY_TYPE = 0
ENABLE_ENERGY_SYSTEM = 1
# COSTUME_SYS
COSTUME_SYSTEM_QUEST = 0
# COSTUME_SYS_END
######################################################################################
# Datei: Kostьmsystem
# Dateiversion: 1.0.0.0
COSTUME_SYSTEM_MAIN = 0
COSTUME_SYSTEM_HAIR = 0
COSTUME_SYSTEM_MAIN_ICON = ""
COSTUME_SYSTEM_HAIR_ICON = ""
######################################################################################
DAYMODE = 0
DAYMODE_UPDATE = 0
ENVIRONMENT_MORNING = "d:/ymir work/environment/morning.msenv"
ENVIRONMENT_NIGHT = "d:/ymir work/environment/night.msenv"
ENVIRONMENT_EVENING="d:/ymir work/environment/evening.msenv"
######################################################################################
# [DEV] CLIENT - BETAMODUS
######################################################################################
BETAMODE = 1
######################################################################################
######################################################################################
######################################################################################
# [DEV] CLIENT - DEVLOPERMODUS
######################################################################################
DEVELOPERMODE = 0
######################################################################################
DEVELOPERMODE_DAYMODE = 0
DEVELOPERMODE_LOGIN = 0
######################################################################################
HIGH_PRICE = 500000
MIDDLE_PRICE = 50000
ERROR_METIN_STONE = 28960
SUB2_LOADING_ENABLE = 1
EXPANDED_COMBO_ENABLE = 1
CONVERT_EMPIRE_LANGUAGE_ENABLE = 1
USE_ITEM_WEAPON_TABLE_ATTACK_BONUS = 0
ADD_DEF_BONUS_ENABLE = 1
LOGIN_COUNT_LIMIT_ENABLE = 0
USE_SKILL_EFFECT_UPGRADE_ENABLE = 1
VIEW_OTHER_EMPIRE_PLAYER_TARGET_BOARD = 1
GUILD_MONEY_PER_GSP = 100
GUILD_WAR_TYPE_SELECT_ENABLE = 1
TWO_HANDED_WEAPON_ATT_SPEED_DECREASE_VALUE = 0
HAIR_COLOR_ENABLE = 1
ARMOR_SPECULAR_ENABLE = 1
WEAPON_SPECULAR_ENABLE = 1
SEQUENCE_PACKET_ENABLE = 1
KEEP_ACCOUNT_CONNETION_ENABLE = 1
MINIMAP_POSITIONINFO_ENABLE = 1
CONVERT_EMPIRE_LANGUAGE_ENABLE = 1
USE_ITEM_WEAPON_TABLE_ATTACK_BONUS = 0
ADD_DEF_BONUS_ENABLE = 0
LOGIN_COUNT_LIMIT_ENABLE = 0
PVPMODE_PROTECTED_LEVEL = 15
TWO_HANDED_WEAPON_ATT_SPEED_DECREASE_VALUE = 10
isItemDropQuestionDialog = 0
def GET_ITEM_DROP_QUESTION_DIALOG_STATUS():
global isItemDropQuestionDialog
return isItemDropQuestionDialog
def SET_ITEM_DROP_QUESTION_DIALOG_STATUS(flag):
global isItemDropQuestionDialog
isItemDropQuestionDialog = flag
import app
import net
########################
def SET_DEFAULT_FOG_LEVEL():
global FOG_LEVEL
app.SetMinFog(FOG_LEVEL)
def SET_FOG_LEVEL_INDEX(index):
global FOG_LEVEL
global FOG_LEVEL_LIST
try:
FOG_LEVEL=FOG_LEVEL_LIST[index]
except IndexError:
FOG_LEVEL=FOG_LEVEL_LIST[0]
app.SetMinFog(FOG_LEVEL)
def GET_FOG_LEVEL_INDEX():
global FOG_LEVEL
global FOG_LEVEL_LIST
return FOG_LEVEL_LIST.index(FOG_LEVEL)
########################
def SET_DEFAULT_CAMERA_MAX_DISTANCE():
global CAMERA_MAX_DISTANCE
app.SetCameraMaxDistance(CAMERA_MAX_DISTANCE)
def SET_CAMERA_MAX_DISTANCE_INDEX(index):
global CAMERA_MAX_DISTANCE
global CAMERA_MAX_DISTANCE_LIST
try:
CAMERA_MAX_DISTANCE=CAMERA_MAX_DISTANCE_LIST[index]
except:
CAMERA_MAX_DISTANCE=CAMERA_MAX_DISTANCE_LIST[0]
app.SetCameraMaxDistance(CAMERA_MAX_DISTANCE)
def GET_CAMERA_MAX_DISTANCE_INDEX():
global CAMERA_MAX_DISTANCE
global CAMERA_MAX_DISTANCE_LIST
return CAMERA_MAX_DISTANCE_LIST.index(CAMERA_MAX_DISTANCE)
########################
import chrmgr
import player
import app
def SET_DEFAULT_CHRNAME_COLOR():
global CHRNAME_COLOR_INDEX
chrmgr.SetEmpireNameMode(CHRNAME_COLOR_INDEX)
def SET_CHRNAME_COLOR_INDEX(index):
global CHRNAME_COLOR_INDEX
CHRNAME_COLOR_INDEX=index
chrmgr.SetEmpireNameMode(index)
def GET_CHRNAME_COLOR_INDEX():
global CHRNAME_COLOR_INDEX
return CHRNAME_COLOR_INDEX
def SET_VIEW_OTHER_EMPIRE_PLAYER_TARGET_BOARD(index):
global VIEW_OTHER_EMPIRE_PLAYER_TARGET_BOARD
VIEW_OTHER_EMPIRE_PLAYER_TARGET_BOARD = index
def GET_VIEW_OTHER_EMPIRE_PLAYER_TARGET_BOARD():
global VIEW_OTHER_EMPIRE_PLAYER_TARGET_BOARD
return VIEW_OTHER_EMPIRE_PLAYER_TARGET_BOARD
def SET_DEFAULT_CONVERT_EMPIRE_LANGUAGE_ENABLE():
global CONVERT_EMPIRE_LANGUAGE_ENABLE
net.SetEmpireLanguageMode(CONVERT_EMPIRE_LANGUAGE_ENABLE)
def SET_DEFAULT_USE_ITEM_WEAPON_TABLE_ATTACK_BONUS():
global USE_ITEM_WEAPON_TABLE_ATTACK_BONUS
player.SetWeaponAttackBonusFlag(USE_ITEM_WEAPON_TABLE_ATTACK_BONUS)
def SET_DEFAULT_USE_SKILL_EFFECT_ENABLE():
global USE_SKILL_EFFECT_UPGRADE_ENABLE
app.SetSkillEffectUpgradeEnable(USE_SKILL_EFFECT_UPGRADE_ENABLE)
def SET_TWO_HANDED_WEAPON_ATT_SPEED_DECREASE_VALUE():
global TWO_HANDED_WEAPON_ATT_SPEED_DECREASE_VALUE
app.SetTwoHandedWeaponAttSpeedDecreaseValue(TWO_HANDED_WEAPON_ATT_SPEED_DECREASE_VALUE)
########################
import item
ACCESSORY_MATERIAL_LIST = [50623, 50624, 50625, 50626, 50627, 50628, 50629, 50630, 50631, 50632, 50633, 50634]
#ACCESSORY_MATERIAL_LIST = [50623, 50623, 50624, 50624, 50625, 50625, 50626, 50627, 50628, 50629, 50630, 50631, 50632, 50633,
# 50623, 50623, 50624, 50624, ]
def GET_ACCESSORY_MATERIAL_VNUM(vnum, subType):
ret = vnum
if vnum >= 16210 and vnum <= 16219:
return 50625
if item.ARMOR_WRIST == subType:
WRIST_ITEM_VNUM_BASE = 14000
ret -= WRIST_ITEM_VNUM_BASE
elif item.ARMOR_NECK == subType:
NECK_ITEM_VNUM_BASE = 16000
ret -= NECK_ITEM_VNUM_BASE
elif item.ARMOR_EAR == subType:
EAR_ITEM_VNUM_BASE = 17000
ret -= EAR_ITEM_VNUM_BASE
type = ret/20
if type<0 or type>=len(ACCESSORY_MATERIAL_LIST):
type = (ret-170) / 20
if type<0 or type>=len(ACCESSORY_MATERIAL_LIST):
return 0
return ACCESSORY_MATERIAL_LIST[type]
def IS_AUTO_POTION(itemVnum):
return IS_AUTO_POTION_HP(itemVnum) or IS_AUTO_POTION_SP(itemVnum)
def IS_AUTO_POTION_HP(itemVnum):
if 72723 <= itemVnum and 72726 >= itemVnum:
return 1
elif itemVnum >= 76021 and itemVnum <= 76022: ## »х·О µйѕо°Ј ј±№°їл И*·жАЗ Гає№
return 1
return 0
def IS_AUTO_POTION_SP(itemVnum):
if 72727 <= itemVnum and 72730 >= itemVnum:
return 1
elif itemVnum >= 76004 and itemVnum <= 76005:
return 1
return 0
Attached Files
constinfo.rar
(1.9 KB, 41 views)
05/18/2013, 19:21
#9
elite*gold: 29
Join Date: Aug 2010
Posts: 855
Received Thanks: 522
[SA]Con hat mir versucht über Skype zu helfen. Wir kamen nicht weiter..und anschließend musste er auch weg.
Ich suche weiterhin eine Lösung.
Hier meine constinfo.py:
Code:
# option
IN_GAME_SHOP_ENABLE = 1
CONSOLE_ENABLE = 0
PVPMODE_ENABLE = 1
PVPMODE_TEST_ENABLE = 0
PVPMODE_ACCELKEY_ENABLE = 1
PVPMODE_ACCELKEY_DELAY = 0.5
PVPMODE_PROTECTED_LEVEL = 30
COSTUME_INDEX = 0
COSTUME_HAIR_INDEX = 0
COSTUME_VNUM = 0
COSTUME_VNUM_HAIR = 0
COSTUME_SYSTEM_MAIN = 0
COSTUME_SYSTEM_HAIR = 0
COSTUME_SYSTEM_MAIN_ICON = ""
COSTUME_SYSTEM_HAIR_ICON = ""
FOG_LEVEL0 = 4800.0
FOG_LEVEL1 = 9600.0
FOG_LEVEL2 = 12800.0
FOG_LEVEL = FOG_LEVEL0
FOG_LEVEL_LIST=[FOG_LEVEL0, FOG_LEVEL1, FOG_LEVEL2]
CAMERA_MAX_DISTANCE_SHORT = 2500.0
CAMERA_MAX_DISTANCE_LONG = 3500.0
CAMERA_MAX_DISTANCE_LIST=[CAMERA_MAX_DISTANCE_SHORT, CAMERA_MAX_DISTANCE_LONG]
CAMERA_MAX_DISTANCE = CAMERA_MAX_DISTANCE_SHORT
CHRNAME_COLOR_INDEX = 0
ENVIRONMENT_NIGHT="d:/ymir work/environment/moonlight04.msenv"
# constant
HIGH_PRICE = 500000
MIDDLE_PRICE = 50000
ERROR_METIN_STONE = 28960
SUB2_LOADING_ENABLE = 1
EXPANDED_COMBO_ENABLE = 1
CONVERT_EMPIRE_LANGUAGE_ENABLE = 1
USE_ITEM_WEAPON_TABLE_ATTACK_BONUS = 0
ADD_DEF_BONUS_ENABLE = 1
LOGIN_COUNT_LIMIT_ENABLE = 0
USE_SKILL_EFFECT_UPGRADE_ENABLE = 1
VIEW_OTHER_EMPIRE_PLAYER_TARGET_BOARD = 1
GUILD_MONEY_PER_GSP = 100
GUILD_WAR_TYPE_SELECT_ENABLE = 1
TWO_HANDED_WEAPON_ATT_SPEED_DECREASE_VALUE = 0
HAIR_COLOR_ENABLE = 1
ARMOR_SPECULAR_ENABLE = 1
WEAPON_SPECULAR_ENABLE = 1
SEQUENCE_PACKET_ENABLE = 1
KEEP_ACCOUNT_CONNETION_ENABLE = 1
MINIMAP_POSITIONINFO_ENABLE = 0
CONVERT_EMPIRE_LANGUAGE_ENABLE = 0
USE_ITEM_WEAPON_TABLE_ATTACK_BONUS = 0
ADD_DEF_BONUS_ENABLE = 0
LOGIN_COUNT_LIMIT_ENABLE = 0
PVPMODE_PROTECTED_LEVEL = 15
TWO_HANDED_WEAPON_ATT_SPEED_DECREASE_VALUE = 10
isItemDropQuestionDialog = 0
def GET_ITEM_DROP_QUESTION_DIALOG_STATUS():
global isItemDropQuestionDialog
return isItemDropQuestionDialog
def SET_ITEM_DROP_QUESTION_DIALOG_STATUS(flag):
global isItemDropQuestionDialog
isItemDropQuestionDialog = flag
import app
import net
########################
def SET_DEFAULT_FOG_LEVEL():
global FOG_LEVEL
app.SetMinFog(FOG_LEVEL)
def SET_FOG_LEVEL_INDEX(index):
global FOG_LEVEL
global FOG_LEVEL_LIST
try:
FOG_LEVEL=FOG_LEVEL_LIST[index]
except IndexError:
FOG_LEVEL=FOG_LEVEL_LIST[0]
app.SetMinFog(FOG_LEVEL)
def GET_FOG_LEVEL_INDEX():
global FOG_LEVEL
global FOG_LEVEL_LIST
return FOG_LEVEL_LIST.index(FOG_LEVEL)
########################
def SET_DEFAULT_CAMERA_MAX_DISTANCE():
global CAMERA_MAX_DISTANCE
app.SetCameraMaxDistance(CAMERA_MAX_DISTANCE)
def SET_CAMERA_MAX_DISTANCE_INDEX(index):
global CAMERA_MAX_DISTANCE
global CAMERA_MAX_DISTANCE_LIST
try:
CAMERA_MAX_DISTANCE=CAMERA_MAX_DISTANCE_LIST[index]
except:
CAMERA_MAX_DISTANCE=CAMERA_MAX_DISTANCE_LIST[0]
app.SetCameraMaxDistance(CAMERA_MAX_DISTANCE)
def GET_CAMERA_MAX_DISTANCE_INDEX():
global CAMERA_MAX_DISTANCE
global CAMERA_MAX_DISTANCE_LIST
return CAMERA_MAX_DISTANCE_LIST.index(CAMERA_MAX_DISTANCE)
########################
import chrmgr
import player
import app
def SET_DEFAULT_CHRNAME_COLOR():
global CHRNAME_COLOR_INDEX
chrmgr.SetEmpireNameMode(CHRNAME_COLOR_INDEX)
def SET_CHRNAME_COLOR_INDEX(index):
global CHRNAME_COLOR_INDEX
CHRNAME_COLOR_INDEX=index
chrmgr.SetEmpireNameMode(index)
def GET_CHRNAME_COLOR_INDEX():
global CHRNAME_COLOR_INDEX
return CHRNAME_COLOR_INDEX
def SET_VIEW_OTHER_EMPIRE_PLAYER_TARGET_BOARD(index):
global VIEW_OTHER_EMPIRE_PLAYER_TARGET_BOARD
VIEW_OTHER_EMPIRE_PLAYER_TARGET_BOARD = index
def GET_VIEW_OTHER_EMPIRE_PLAYER_TARGET_BOARD():
global VIEW_OTHER_EMPIRE_PLAYER_TARGET_BOARD
return VIEW_OTHER_EMPIRE_PLAYER_TARGET_BOARD
def SET_DEFAULT_CONVERT_EMPIRE_LANGUAGE_ENABLE():
global CONVERT_EMPIRE_LANGUAGE_ENABLE
net.SetEmpireLanguageMode(CONVERT_EMPIRE_LANGUAGE_ENABLE)
def SET_DEFAULT_USE_ITEM_WEAPON_TABLE_ATTACK_BONUS():
global USE_ITEM_WEAPON_TABLE_ATTACK_BONUS
player.SetWeaponAttackBonusFlag(USE_ITEM_WEAPON_TABLE_ATTACK_BONUS)
def SET_DEFAULT_USE_SKILL_EFFECT_ENABLE():
global USE_SKILL_EFFECT_UPGRADE_ENABLE
app.SetSkillEffectUpgradeEnable(USE_SKILL_EFFECT_UPGRADE_ENABLE)
def SET_TWO_HANDED_WEAPON_ATT_SPEED_DECREASE_VALUE():
global TWO_HANDED_WEAPON_ATT_SPEED_DECREASE_VALUE
app.SetTwoHandedWeaponAttSpeedDecreaseValue(TWO_HANDED_WEAPON_ATT_SPEED_DECREASE_VALUE)
########################
import item
ACCESSORY_MATERIAL_LIST = [50623, 50624, 50625, 50626, 50627, 50628, 50629, 50630, 50631, 50632, 50633, 50634]
#ACCESSORY_MATERIAL_LIST = [50623, 50623, 50624, 50624, 50625, 50625, 50626, 50627, 50628, 50629, 50630, 50631, 50632, 50633,
# 50623, 50623, 50624, 50624, ]
def GET_ACCESSORY_MATERIAL_VNUM(vnum, subType):
ret = vnum
if vnum >= 16210 and vnum <= 16219:
return 50625
if item.ARMOR_WRIST == subType:
WRIST_ITEM_VNUM_BASE = 14000
ret -= WRIST_ITEM_VNUM_BASE
elif item.ARMOR_NECK == subType:
NECK_ITEM_VNUM_BASE = 16000
ret -= NECK_ITEM_VNUM_BASE
elif item.ARMOR_EAR == subType:
EAR_ITEM_VNUM_BASE = 17000
ret -= EAR_ITEM_VNUM_BASE
type = ret/20
if type<0 or type>=len(ACCESSORY_MATERIAL_LIST):
type = (ret-170) / 20
if type<0 or type>=len(ACCESSORY_MATERIAL_LIST):
return 0
return ACCESSORY_MATERIAL_LIST[type]
## ÀÚµ¿¹°¾à (HP: #72723 ~ #72726, SP: #72727 ~ #72730)
# ÇØ´ç vnumÀÌ ÀÚµ¿¹°¾àÀΰ¡?
def IS_AUTO_POTION(itemVnum):
return IS_AUTO_POTION_HP(itemVnum) or IS_AUTO_POTION_SP(itemVnum)
# ÇØ´ç vnumÀÌ HP ÀÚµ¿¹°¾àÀΰ¡?
def IS_AUTO_POTION_HP(itemVnum):
if 72723 <= itemVnum and 72726 >= itemVnum:
return 1
elif itemVnum >= 76021 and itemVnum <= 76022: ## »õ·Î µé¾î°£ ¼±¹°¿ë È*·æÀÇ Ãູ
return 1
elif itemVnum == 79012:
return 1
return 0
# ÇØ´ç vnumÀÌ SP ÀÚµ¿¹°¾àÀΰ¡?
def IS_AUTO_POTION_SP(itemVnum):
if 72727 <= itemVnum and 72730 >= itemVnum:
return 1
elif itemVnum >= 76004 and itemVnum <= 76005: ## »õ·Î µé¾î°£ ¼±¹°¿ë ¼ö·æÀÇ Ãູ
return 1
elif itemVnum == 79013:
return 1
return 0
Und meine uitooltip.py:
Code:
import dbg
import player
import item
import grp
import wndMgr
import skill
import shop
import exchange
import grpText
import safebox
import locale
import app
import background
import nonplayer
import chr
import ui
import mouseModule
import constInfo
WARP_SCROLLS = [22011, 22000, 22010]
DESC_DEFAULT_MAX_COLS = 26
DESC_WESTERN_MAX_COLS = 35
DESC_WESTERN_MAX_WIDTH = 220
def chop(n):
return round(n - 0.5, 1)
def SplitDescription(desc, limit):
total_tokens = desc.split()
line_tokens = []
line_len = 0
lines = []
for token in total_tokens:
if "|" in token:
sep_pos = token.find("|")
line_tokens.append(token[:sep_pos])
lines.append(" ".join(line_tokens))
line_len = len(token) - (sep_pos + 1)
line_tokens = [token[sep_pos+1:]]
else:
line_len += len(token)
if len(line_tokens) + line_len > limit:
lines.append(" ".join(line_tokens))
line_len = len(token)
line_tokens = [token]
else:
line_tokens.append(token)
if line_tokens:
lines.append(" ".join(line_tokens))
return lines
###################################################################################################
## ToolTip
##
## NOTE : ÇöÀç´Â Item°ú SkillÀ» »ó¼ÓÀ¸·Î ƯÈ* ½ÃÄѵξúÀ½
## ÇÏÁö¸¸ ±×´ÙÁö Àǹ̰¡ ¾ø¾î º¸ÀÓ
##
class ToolTip(ui.ThinBoard):
TOOL_TIP_WIDTH = 190
TOOL_TIP_HEIGHT = 10
TEXT_LINE_HEIGHT = 17
TITLE_COLOR = grp.GenerateColor(0.9490, 0.9058, 0.7568, 1.0)
SPECIAL_TITLE_COLOR = grp.GenerateColor(1.0, 0.7843, 0.0, 1.0)
NORMAL_COLOR = grp.GenerateColor(0.7607, 0.7607, 0.7607, 1.0)
FONT_COLOR = grp.GenerateColor(0.7607, 0.7607, 0.7607, 1.0)
PRICE_COLOR = 0xffFFB96D
HIGH_PRICE_COLOR = SPECIAL_TITLE_COLOR
MIDDLE_PRICE_COLOR = grp.GenerateColor(0.85, 0.85, 0.85, 1.0)
LOW_PRICE_COLOR = grp.GenerateColor(0.7, 0.7, 0.7, 1.0)
ENABLE_COLOR = grp.GenerateColor(0.7607, 0.7607, 0.7607, 1.0)
DISABLE_COLOR = grp.GenerateColor(0.9, 0.4745, 0.4627, 1.0)
NEGATIVE_COLOR = grp.GenerateColor(0.9, 0.4745, 0.4627, 1.0)
POSITIVE_COLOR = grp.GenerateColor(0.5411, 0.7254, 0.5568, 1.0)
SPECIAL_POSITIVE_COLOR = grp.GenerateColor(0.6911, 0.8754, 0.7068, 1.0)
SPECIAL_POSITIVE_COLOR2 = grp.GenerateColor(0.8824, 0.9804, 0.8824, 1.0)
CONDITION_COLOR = 0xffBEB47D
CAN_LEVEL_UP_COLOR = 0xff8EC292
CANNOT_LEVEL_UP_COLOR = DISABLE_COLOR
NEED_SKILL_POINT_COLOR = 0xff9A9CDB
def __init__(self, width = TOOL_TIP_WIDTH, isPickable=FALSE):
ui.ThinBoard.__init__(self, "TOP_MOST")
if isPickable:
pass
else:
self.AddFlag("not_pick")
self.AddFlag("float")
self.followFlag = TRUE
self.toolTipWidth = width
self.xPos = -1
self.yPos = -1
self.defFontName = locale.UI_DEF_FONT
self.ClearToolTip()
def __del__(self):
ui.ThinBoard.__del__(self)
def ClearToolTip(self):
self.toolTipHeight = 12
self.childrenList = []
def SetFollow(self, flag):
self.followFlag = flag
def SetDefaultFontName(self, fontName):
self.defFontName = fontName
def AppendSpace(self, size):
self.toolTipHeight += size
self.ResizeToolTip()
def AppendHorizontalLine(self):
for i in xrange(2):
horizontalLine = ui.Line()
horizontalLine.SetParent(self)
horizontalLine.SetPosition(0, self.toolTipHeight + 3 + i)
horizontalLine.SetWindowHorizontalAlignCenter()
horizontalLine.SetSize(150, 0)
horizontalLine.Show()
if 0 == i:
horizontalLine.SetColor(0xff555555)
else:
horizontalLine.SetColor(0xff000000)
self.childrenList.append(horizontalLine)
self.toolTipHeight += 11
self.ResizeToolTip()
def AlignHorizonalCenter(self):
for child in self.childrenList:
(x, y)=child.GetLocalPosition()
child.SetPosition(self.toolTipWidth/2, y)
self.ResizeToolTip()
def AutoAppendTextLine(self, text, color = FONT_COLOR, centerAlign = TRUE):
textLine = ui.TextLine()
textLine.SetParent(self)
textLine.SetFontName(self.defFontName)
textLine.SetPackedFontColor(color)
textLine.SetText(text)
textLine.SetOutline()
textLine.SetFeather(FALSE)
textLine.Show()
if centerAlign:
textLine.SetPosition(self.toolTipWidth/2, self.toolTipHeight)
textLine.SetHorizontalAlignCenter()
else:
textLine.SetPosition(10, self.toolTipHeight)
self.childrenList.append(textLine)
(textWidth, textHeight)=textLine.GetTextSize()
textWidth += 40
textHeight += 5
if self.toolTipWidth < textWidth:
self.toolTipWidth = textWidth
self.toolTipHeight += textHeight
return textLine
def AppendTextLine(self, text, color = FONT_COLOR, centerAlign = TRUE):
textLine = ui.TextLine()
textLine.SetParent(self)
textLine.SetFontName(self.defFontName)
textLine.SetPackedFontColor(color)
textLine.SetText(text)
textLine.SetOutline()
textLine.SetFeather(FALSE)
textLine.Show()
if centerAlign:
textLine.SetPosition(self.toolTipWidth/2, self.toolTipHeight)
textLine.SetHorizontalAlignCenter()
else:
textLine.SetPosition(10, self.toolTipHeight)
self.childrenList.append(textLine)
self.toolTipHeight += self.TEXT_LINE_HEIGHT
self.ResizeToolTip()
return textLine
def AppendDescription(self, desc, limit, color = FONT_COLOR):
if locale.IsEUROPE():
self.__AppendDescription_WesternLanguage(desc, color)
else:
self.__AppendDescription_EasternLanguage(desc, limit, color)
def __AppendDescription_EasternLanguage(self, description, characterLimitation, color=FONT_COLOR):
length = len(description)
if 0 == length:
return
lineCount = grpText.GetSplitingTextLineCount(description, characterLimitation)
for i in xrange(lineCount):
if 0 == i:
self.AppendSpace(5)
self.AppendTextLine(grpText.GetSplitingTextLine(description, characterLimitation, i), color)
def __AppendDescription_WesternLanguage(self, desc, color=FONT_COLOR):
lines = SplitDescription(desc, DESC_WESTERN_MAX_COLS)
if not lines:
return
self.AppendSpace(5)
for line in lines:
self.AppendTextLine(line, color)
def ResizeToolTip(self):
self.SetSize(self.toolTipWidth, self.TOOL_TIP_HEIGHT + self.toolTipHeight)
def SetItemTitle(self, name):
ItemData = [
]
tmp = []
SpecialItems = [
[item.GetItemName(item.SelectItem(11309)), "|Stylisch|", grp.GenerateColor(1.0, 0.0784, 0.5764, 1.0)],
[item.GetItemName(item.SelectItem(11509)), "|Stylisch|", grp.GenerateColor(1.0, 0.0784, 0.5764, 1.0)],
[item.GetItemName(item.SelectItem(11709)), "|Stylisch|", grp.GenerateColor(1.0, 0.0784, 0.5764, 1.0)],
[item.GetItemName(item.SelectItem(12009)), "|Stylisch|", grp.GenerateColor(1.0, 0.0784, 0.5764, 1.0)],
[item.GetItemName(item.SelectItem(41013)), "|Göttlich|", grp.GenerateColor(0.4745, 0.8039, 0.8039, 1.0)],
[item.GetItemName(item.SelectItem(41023)), "|Göttlich|", grp.GenerateColor(0.4745, 0.8039, 0.8039, 1.0)],
[item.GetItemName(item.SelectItem(41033)), "|Göttlich|", grp.GenerateColor(0.4745, 0.8039, 0.8039, 1.0)],
[item.GetItemName(item.SelectItem(41043)), "|Göttlich|", grp.GenerateColor(0.4745, 0.8039, 0.8039, 1.0)],
[item.GetItemName(item.SelectItem(10049)), "|Episch|", grp.GenerateColor(0.0, 0.7725, 0.8039, 1.0)],
[item.GetItemName(item.SelectItem(10059)), "|Episch|", grp.GenerateColor(0.0, 0.7725, 0.8039, 1.0)],
[item.GetItemName(item.SelectItem(10069)), "|Episch|", grp.GenerateColor(0.0, 0.7725, 0.8039, 1.0)],
[item.GetItemName(item.SelectItem(10079)), "|Episch|", grp.GenerateColor(0.0, 0.7725, 0.8039, 1.0)],
[item.GetItemName(item.SelectItem(56839)), "|Episch|", grp.GenerateColor(0.0, 0.7725, 0.8039, 1.0)],
[item.GetItemName(item.SelectItem(55829)), "|Episch|", grp.GenerateColor(0.0, 0.7725, 0.8039, 1.0)],
[item.GetItemName(item.SelectItem(53819)), "|Episch|", grp.GenerateColor(0.0, 0.7725, 0.8039, 1.0)],
[item.GetItemName(item.SelectItem(54819)), "|Episch|", grp.GenerateColor(0.0, 0.7725, 0.8039, 1.0)],
[item.GetItemName(item.SelectItem(57849)), "|Episch|", grp.GenerateColor(0.0, 0.7725, 0.8039, 1.0)],
[item.GetItemName(item.SelectItem(58859)), "|Episch|", grp.GenerateColor(0.0, 0.7725, 0.8039, 1.0)],
[item.GetItemName(item.SelectItem(59869)), "|Episch|", grp.GenerateColor(0.0, 0.7725, 0.8039, 1.0)],
[item.GetItemName(item.SelectItem(9299)), "|Göttlich|", grp.GenerateColor(0.4745, 0.8039, 0.8039, 1.0)],
[item.GetItemName(item.SelectItem(9199)), "|Göttlich|", grp.GenerateColor(0.4745, 0.8039, 0.8039, 1.0)],
[item.GetItemName(item.SelectItem(9399)), "|Göttlich|", grp.GenerateColor(0.4745, 0.8039, 0.8039, 1.0)],
[item.GetItemName(item.SelectItem(9499)), "|Göttlich|", grp.GenerateColor(0.4745, 0.8039, 0.8039, 1.0)],
[item.GetItemName(item.SelectItem(9599)), "|Göttlich|", grp.GenerateColor(0.4745, 0.8039, 0.8039, 1.0)],
[item.GetItemName(item.SelectItem(639)), "|Göttlich|", grp.GenerateColor(0.4745, 0.8039, 0.8039, 1.0)],
[item.GetItemName(item.SelectItem(5179)), "|Göttlich|", grp.GenerateColor(0.4745, 0.8039, 0.8039, 1.0)],
]
for itemname in SpecialItems:
tmp.append(itemname[0])
try:
try:
Index = tmp.index(name)
self.AppendTextLine(SpecialItems[Index][1], SpecialItems[Index][2])
except:
Index = int(name.split("+")[1])
self.AppendTextLine(ItemData[Index][0], ItemData[Index][1])
except:
pass
def SetTitle(self, name):
self.AppendTextLine(name, self.TITLE_COLOR)
def GetLimitTextLineColor(self, curValue, limitValue):
if curValue < limitValue:
return self.DISABLE_COLOR
return self.ENABLE_COLOR
def GetChangeTextLineColor(self, value, isSpecial=FALSE):
if value > 0:
if isSpecial:
return self.SPECIAL_POSITIVE_COLOR
else:
return self.POSITIVE_COLOR
if 0 == value:
return self.NORMAL_COLOR
return self.NEGATIVE_COLOR
def SetToolTipPosition(self, x = -1, y = -1):
self.xPos = x
self.yPos = y
def ShowToolTip(self):
self.SetTop()
self.Show()
self.OnUpdate()
def HideToolTip(self):
self.Hide()
def OnUpdate(self):
if not self.followFlag:
return
x = 0
y = 0
width = self.GetWidth()
height = self.toolTipHeight
if -1 == self.xPos and -1 == self.yPos:
(mouseX, mouseY) = wndMgr.GetMousePosition()
if mouseY < wndMgr.GetScreenHeight() - 200:
y = mouseY + 40
else:
y = mouseY - height - 30
x = mouseX - width/2
else:
x = self.xPos - width/2
y = self.yPos - height
x = max(x, 0)
y = max(y, 0)
x = min(x + width/2, wndMgr.GetScreenWidth() - width/2) - width/2
y = min(y + self.GetHeight(), wndMgr.GetScreenHeight()) - self.GetHeight()
parentWindow = self.GetParentProxy()
if parentWindow:
(gx, gy) = parentWindow.GetGlobalPosition()
x -= gx
y -= gy
self.SetPosition(x, y)
class ItemToolTip(ToolTip):
CHARACTER_NAMES = (
locale.TOOLTIP_WARRIOR,
locale.TOOLTIP_ASSASSIN,
locale.TOOLTIP_SURA,
locale.TOOLTIP_SHAMAN
)
CHARACTER_COUNT = len(CHARACTER_NAMES)
WEAR_NAMES = (
locale.TOOLTIP_ARMOR,
locale.TOOLTIP_HELMET,
locale.TOOLTIP_SHOES,
locale.TOOLTIP_WRISTLET,
locale.TOOLTIP_WEAPON,
locale.TOOLTIP_NECK,
locale.TOOLTIP_EAR,
locale.TOOLTIP_UNIQUE,
locale.TOOLTIP_SHIELD,
locale.TOOLTIP_ARROW,
)
WEAR_COUNT = len(WEAR_NAMES)
AFFECT_DICT = {
item.APPLY_MAX_HP : locale.TOOLTIP_MAX_HP,
item.APPLY_MAX_SP : locale.TOOLTIP_MAX_SP,
item.APPLY_CON : locale.TOOLTIP_CON,
item.APPLY_INT : locale.TOOLTIP_INT,
item.APPLY_STR : locale.TOOLTIP_STR,
item.APPLY_DEX : locale.TOOLTIP_DEX,
item.APPLY_ATT_SPEED : locale.TOOLTIP_ATT_SPEED,
item.APPLY_MOV_SPEED : locale.TOOLTIP_MOV_SPEED,
item.APPLY_CAST_SPEED : locale.TOOLTIP_CAST_SPEED,
item.APPLY_HP_REGEN : locale.TOOLTIP_HP_REGEN,
item.APPLY_SP_REGEN : locale.TOOLTIP_SP_REGEN,
item.APPLY_POISON_PCT : locale.TOOLTIP_APPLY_POISON_PCT,
item.APPLY_STUN_PCT : locale.TOOLTIP_APPLY_STUN_PCT,
item.APPLY_SLOW_PCT : locale.TOOLTIP_APPLY_SLOW_PCT,
item.APPLY_CRITICAL_PCT : locale.TOOLTIP_APPLY_CRITICAL_PCT,
item.APPLY_PENETRATE_PCT : locale.TOOLTIP_APPLY_PENETRATE_PCT,
item.APPLY_ATTBONUS_WARRIOR : locale.TOOLTIP_APPLY_ATTBONUS_WARRIOR,
item.APPLY_ATTBONUS_ASSASSIN : locale.TOOLTIP_APPLY_ATTBONUS_ASSASSIN,
item.APPLY_ATTBONUS_SURA : locale.TOOLTIP_APPLY_ATTBONUS_SURA,
item.APPLY_ATTBONUS_SHAMAN : locale.TOOLTIP_APPLY_ATTBONUS_SHAMAN,
item.APPLY_ATTBONUS_MONSTER : locale.TOOLTIP_APPLY_ATTBONUS_MONSTER,
item.APPLY_ATTBONUS_HUMAN : locale.TOOLTIP_APPLY_ATTBONUS_HUMAN,
item.APPLY_ATTBONUS_ANIMAL : locale.TOOLTIP_APPLY_ATTBONUS_ANIMAL,
item.APPLY_ATTBONUS_ORC : locale.TOOLTIP_APPLY_ATTBONUS_ORC,
item.APPLY_ATTBONUS_MILGYO : locale.TOOLTIP_APPLY_ATTBONUS_MILGYO,
item.APPLY_ATTBONUS_UNDEAD : locale.TOOLTIP_APPLY_ATTBONUS_UNDEAD,
item.APPLY_ATTBONUS_DEVIL : locale.TOOLTIP_APPLY_ATTBONUS_DEVIL,
item.APPLY_STEAL_HP : locale.TOOLTIP_APPLY_STEAL_HP,
item.APPLY_STEAL_SP : locale.TOOLTIP_APPLY_STEAL_SP,
item.APPLY_MANA_BURN_PCT : locale.TOOLTIP_APPLY_MANA_BURN_PCT,
item.APPLY_DAMAGE_SP_RECOVER : locale.TOOLTIP_APPLY_DAMAGE_SP_RECOVER,
item.APPLY_BLOCK : locale.TOOLTIP_APPLY_BLOCK,
item.APPLY_DODGE : locale.TOOLTIP_APPLY_DODGE,
item.APPLY_RESIST_SWORD : locale.TOOLTIP_APPLY_RESIST_SWORD,
item.APPLY_RESIST_TWOHAND : locale.TOOLTIP_APPLY_RESIST_TWOHAND,
item.APPLY_RESIST_DAGGER : locale.TOOLTIP_APPLY_RESIST_DAGGER,
item.APPLY_RESIST_BELL : locale.TOOLTIP_APPLY_RESIST_BELL,
item.APPLY_RESIST_FAN : locale.TOOLTIP_APPLY_RESIST_FAN,
item.APPLY_RESIST_BOW : locale.TOOLTIP_RESIST_BOW,
item.APPLY_RESIST_FIRE : locale.TOOLTIP_RESIST_FIRE,
item.APPLY_RESIST_ELEC : locale.TOOLTIP_RESIST_ELEC,
item.APPLY_RESIST_MAGIC : locale.TOOLTIP_RESIST_MAGIC,
item.APPLY_RESIST_WIND : locale.TOOLTIP_APPLY_RESIST_WIND,
item.APPLY_REFLECT_MELEE : locale.TOOLTIP_APPLY_REFLECT_MELEE,
item.APPLY_REFLECT_CURSE : locale.TOOLTIP_APPLY_REFLECT_CURSE,
item.APPLY_POISON_REDUCE : locale.TOOLTIP_APPLY_POISON_REDUCE,
item.APPLY_KILL_SP_RECOVER : locale.TOOLTIP_APPLY_KILL_SP_RECOVER,
item.APPLY_EXP_DOUBLE_BONUS : locale.TOOLTIP_APPLY_EXP_DOUBLE_BONUS,
item.APPLY_GOLD_DOUBLE_BONUS : locale.TOOLTIP_APPLY_GOLD_DOUBLE_BONUS,
item.APPLY_ITEM_DROP_BONUS : locale.TOOLTIP_APPLY_ITEM_DROP_BONUS,
item.APPLY_POTION_BONUS : locale.TOOLTIP_APPLY_POTION_BONUS,
item.APPLY_KILL_HP_RECOVER : locale.TOOLTIP_APPLY_KILL_HP_RECOVER,
item.APPLY_IMMUNE_STUN : locale.TOOLTIP_APPLY_IMMUNE_STUN,
item.APPLY_IMMUNE_SLOW : locale.TOOLTIP_APPLY_IMMUNE_SLOW,
item.APPLY_IMMUNE_FALL : locale.TOOLTIP_APPLY_IMMUNE_FALL,
item.APPLY_BOW_DISTANCE : locale.TOOLTIP_BOW_DISTANCE,
item.APPLY_DEF_GRADE : locale.TOOLTIP_DEF_GRADE,
item.APPLY_ATT_GRADE : locale.TOOLTIP_ATT_GRADE,
item.APPLY_MAGIC_ATT_GRADE : locale.TOOLTIP_MAGIC_ATT_GRADE,
item.APPLY_MAGIC_DEF_GRADE : locale.TOOLTIP_MAGIC_DEF_GRADE,
item.APPLY_MAX_STAMINA : locale.TOOLTIP_MAX_STAMINA,
item.APPLY_MALL_ATTBONUS : locale.TOOLTIP_MALL_ATTBONUS,
item.APPLY_MALL_DEFBONUS : locale.TOOLTIP_MALL_DEFBONUS,
item.APPLY_MALL_EXPBONUS : locale.TOOLTIP_MALL_EXPBONUS,
item.APPLY_MALL_ITEMBONUS : locale.TOOLTIP_MALL_ITEMBONUS,
item.APPLY_MALL_GOLDBONUS : locale.TOOLTIP_MALL_GOLDBONUS,
item.APPLY_SKILL_DAMAGE_BONUS : locale.TOOLTIP_SKILL_DAMAGE_BONUS,
item.APPLY_NORMAL_HIT_DAMAGE_BONUS : locale.TOOLTIP_NORMAL_HIT_DAMAGE_BONUS,
item.APPLY_SKILL_DEFEND_BONUS : locale.TOOLTIP_SKILL_DEFEND_BONUS,
item.APPLY_NORMAL_HIT_DEFEND_BONUS : locale.TOOLTIP_NORMAL_HIT_DEFEND_BONUS,
item.APPLY_PC_BANG_EXP_BONUS : locale.TOOLTIP_MALL_EXPBONUS_P_STATIC,
item.APPLY_PC_BANG_DROP_BONUS : locale.TOOLTIP_MALL_ITEMBONUS_P_STATIC,
item.APPLY_RESIST_WARRIOR : locale.TOOLTIP_APPLY_RESIST_WARRIOR,
item.APPLY_RESIST_ASSASSIN : locale.TOOLTIP_APPLY_RESIST_ASSASSIN,
item.APPLY_RESIST_SURA : locale.TOOLTIP_APPLY_RESIST_SURA,
item.APPLY_RESIST_SHAMAN : locale.TOOLTIP_APPLY_RESIST_SHAMAN,
599 : locale.TOOLTIP_ENERGY,
598 : locale.TOOLTIP_COSTUME_ATTR_BONUS,
}
ATTRIBUTE_NEED_WIDTH = {
23 : 230,
24 : 230,
25 : 230,
26 : 220,
27 : 210,
35 : 210,
36 : 210,
37 : 210,
38 : 210,
39 : 210,
40 : 210,
41 : 210,
42 : 220,
43 : 230,
45 : 230,
}
ANTI_FLAG_DICT = {
0 : item.ITEM_ANTIFLAG_WARRIOR,
1 : item.ITEM_ANTIFLAG_ASSASSIN,
2 : item.ITEM_ANTIFLAG_SURA,
3 : item.ITEM_ANTIFLAG_SHAMAN,
}
FONT_COLOR = grp.GenerateColor(0.7607, 0.7607, 0.7607, 1.0)
def __init__(self, *args, **kwargs):
ToolTip.__init__(self, *args, **kwargs)
self.itemVnum = 0
self.isShopItem = FALSE
def __del__(self):
ToolTip.__del__(self)
def CanEquip(self):
if not item.IsEquipmentVID(self.itemVnum):
return TRUE
race = player.GetRace()
job = chr.RaceToJob(race)
if not self.ANTI_FLAG_DICT.has_key(job):
return FALSE
if item.IsAntiFlag(self.ANTI_FLAG_DICT[job]):
return FALSE
sex = chr.RaceToSex(race)
MALE = 1
FEMALE = 0
if item.IsAntiFlag(item.ITEM_ANTIFLAG_MALE) and sex == MALE:
return FALSE
if item.IsAntiFlag(item.ITEM_ANTIFLAG_FEMALE) and sex == FEMALE:
return FALSE
for i in xrange(item.LIMIT_MAX_NUM):
(limitType, limitValue) = item.GetLimit(i)
if item.LIMIT_LEVEL == limitType:
if player.GetStatus(player.LEVEL) < limitValue:
return FALSE
"""
elif item.LIMIT_STR == limitType:
if player.GetStatus(player.ST) < limitValue:
return FALSE
elif item.LIMIT_DEX == limitType:
if player.GetStatus(player.DX) < limitValue:
return FALSE
elif item.LIMIT_INT == limitType:
if player.GetStatus(player.IQ) < limitValue:
return FALSE
elif item.LIMIT_CON == limitType:
if player.GetStatus(player.HT) < limitValue:
return FALSE
"""
return TRUE
def AppendTextLine(self, text, color = FONT_COLOR, centerAlign = TRUE):
if not self.CanEquip():
color = self.DISABLE_COLOR
return ToolTip.AppendTextLine(self, text, color, centerAlign)
def ClearToolTip(self):
self.isShopItem = FALSE
self.toolTipWidth = self.TOOL_TIP_WIDTH
ToolTip.ClearToolTip(self)
def SetInventoryItem(self, slotIndex):
itemVnum = player.GetItemIndex(slotIndex)
if 0 == itemVnum:
return
self.ClearToolTip()
if shop.IsOpen():
if not shop.IsPrivateShop():
item.SelectItem(itemVnum)
self.AppendSellingPrice(player.GetISellItemPrice(slotIndex))
metinSlot = [player.GetItemMetinSocket(slotIndex, i) for i in xrange(player.METIN_SOCKET_MAX_NUM)]
attrSlot = [player.GetItemAttribute(slotIndex, i) for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM)]
#print itemVnum, metinSlot, attrSlot
self.AddItemData(itemVnum, metinSlot, attrSlot)
def SetShopItem(self, slotIndex):
itemVnum = shop.GetItemID(slotIndex)
if 0 == itemVnum:
return
price = shop.GetItemPrice(slotIndex)
self.ClearToolTip()
self.isShopItem = TRUE
metinSlot = []
for i in xrange(player.METIN_SOCKET_MAX_NUM):
metinSlot.append(shop.GetItemMetinSocket(slotIndex, i))
attrSlot = []
for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
attrSlot.append(shop.GetItemAttribute(slotIndex, i))
self.AddItemData(itemVnum, metinSlot, attrSlot)
self.AppendPrice(price)
def SetExchangeOwnerItem(self, slotIndex):
itemVnum = exchange.GetItemVnumFromSelf(slotIndex)
if 0 == itemVnum:
return
self.ClearToolTip()
metinSlot = []
for i in xrange(player.METIN_SOCKET_MAX_NUM):
metinSlot.append(exchange.GetItemMetinSocketFromSelf(slotIndex, i))
attrSlot = []
for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
attrSlot.append(exchange.GetItemAttributeFromSelf(slotIndex, i))
self.AddItemData(itemVnum, metinSlot, attrSlot)
def SetExchangeTargetItem(self, slotIndex):
itemVnum = exchange.GetItemVnumFromTarget(slotIndex)
if 0 == itemVnum:
return
self.ClearToolTip()
metinSlot = []
for i in xrange(player.METIN_SOCKET_MAX_NUM):
metinSlot.append(exchange.GetItemMetinSocketFromTarget(slotIndex, i))
attrSlot = []
for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
attrSlot.append(exchange.GetItemAttributeFromTarget(slotIndex, i))
self.AddItemData(itemVnum, metinSlot, attrSlot)
def SetPrivateShopBuilderItem(self, inventorySlotIndex, privateShopSlotIndex):
itemVnum = player.GetItemIndex(inventorySlotIndex)
if 0 == itemVnum:
return
item.SelectItem(itemVnum)
self.ClearToolTip()
self.AppendSellingPrice(shop.GetPrivateShopItemPrice(inventorySlotIndex))
metinSlot = []
for i in xrange(player.METIN_SOCKET_MAX_NUM):
metinSlot.append(player.GetItemMetinSocket(inventorySlotIndex, i))
attrSlot = []
for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
attrSlot.append(player.GetItemAttribute(inventorySlotIndex, i))
self.AddItemData(itemVnum, metinSlot, attrSlot)
def SetSafeBoxItem(self, slotIndex):
itemVnum = safebox.GetItemID(slotIndex)
if 0 == itemVnum:
return
self.ClearToolTip()
metinSlot = []
for i in xrange(player.METIN_SOCKET_MAX_NUM):
metinSlot.append(safebox.GetItemMetinSocket(slotIndex, i))
attrSlot = []
for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
attrSlot.append(safebox.GetItemAttribute(slotIndex, i))
self.AddItemData(itemVnum, metinSlot, attrSlot)
def SetMallItem(self, slotIndex):
itemVnum = safebox.GetMallItemID(slotIndex)
if 0 == itemVnum:
return
self.ClearToolTip()
metinSlot = []
for i in xrange(player.METIN_SOCKET_MAX_NUM):
metinSlot.append(safebox.GetMallItemMetinSocket(slotIndex, i))
attrSlot = []
for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
attrSlot.append(safebox.GetMallItemAttribute(slotIndex, i))
self.AddItemData(itemVnum, metinSlot, attrSlot)
def SetItemToolTip(self, itemVnum):
self.ClearToolTip()
metinSlot = []
for i in xrange(player.METIN_SOCKET_MAX_NUM):
metinSlot.append(0)
attrSlot = []
for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
attrSlot.append((0, 0))
self.AddItemData(itemVnum, metinSlot, attrSlot)
def __AppendAttackSpeedInfo(self, item):
atkSpd = item.GetValue(0)
if atkSpd < 80:
stSpd = locale.TOOLTIP_ITEM_VERY_FAST
elif atkSpd <= 95:
stSpd = locale.TOOLTIP_ITEM_FAST
elif atkSpd <= 105:
stSpd = locale.TOOLTIP_ITEM_NORMAL
elif atkSpd <= 120:
stSpd = locale.TOOLTIP_ITEM_SLOW
else:
stSpd = locale.TOOLTIP_ITEM_VERY_SLOW
self.AppendTextLine(locale.TOOLTIP_ITEM_ATT_SPEED % stSpd, self.NORMAL_COLOR)
def __AppendAttackGradeInfo(self):
atkGrade = item.GetValue(1)
self.AppendTextLine(locale.TOOLTIP_ITEM_ATT_GRADE % atkGrade, self.GetChangeTextLineColor(atkGrade))
def __AppendAttackPowerInfo(self):
minPower = item.GetValue(3)
maxPower = item.GetValue(4)
addPower = item.GetValue(5)
if maxPower > minPower:
self.AppendTextLine(locale.TOOLTIP_ITEM_ATT_POWER % (minPower+addPower, maxPower+addPower), self.POSITIVE_COLOR)
else:
self.AppendTextLine(locale.TOOLTIP_ITEM_ATT_POWER_ONE_ARG % (minPower+addPower), self.POSITIVE_COLOR)
def __AppendMagicAttackInfo(self):
minMagicAttackPower = item.GetValue(1)
maxMagicAttackPower = item.GetValue(2)
addPower = item.GetValue(5)
if minMagicAttackPower > 0 or maxMagicAttackPower > 0:
if maxMagicAttackPower > minMagicAttackPower:
self.AppendTextLine(locale.TOOLTIP_ITEM_MAGIC_ATT_POWER % (minMagicAttackPower+addPower, maxMagicAttackPower+addPower), self.POSITIVE_COLOR)
else:
self.AppendTextLine(locale.TOOLTIP_ITEM_MAGIC_ATT_POWER_ONE_ARG % (minMagicAttackPower+addPower), self.POSITIVE_COLOR)
def __AppendMagicDefenceInfo(self):
magicDefencePower = item.GetValue(0)
if magicDefencePower > 0:
self.AppendTextLine(locale.TOOLTIP_ITEM_MAGIC_DEF_POWER % magicDefencePower, self.GetChangeTextLineColor(magicDefencePower))
def __AppendAttributeInformation(self, attrSlot):
if 0 != attrSlot:
for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
type = attrSlot[i][0]
value = attrSlot[i][1]
if 0 == value:
continue
affectString = self.__GetAffectString(type, value)
if affectString:
affectColor = self.__GetAttributeColor(i, value)
self.AppendTextLine(affectString, affectColor)
def __GetAttributeColor(self, index, value):
if value > 0:
if index >= 5:
return self.SPECIAL_POSITIVE_COLOR2
else:
return self.SPECIAL_POSITIVE_COLOR
elif value == 0:
return self.NORMAL_COLOR
else:
return self.NEGATIVE_COLOR
def __IsPolymorphItem(self, itemVnum):
if itemVnum >= 70103 and itemVnum <= 70106:
return 1
return 0
def __SetPolymorphItemTitle(self, monsterVnum):
if locale.IsVIETNAM():
itemName =item.GetItemName()
itemName+=" "
itemName+=nonplayer.GetMonsterName(monsterVnum)
else:
itemName =nonplayer.GetMonsterName(monsterVnum)
itemName+=" "
itemName+=item.GetItemName()
self.SetTitle(itemName)
def __SetNormalItemTitle(self):
self.SetTitle(item.GetItemName())
def __SetSpecialItemTitle(self):
self.AppendTextLine(item.GetItemName(), self.SPECIAL_TITLE_COLOR)
def __SetItemTitle(self, itemVnum, metinSlot, attrSlot):
self.SetItemTitle(item.GetItemName())
item.SelectItem(itemVnum)
if self.__IsPolymorphItem(itemVnum):
self.__SetPolymorphItemTitle(metinSlot[0])
else:
if self.__IsAttr(attrSlot):
self.__SetSpecialItemTitle()
return
self.__SetNormalItemTitle()
def __IsAttr(self, attrSlot):
if not attrSlot:
return FALSE
for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
type = attrSlot[i][0]
if 0 != type:
return TRUE
return FALSE
def AddRefineItemData(self, itemVnum, metinSlot, attrSlot = 0):
for i in xrange(player.METIN_SOCKET_MAX_NUM):
metinSlotData=metinSlot[i]
if self.GetMetinItemIndex(metinSlotData) == constInfo.ERROR_METIN_STONE:
metinSlot[i]=player.METIN_SOCKET_TYPE_SILVER
self.AddItemData(itemVnum, metinSlot, attrSlot)
def AddItemData_Offline(self, itemVnum, itemDesc, itemSummary, metinSlot, attrSlot):
self.__AdjustMaxWidth(attrSlot, itemDesc)
self.__SetItemTitle(itemVnum, metinSlot, attrSlot)
if self.__IsHair(itemVnum):
self.__AppendHairIcon(itemVnum)
### Description ###
self.AppendDescription(itemDesc, 26)
self.AppendDescription(itemSummary, 26, self.CONDITION_COLOR)
def AddItemData(self, itemVnum, metinSlot, attrSlot = 0):
self.itemVnum = itemVnum
item.SelectItem(itemVnum)
itemType = item.GetItemType()
itemSubType = item.GetItemSubType()
if 50026 == itemVnum:
if 0 != metinSlot:
name = item.GetItemName()
if metinSlot[0] > 0:
name += " "
name += locale.NumberToMoneyString(metinSlot[0])
self.SetTitle(name)
self.ShowToolTip()
return
### Skill Book ###
elif 50300 == itemVnum:
if 0 != metinSlot:
self.__SetSkillBookToolTip(metinSlot[0], locale.TOOLTIP_SKILLBOOK_NAME, 1)
self.ShowToolTip()
return
elif 70037 == itemVnum:
if 0 != metinSlot:
self.__SetSkillBookToolTip(metinSlot[0], locale.TOOLTIP_SKILL_FORGET_BOOK_NAME, 0)
self.AppendDescription(item.GetItemDescription(), 26)
self.AppendDescription(item.GetItemSummary(), 26, self.CONDITION_COLOR)
self.ShowToolTip()
return
elif 70055 == itemVnum:
if 0 != metinSlot:
self.__SetSkillBookToolTip(metinSlot[0], locale.TOOLTIP_SKILL_FORGET_BOOK_NAME, 0)
self.AppendDescription(item.GetItemDescription(), 26)
self.AppendDescription(item.GetItemSummary(), 26, self.CONDITION_COLOR)
self.ShowToolTip()
return
###########################################################################################
itemDesc = item.GetItemDescription()
itemSummary = item.GetItemSummary()
isCostumeItem = 0
isCostumeHair = 0
isCostumeBody = 0
if 28 == itemType:
isCostumeItem = 1
isCostumeHair = 1 == itemSubType
isCostumeBody = 0 == itemSubType
#dbg.TraceError("IS_COSTUME_ITEM! body(%d) hair(%d)" % (isCostumeBody, isCostumeHair))
self.__AdjustMaxWidth(attrSlot, itemDesc)
self.__SetItemTitle(itemVnum, metinSlot, attrSlot)
if self.__IsHair(itemVnum):
self.__AppendHairIcon(itemVnum)
### Description ###
self.AppendDescription(itemDesc, 26)
self.AppendDescription(itemSummary, 26, self.CONDITION_COLOR)
### Weapon ###
if item.ITEM_TYPE_WEAPON == itemType:
self.__AppendLimitInformation()
self.AppendSpace(5)
## ºÎäÀÏ °æ¿ì ¸¶°øÀ» ¸ÕÀú Ç¥½ÃÇÑ´Ù.
if item.WEAPON_FAN == itemSubType:
self.__AppendMagicAttackInfo()
self.__AppendAttackPowerInfo()
else:
self.__AppendAttackPowerInfo()
self.__AppendMagicAttackInfo()
self.__AppendAffectInformation()
self.__AppendAttributeInformation(attrSlot)
self.AppendWearableInformation()
self.__AppendMetinSlotInfo(metinSlot)
### Armor ###
elif item.ITEM_TYPE_ARMOR == itemType:
self.__AppendLimitInformation()
## ¹æ¾î·Â
defGrade = item.GetValue(1)
defBonus = item.GetValue(5)*2 ## ¹æ¾î·Â Ç¥½Ã À߸ø µÇ´Â ¹®Á¦¸¦ ¼öÁ¤
if defGrade > 0:
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_ITEM_DEF_GRADE % (defGrade+defBonus), self.GetChangeTextLineColor(defGrade))
self.__AppendMagicDefenceInfo()
self.__AppendAffectInformation()
self.__AppendAttributeInformation(attrSlot)
self.AppendWearableInformation()
if itemSubType in (item.ARMOR_WRIST, item.ARMOR_NECK, item.ARMOR_EAR):
self.__AppendAccessoryMetinSlotInfo(metinSlot, constInfo.GET_ACCESSORY_MATERIAL_VNUM(itemVnum, itemSubType))
else:
self.__AppendMetinSlotInfo(metinSlot)
elif 0 != isCostumeItem:
self.__AppendLimitInformation()
self.__AppendAffectInformation()
self.__AppendAttributeInformation(attrSlot)
self.AppendWearableInformation()
bHasRealtimeFlag = 0
## »ç¿ë°¡´É ½Ã°£ Á¦ÇÑÀÌ ÀÖ´ÂÁö ã¾Æº¸°í
for i in xrange(item.LIMIT_MAX_NUM):
(limitType, limitValue) = item.GetLimit(i)
if 7 == limitType:
bHasRealtimeFlag = 1
## ÀÖ´Ù¸é °ü·Ã Á¤º¸¸¦ Ç¥½ÃÇÔ. ex) ³²Àº ½Ã°£ : 6ÀÏ 6½Ã°£ 58ºÐ
if 1 == bHasRealtimeFlag:
self.AppendMallItemLastTime(metinSlot[2])
#dbg.TraceError("1) REAL_TIME flag On ")
## Rod ##
elif item.ITEM_TYPE_ROD == itemType:
if 0 != metinSlot:
curLevel = item.GetValue(0) / 10
curEXP = metinSlot[0]
maxEXP = item.GetValue(2)
self.__AppendLimitInformation()
self.__AppendRodInformation(curLevel, curEXP, maxEXP)
## Pick ##
elif item.ITEM_TYPE_PICK == itemType:
if 0 != metinSlot:
curLevel = item.GetValue(0) / 10
curEXP = metinSlot[0]
maxEXP = item.GetValue(2)
self.__AppendLimitInformation()
self.__AppendPickInformation(curLevel, curEXP, maxEXP)
## Lottery ##
elif item.ITEM_TYPE_LOTTERY == itemType:
if 0 != metinSlot:
ticketNumber = int(metinSlot[0])
stepNumber = int(metinSlot[1])
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_LOTTERY_STEP_NUMBER % (stepNumber), self.NORMAL_COLOR)
self.AppendTextLine(locale.TOOLTIP_LOTTO_NUMBER % (ticketNumber), self.NORMAL_COLOR);
### Metin ###
elif item.ITEM_TYPE_METIN == itemType:
self.AppendMetinInformation()
self.AppendMetinWearInformation()
### Fish ###
elif item.ITEM_TYPE_FISH == itemType:
if 0 != metinSlot:
self.__AppendFishInfo(metinSlot[0])
## item.ITEM_TYPE_BLEND
elif item.ITEM_TYPE_BLEND == itemType:
self.__AppendLimitInformation()
if metinSlot:
affectType = metinSlot[0]
affectValue = metinSlot[1]
time = metinSlot[2]
self.AppendSpace(5)
affectText = self.__GetAffectString(affectType, affectValue)
self.AppendTextLine(affectText, self.NORMAL_COLOR)
if time > 0:
minute = (time / 60)
second = (time % 60)
timeString = locale.TOOLTIP_POTION_TIME
if minute > 0:
timeString += str(minute) + locale.TOOLTIP_POTION_MIN
if second > 0:
timeString += " " + str(second) + locale.TOOLTIP_POTION_SEC
self.AppendTextLine(timeString)
else:
self.AppendTextLine(locale.BLEND_POTION_NO_TIME)
else:
self.AppendTextLine("BLEND_POTION_NO_INFO")
elif item.ITEM_TYPE_UNIQUE == itemType:
if 0 != metinSlot:
time = metinSlot[player.METIN_SOCKET_MAX_NUM-1]
if 1 == item.GetValue(2): ## ½Ç½Ã°£ ÀÌ¿ë Flag / ÀåÂø ¾ÈÇØµµ ÁØ´Ù
self.AppendMallItemLastTime(time)
else:
self.AppendUniqueItemLastTime(time)
### Use ###
elif item.ITEM_TYPE_USE == itemType:
self.__AppendLimitInformation()
if item.USE_POTION == itemSubType or item.USE_POTION_NODELAY == itemSubType:
self.__AppendPotionInformation()
elif item.USE_ABILITY_UP == itemSubType:
self.__AppendAbilityPotionInformation()
## ¿µ¼® °¨Áö±â
if 27989 == itemVnum:
if 0 != metinSlot:
useCount = int(metinSlot[0])
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_REST_USABLE_COUNT % (6 - useCount), self.NORMAL_COLOR)
## À̺¥Æ® °¨Áö±â
elif 50004 == itemVnum:
if 0 != metinSlot:
useCount = int(metinSlot[0])
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_REST_USABLE_COUNT % (10 - useCount), self.NORMAL_COLOR)
elif 72723 == itemVnum == itemVnum:
if 0 != metinSlot:
## 0: Ȱ¼ºÈ*, 1: »ç¿ë·®, 2: ÃÑ·®
isActivated = int(metinSlot[0])
usedAmount = float(metinSlot[1])
totalAmount = float(metinSlot[2])
if 0 == totalAmount:
totalAmount = 1
self.AppendSpace(5)
if 0 != isActivated:
self.AppendTextLine("(%s)" % (locale.TOOLTIP_AUTO_POTION_USING), self.SPECIAL_POSITIVE_COLOR)
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_AUTO_POTION_REST % (100.0 - ((usedAmount / totalAmount) * 100.0)), self.POSITIVE_COLOR)
elif 72724 == itemVnum == itemVnum:
if 0 != metinSlot:
## 0: Ȱ¼ºÈ*, 1: »ç¿ë·®, 2: ÃÑ·®
isActivated = int(metinSlot[0])
usedAmount = float(metinSlot[1])
totalAmount = float(metinSlot[2])
if 0 == totalAmount:
totalAmount = 1
self.AppendSpace(5)
if 0 != isActivated:
self.AppendTextLine("(%s)" % (locale.TOOLTIP_AUTO_POTION_USING), self.SPECIAL_POSITIVE_COLOR)
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_AUTO_POTION_REST % (100.0 - ((usedAmount / totalAmount) * 100.0)), self.POSITIVE_COLOR)
elif 72725 == itemVnum == itemVnum:
if 0 != metinSlot:
## 0: Ȱ¼ºÈ*, 1: »ç¿ë·®, 2: ÃÑ·®
isActivated = int(metinSlot[0])
usedAmount = float(metinSlot[1])
totalAmount = float(metinSlot[2])
if 0 == totalAmount:
totalAmount = 1
self.AppendSpace(5)
if 0 != isActivated:
self.AppendTextLine("(%s)" % (locale.TOOLTIP_AUTO_POTION_USING), self.SPECIAL_POSITIVE_COLOR)
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_AUTO_POTION_REST % (100.0 - ((usedAmount / totalAmount) * 100.0)), self.POSITIVE_COLOR)
elif 72726 == itemVnum == itemVnum:
if 0 != metinSlot:
## 0: Ȱ¼ºÈ*, 1: »ç¿ë·®, 2: ÃÑ·®
isActivated = int(metinSlot[0])
usedAmount = float(metinSlot[1])
totalAmount = float(metinSlot[2])
if 0 == totalAmount:
totalAmount = 1
self.AppendSpace(5)
if 0 != isActivated:
self.AppendTextLine("(%s)" % (locale.TOOLTIP_AUTO_POTION_USING), self.SPECIAL_POSITIVE_COLOR)
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_AUTO_POTION_REST % (100.0 - ((usedAmount / totalAmount) * 100.0)), self.POSITIVE_COLOR)
elif 72727 == itemVnum == itemVnum:
if 0 != metinSlot:
## 0: Ȱ¼ºÈ*, 1: »ç¿ë·®, 2: ÃÑ·®
isActivated = int(metinSlot[0])
usedAmount = float(metinSlot[1])
totalAmount = float(metinSlot[2])
if 0 == totalAmount:
totalAmount = 1
self.AppendSpace(5)
if 0 != isActivated:
self.AppendTextLine("(%s)" % (locale.TOOLTIP_AUTO_POTION_USING), self.SPECIAL_POSITIVE_COLOR)
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_AUTO_POTION_REST % (100.0 - ((usedAmount / totalAmount) * 100.0)), self.POSITIVE_COLOR)
elif 72728 == itemVnum == itemVnum:
if 0 != metinSlot:
## 0: Ȱ¼ºÈ*, 1: »ç¿ë·®, 2: ÃÑ·®
isActivated = int(metinSlot[0])
usedAmount = float(metinSlot[1])
totalAmount = float(metinSlot[2])
if 0 == totalAmount:
totalAmount = 1
self.AppendSpace(5)
if 0 != isActivated:
self.AppendTextLine("(%s)" % (locale.TOOLTIP_AUTO_POTION_USING), self.SPECIAL_POSITIVE_COLOR)
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_AUTO_POTION_REST % (100.0 - ((usedAmount / totalAmount) * 100.0)), self.POSITIVE_COLOR)
elif 72729 == itemVnum == itemVnum:
if 0 != metinSlot:
## 0: Ȱ¼ºÈ*, 1: »ç¿ë·®, 2: ÃÑ·®
isActivated = int(metinSlot[0])
usedAmount = float(metinSlot[1])
totalAmount = float(metinSlot[2])
if 0 == totalAmount:
totalAmount = 1
self.AppendSpace(5)
if 0 != isActivated:
self.AppendTextLine("(%s)" % (locale.TOOLTIP_AUTO_POTION_USING), self.SPECIAL_POSITIVE_COLOR)
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_AUTO_POTION_REST % (100.0 - ((usedAmount / totalAmount) * 100.0)), self.POSITIVE_COLOR)
elif 72730 == itemVnum == itemVnum:
if 0 != metinSlot:
## 0: Ȱ¼ºÈ*, 1: »ç¿ë·®, 2: ÃÑ·®
isActivated = int(metinSlot[0])
usedAmount = float(metinSlot[1])
totalAmount = float(metinSlot[2])
if 0 == totalAmount:
totalAmount = 1
self.AppendSpace(5)
if 0 != isActivated:
self.AppendTextLine("(%s)" % (locale.TOOLTIP_AUTO_POTION_USING), self.SPECIAL_POSITIVE_COLOR)
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_AUTO_POTION_REST % (100.0 - ((usedAmount / totalAmount) * 100.0)), self.POSITIVE_COLOR)
## ±Íȯ ±â¾ïºÎ
elif itemVnum in WARP_SCROLLS:
if 0 != metinSlot:
xPos = int(metinSlot[0])
yPos = int(metinSlot[1])
if xPos != 0 and yPos != 0:
(mapName, xBase, yBase) = background.GlobalPositionToMapInfo(xPos, yPos)
localeMapName=locale.MINIMAP_ZONE_NAME_DICT.get(mapName, "")
self.AppendSpace(5)
if localeMapName!="":
self.AppendTextLine(locale.TOOLTIP_MEMORIZED_POSITION % (localeMapName, int(xPos-xBase)/100, int(yPos-yBase)/100), self.NORMAL_COLOR)
else:
self.AppendTextLine(locale.TOOLTIP_MEMORIZED_POSITION_ERROR % (int(xPos)/100, int(yPos)/100), self.NORMAL_COLOR)
dbg.TraceError("NOT_EXIST_IN_MINIMAP_ZONE_NAME_DICT: %s" % mapName)
#####
if item.USE_SPECIAL == itemSubType:
if 0 != metinSlot:
time = metinSlot[player.METIN_SOCKET_MAX_NUM-1]
## ½Ç½Ã°£ ÀÌ¿ë Flag
if 1 == item.GetValue(2):
self.AppendMallItemLastTime(time)
else:
self.__AppendLimitInformation()
self.ShowToolTip()
## Çì¾îÀΰ¡?
def __IsHair(self, itemVnum):
return (self.__IsOldHair(itemVnum) or
self.__IsNewHair(itemVnum) or
self.__IsNewHair2(itemVnum) or
self.__IsNewHair3(itemVnum)
)
def __IsOldHair(self, itemVnum):
return itemVnum > 73000 and itemVnum < 74000
def __IsNewHair(self, itemVnum):
return itemVnum > 74000 and itemVnum < 75000
def __IsNewHair2(self, itemVnum):
return itemVnum > 75000 and itemVnum < 77000
def __IsNewHair3(self, itemVnum):
return ((74012 < itemVnum and itemVnum < 74022) or
(74262 < itemVnum and itemVnum < 74272) or
(74512 < itemVnum and itemVnum < 74522) or
(74762 < itemVnum and itemVnum < 74772) or
(45000 < itemVnum and itemVnum < 47000))
def __IsCostume(self, itemVnum):
return itemVnum in [45018, 45017, 45016, 45015, 45014, 45013, 45012, 45011, 41114, 41113, 41112, 41111, 41110, 41109, 41108, 41107, 41106, 41105, 41104, 41103, 41102, 41101, 41100, 41099, 41098, 41097, 41096, 41095, 41094, 41093, 41092, 41091, 41090, 41089, 41088, 41087, 41086, 41085, 41054, 41053, 41052, 41051, 41050, 41049, 41048, 41047, 41046, 41045, 41044, 41043, 41042, 41041, 41040, 41039, 41038, 41037, 41036, 41035, 41034, 41033, 41032, 41031, 41030, 41029, 91021]
def __AppendHairIcon(self, itemVnum):
itemImage = ui.ImageBox()
itemImage.SetParent(self)
itemImage.Show()
if self.__IsOldHair(itemVnum):
itemImage.LoadImage("d:/ymir work/item/quest/"+str(itemVnum)+".tga")
elif self.__IsNewHair3(itemVnum):
itemImage.LoadImage("icon/hair/%d.sub" % (itemVnum))
elif self.__IsNewHair(itemVnum): # ±âÁ¸ Çì¾î ¹øÈ£¸¦ ¿¬°á½ÃÄѼ* »ç¿ëÇÑ´Ù. »õ·Î¿î ¾ÆÀÌÅÛÀº 1000¸¸Å* ¹øÈ£°¡ ´Ã¾ú´Ù.
itemImage.LoadImage("d:/ymir work/item/quest/"+str(itemVnum-1000)+".tga")
elif self.__IsNewHair2(itemVnum): # ±âÁ¸ Çì¾î ¹øÈ£¸¦ ¿¬°á½ÃÄѼ* »ç¿ëÇÑ´Ù. »õ·Î¿î ¾ÆÀÌÅÛÀº 1000¸¸Å* ¹øÈ£°¡ ´Ã¾ú´Ù.
itemImage.LoadImage("icon/hair/%d.sub" % (itemVnum))
itemImage.SetPosition(itemImage.GetWidth()/2, self.toolTipHeight)
self.toolTipHeight += itemImage.GetHeight()
#self.toolTipWidth += itemImage.GetWidth()/2
self.childrenList.append(itemImage)
self.ResizeToolTip()
## »çÀÌÁî°¡ Å« Description ÀÏ °æ¿ì ÅøÆÁ »çÀÌÁ Á¶Á¤ÇÑ´Ù
def __AdjustMaxWidth(self, attrSlot, desc):
newToolTipWidth = self.toolTipWidth
newToolTipWidth = max(self.__AdjustAttrMaxWidth(attrSlot), newToolTipWidth)
newToolTipWidth = max(self.__AdjustDescMaxWidth(desc), newToolTipWidth)
if newToolTipWidth > self.toolTipWidth:
self.toolTipWidth = newToolTipWidth
self.ResizeToolTip()
def __AdjustAttrMaxWidth(self, attrSlot):
if 0 == attrSlot:
return self.toolTipWidth
maxWidth = self.toolTipWidth
for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
type = attrSlot[i][0]
value = attrSlot[i][1]
if self.ATTRIBUTE_NEED_WIDTH.has_key(type):
if value > 0:
maxWidth = max(self.ATTRIBUTE_NEED_WIDTH[type], maxWidth)
# ATTR_CHANGE_TOOLTIP_WIDTH
#self.toolTipWidth = max(self.ATTRIBUTE_NEED_WIDTH[type], self.toolTipWidth)
#self.ResizeToolTip()
# END_OF_ATTR_CHANGE_TOOLTIP_WIDTH
return maxWidth
def __AdjustDescMaxWidth(self, desc):
if len(desc) < DESC_DEFAULT_MAX_COLS:
return self.toolTipWidth
return DESC_WESTERN_MAX_WIDTH
def __SetSkillBookToolTip(self, skillIndex, bookName, skillGrade):
skillName = skill.GetSkillName(skillIndex)
if not skillName:
return
if locale.IsVIETNAM():
itemName = bookName + " " + skillName
else:
itemName = skillName + " " + bookName
self.SetTitle(itemName)
def __AppendPickInformation(self, curLevel, curEXP, maxEXP):
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_PICK_LEVEL % (curLevel), self.NORMAL_COLOR)
self.AppendTextLine(locale.TOOLTIP_PICK_EXP % (curEXP, maxEXP), self.NORMAL_COLOR)
if curEXP == maxEXP:
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_PICK_UPGRADE1, self.NORMAL_COLOR)
self.AppendTextLine(locale.TOOLTIP_PICK_UPGRADE2, self.NORMAL_COLOR)
self.AppendTextLine(locale.TOOLTIP_PICK_UPGRADE3, self.NORMAL_COLOR)
def __AppendRodInformation(self, curLevel, curEXP, maxEXP):
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_FISHINGROD_LEVEL % (curLevel), self.NORMAL_COLOR)
self.AppendTextLine(locale.TOOLTIP_FISHINGROD_EXP % (curEXP, maxEXP), self.NORMAL_COLOR)
if curEXP == maxEXP:
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_FISHINGROD_UPGRADE1, self.NORMAL_COLOR)
self.AppendTextLine(locale.TOOLTIP_FISHINGROD_UPGRADE2, self.NORMAL_COLOR)
self.AppendTextLine(locale.TOOLTIP_FISHINGROD_UPGRADE3, self.NORMAL_COLOR)
def __AppendLimitInformation(self):
appendSpace = FALSE
for i in xrange(item.LIMIT_MAX_NUM):
(limitType, limitValue) = item.GetLimit(i)
if limitValue > 0:
if FALSE == appendSpace:
self.AppendSpace(5)
appendSpace = TRUE
else:
continue
if item.LIMIT_LEVEL == limitType:
color = self.GetLimitTextLineColor(player.GetStatus(player.LEVEL), limitValue)
self.AppendTextLine(locale.TOOLTIP_ITEM_LIMIT_LEVEL % (limitValue), color)
"""
elif item.LIMIT_STR == limitType:
color = self.GetLimitTextLineColor(player.GetStatus(player.ST), limitValue)
self.AppendTextLine(locale.TOOLTIP_ITEM_LIMIT_STR % (limitValue), color)
elif item.LIMIT_DEX == limitType:
color = self.GetLimitTextLineColor(player.GetStatus(player.DX), limitValue)
self.AppendTextLine(locale.TOOLTIP_ITEM_LIMIT_DEX % (limitValue), color)
elif item.LIMIT_INT == limitType:
color = self.GetLimitTextLineColor(player.GetStatus(player.IQ), limitValue)
self.AppendTextLine(locale.TOOLTIP_ITEM_LIMIT_INT % (limitValue), color)
elif item.LIMIT_CON == limitType:
color = self.GetLimitTextLineColor(player.GetStatus(player.HT), limitValue)
self.AppendTextLine(locale.TOOLTIP_ITEM_LIMIT_CON % (limitValue), color)
"""
def __GetAffectString(self, affectType, affectValue):
if 0 == affectType:
return None
if 0 == affectValue:
return None
try:
return self.AFFECT_DICT[affectType](affectValue)
except TypeError:
return "UNKNOWN_VALUE[%s] %s" % (affectType, affectValue)
except KeyError:
return "UNKNOWN_TYPE[%s] %s" % (affectType, affectValue)
def __AppendAffectInformation(self):
for i in xrange(item.ITEM_APPLY_MAX_NUM):
(affectType, affectValue) = item.GetAffect(i)
affectString = self.__GetAffectString(affectType, affectValue)
if affectString:
self.AppendTextLine(affectString, self.GetChangeTextLineColor(affectValue))
def AppendWearableInformation(self):
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_ITEM_WEARABLE_JOB, self.NORMAL_COLOR)
flagList = (
not item.IsAntiFlag(item.ITEM_ANTIFLAG_WARRIOR),
not item.IsAntiFlag(item.ITEM_ANTIFLAG_ASSASSIN),
not item.IsAntiFlag(item.ITEM_ANTIFLAG_SURA),
not item.IsAntiFlag(item.ITEM_ANTIFLAG_SHAMAN))
characterNames = ""
for i in xrange(self.CHARACTER_COUNT):
name = self.CHARACTER_NAMES[i]
flag = flagList[i]
if flag:
characterNames += " "
characterNames += name
textLine = self.AppendTextLine(characterNames, self.NORMAL_COLOR, TRUE)
textLine.SetFeather()
if item.IsAntiFlag(item.ITEM_ANTIFLAG_MALE):
textLine = self.AppendTextLine(locale.FOR_FEMALE, self.NORMAL_COLOR, TRUE)
textLine.SetFeather()
if item.IsAntiFlag(item.ITEM_ANTIFLAG_FEMALE):
textLine = self.AppendTextLine(locale.FOR_MALE, self.NORMAL_COLOR, TRUE)
textLine.SetFeather()
def __AppendPotionInformation(self):
self.AppendSpace(5)
healHP = item.GetValue(0)
healSP = item.GetValue(1)
healStatus = item.GetValue(2)
healPercentageHP = item.GetValue(3)
healPercentageSP = item.GetValue(4)
if healHP > 0:
self.AppendTextLine(locale.TOOLTIP_POTION_PLUS_HP_POINT % healHP, self.GetChangeTextLineColor(healHP))
if healSP > 0:
self.AppendTextLine(locale.TOOLTIP_POTION_PLUS_SP_POINT % healSP, self.GetChangeTextLineColor(healSP))
if healStatus != 0:
self.AppendTextLine(locale.TOOLTIP_POTION_CURE)
if healPercentageHP > 0:
self.AppendTextLine(locale.TOOLTIP_POTION_PLUS_HP_PERCENT % healPercentageHP, self.GetChangeTextLineColor(healPercentageHP))
if healPercentageSP > 0:
self.AppendTextLine(locale.TOOLTIP_POTION_PLUS_SP_PERCENT % healPercentageSP, self.GetChangeTextLineColor(healPercentageSP))
def __AppendAbilityPotionInformation(self):
self.AppendSpace(5)
abilityType = item.GetValue(0)
time = item.GetValue(1)
point = item.GetValue(2)
if abilityType == item.APPLY_ATT_SPEED:
self.AppendTextLine(locale.TOOLTIP_POTION_PLUS_ATTACK_SPEED % point, self.GetChangeTextLineColor(point))
elif abilityType == item.APPLY_MOV_SPEED:
self.AppendTextLine(locale.TOOLTIP_POTION_PLUS_MOVING_SPEED % point, self.GetChangeTextLineColor(point))
if time > 0:
minute = (time / 60)
second = (time % 60)
timeString = locale.TOOLTIP_POTION_TIME
if minute > 0:
timeString += str(minute) + locale.TOOLTIP_POTION_MIN
if second > 0:
timeString += " " + str(second) + locale.TOOLTIP_POTION_SEC
self.AppendTextLine(timeString)
def GetPriceColor(self, price):
if price>=constInfo.HIGH_PRICE:
return self.HIGH_PRICE_COLOR
if price>=constInfo.MIDDLE_PRICE:
return self.MIDDLE_PRICE_COLOR
else:
return self.LOW_PRICE_COLOR
def AppendPrice(self, price):
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_BUYPRICE % (locale.NumberToMoneyString(price)), self.GetPriceColor(price))
def AppendSellingPrice(self, price):
if item.IsAntiFlag(item.ITEM_ANTIFLAG_SELL):
self.AppendTextLine(locale.TOOLTIP_ANTI_SELL, self.DISABLE_COLOR)
self.AppendSpace(5)
else:
self.AppendTextLine(locale.TOOLTIP_SELLPRICE % (locale.NumberToMoneyString(price)), self.GetPriceColor(price))
self.AppendSpace(5)
def AppendMetinInformation(self):
affectType, affectValue = item.GetAffect(0)
#affectType = item.GetValue(0)
#affectValue = item.GetValue(1)
affectString = self.__GetAffectString(affectType, affectValue)
if affectString:
self.AppendSpace(5)
self.AppendTextLine(affectString, self.GetChangeTextLineColor(affectValue))
def AppendMetinWearInformation(self):
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_SOCKET_REFINABLE_ITEM, self.NORMAL_COLOR)
flagList = (item.IsWearableFlag(item.WEARABLE_BODY),
item.IsWearableFlag(item.WEARABLE_HEAD),
item.IsWearableFlag(item.WEARABLE_FOOTS),
item.IsWearableFlag(item.WEARABLE_WRIST),
item.IsWearableFlag(item.WEARABLE_WEAPON),
item.IsWearableFlag(item.WEARABLE_NECK),
item.IsWearableFlag(item.WEARABLE_EAR),
item.IsWearableFlag(item.WEARABLE_UNIQUE),
item.IsWearableFlag(item.WEARABLE_SHIELD),
item.IsWearableFlag(item.WEARABLE_ARROW))
wearNames = ""
for i in xrange(self.WEAR_COUNT):
name = self.WEAR_NAMES[i]
flag = flagList[i]
if flag:
wearNames += " "
wearNames += name
textLine = ui.TextLine()
textLine.SetParent(self)
textLine.SetFontName(self.defFontName)
textLine.SetPosition(self.toolTipWidth/2, self.toolTipHeight)
textLine.SetHorizontalAlignCenter()
textLine.SetPackedFontColor(self.NORMAL_COLOR)
textLine.SetText(wearNames)
textLine.Show()
self.childrenList.append(textLine)
self.toolTipHeight += self.TEXT_LINE_HEIGHT
self.ResizeToolTip()
def GetMetinSocketType(self, number):
if player.METIN_SOCKET_TYPE_NONE == number:
return player.METIN_SOCKET_TYPE_NONE
elif player.METIN_SOCKET_TYPE_SILVER == number:
return player.METIN_SOCKET_TYPE_SILVER
elif player.METIN_SOCKET_TYPE_GOLD == number:
return player.METIN_SOCKET_TYPE_GOLD
else:
item.SelectItem(number)
if item.METIN_NORMAL == item.GetItemSubType():
return player.METIN_SOCKET_TYPE_SILVER
elif item.METIN_GOLD == item.GetItemSubType():
return player.METIN_SOCKET_TYPE_GOLD
elif "USE_PUT_INTO_ACCESSORY_SOCKET" == item.GetUseType(number):
return player.METIN_SOCKET_TYPE_SILVER
return player.METIN_SOCKET_TYPE_NONE
def GetMetinItemIndex(self, number):
if player.METIN_SOCKET_TYPE_SILVER == number:
return 0
if player.METIN_SOCKET_TYPE_GOLD == number:
return 0
return number
def __AppendAccessoryMetinSlotInfo(self, metinSlot, mtrlVnum):
ACCESSORY_SOCKET_MAX_SIZE = 3
cur=min(metinSlot[0], ACCESSORY_SOCKET_MAX_SIZE)
end=min(metinSlot[1], ACCESSORY_SOCKET_MAX_SIZE)
affectType1, affectValue1 = item.GetAffect(0)
affectList1=[0, max(1, affectValue1*10/100), max(2, affectValue1*20/100), max(3, affectValue1*40/100)]
affectType2, affectValue2 = item.GetAffect(1)
affectList2=[0, max(1, affectValue2*10/100), max(2, affectValue2*20/100), max(3, affectValue2*40/100)]
mtrlPos=0
mtrlList=[mtrlVnum]*cur+[player.METIN_SOCKET_TYPE_SILVER]*(end-cur)
for mtrl in mtrlList:
affectString1 = self.__GetAffectString(affectType1, affectList1[mtrlPos+1]-affectList1[mtrlPos])
affectString2 = self.__GetAffectString(affectType2, affectList2[mtrlPos+1]-affectList2[mtrlPos])
leftTime = 0
if cur == mtrlPos+1:
leftTime=metinSlot[2]
self.__AppendMetinSlotInfo_AppendMetinSocketData(mtrlPos, mtrl, affectString1, affectString2, leftTime)
mtrlPos+=1
def __AppendMetinSlotInfo(self, metinSlot):
if self.__AppendMetinSlotInfo_IsEmptySlotList(metinSlot):
return
for i in xrange(player.METIN_SOCKET_MAX_NUM):
self.__AppendMetinSlotInfo_AppendMetinSocketData(i, metinSlot[i])
def __AppendMetinSlotInfo_IsEmptySlotList(self, metinSlot):
if 0 == metinSlot:
return 1
for i in xrange(player.METIN_SOCKET_MAX_NUM):
metinSlotData=metinSlot[i]
if 0 != self.GetMetinSocketType(metinSlotData):
if 0 != self.GetMetinItemIndex(metinSlotData):
return 0
return 1
def __AppendMetinSlotInfo_AppendMetinSocketData(self, index, metinSlotData, custumAffectString="", custumAffectString2="", leftTime=0):
slotType = self.GetMetinSocketType(metinSlotData)
itemIndex = self.GetMetinItemIndex(metinSlotData)
if 0 == slotType:
return
self.AppendSpace(5)
slotImage = ui.ImageBox()
slotImage.SetParent(self)
slotImage.SetPosition(9, self.toolTipHeight-1)
slotImage.Show()
## Name
nameTextLine = ui.TextLine()
nameTextLine.SetParent(self)
nameTextLine.SetFontName(self.defFontName)
nameTextLine.SetPackedFontColor(self.NORMAL_COLOR)
nameTextLine.SetPosition(50, self.toolTipHeight + 2)
nameTextLine.SetOutline()
nameTextLine.SetFeather()
nameTextLine.Show()
self.childrenList.append(nameTextLine)
if player.METIN_SOCKET_TYPE_SILVER == slotType:
slotImage.LoadImage("d:/ymir work/ui/game/windows/metin_slot_silver.sub")
elif player.METIN_SOCKET_TYPE_GOLD == slotType:
slotImage.LoadImage("d:/ymir work/ui/game/windows/metin_slot_gold.sub")
self.childrenList.append(slotImage)
metinImage = ui.ImageBox()
metinImage.SetParent(self)
metinImage.SetPosition(10, self.toolTipHeight)
metinImage.Show()
self.childrenList.append(metinImage)
if itemIndex:
item.SelectItem(itemIndex)
## Image
try:
metinImage.LoadImage(item.GetIconImageFileName())
except:
dbg.TraceError("ItemToolTip.__AppendMetinSocketData() - Failed to find image file %d:%s" %
(itemIndex, item.GetIconImageFileName())
)
nameTextLine.SetText(item.GetItemName())
## Affect
affectTextLine = ui.TextLine()
affectTextLine.SetParent(self)
affectTextLine.SetFontName(self.defFontName)
affectTextLine.SetPackedFontColor(self.POSITIVE_COLOR)
affectTextLine.SetPosition(50, self.toolTipHeight + 16 + 2)
affectTextLine.SetOutline()
affectTextLine.SetFeather()
affectTextLine.Show()
if custumAffectString:
affectTextLine.SetText(custumAffectString)
elif itemIndex!=constInfo.ERROR_METIN_STONE:
affectType, affectValue = item.GetAffect(0)
affectString = self.__GetAffectString(affectType, affectValue)
if affectString:
affectTextLine.SetText(affectString)
else:
affectTextLine.SetText(locale.TOOLTIP_APPLY_NOAFFECT)
self.childrenList.append(affectTextLine)
if custumAffectString2:
affectTextLine = ui.TextLine()
affectTextLine.SetParent(self)
affectTextLine.SetFontName(self.defFontName)
affectTextLine.SetPackedFontColor(self.POSITIVE_COLOR)
affectTextLine.SetPosition(50, self.toolTipHeight + 16 + 2 + 16 + 2)
affectTextLine.SetOutline()
affectTextLine.SetFeather()
affectTextLine.Show()
affectTextLine.SetText(custumAffectString2)
self.childrenList.append(affectTextLine)
self.toolTipHeight += 16 + 2
if 0 != leftTime:
timeText = (locale.LEFT_TIME + " : " + locale.SecondToDHM(leftTime))
timeTextLine = ui.TextLine()
timeTextLine.SetParent(self)
timeTextLine.SetFontName(self.defFontName)
timeTextLine.SetPackedFontColor(self.POSITIVE_COLOR)
timeTextLine.SetPosition(50, self.toolTipHeight + 16 + 2 + 16 + 2)
timeTextLine.SetOutline()
timeTextLine.SetFeather()
timeTextLine.Show()
timeTextLine.SetText(timeText)
self.childrenList.append(timeTextLine)
self.toolTipHeight += 16 + 2
else:
nameTextLine.SetText(locale.TOOLTIP_SOCKET_EMPTY)
self.toolTipHeight += 35
self.ResizeToolTip()
def __AppendFishInfo(self, size):
if size > 0:
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_FISH_LEN % (float(size) / 100.0), self.NORMAL_COLOR)
def AppendUniqueItemLastTime(self, restMin):
restSecond = restMin*60
self.AppendSpace(5)
self.AppendTextLine(locale.LEFT_TIME + " : " + locale.SecondToHM(restSecond), self.NORMAL_COLOR)
def AppendMallItemLastTime(self, endTime):
leftSec = max(0, endTime - app.GetGlobalTimeStamp())
self.AppendSpace(5)
self.AppendTextLine(locale.LEFT_TIME + " : " + locale.SecondToDHM(leftSec), self.NORMAL_COLOR)
class HyperlinkItemToolTip(ItemToolTip):
def __init__(self):
ItemToolTip.__init__(self, isPickable=TRUE)
def SetHyperlinkItem(self, tokens):
minTokenCount = 3 + player.METIN_SOCKET_MAX_NUM
maxTokenCount = minTokenCount + 2 * player.ATTRIBUTE_SLOT_MAX_NUM
if tokens and len(tokens) >= minTokenCount and len(tokens) <= maxTokenCount:
head, vnum, flag = tokens[:3]
itemVnum = int(vnum, 16)
metinSlot = [int(metin, 16) for metin in tokens[3:6]]
rests = tokens[6:]
if rests:
attrSlot = []
rests.reverse()
while rests:
key = int(rests.pop(), 16)
if rests:
val = int(rests.pop())
attrSlot.append((key, val))
attrSlot += [(0, 0)] * (player.ATTRIBUTE_SLOT_MAX_NUM - len(attrSlot))
else:
attrSlot = [(0, 0)] * player.ATTRIBUTE_SLOT_MAX_NUM
self.ClearToolTip()
self.AddItemData(itemVnum, metinSlot, attrSlot)
ItemToolTip.OnUpdate(self)
def OnUpdate(self):
pass
def OnMouseLeftButtonDown(self):
self.Hide()
class SkillToolTip(ToolTip):
POINT_NAME_DICT = {
player.LEVEL : locale.SKILL_TOOLTIP_LEVEL,
player.IQ : locale.SKILL_TOOLTIP_INT,
}
SKILL_TOOL_TIP_WIDTH = 200
PARTY_SKILL_TOOL_TIP_WIDTH = 340
PARTY_SKILL_EXPERIENCE_AFFECT_LIST = ( ( 2, 2, 10,),
( 8, 3, 20,),
(14, 4, 30,),
(22, 5, 45,),
(28, 6, 60,),
(34, 7, 80,),
(38, 8, 100,), )
PARTY_SKILL_PLUS_GRADE_AFFECT_LIST = ( ( 4, 2, 1, 0,),
(10, 3, 2, 0,),
(16, 4, 2, 1,),
(24, 5, 2, 2,), )
PARTY_SKILL_ATTACKER_AFFECT_LIST = ( ( 36, 3, ),
( 26, 1, ),
( 32, 2, ), )
SKILL_GRADE_NAME = { player.SKILL_GRADE_MASTER : locale.SKILL_GRADE_NAME_MASTER,
player.SKILL_GRADE_GRAND_MASTER : locale.SKILL_GRADE_NAME_GRAND_MASTER,
player.SKILL_GRADE_PERFECT_MASTER : locale.SKILL_GRADE_NAME_PERFECT_MASTER, }
AFFECT_NAME_DICT = {
"HP" : locale.TOOLTIP_SKILL_AFFECT_ATT_POWER,
"ATT_GRADE" : locale.TOOLTIP_SKILL_AFFECT_ATT_GRADE,
"DEF_GRADE" : locale.TOOLTIP_SKILL_AFFECT_DEF_GRADE,
"ATT_SPEED" : locale.TOOLTIP_SKILL_AFFECT_ATT_SPEED,
"MOV_SPEED" : locale.TOOLTIP_SKILL_AFFECT_MOV_SPEED,
"DODGE" : locale.TOOLTIP_SKILL_AFFECT_DODGE,
"RESIST_NORMAL" : locale.TOOLTIP_SKILL_AFFECT_RESIST_NORMAL,
"REFLECT_MELEE" : locale.TOOLTIP_SKILL_AFFECT_REFLECT_MELEE,
}
AFFECT_APPEND_TEXT_DICT = {
"DODGE" : "%",
"RESIST_NORMAL" : "%",
"REFLECT_MELEE" : "%",
}
def __init__(self):
ToolTip.__init__(self, self.SKILL_TOOL_TIP_WIDTH)
def __del__(self):
ToolTip.__del__(self)
def SetSkill(self, skillIndex, skillLevel = -1):
if 0 == skillIndex:
return
if skill.SKILL_TYPE_GUILD == skill.GetSkillType(skillIndex):
if self.SKILL_TOOL_TIP_WIDTH != self.toolTipWidth:
self.toolTipWidth = self.SKILL_TOOL_TIP_WIDTH
self.ResizeToolTip()
self.AppendDefaultData(skillIndex)
self.AppendSkillConditionData(skillIndex)
self.AppendGuildSkillData(skillIndex, skillLevel)
else:
if self.SKILL_TOOL_TIP_WIDTH != self.toolTipWidth:
self.toolTipWidth = self.SKILL_TOOL_TIP_WIDTH
self.ResizeToolTip()
slotIndex = player.GetSkillSlotIndex(skillIndex)
skillGrade = player.GetSkillGrade(slotIndex)
skillLevel = player.GetSkillLevel(slotIndex)
skillCurrentPercentage = player.GetSkillCurrentEfficientPercentage(slotIndex)
skillNextPercentage = player.GetSkillNextEfficientPercentage(slotIndex)
self.AppendDefaultData(skillIndex)
self.AppendSkillConditionData(skillIndex)
self.AppendSkillDataNew(slotIndex, skillIndex, skillGrade, skillLevel, skillCurrentPercentage, skillNextPercentage)
self.AppendSkillRequirement(skillIndex, skillLevel)
self.ShowToolTip()
def SetSkillNew(self, slotIndex, skillIndex, skillGrade, skillLevel):
if 0 == skillIndex:
return
if player.SKILL_INDEX_TONGSOL == skillIndex:
slotIndex = player.GetSkillSlotIndex(skillIndex)
skillLevel = player.GetSkillLevel(slotIndex)
self.AppendDefaultData(skillIndex)
self.AppendPartySkillData(skillGrade, skillLevel)
elif player.SKILL_INDEX_RIDING == skillIndex:
slotIndex = player.GetSkillSlotIndex(skillIndex)
self.AppendSupportSkillDefaultData(skillIndex, skillGrade, skillLevel, 30)
elif player.SKILL_INDEX_SUMMON == skillIndex:
maxLevel = 10
self.ClearToolTip()
self.__SetSkillTitle(skillIndex, skillGrade)
## Description
description = skill.GetSkillDescription(skillIndex)
self.AppendDescription(description, 25)
if skillLevel == 10:
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_SKILL_LEVEL_MASTER % (skillLevel), self.NORMAL_COLOR)
self.AppendTextLine(locale.SKILL_SUMMON_DESCRIPTION % (skillLevel*10), self.NORMAL_COLOR)
else:
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_SKILL_LEVEL % (skillLevel), self.NORMAL_COLOR)
self.__AppendSummonDescription(skillLevel, self.NORMAL_COLOR)
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_SKILL_LEVEL % (skillLevel+1), self.NEGATIVE_COLOR)
self.__AppendSummonDescription(skillLevel+1, self.NEGATIVE_COLOR)
elif skill.SKILL_TYPE_GUILD == skill.GetSkillType(skillIndex):
if self.SKILL_TOOL_TIP_WIDTH != self.toolTipWidth:
self.toolTipWidth = self.SKILL_TOOL_TIP_WIDTH
self.ResizeToolTip()
self.AppendDefaultData(skillIndex)
self.AppendSkillConditionData(skillIndex)
self.AppendGuildSkillData(skillIndex, skillLevel)
else:
if self.SKILL_TOOL_TIP_WIDTH != self.toolTipWidth:
self.toolTipWidth = self.SKILL_TOOL_TIP_WIDTH
self.ResizeToolTip()
slotIndex = player.GetSkillSlotIndex(skillIndex)
skillCurrentPercentage = player.GetSkillCurrentEfficientPercentage(slotIndex)
skillNextPercentage = player.GetSkillNextEfficientPercentage(slotIndex)
self.AppendDefaultData(skillIndex, skillGrade)
self.AppendSkillConditionData(skillIndex)
self.AppendSkillDataNew(slotIndex, skillIndex, skillGrade, skillLevel, skillCurrentPercentage, skillNextPercentage)
self.AppendSkillRequirement(skillIndex, skillLevel)
self.ShowToolTip()
def __SetSkillTitle(self, skillIndex, skillGrade):
self.SetTitle(skill.GetSkillName(skillIndex, skillGrade))
self.__AppendSkillGradeName(skillIndex, skillGrade)
def __AppendSkillGradeName(self, skillIndex, skillGrade):
if self.SKILL_GRADE_NAME.has_key(skillGrade):
self.AppendSpace(5)
self.AppendTextLine(self.SKILL_GRADE_NAME[skillGrade] % (skill.GetSkillName(skillIndex, 0)), self.CAN_LEVEL_UP_COLOR)
def SetSkillOnlyName(self, slotIndex, skillIndex, skillGrade):
if 0 == skillIndex:
return
slotIndex = player.GetSkillSlotIndex(skillIndex)
self.toolTipWidth = self.SKILL_TOOL_TIP_WIDTH
self.ResizeToolTip()
self.ClearToolTip()
self.__SetSkillTitle(skillIndex, skillGrade)
self.AppendDefaultData(skillIndex, skillGrade)
self.AppendSkillConditionData(skillIndex)
self.ShowToolTip()
def AppendDefaultData(self, skillIndex, skillGrade = 0):
self.ClearToolTip()
self.__SetSkillTitle(skillIndex, skillGrade)
## Level Limit
levelLimit = skill.GetSkillLevelLimit(skillIndex)
if levelLimit > 0:
color = self.NORMAL_COLOR
if player.GetStatus(player.LEVEL) < levelLimit:
color = self.NEGATIVE_COLOR
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_ITEM_LIMIT_LEVEL % (levelLimit), color)
## Description
description = skill.GetSkillDescription(skillIndex)
self.AppendDescription(description, 25)
def AppendSupportSkillDefaultData(self, skillIndex, skillGrade, skillLevel, maxLevel):
self.ClearToolTip()
self.__SetSkillTitle(skillIndex, skillGrade)
## Description
description = skill.GetSkillDescription(skillIndex)
self.AppendDescription(description, 25)
if 1 == skillGrade:
skillLevel += 19
elif 2 == skillGrade:
skillLevel += 29
elif 3 == skillGrade:
skillLevel = 40
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_SKILL_LEVEL_WITH_MAX % (skillLevel, maxLevel), self.NORMAL_COLOR)
def AppendSkillConditionData(self, skillIndex):
conditionDataCount = skill.GetSkillConditionDescriptionCount(skillIndex)
if conditionDataCount > 0:
self.AppendSpace(5)
for i in xrange(conditionDataCount):
self.AppendTextLine(skill.GetSkillConditionDescription(skillIndex, i), self.CONDITION_COLOR)
def AppendGuildSkillData(self, skillIndex, skillLevel):
skillMaxLevel = 7
skillCurrentPercentage = float(skillLevel) / float(skillMaxLevel)
skillNextPercentage = float(skillLevel+1) / float(skillMaxLevel)
## Current Level
if skillLevel > 0:
if self.HasSkillLevelDescription(skillIndex, skillLevel):
self.AppendSpace(5)
if skillLevel == skillMaxLevel:
self.AppendTextLine(locale.TOOLTIP_SKILL_LEVEL_MASTER % (skillLevel), self.NORMAL_COLOR)
else:
self.AppendTextLine(locale.TOOLTIP_SKILL_LEVEL % (skillLevel), self.NORMAL_COLOR)
#####
for i in xrange(skill.GetSkillAffectDescriptionCount(skillIndex)):
self.AppendTextLine(skill.GetSkillAffectDescription(skillIndex, i, skillCurrentPercentage), self.ENABLE_COLOR)
## Cooltime
coolTime = skill.GetSkillCoolTime(skillIndex, skillCurrentPercentage)
if coolTime > 0:
self.AppendTextLine(locale.TOOLTIP_SKILL_COOL_TIME + str(coolTime), self.ENABLE_COLOR)
## SP
needGSP = skill.GetSkillNeedSP(skillIndex, skillCurrentPercentage)
if needGSP > 0:
self.AppendTextLine(locale.TOOLTIP_NEED_GSP % (needGSP), self.ENABLE_COLOR)
## Next Level
if skillLevel < skillMaxLevel:
if self.HasSkillLevelDescription(skillIndex, skillLevel+1):
self.AppendSpace(5)
self.AppendTextLine(locale.TOOLTIP_NEXT_SKILL_LEVEL_1 % (skillLevel+1, skillMaxLevel), self.DISABLE_COLOR)
#####
for i in xrange(skill.GetSkillAffectDescriptionCount(skillIndex)):
self.AppendTextLine(skill.GetSkillAffectDescription(skillIndex, i, skillNextPercentage), self.DISABLE_COLOR)
## Cooltime
coolTime = skill.GetSkillCoolTime(skillIndex, skillNextPercentage)
if coolTime > 0:
self.AppendTextLine(locale.TOOLTIP_SKILL_COOL_TIME + str(coolTime), self.DISABLE_COLOR)
## SP
needGSP = skill.GetSkillNeedSP(skillIndex, skillNextPercentage)
if needGSP > 0:
self.AppendTextLine(locale.TOOLTIP_NEED_GSP % (needGSP), self.DISABLE_COLOR)
def AppendSkillDataNew(self, slotIndex, skillIndex, skillGrade, skillLevel, skillCurrentPercentage, skillNextPercentage):
self.skillMaxLevelStartDict = { 0 : 17, 1 : 7, 2 : 10, }
self.skillMaxLevelEndDict = { 0 : 20, 1 : 10, 2 : 10, }
skillLevelUpPoint = 1
realSkillGrade = player.GetSkillGrade(slotIndex)
skillMaxLevelStart = self.skillMaxLevelStartDict.get(realSkillGrade, 15)
skillMaxLevelEnd = self.skillMaxLevelEndDict.get(realSkillGrade, 20)
## Current Level
if skillLevel > 0:
if self.HasSkillLevelDescription(skillIndex, skillLevel):
self.AppendSpace(5)
if skillGrade == skill.SKILL_GRADE_COUNT:
pass
elif skillLevel == skillMaxLevelEnd:
self.AppendTextLine(locale.TOOLTIP_SKILL_LEVEL_MASTER % (skillLevel), self.NORMAL_COLOR)
else:
self.AppendTextLine(locale.TOOLTIP_SKILL_LEVEL % (skillLevel), self.NORMAL_COLOR)
self.AppendSkillLevelDescriptionNew(skillIndex, skillCurrentPercentage, self.ENABLE_COLOR)
## Next Level
if skillGrade != skill.SKILL_GRADE_COUNT:
if skillLevel < skillMaxLevelEnd:
if self.HasSkillLevelDescription(skillIndex, skillLevel+skillLevelUpPoint):
self.AppendSpace(5)
## HPº¸°*, °üÅëȸÇÇ º¸Á¶½ºÅ³ÀÇ °æ¿ì
if skillIndex == 141 or skillIndex == 142:
self.AppendTextLine(locale.TOOLTIP_NEXT_SKILL_LEVEL_3 % (skillLevel+1), self.DISABLE_COLOR)
else:
self.AppendTextLine(locale.TOOLTIP_NEXT_SKILL_LEVEL_1 % (skillLevel+1, skillMaxLevelEnd), self.DISABLE_COLOR)
self.AppendSkillLevelDescriptionNew(skillIndex, skillNextPercentage, self.DISABLE_COLOR)
def AppendSkillLevelDescriptionNew(self, skillIndex, skillPercentage, color):
affectDataCount = skill.GetNewAffectDataCount(skillIndex)
if affectDataCount > 0:
for i in xrange(affectDataCount):
type, minValue, maxValue = skill.GetNewAffectData(skillIndex, i, skillPercentage)
if not self.AFFECT_NAME_DICT.has_key(type):
continue
minValue = int(minValue)
maxValue = int(maxValue)
affectText = self.AFFECT_NAME_DICT[type]
if "HP" == type:
if minValue < 0 and maxValue < 0:
minValue *= -1
maxValue *= -1
else:
affectText = locale.TOOLTIP_SKILL_AFFECT_HEAL
affectText += str(minValue)
if minValue != maxValue:
affectText += " - " + str(maxValue)
affectText += self.AFFECT_APPEND_TEXT_DICT.get(type, "")
#import debugInfo
#if debugInfo.IsDebugMode():
# affectText = "!!" + affectText
self.AppendTextLine(affectText, color)
else:
for i in xrange(skill.GetSkillAffectDescriptionCount(skillIndex)):
self.AppendTextLine(skill.GetSkillAffectDescription(skillIndex, i, skillPercentage), color)
## Duration
duration = skill.GetDuration(skillIndex, skillPercentage)
if duration > 0:
self.AppendTextLine(locale.TOOLTIP_SKILL_DURATION % (duration), color)
## Cooltime
coolTime = skill.GetSkillCoolTime(skillIndex, skillPercentage)
if coolTime > 0:
self.AppendTextLine(locale.TOOLTIP_SKILL_COOL_TIME + str(coolTime), color)
## SP
needSP = skill.GetSkillNeedSP(skillIndex, skillPercentage)
if needSP != 0:
continuationSP = skill.GetSkillContinuationSP(skillIndex, skillPercentage)
if skill.IsUseHPSkill(skillIndex):
self.AppendNeedHP(needSP, continuationSP, color)
else:
self.AppendNeedSP(needSP, continuationSP, color)
def AppendSkillRequirement(self, skillIndex, skillLevel):
skillMaxLevel = skill.GetSkillMaxLevel(skillIndex)
if skillLevel >= skillMaxLevel:
return
isAppendHorizontalLine = FALSE
## Requirement
if skill.IsSkillRequirement(skillIndex):
if not isAppendHorizontalLine:
isAppendHorizontalLine = TRUE
self.AppendHorizontalLine()
requireSkillName, requireSkillLevel = skill.GetSkillRequirementData(skillIndex)
color = self.CANNOT_LEVEL_UP_COLOR
if skill.CheckRequirementSueccess(skillIndex):
color = self.CAN_LEVEL_UP_COLOR
self.AppendTextLine(locale.TOOLTIP_REQUIREMENT_SKILL_LEVEL % (requireSkillName, requireSkillLevel), color)
## Require Stat
requireStatCount = skill.GetSkillRequireStatCount(skillIndex)
if requireStatCount > 0:
for i in xrange(requireStatCount):
type, level = skill.GetSkillRequireStatData(skillIndex, i)
if self.POINT_NAME_DICT.has_key(type):
if not isAppendHorizontalLine:
isAppendHorizontalLine = TRUE
self.AppendHorizontalLine()
name = self.POINT_NAME_DICT[type]
color = self.CANNOT_LEVEL_UP_COLOR
if player.GetStatus(type) >= level:
color = self.CAN_LEVEL_UP_COLOR
self.AppendTextLine(locale.TOOLTIP_REQUIREMENT_STAT_LEVEL % (name, level), color)
def HasSkillLevelDescription(self, skillIndex, skillLevel):
if skill.GetSkillAffectDescriptionCount(skillIndex) > 0:
return TRUE
if skill.GetSkillCoolTime(skillIndex, skillLevel) > 0:
return TRUE
if skill.GetSkillNeedSP(skillIndex, skillLevel) > 0:
return TRUE
return FALSE
def AppendMasterAffectDescription(self, index, desc, color):
self.AppendTextLine(desc, color)
def AppendNextAffectDescription(self, index, desc):
self.AppendTextLine(desc, self.DISABLE_COLOR)
def AppendNeedHP(self, needSP, continuationSP, color):
self.AppendTextLine(locale.TOOLTIP_NEED_HP % (needSP), color)
if continuationSP > 0:
self.AppendTextLine(locale.TOOLTIP_NEED_HP_PER_SEC % (continuationSP), color)
def AppendNeedSP(self, needSP, continuationSP, color):
if -1 == needSP:
self.AppendTextLine(locale.TOOLTIP_NEED_ALL_SP, color)
else:
self.AppendTextLine(locale.TOOLTIP_NEED_SP % (needSP), color)
if continuationSP > 0:
self.AppendTextLine(locale.TOOLTIP_NEED_SP_PER_SEC % (continuationSP), color)
def AppendPartySkillData(self, skillGrade, skillLevel):
if 1 == skillGrade:
skillLevel += 19
elif 2 == skillGrade:
skillLevel += 29
elif 3 == skillGrade:
skillLevel = 40
if skillLevel <= 0:
return
skillIndex = player.SKILL_INDEX_TONGSOL
slotIndex = player.GetSkillSlotIndex(skillIndex)
skillPower = player.GetSkillCurrentEfficientPercentage(slotIndex)
if locale.IsBRAZIL():
k = skillPower
else:
k = player.GetSkillLevel(skillIndex) / 100.0
self.AppendSpace(5)
self.AutoAppendTextLine(locale.TOOLTIP_PARTY_SKILL_LEVEL % skillLevel, self.NORMAL_COLOR)
if skillLevel>=10:
self.AutoAppendTextLine(locale.PARTY_SKILL_ATTACKER % chop( 10 + 60 * k ))
if skillLevel>=20:
self.AutoAppendTextLine(locale.PARTY_SKILL_BERSERKER % chop(1 + 5 * k))
self.AutoAppendTextLine(locale.PARTY_SKILL_TANKER % chop(50 + 1450 * k))
if skillLevel>=25:
self.AutoAppendTextLine(locale.PARTY_SKILL_BUFFER % chop(5 + 45 * k ))
if skillLevel>=35:
self.AutoAppendTextLine(locale.PARTY_SKILL_SKILL_MASTER % chop(25 + 600 * k ))
if skillLevel>=40:
self.AutoAppendTextLine(locale.PARTY_SKILL_DEFENDER % chop( 5 + 30 * k ))
self.AlignHorizonalCenter()
def __AppendSummonDescription(self, skillLevel, color):
if skillLevel > 1:
self.AppendTextLine(locale.SKILL_SUMMON_DESCRIPTION % (skillLevel * 10), color)
elif 1 == skillLevel:
self.AppendTextLine(locale.SKILL_SUMMON_DESCRIPTION % (15), color)
elif 0 == skillLevel:
self.AppendTextLine(locale.SKILL_SUMMON_DESCRIPTION % (10), color)
if __name__ == "__main__":
import app
import wndMgr
import systemSetting
import mouseModule
import grp
import ui
#wndMgr.SetOutlineFlag(TRUE)
app.SetMouseHandler(mouseModule.mouseController)
app.SetHairColorEnable(TRUE)
wndMgr.SetMouseHandler(mouseModule.mouseController)
wndMgr.SetScreenSize(systemSetting.GetWidth(), systemSetting.GetHeight())
app.Create("METIN2 CLOSED BETA", systemSetting.GetWidth(), systemSetting.GetHeight(), 1)
mouseModule.mouseController.Create()
toolTip = ItemToolTip()
toolTip.ClearToolTip()
#toolTip.AppendTextLine("Test")
desc = "Item descriptions:|increase of width of display to 35 digits per row AND installation of function that the displayed words are not broken up in two parts, but instead if one word is too long to be displayed in this row, this word will start in the next row."
summ = ""
toolTip.AddItemData_Offline(10, desc, summ, 0, 0)
toolTip.Show()
app.Loop()
Dort befinden sich denk ich auch noch weitere Sachen zum Kostümsystem.
05/18/2013, 19:58
#10
elite*gold: 0
Join Date: Sep 2012
Posts: 815
Received Thanks: 627
Nimm diese Costume Window da du die Lite Version
Und benutz die uiInventory ausm Anhang damit sollte es dann gehen
Attached Files
costumewindow.rar
(756 Bytes, 83 views)
uiinventory.rar
(5.8 KB, 75 views)
05/18/2013, 20:33
#11
elite*gold: 29
Join Date: Aug 2010
Posts: 855
Received Thanks: 522
Ich bedanke mich schonmal für die Hilfe.
Jedoch besteht jetzt nur noch das Problem, dass wenn ich auf das Kostümicon im Inventar klicke, schließt sich der Client.
Syserr:
uiInventory.py(line:79) __LoadWindow
CostumeWindow.LoadWindow.BindObject - exceptions.AttributeError:'module' object has no attribute 'ExpandedImageBox2'
0518 20:31:29223 :: ================================================== ================================================== ========
0518 20:31:29223 :: Abort!!!!
05/18/2013, 21:05
#12
elite*gold: 0
Join Date: Sep 2012
Posts: 815
Received Thanks: 627
Quote:
Originally Posted by
.SliceR
Ich bedanke mich schonmal für die Hilfe.
Jedoch besteht jetzt nur noch das Problem, dass wenn ich auf das Kostümicon im Inventar klicke, schließt sich der Client.
Syserr:
uiInventory.py(line:79) __LoadWindow
CostumeWindow.LoadWindow.BindObject - exceptions.AttributeError:'module' object has no attribute 'ExpandedImageBox2'
0518 20:31:29223 :: ================================================== ================================================== ========
0518 20:31:29223 :: Abort!!!!
Pack die ui.py noch ausm Anhang rein
Attached Files
ui.rar
(15.5 KB, 81 views)
05/18/2013, 21:08
#13
elite*gold: 29
Join Date: Aug 2010
Posts: 855
Received Thanks: 522
Ich danke dir vom ganzem Herzen!!!!! Es funktioniert alles einwandfrei!
Dankesehr
05/18/2013, 21:18
#14
elite*gold: 0
Join Date: Sep 2012
Posts: 815
Received Thanks: 627
Quote:
Originally Posted by
.SliceR
Ich danke dir vom ganzem Herzen!!!!! Es funktioniert alles einwandfrei!
Dankesehr
Dafür gibt es einen Thanks-Button und war ja nur ne Sache von ner Minute
So da das Theme erledigt ist und der TE zufrieden ist ein
#closerequest
05/18/2013, 21:20
#15
Hidden Moderator
elite*gold: 0
Join Date: Jul 2011
Posts: 24,076
Received Thanks: 4,806
#closed
Similar Threads
problem with 2013er Client by .tehSource
07/20/2013 - Metin2 Private Server - 5 Replies
hey all
i use this client
i edit from the root
from de to ae
and take the local_ae from the original metin2
and edit local.cfg
[Selling] 2013er De Client
06/19/2013 - elite*gold Trading - 1 Replies
Ich verkaufe hiermit einen Aktuellen Metin2 Clienten vom 18.04.2013
Wurde von mir entpackt , das einzigste was entnommen wurde ist z.B Dragonsoul was ihr aber auf wunsch natürlich wider in die root eintragen werde
Desweiteren habe ich Paylasicis kostüme schnittstelle + energisystem schnittstelle + ring effeckt eingefügt das ihr diese arbeit nicht habt
Alle aktuellen kostüme klappen(also auch die aus den neuen patches wie costume_soccer...)
Bisher habe ich in der Serverinfo.py 4 Channels...
2013er Client .tehSource | Suche Entpacker + Packer
05/05/2013 - Metin2 Private Server - 6 Replies
Ja, wenn Ich root entpacke geht es, aber wenn Ich wieder packe, kommen keine neuen root dateien.
Kann mir wer helfen? :rtfm:
Hamachi server Mit tehsource client?
04/14/2013 - Metin2 Private Server - 6 Replies
Hallo leute,
Ich hätte da mal eine frage.
Ich hab mir eben den TehSource 2013 client runtergeladen hab die serverinfo.py in den root dateien angepasst aber es klappt nix.Da steht ganze zeit nur ich werde mit den server verbunden..
Weiss jemand was ich machen soll? Hab schon einen Surakopf reingezogen und auf meine ip geändert dann kann ich nicht den server anwählen und es funkt nix.
Was muss ich da eventuell machen?
Client mit Eenergy/kostym system
09/15/2012 - Metin2 Private Server - 0 Replies
Hallu
So ich woltle heute das energy system in mein client einfügen, doch jedes mal bekomm ich ein kick nach dem ladebalken...
0915 16:37:14638 :: CMapOutdoor::Load - LoadMonsterAreaInfo ERROR
0915 16:37:15201 :: GRANNY: r:/granny/rt/granny_file_info.cpp(145): File has run-time type tag of 0x8000000f, which doesn't match this version of Granny (0x80000010). Automatic conversion will be attempted.
0915 16:37:18290 :: Failed to load script file : locale/de/ui/EnergyBar.py
0915 16:37:18292...
All times are GMT +1. The time now is 10:27 .