[C++,Py]Soul Stone
- Seby.
-

- Mesaje: 883
- Membru din: 02 Feb 2017, 23:00
- Server: Metin2Pegasus
- Regat: Jinno
- Aprecieri: 112
- Mulţumiri: 167
- Discord: Copiază ID
- Contact:
Manual nu vă mai place să citiţi 
gmake: *** [OBJDIR/char_manager.o] Error 1
char_item.cpp: In member function 'bool CHARACTER::IsEmptyItemGrid(TItemPos, BYTE, int) const':
char_item.cpp:778:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
gmake: *** [OBJDIR/char_item.o] Error 1
root@:/usr/src/ASOURCE/Server/game/src #
vreo rezolvare? avand in vedere ca nu am bagat nimic in char_item.cpp
char_item.cpp: In member function 'bool CHARACTER::IsEmptyItemGrid(TItemPos, BYTE, int) const':
char_item.cpp:778:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
gmake: *** [OBJDIR/char_item.o] Error 1
root@:/usr/src/ASOURCE/Server/game/src #
vreo rezolvare? avand in vedere ca nu am bagat nimic in char_item.cpp
- darak.darak2
-

- Mesaje: 222
- Membru din: 17 Feb 2017, 22:53
- Server: www.kor2.ro
- Regat: Chunjo
- Aprecieri: 7
- Mulţumiri: 19
- Contact:
- darak.darak2
-

