Jump to content
Phishing - Beware of identity theft... ×
  • 0

New Refines Can't add to acessories


iRETEMAG

Question

  • Premium

Hi Metin2Dev, I can't put the new ones at my acessories.

5XvSb.png

Red ones.

Ruby, Garnet, Emerald, Sapphire.

My Item_Proto database refines vnums:

vnum	name	locale_name	type	subtype	weight	size	antiflag	flag	wearflag	immuneflag	gold	shop_buy_price	refined_vnum	refine_set	refine_set2	magic_pct	limittype0	limitvalue0	limittype1	limitvalue1	applytype0	applyvalue0	applytype1	applyvalue1	applytype2	applyvalue2	value0	value1	value2	value3	value4	value5	socket0	socket1	socket2	socket3	socket4	socket5	specular	socket_pct	addon_type
50635	(BLOB)	(BLOB)	3	21	0	1	0	0	0		1000000	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	-1	-1	-1	-1	-1	-1	0	0	0
50636	(BLOB)	(BLOB)	3	21	0	1	0	0	0		1000000	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	-1	-1	-1	-1	-1	-1	0	0	0
50637	(BLOB)	(BLOB)	3	21	0	1	0	0	0		1000000	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	-1	-1	-1	-1	-1	-1	0	0	0
50638	(BLOB)	(BLOB)	3	21	0	1	0	0	0		1000000	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	-1	-1	-1	-1	-1	-1	0	0	0

 

My constinfo.py:

 

# 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
 
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"
 
group_add = ""
group_new_name = ""
group_chat_enable = 0
group_chat = ""
groups = {}
ip = "25.66.209.100"
#ip = "25.66.209.100"
#ip = "127.0.0.1"
ch = "1"
ch_name= "Testserver"
ch_nr = {}
 
#ch_nr[0] = 13070
auth = 11002
#auth = 11002
#ch_nr[0] = 31965
ch_nr[0] = 13070
ch_nr[1] = 13023
ch_nr[2] = 13033
ch_nr[3] = 13043
ch_nr[4] = 13053
ch_nr[5] = 13063
 
#chwechsel
chrenew = 0
id = ""
pw = ""
char_place = 0
ladebild = 0
#ende
 
# Craftingsystem by xGr33n & Apo
CRAFTING_NPC_ID = 0
CRAFTING_NPC_ID_OLD = 0
CRAFTING_RESULT = 0
CRAFTING_NEED = 0
 
# 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, 50635, 50636, 50637, 50638] 
#ACCESSORY_MATERIAL_LIST = [50623, 50623, 50624, 50624, 50625, 50625, 50626, 50627, 50628, 50629, 50630, 50631, 50632, 50633,  
#                50623, 50623, 50624, 50624, ] 
JewelAccessoryInfos = [ 
        # jewel        wrist    neck    ear 
        [ 50634,    14420,    16220,    17220 ],     
        [ 50635,    14500,    16500,    17500 ],     
        [ 50636,    14520,    16520,    17520 ],     
        [ 50637,    14540,    16540,    17540 ],     
        [ 50638,    14560,    16560,    17560 ],     
    ] 
def GET_ACCESSORY_MATERIAL_VNUM(vnum, subType): 
    ret = vnum 
    item_base = (vnum / 10) * 10 
    for info in JewelAccessoryInfos: 
        if item.ARMOR_WRIST == subType:     
            if info[1] == item_base: 
                return info[0] 
        elif item.ARMOR_NECK == subType:     
            if info[2] == item_base: 
                return info[0] 
        elif item.ARMOR_EAR == subType:     
            if info[3] == item_base: 
                return info[0] 
  
    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
 
INPUT_IGNORE = 0
 
VID = 0
STHX = 0
HPXD = 0
 
PLAYER_HP = 0
PLAYER_MAX_HP = 0
PLAYER_SP = 0
PLAYER_MAX_SP = 0
PLAYER_NAME = ""
 
CApiSetHide = 0
SendString = ""

My game: 34083

 

Also: I get green image (like positive add), but say ("This Item cannot be equipped") when I add to the new accessories.

