-
Posts
167 -
Joined
-
Last visited
-
Days Won
1 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Human
-
-
Excellent guide it works good ...
but i have problem with converting item proto using convertproto.py
if any1 can correct it will be good
Error while converting
File "convert_proto.py", line 857, in item_proto
item_proto_line = "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % (row[0], "\"" + row[1] + "\"", "\"" + get_item_type(row[3], row[0]) + "\"" , "\"" + get_item_subtype(row[3], row[4], row[0]) + "\"", row[6] , get_antiflag(row[7], row[0]), get_flag(row[8], row[0]), get_wearflag(row[9], row[0]), get_immuneflag(row[10]), row[11], row[12], row[13], row[14], row[16], get_limittype(row[17]), row[18], get_limittype(row[19]), row[20], get_apply(row[21]), row[22], get_apply(row[23]), row[24], get_apply(row[25]), row[26], row[27], row[28], row[29], row[30], row[31], row[32], row[39], row[40], row[41])
TypeError: cannot concatenate 'str' and 'long' objects
I tell you why it is happening normal convert proto the vnum_range will be last so it wont make problem but here we added vnum_range next to vnum that is row 2... so its making problem So any one who correct this will be helpful i tried but it says
" TypeError: not enough arguments for format string "Here is my Convert proto.py
Error section
out_file_itemproto = open("item_proto.txt", "w")
out_file_itemnames = open("item_names.txt", "w")
print "Converting item_proto..."
for row in rows:
item_proto_line = "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % (row[0], "\"" + row[1] + "\"", "\"" + get_item_type(row[3], row[0]) + "\"" , "\"" + get_item_subtype(row[3], row[4], row[0]) + "\"", row[6] , get_antiflag(row[7], row[0]), get_flag(row[8], row[0]), get_wearflag(row[9], row[0]), get_immuneflag(row[10]), row[11], row[12], row[13], row[14], row[16], get_limittype(row[17]), row[18], get_limittype(row[19]), row[20], get_apply(row[21]), row[22], get_apply(row[23]), row[24], get_apply(row[25]), row[26], row[27], row[28], row[29], row[30], row[31], row[32], row[39], row[40], row[41])
item_names_line = "%s\t%s" % (row[0], row[2])
out_file_itemproto.write(item_proto_line + "\r\n")
out_file_itemnames.write(item_names_line + "\r\n")
out_file_itemproto.close()
Thanks in Advance- 1
-
Excellent guide it works good ...
but i have problem with converting item proto using convertproto.py
if any1 can correct it will be good
Error while converting
SpoilerFile "convert_proto.py", line 857, in item_proto
item_proto_line = "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % (row[0], "\"" + row[1] + "\"", "\"" + get_item_type(row[3], row[0]) + "\"" , "\"" + get_item_subtype(row[3], row[4], row[0]) + "\"", row[6] , get_antiflag(row[7], row[0]), get_flag(row[8], row[0]), get_wearflag(row[9], row[0]), get_immuneflag(row[10]), row[11], row[12], row[13], row[14], row[16], get_limittype(row[17]), row[18], get_limittype(row[19]), row[20], get_apply(row[21]), row[22], get_apply(row[23]), row[24], get_apply(row[25]), row[26], row[27], row[28], row[29], row[30], row[31], row[32], row[39], row[40], row[41])
TypeError: cannot concatenate 'str' and 'long' objects
I tell you why it is happening normal convert proto the vnum_range will be last so it wont make problem but here we added vnum_range next to vnum that is row 2... so its making problem So any one who correct this will be helpful i tried but it says
" TypeError: not enough arguments for format string "Here is my Convert proto.py
Error section
Spoilerout_file_itemproto = open("item_proto.txt", "w")
out_file_itemnames = open("item_names.txt", "w")
print "Converting item_proto..."
for row in rows:
item_proto_line = "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % (row[0], "\"" + row[1] + "\"", "\"" + get_item_type(row[3], row[0]) + "\"" , "\"" + get_item_subtype(row[3], row[4], row[0]) + "\"", row[6] , get_antiflag(row[7], row[0]), get_flag(row[8], row[0]), get_wearflag(row[9], row[0]), get_immuneflag(row[10]), row[11], row[12], row[13], row[14], row[16], get_limittype(row[17]), row[18], get_limittype(row[19]), row[20], get_apply(row[21]), row[22], get_apply(row[23]), row[24], get_apply(row[25]), row[26], row[27], row[28], row[29], row[30], row[31], row[32], row[39], row[40], row[41])
item_names_line = "%s\t%s" % (row[0], row[2])
out_file_itemproto.write(item_proto_line + "\r\n")
out_file_itemnames.write(item_names_line + "\r\n")
out_file_itemproto.close()
Thanks in Advance -
-
well i compiled with that but i get this bug in database mysql
Spoilersocket0 socket1 socket2 socket3 socket4 socket5 specular socket_pct addon_type vnum_range -1 -1 -1 -1 -1 -1 0 0 3 0 -1 -1 -1 -1 -1 -1 0 0 3 0 -1 -1 -1 -1 -1 -1 0 100 3 0 -1 -1 -1 -1 -1 -1 0 80 3 0 -1 -1 -1 -1 -1 -1 0 65 3 0 -1 -1 -1 -1 -1 -1 0 50 3 0 -1 -1 -1 -1 -1 -1 0 40 3 0 -1 -1 -1 -1 -1 -1 0 30 3 0 -1 -1 -1 -1 -1 -1 0 0 3 0 -1 -1 -1 -1 -1 -1 0 0 3 0 -1 -1 -1 -1 -1 -1 0 0 3 0 -1 -1 -1 -1 -1 -1 0 0 3 0 -1 -1 -1 -1 -1 -1 0 100 3 0 -1 -1 -1 -1 -1 -1 0 80 3 0 -1 -1 -1 -1 -1 -1 0 65 3 0 -1 -1 -1 -1 -1 -1 0 50 3 0 -1 -1 -1 -1 -1 -1 0 40 3 0 -1 -1 -1 -1 -1 -1 0 30 3 0 -1 -1 -1 -1 -1 -1 0 0 3 0 -1 -1 -1 -1 -1 -1 0 0 3 0 -1 -1 -1 -1 -1 -1 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-1 -1 0 0 0 0 -1 -1 -1 -1 -1 -1 0 30 3 0 -1 -1 -1 -1 -1 -1 0 30 3 0 -1 -1 -1 -1 -1 -1 0 100 3 0 -1 -1 -1 -1 -1 -1 0 100 3 0 -1 -1 -1 -1 -1 -1 0 30 3 0 -1 -1 -1 -1 -1 -1 0 100 3 0 -1 -1 -1 -1 -1 -1 0 100 3 0 -1 -1 -1 -1 -1 -1 0 100 3 0 -1 -1 -1 -1 -1 -1 0 100 3 0 -1 -1 -1 -1 -1 -1 0 100 3 0 -1 -1 -1 -1 -1 -1 0 0 0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 -1 -1 -1 -1 -1 -1 0 100 23 0 -1 -1 -1 -1 -1 -1 0 100 17 0 -1 -1 -1 -1 -1 -1 0 100 17 0 -1 -1 -1 -1 -1 -1 0 100 17 0 -1 -1 -1 -1 -1 -1 0 100 3 0 -1 -1 -1 -1 -1 -1 0 100 3 0 look that specular moves to socket_pct position and socket_pct moves to addon :S
-
-
oh thanks let me try i didnt see that comma
-
Hey devs,
I Have a stranger problem that is
In my Item proto db side whenever i reboot or reload proto the Specular value, Socket0 , socket1, socket 2 values went to 0 ...
Im reading from Mysql DB not txt...
when i check clientManagerBoot.cpp i found that there is no specification for specular or socketBefore adding
Spoilerbool CClientManager::InitializeItemTable() {
char query[4096];
snprintf(query, sizeof(query),
"SELECT vnum, vnum_range, name, %s, type, subtype, gold, shop_buy_price, weight, size, flag, wearflag, "
"antiflag, immuneflag+0, refined_vnum, refine_set, magic_pct, socket_pct, addon_type, "
"limittype0, limitvalue0, limittype1, limitvalue1, "
"applytype0, applyvalue0, applytype1, applyvalue1, applytype2, applyvalue2, "
"value0, value1, value2, value3, value4, value5 "
"FROM item_proto%s ORDER BY vnum",
g_stLocaleNameColumn.c_str(), GetTablePostfix());so i added in specular and socket1 etc...
After addingSpoilerbool CClientManager::InitializeItemTable() {
char query[4096];
snprintf(query, sizeof(query),
"SELECT vnum, vnum_range, name, %s, type, subtype, gold, shop_buy_price, weight, size, flag, wearflag, "
"antiflag, immuneflag+0, refined_vnum, refine_set, magic_pct, socket_pct, addon_type, "
"limittype0, limitvalue0, limittype1, limitvalue1, "
"applytype0, applyvalue0, applytype1, applyvalue1, applytype2, applyvalue2, "
"value0, value1, value2, value3, value4, value5 "
"socket0, specular, socket1, socket2, "
"FROM item_proto%s ORDER BY vnum",
g_stLocaleNameColumn.c_str(), GetTablePostfix());std::auto_ptr<SQLMsg> pkMsg(CDBManager::instance().DirectQuery(query));
SQLResult * pRes = pkMsg->Get();Db and game compiled successfully
but game is not starting
connect: Connection refusedi get error from db syserr
SpoilerSYSERR: Mar 22 16:23:44 :: pid_init:
Start of pid: 732SYSERR: Mar 22 16:23:44 :: DirectQuery: AsyncSQL::DirectQuery : mysql_query error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM item_proto ORDER BY vnum' at line 1
query: SELECT vnum, vnum_range, name, locale_name, type, subtype, gold, shop_buy_price, weight, size, flag, wearflag, antiflag, immuneflag+0, refined_vnum, refine_set, magic_pct, socket_pct, addon_type, limittype0, limitvalue0, limittype1, limitvalue1, applytype0, applyvalue0, applytype1, applyvalue1, applytype2, applyvalue2, value0, value1, value2, value3, value4, value5 socket0, specular, socket1, socket2, FROM item_proto ORDER BY vnum
SYSERR: Mar 22 16:23:44 :: InitializeItemTable: Could not load item_proto. No results!
SYSERR: Mar 22 16:23:44 :: InitializeTables: InitializeItemTable FAILED
SYSERR: Mar 22 16:23:44 :: Initialize: Table Initialize FAILED
SYSERR: Mar 22 16:23:44 :: pid_deinit:
End of pidAny Solution for this ?
Thanks in advance
-
Well sorry i found the solution
its that item for opening shop...
item vnum i specified in it..offline shop config..I got another bug
The change price of opened shop item I changed the price but the item at 1st slot say pos '0' is changing even if i change 3rd slot item I show in pic clearly
In this Picture i click change price for foundation stone
https://metin2.download/picture/tO5MMfTc2K6CV3YlyTTcsY4HAahw51JA/.png
Once i done the price of battle sword is changed
https://metin2.download/picture/XjMX9QZ1a4spssj5SFnAw5izKJGZ8iN8/.png
Check the foundation stone price is unchangedhttps://metin2.download/picture/lh5QszmPbPaMH0hWMTOCx2Tt2MVtw837/.png
Here is my Offlineshopmanager.cpp
Spoilervoid COfflineShopManager::ChangePrice(LPCHARACTER ch, BYTE bPos, DWORD dwPrice)
{
if (!ch)
return;if (bPos >= OFFLINE_SHOP_HOST_ITEM_MAX_NUM)
{
sys_err("Offlineshop overflow slot count [%s][%d]", ch->GetName(), bPos);
return;
}LPOFFLINESHOP pkOfflineShop = FindOfflineShop(FindMyOfflineShop(ch->GetPlayerID()));
if (pkOfflineShop)
pkOfflineShop->BroadcastUpdatePrice(bPos, dwPrice);DBManager::instance().DirectQuery("UPDATE %soffline_shop_item SET price = %u WHERE owner_id = %u and pos = %d", get_table_postfix(), dwPrice, ch->GetPlayerID(), bPos);
sys_log(0, "PRET: %u | ITEM ID: %u | POZITIE: %d", dwPrice, ch->GetPlayerID(), bPos);
}
any solution for this ?
thanks -
Hey there,
i installed offline shop successfully both in client side server side, db , python, and no errors the thing is when i click that bundle in that area ( right of belt) nothing happens..
No Syserr in client or in server auth, ch1 , db folders..
Anyone can help with it?Thanks in advance
-
no one to solve?
-
i already did that and let me show what error i get when i click create character
Spoiler0310 11:02:18924 ::
networkModule.py(line:190) SetCreateCharacterPhase
system.py(line:115) __pack_importnetworkModule.SetCreateCharacterPhase - exceptions.SyntaxError:invalid syntax (line 689)
0310 11:02:18925 :: ============================================================================================================
0310 11:02:18925 :: Abort!!!!
when i correct those
i get this errorSpoiler
0310 12:07:09274 :: File "uiPhaseCurtain.py", line 51, in OnUpdate0310 12:07:09275 :: File "networkModule.py", line 137, in __ChangePhaseWindow
0310 12:07:09275 :: File "introCreate.py", line 316, in Open
0310 12:07:09275 :: File "introCreate.py", line 417, in EnableWindow
0310 12:07:09275 :: File "introCreate.py", line 430, in __GetSlotChrID
0310 12:07:09275 :: KeyError
0310 12:07:09275 :: :
0310 12:07:09275 :: 4
0310 12:07:09275 ::Well i corrected the RACE_DECT = { and RACE_NAME those 4 ... now i able to see create windows but female is not working and i get sys err
Spoiler0310 13:06:48808 :: Traceback (most recent call last):
0310 13:06:48808 :: File "introCreate.py", line 690, in OnUpdate
0310 13:06:48808 :: IndexError
0310 13:06:48808 :: :
0310 13:06:48808 :: list index out of range
0310 13:06:48808 ::
its like a lot and that line 690 is not On update anyway i checked OnUpdate i cant find it anything wrong
**Still need to be solvedSpoilerdef OnUpdate(self):
chr.Update()
(xposEventSet, yposEventSet) = self.textBoard.GetGlobalPosition()
event.UpdateEventSet(self.descIndex, xposEventSet+7, -(yposEventSet+7))
self.descriptionBox.SetIndex(self.descIndex)
SLOT_COUNT_TWO = 4
#if constInfo.WOLF_WOMEN != "DISABLED" and constInfo.WOLF_WOMEN == "ENABLED":
# SLOT_COUNT_TWO += 1
#else:
# if constInfo.WOLF_MAN != "DISABLED" and constInfo.WOLF_MAN == "ENABLED":
# SLOT_COUNT_TWO += 1
#if SLOT_COUNT_TWO > 5:
#SLOT_COUNT_TWO = 5
for page in xrange(PAGE_COUNT):
SLOT_COUNT_RES = 5
for i in xrange(SLOT_COUNT_RES):
self.curNameAlpha += (self.destNameAlpha - self.curNameAlpha) / 10.0
self.NameList.SetAlpha(self.curNameAlpha)
for i in xrange(4):
self.curGauge += (self.destGauge - self.curGauge) / 10.0
if abs(self.curGauge - self.destGauge) < 0.005:
self.curGauge = self.destGauge
self.GaugeList.SetPercentage(self.curGauge, 1.0)
if -1 != self.reservingRaceIndex:
if app.GetTime() - self.reservingStartTime >= 1.5:
chrSlot=self.stream.GetCharacterSlot()
textName = self.editCharacterName.GetText()
raceIndex = self.reservingRaceIndex
shapeIndex = self.reservingShapeIndex
startStat = self.START_STAT[self.slot]
statCon = self.stat[0] - startStat[0]
statInt = self.stat[1] - startStat[1]
statStr = self.stat[2] - startStat[2]
statDex = self.stat[3] - startStat[3]
net.SendCreateCharacterPacket(chrSlot, textName, raceIndex, shapeIndex, statCon, statInt, statStr, statDex)
self.reservingRaceIndex = -1
getting this error while in create char window and also in select char window
https://metin2.download/picture/uDcoigc0T1UTLcqin6IuHVKCA9iEduII/.pngand error is
Spoiler0310 14:03:09372 :: invalid idx 0
0310 14:04:16809 ::
introEmpire.py(line:189) __LoadScript
ui.py(line:2906) GetChildSelectEmpireWindow.__LoadScript.BindObject - exceptions.KeyError:EmpireName
0310 14:04:16809 :: ============================================================================================================
0310 14:04:16809 :: Abort!!!!##Solved
Error 2 :
Here Ninja is selected but female sura is showing
https://metin2.download/picture/Ac4J3Kd24X22eMoOLWh8dCarCf5ln6WX/.jpg
**Still needed to be solveI will be happy if anyone correct these
thanks in advance -
I get error with wolfman cant correct it
I want without wolfman can anyone edit this ?
my introcreate.py isThanks in advance
I am getting errorSpoiler
networkModule.SetCreateCharacterPhase - exceptions.AttributeError:'module' object has no attribute 'RACE_WOLF_M'i need to remove the wolf man else i need playersettingmodule.py with wolfman race added so i can disable in constinfo.py
anyone provide me official playersettingmodule.py with wolfman or introcreate.py without wolfman
thanks in advance- 1
-
I get error with wolfman cant correct it
I want without wolfman can anyone edit this ?
my introcreate.py isThanks in advance
-
Hello,
I added new login interface and when i added successfully without error at Character selection window when i select i cant use Enter key nor any arrow keys to rotate
what is that problem?
any one solve it ?Thanks in advance
-
Hey all ,
well i want to compile quest using pre_qc with make command sh make_locale i get this errorSpoilermake_locale: import: not found
make_locale: import: not found
make_locale: 5: Syntax error: word unexpected (expecting ")")my Pre_qc is
Spoiler# -*- coding: 949 -*-
# 말 그대로 pre qc.
# 우리 퀘스트 언어에는 지역 변수만이 있고,
# state나, 심지어 when, function을 아우르는 전역 변수를 사용할 수 없다.
# 전역 '변수'의 사용은 언어의 구조상 사용이 불가하고, 별 의미가 없다.
# 하지만 전역 '상수'의 사용은 퀘스트 view 상으로 꼭 필요하기 때문에,
# fuction setting () 과 같은 함수를 이용하여,
# 매번 테이블을 생성하여 전역 상수를 흉내내어 사용하였다.
# 이는 매우 비효율적이므로,
# c의 preprocesser와 같이 pre qc를 만들어 전역 상수를 사용할 수 있도록 하였다.
# 퀘스트를 qc로 컴파일 하기 전에 pre_qc.py를 통과하면,
# pre_qc.py는 define 구문을 처리하고, 그 결과를
# pre_qc/filename에 저장한다.import sys
def split_by_quat (buf):
p = False
l = list (buf)
l.reverse()
s = ""
res = []
while l:
c = l.pop()
if c == '"':
if p == True:
s += c
res +=
s = ""
else:
if len (s) != 0:
res +=
s = '"'
p = not p
elif c == "\\" and l[0] == '"':
s += c
s += l.pop()
else:
s += c
if len (s) != 0:
res +=
return resdef AddSepMiddleOfElement (l, sep):
l.reverse()
new_list = [l.pop()]
while l:
new_list.append (sep)
new_list.append (l.pop())
return new_listdef my_split_with_seps(s, seps):
res =
for sep in seps:
new_res = []
for r in res:
sp = r.split (sep)
sp = AddSepMiddleOfElement (sp, sep)
new_res += sp
res = new_res
new_res = []
for r in res:
if r != '':
new_res.append (r)
return new_resdef my_split(s, seps):
res =
for sep in seps:
new_res = []
for r in res:
sp = r.split (sep)
new_res += sp
res = new_res
new_res = []
for r in res:
if r != '':
new_res.append (r)
return new_res
def MultiIndex (list, key):
l = []
i = 0
for s in list:
if s == key:
l.append (i)
i = i + 1
return ldef Replace (lines, parameter_table, keys):
r = []
for string in lines:
l = split_by_quat (string)
for s in l:
if s[0] == '"':
r +=
else:
tokens = my_split_with_seps (s, ["\t", ",", " ", "=", "[", "]",'-','<','>','~','!','.','(',')'])
for key in keys:
try:
idices = MultiIndex(tokens, key)
for i in idices:
tokens = parameter_table[key][0]
except:
pass
r += tokens
return rdef MakeParameterTable(lines, parameter_table, keys):
names = []
values = []
group_names = []
group_values = []
idx = 0
for line in lines:
idx += 1
line = line.strip("\n")
if (-1 != line.find("--")):
line = line[0:line.find("--")]
tokens = my_split(line, ["\t", ",", " ", "=", "[", "]", "\r", "\n"])
if len(tokens) == 0:
continue
if cmp (tokens[0], "quest") == 0:
start = idx
break
if cmp (tokens[0], "define") == 0:
if cmp (tokens[1], "group") == 0:
group_value = []
for value in tokens[3:]:
if parameter_table.get(value, 0) != 0:
value = prameter_table[value]
group_value.append (value)
parameter_table [tokens[2]] = group_value
keys.append(tokens[2])
elif len(tokens) > 5:
print "%d %s" % (idx, "Invalid syntax")
print "define [name] = [value]"
print "define group [name] = \"[\"[v0],[v1], ... \"]\""
else :
if tokens[1] == "rgd_kill_num":
print "mybad"
value = tokens[2]
if parameter_table.get(value, 0) != 0:
value = prameter_table[value]
parameter_table[tokens[1]] = [value]
keys.append (tokens[1])
parameter_table = dict (zip (group_names, group_values))
return startdef run(filename):
parameter_table = dict()
keys = []filename = filename.strip("\n")
if filename == "":
return
lines = open (filename).readlines()
start = MakeParameterTable (lines, parameter_table, keys)
if len (keys) == 0:
return Falselines = lines [start-1:]
r = Replace (lines, parameter_table, keys)
f = file ("pre_qc/"+filename, "w")
for s in r:
f.write(s)
return True
my make_localeSpoiler#!/usr/local/bin/python
import pre_qc
import os
import sys
os.system('rm -rf object')
os.system('mkdir object')
#os.system('rm -rf pre_qc')
os.system('mkdir pre_qc')
os.system('chgrp quest object')
for line in file('locale_list'):
r = pre_qc.run (line)
if r == True:
filename = 'pre_qc/'+line
else:
filename = lineif os.system('./qc '+filename):
print 'Error occured on compile ' + line
os.system('chmod -R 770 object')
import sys
sys.exit(-1)os.system('chmod -R 770 object')
Thanks in Advance
-
well im sorry i again need a solution for this which i found the reason..
When two same kingdom players enter the ring the duel not starts but opposite kingdoms it runs quite smoothlySo anyone here can tell whats the problem and solution for it ?
-
Hello metin2 dev
I need Vanilla ( real Vanilla) to talk to me regarding vanilla core and some issues
This can be stupid but i have no other go because i cant find vanilla and no one is here to solve some bugs in vanilla core...
my Skype : -EDIT-Sorry if i am posted this message in wrong thread
Thanks
-
-
Hello guys
While i trying dragon alchemy i m able to do upgrade class and clarity ..but level of dragon stone ( strength) cant be increase...
Here is the pictureIf i click too nothing happens..
In sys error i get this
any solution for this ?
Thanks in advance...DoRefineStrength: INVALID DRAGON SOUL(114410)
-
I dont have a source and the bug is getting more exp when u keep Level distribution in party leveling... and When u keep event distribution no exp is flowing..
It is normal exp rate when u levelup alone without any party....
I just want to know where i can see this exp allowed for party in source or sf..
-
Still cant find the solutions ... any1 here with answer is appreciated...
Thanks
-
-
Hi everyone,
I have problem in Watery Cavern or Dragon room while in party that is group leveling they receive more exp.. in Level distribution than even distribution...
exp is so much than while levelling alone... some bug in that party...or what is the problem in that??may i know where i can change that group party distirbution values??
Very urgent
Need Help...
Thanks in advance...
-
No one to answer my problem?
pets from official
in Community Support - Questions & Answers
Posted
Check the link from that msm like D:\Ymir Work\npc_pet\valentine_angel\valentine_angel.GR2
and put that on correct folder npc_pet