- Mesaje: 222
- Membru din: 17 Feb 2017, 22:53
- Server: www.kor2.ro
- Regat: Chunjo
- Aprecieri: 7
- Mulţumiri: 19
- Contact:
Nu am spus ca e si usor sa le faci.. si cei care stiu sa le rezolve, le vin ideiile astea.Valy. scrie:bv le dai ideiidarak.darak2 scrie:Poti face mai multe variante.. carti,biolog,92/94,boabe zen,carti secundare. Nice
)))
un quest daca va ajuta:
quest training_grandmaster_skill begin
state start begin
when 50513.use begin
setskin(NOWINDOW)
local vnum = tonumber(input()) or 0
if vnum <= 0 then
cmdchat("SoulStoneResult -1")
return
end
local seelicount = pc.count_item(50513)
if seelicount == 0 then
cmdchat("SoulStoneResult -1")
return
end
if pc.get_skill_group() == 0 then
cmdchat("SoulStoneResult -1")
return
end
local result = training_grandmaster_skill.BuildGrandMasterSkillList(pc.get_job(), pc.get_skill_group())
local vnum_list = result[1]
local name_list = result[2]
if table.getn(vnum_list) == 0 then
cmdchat("SoulStoneResult -1")
return
end
local index = -1
for i = 1, table.getn(vnum_list) do
if vnum_list == vnum then
index = i
break
end
end
if index == -1 then
cmdchat("SoulStoneResult -1")
return
end
local skill_name=name_list[index]
local skill_vnum=vnum_list[index]
local skill_level = pc.get_skill_level(skill_vnum)
local -cenzurat-_alignment = pc.get_real_alignment()
local need_alignment = 1000+500*(skill_level-30)
if -cenzurat-_alignment<-19000+need_alignment then
notice("Nu ai destule puncte de grad.")
cmdchat("SoulStoneResult -1")
return
end
if get_time() < pc.getqf("next_time") then -- and not is_test_server() then
if pc.is_skill_book_no_delay() then
pc.remove_skill_book_no_delay()
else
notice("Ai citit deja o piatra spiritului azi!")
cmdchat("SoulStoneResult -1")
return
end
end
pc.setqf("next_time", get_time()+time_hour_to_sec(number(8, 12)))
pc.remove_item(50513)
if pc.learn_grand_master_skill(skill_vnum) then
cmdchat("SoulStoneResult 1")
pc.change_alignment(-need_alignment)
else
cmdchat("SoulStoneResult 0")
pc.change_alignment(-number(need_alignment/3, need_alignment/2))
end
end
function BuildGrandMasterSkillList(job, group)
GRAND_MASTER_SKILL_LEVEL = 30
PERFECT_MASTER_SKILL_LEVEL = 40
local skill_list = special.active_skill_list[job+1][group]
local ret_vnum_list = {}
local ret_name_list = {}
-- test_chat(string.format("job=%d, group=%d", job, group))
table.foreach(skill_list,
function(i, skill_vnum)
local skill_level = pc.get_skill_level(skill_vnum)
-- test_chat(string.format("[%d]=%d", skill_vnum, skill_level))
if skill_level >= GRAND_MASTER_SKILL_LEVEL and skill_level < PERFECT_MASTER_SKILL_LEVEL then
table.insert(ret_vnum_list, skill_vnum)
local name=locale.GM_SKILL_NAME_DICT[skill_vnum]
if name == nil then name=skill_vnum end
table.insert(ret_name_list, name)
end
end)
return {ret_vnum_list, ret_name_list}
--return {ret_vnum_list, ret_name_list}
end
end
end
quest training_grandmaster_skill begin
state start begin
when 50513.use begin
setskin(NOWINDOW)
local vnum = tonumber(input()) or 0
if vnum <= 0 then
cmdchat("SoulStoneResult -1")
return
end
local seelicount = pc.count_item(50513)
if seelicount == 0 then
cmdchat("SoulStoneResult -1")
return
end
if pc.get_skill_group() == 0 then
cmdchat("SoulStoneResult -1")
return
end
local result = training_grandmaster_skill.BuildGrandMasterSkillList(pc.get_job(), pc.get_skill_group())
local vnum_list = result[1]
local name_list = result[2]
if table.getn(vnum_list) == 0 then
cmdchat("SoulStoneResult -1")
return
end
local index = -1
for i = 1, table.getn(vnum_list) do
if vnum_list == vnum then
index = i
break
end
end
if index == -1 then
cmdchat("SoulStoneResult -1")
return
end
local skill_name=name_list[index]
local skill_vnum=vnum_list[index]
local skill_level = pc.get_skill_level(skill_vnum)
local -cenzurat-_alignment = pc.get_real_alignment()
local need_alignment = 1000+500*(skill_level-30)
if -cenzurat-_alignment<-19000+need_alignment then
notice("Nu ai destule puncte de grad.")
cmdchat("SoulStoneResult -1")
return
end
if get_time() < pc.getqf("next_time") then -- and not is_test_server() then
if pc.is_skill_book_no_delay() then
pc.remove_skill_book_no_delay()
else
notice("Ai citit deja o piatra spiritului azi!")
cmdchat("SoulStoneResult -1")
return
end
end
pc.setqf("next_time", get_time()+time_hour_to_sec(number(8, 12)))
pc.remove_item(50513)
if pc.learn_grand_master_skill(skill_vnum) then
cmdchat("SoulStoneResult 1")
pc.change_alignment(-need_alignment)
else
cmdchat("SoulStoneResult 0")
pc.change_alignment(-number(need_alignment/3, need_alignment/2))
end
end
function BuildGrandMasterSkillList(job, group)
GRAND_MASTER_SKILL_LEVEL = 30
PERFECT_MASTER_SKILL_LEVEL = 40
local skill_list = special.active_skill_list[job+1][group]
local ret_vnum_list = {}
local ret_name_list = {}
-- test_chat(string.format("job=%d, group=%d", job, group))
table.foreach(skill_list,
function(i, skill_vnum)
local skill_level = pc.get_skill_level(skill_vnum)
-- test_chat(string.format("[%d]=%d", skill_vnum, skill_level))
if skill_level >= GRAND_MASTER_SKILL_LEVEL and skill_level < PERFECT_MASTER_SKILL_LEVEL then
table.insert(ret_vnum_list, skill_vnum)
local name=locale.GM_SKILL_NAME_DICT[skill_vnum]
if name == nil then name=skill_vnum end
table.insert(ret_name_list, name)
end
end)
return {ret_vnum_list, ret_name_list}
--return {ret_vnum_list, ret_name_list}
end
end
end
-
- Informaţie
-
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 5 vizitatori