Someone? :(

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

Recommended Posts

  • 0

open item.cpp 

find 

const static JewelAccessoryInfo infos 

add

{ 50635, 14500, 16500, 17500 }, 
{ 50636, 14520, 16520, 17520 }, 
{ 50637, 14540, 16540, 17540 }, 
{ 50638, 14560, 16560, 17560 },
{ 50639, 14570, 16570, 17570 },
  • Love 1
Link to comment
Share on other sites

  • 0
  • Premium

 

open item.cpp 

find 

const static JewelAccessoryInfo infos 

add

{ 50635, 14500, 16500, 17500 }, 
{ 50636, 14520, 16520, 17520 }, 
{ 50637, 14540, 16540, 17540 }, 
{ 50638, 14560, 16560, 17560 },
{ 50639, 14570, 16570, 17570 },

 

 

you use own core?

​Game 34083

Where I can find the "item.cpp" ? (that's all)

Link to comment
Share on other sites

  • 0

 

 

open item.cpp 

find 

const static JewelAccessoryInfo infos 

add

{ 50635, 14500, 16500, 17500 }, 
{ 50636, 14520, 16520, 17520 }, 
{ 50637, 14540, 16540, 17540 }, 
{ 50638, 14560, 16560, 17560 },
{ 50639, 14570, 16570, 17570 },

 

 

you use own core?

​Game 34083

Where I can find the "item.cpp" ? (that's all)

 

item.cpp in source mainline. I don't know how fix in 34083 core

Link to comment
Share on other sites

  • 0
  • Premium

 

 

 

open item.cpp 

find 

const static JewelAccessoryInfo infos 

add

{ 50635, 14500, 16500, 17500 }, 
{ 50636, 14520, 16520, 17520 }, 
{ 50637, 14540, 16540, 17540 }, 
{ 50638, 14560, 16560, 17560 },
{ 50639, 14570, 16570, 17570 },

 

 

you use own core?

​Game 34083

Where I can find the "item.cpp" ? (that's all)

 

item.cpp in source mainline. I don't know how fix in 34083 core

 

I don't have this at my server :(

Link to comment
Share on other sites

  • 0

 

 

 

 

open item.cpp 

find 

const static JewelAccessoryInfo infos 

add

{ 50635, 14500, 16500, 17500 }, 
{ 50636, 14520, 16520, 17520 }, 
{ 50637, 14540, 16540, 17540 }, 
{ 50638, 14560, 16560, 17560 },
{ 50639, 14570, 16570, 17570 },

 

 

you use own core?

​Game 34083

Where I can find the "item.cpp" ? (that's all)

 

item.cpp in source mainline. I don't know how fix in 34083 core

 

I don't have this at my server :(

 

when you add accessories in bracelet, earrings, necklace, accessory disappears?

Link to comment
Share on other sites

  • 0

when you add accessories in bracelet, earrings, necklace, accessory disappears? 

No. Just say (This Item cannot be equipped.)

 

in this way. go root->constInfo.py

find

JewelAccessoryInfos

add this

		[ 50634,	14420,	16220,	17220 ],	
		[ 50635,	14500,	16500,	17500 ],	
		[ 50636,	14520,	16520,	17520 ],	
		[ 50637,	14540,	16540,	17540 ],	
		[ 50638,	14560,	16560,	17560 ],
		[ 50639,	14570,	16570,	17570 ],	

and find 

ACCESSORY_MATERIAL_LIST

add this

50634, 50635, 50636, 50637, 50638, 50639,
Link to comment
Share on other sites

  • 0
  • Premium

 

when you add accessories in bracelet, earrings, necklace, accessory disappears? 

No. Just say (This Item cannot be equipped.)

 

in this way. go root->constInfo.py

find

JewelAccessoryInfos

add this

		[ 50634,	14420,	16220,	17220 ],	
		[ 50635,	14500,	16500,	17500 ],	
		[ 50636,	14520,	16520,	17520 ],	
		[ 50637,	14540,	16540,	17540 ],	
		[ 50638,	14560,	16560,	17560 ],
		[ 50639,	14570,	16570,	17570 ],	

and find 

ACCESSORY_MATERIAL_LIST

add this

50634, 50635, 50636, 50637, 50638, 50639,

Same error.

I add:

 

# 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

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"

group_add = ""
group_new_name = ""
group_chat_enable = 0
group_chat = ""
groups = {}
ip = "25.66.209.100"
#ip = "25.66.209.100"
#ip = "127.0.0.1"
ch = "1"
ch_name= "Testserver"
ch_nr = {}

#ch_nr[0] = 13070
auth = 11002
#auth = 11002
#ch_nr[0] = 31965
ch_nr[0] = 13070
ch_nr[1] = 13023
ch_nr[2] = 13033
ch_nr[3] = 13043
ch_nr[4] = 13053
ch_nr[5] = 13063

#chwechsel
chrenew = 0
id = ""
pw = ""
char_place = 0
ladebild = 0
#ende

# Craftingsystem by xGr33n & Apo
CRAFTING_NPC_ID = 0
CRAFTING_NPC_ID_OLD = 0
CRAFTING_RESULT = 0
CRAFTING_NEED = 0

# 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, 50635, 50636, 50637, 50638, 50639,]
#ACCESSORY_MATERIAL_LIST = [50623, 50623, 50624, 50624, 50625, 50625, 50626, 50627, 50628, 50629, 50630, 50631, 50632, 50633, 
#			    50623, 50623, 50624, 50624, ]
JewelAccessoryInfos = [
		# jewel		wrist	neck	ear
		[ 50634,	14420,	16220,	17220 ],	
		[ 50635,	14500,	16500,	17500 ],	
		[ 50636,	14520,	16520,	17520 ],	
		[ 50637,	14540,	16540,	17540 ],	
		[ 50638,	14560,	16560,	17560 ],	
		[ 50639,    14570,  16570,  17570 ],  
	]
def GET_ACCESSORY_MATERIAL_VNUM(vnum, subType):
	ret = vnum
	item_base = (vnum / 10) * 10
	for info in JewelAccessoryInfos:
		if item.ARMOR_WRIST == subType:	
			if info[1] == item_base:
				return info[0]
		elif item.ARMOR_NECK == subType:	
			if info[2] == item_base:
				return info[0]
		elif item.ARMOR_EAR == subType:	
			if info[3] == item_base:
				return info[0]
 
	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

INPUT_IGNORE = 0

VID = 0
STHX = 0
HPXD = 0

PLAYER_HP = 0
PLAYER_MAX_HP = 0
PLAYER_SP = 0
PLAYER_MAX_SP = 0
PLAYER_NAME = ""

CApiSetHide = 0
SendString = ""

Link to comment
Share on other sites

  • 0
  • Premium

My Item_Proto database refines vnums:

vnum	name	locale_name	type	subtype	weight	size	antiflag	flag	wearflag	immuneflag	gold	shop_buy_price	refined_vnum	refine_set	refine_set2	magic_pct	limittype0	limitvalue0	limittype1	limitvalue1	applytype0	applyvalue0	applytype1	applyvalue1	applytype2	applyvalue2	value0	value1	value2	value3	value4	value5	socket0	socket1	socket2	socket3	socket4	socket5	specular	socket_pct	addon_type
50635	(BLOB)	(BLOB)	3	21	0	1	0	0	0		1000000	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	-1	-1	-1	-1	-1	-1	0	0	0
50636	(BLOB)	(BLOB)	3	21	0	1	0	0	0		1000000	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	-1	-1	-1	-1	-1	-1	0	0	0
50637	(BLOB)	(BLOB)	3	21	0	1	0	0	0		1000000	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	-1	-1	-1	-1	-1	-1	0	0	0
50638	(BLOB)	(BLOB)	3	21	0	1	0	0	0		1000000	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	-1	-1	-1	-1	-1	-1	0	0	0

 

My constinfo.py:
 

# 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
 
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"
 
group_add = ""
group_new_name = ""
group_chat_enable = 0
group_chat = ""
groups = {}
ip = "25.66.209.100"
#ip = "25.66.209.100"
#ip = "127.0.0.1"
ch = "1"
ch_name= "Testserver"
ch_nr = {}
 
#ch_nr[0] = 13070
auth = 11002
#auth = 11002
#ch_nr[0] = 31965
ch_nr[0] = 13070
ch_nr[1] = 13023
ch_nr[2] = 13033
ch_nr[3] = 13043
ch_nr[4] = 13053
ch_nr[5] = 13063
 
#chwechsel
chrenew = 0
id = ""
pw = ""
char_place = 0
ladebild = 0
#ende
 
# Craftingsystem by xGr33n & Apo
CRAFTING_NPC_ID = 0
CRAFTING_NPC_ID_OLD = 0
CRAFTING_RESULT = 0
CRAFTING_NEED = 0
 
# 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, 50635, 50636, 50637, 50638] 
#ACCESSORY_MATERIAL_LIST = [50623, 50623, 50624, 50624, 50625, 50625, 50626, 50627, 50628, 50629, 50630, 50631, 50632, 50633,  
#                50623, 50623, 50624, 50624, ] 
JewelAccessoryInfos = [ 
        # jewel        wrist    neck    ear 
        [ 50634,    14420,    16220,    17220 ],     
        [ 50635,    14500,    16500,    17500 ],     
        [ 50636,    14520,    16520,    17520 ],     
        [ 50637,    14540,    16540,    17540 ],     
        [ 50638,    14560,    16560,    17560 ],     
    ] 
def GET_ACCESSORY_MATERIAL_VNUM(vnum, subType): 
    ret = vnum 
    item_base = (vnum / 10) * 10 
    for info in JewelAccessoryInfos: 
        if item.ARMOR_WRIST == subType:     
            if info[1] == item_base: 
                return info[0] 
        elif item.ARMOR_NECK == subType:     
            if info[2] == item_base: 
                return info[0] 
        elif item.ARMOR_EAR == subType:     
            if info[3] == item_base: 
                return info[0] 
  
    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
 
INPUT_IGNORE = 0
 
VID = 0
STHX = 0
HPXD = 0
 
PLAYER_HP = 0
PLAYER_MAX_HP = 0
PLAYER_SP = 0
PLAYER_MAX_SP = 0
PLAYER_NAME = ""
 
CApiSetHide = 0
SendString = ""




My game: 34083

 

Also: I get green image (like positive add), but say ("This Item cannot be equipped") when I add to the new accessories.

Link to comment
Share on other sites

  • 0
  • Premium

It uses mathematical calculations. Do the math to see which vnums your items should be at so that they are considered as such, or hardcode them into the function.

 

Where I can do this? I don't have the compiled files we are using now.  :(

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.