Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CONFIRM_NO = 0
- CONFIRM_YES = 1
- CONFIRM_OK = 1
- CONFIRM_TIMEOUT = 2
- MALE = 0
- FEMALE = 1
- --quest.create = function(f) return coroutine.create(f) end
- --quest.process = function(co,args) return coroutine.resume(co, args) end
- setstate = q.setstate
- newstate = q.setstate
- --Biblioteka z plikami tekstowymi---
- quest_txt = "/usr/home/mt2/quest/biblioteka_txt/"
- --------------------------------------------------------------------------
- q.set_clock = function(name, value) q.set_clock_name(name) q.set_clock_value(value) end
- q.set_counter = function(name, value) q.set_counter_name(name) q.set_counter_value(value) end
- c_item_name = function(vnum) return ("[ITEM value;"..vnum.."]") end
- c_mob_name = function(vnum) return ("[MOB value;"..vnum.."]") end
- -- d.set_folder = function (path) raw_script("[SET_PATH path;"..path.."]") end
- -- d.set_folder = function (path) path.show_cinematic("[SET_PATH path;"..path.."]") end
- -- party.run_cinematic = function (path) party.show_cinematic("[RUN_CINEMATIC value;"..path.."]") end
- newline = "[ENTER]"
- function color256(r, g, b) return "[COLOR r;"..(r/255.0).."|g;"..(g/255.0).."|b;"..(b/255.0).."]" end
- function color(r,g,b) return "[COLOR r;"..r.."|g;"..g.."|b;"..b.."]" end
- function delay(v) return "[DELAY value;"..v.."]" end
- function setcolor(r,g,b) raw_script(color(r,g,b)) end
- function setdelay(v) raw_script(delay(v)) end
- function resetcolor(r,g,b) raw_script("[/COLOR]") end
- function resetdelay(v) raw_script("[/DELAY]") end
- -- minimap? ???? ??
- function addmapsignal(x,y) raw_script("[ADDMAPSIGNAL x;"..x.."|y;"..y.."]") end
- -- minimap ????? ?? ???
- function clearmapsignal() raw_script("[CLEARMAPSIGNAL]") end
- -- ??????? ??? ??? ?? ??? ???.
- function setbgimage(src) raw_script("[BGIMAGE src;") raw_script(src) raw_script("]") end
- -- ???? ???? ????.
- function addimage(x,y,src) raw_script("[IMAGE x;"..x.."|y;"..y) raw_script("|src;") raw_script(src) raw_script("]") end
- function makequestbutton(name)
- raw_script("[QUESTBUTTON idx;")
- raw_script(""..q.getcurrentquestindex())
- raw_script("|name;")
- raw_script(name) raw_script("]")
- end
- function make_quest_button_ex(name, icon_type, icon_name)
- test_chat(icon_type)
- test_chat(icon_name)
- raw_script("[QUESTBUTTON idx;")
- raw_script(""..q.getcurrentquestindex())
- raw_script("|name;")
- raw_script(name)
- raw_script("|icon_type;")
- raw_script(icon_type)
- raw_script("|icon_name;")
- raw_script(icon_name)
- raw_script("]")
- end
- MAX_LEVEL = 250 -- Max level jaki jest na serwerze
- function make_quest_button(name) makequestbutton(name) end
- function send_letter_ex(name, icon_type, icon_name) make_quest_button_ex(name, icon_type, icon_name) set_skin(NOWINDOW) q.set_title(name) q.start() end
- function send_letter(name) makequestbutton(name) set_skin(NOWINDOW) q.set_title(name) q.start() end
- function clear_letter() q.done() end
- function say_title(name) say(color256(255, 230, 186)..name..color256(196, 196, 196)) end
- function say_reward(name) say(color256(255, 200, 200)..name..color256(196, 196, 196)) end
- function say_blekit(name) say(color256(0, 255, 255)..name..color256(196, 196, 196)) end
- function say_akwa(name) say(color256(127, 255, 212)..name..color256(196, 196, 196)) end
- function say_amarant(name) say(color256(230, 28, 102)..name..color256(196, 196, 196)) end
- function say_ametyst(name) say(color256(153, 102, 204)..name..color256(196, 196, 196)) end
- function say_antracyt(name) say(color256(54, 65, 53)..name..color256(196, 196, 196)) end
- function say_atrament(name) say(color256(0, 49, 83)..name..color256(196, 196, 196)) end
- function say_banan(name) say(color256(254, 254, 51)..name..color256(196, 196, 196)) end
- function say_bez(name) say(color256(194, 178, 128)..name..color256(196, 196, 196)) end
- function say_blue(name) say(color256(0, 168, 231)..name..color256(196, 196, 196)) end
- function say_bordo(name) say(color256(80, 0, 0)..name..color256(196, 196, 196)) end
- function say_braz(name) say(color256(150, 75, 0)..name..color256(196, 196, 196)) end
- function say_brunatny(name) say(color256(112, 32, 31)..name..color256(196, 196, 196)) end
- function say_brzoskwinia(name) say(color256(255, 204, 153)..name..color256(196, 196, 196)) end
- function say_burak(name) say(color256(98, 0, 44)..name..color256(196, 196, 196)) end
- function say_cynamon(name) say(color256(157, 91, 3)..name..color256(196, 196, 196)) end
- function say_red(name) say(color256(222, 0, 47)..name..color256(196, 196, 196)) end
- function say_fiolet(name) say(color256(184, 3, 255)..name..color256(196, 196, 196)) end
- function say_granat(name) say(color256(0, 0, 128)..name..color256(196, 196, 196)) end
- function say_lawenda(name) say(color256(201, 162, 191)..name..color256(196, 196, 196)) end
- function say_arbuz(name) say(color256(255, 109, 102)..name..color256(196, 196, 196)) end
- function say_biskup(name) say(color256(194, 178, 128)..name..color256(196, 196, 196)) end
- function say_burgund(name) say(color256(96, 2, 1)..name..color256(196, 196, 196)) end
- function say_bursztyn(name) say(color256(255, 191, 0)..name..color256(196, 196, 196)) end
- function say_bury(name) say(color256(107, 86, 54)..name..color256(196, 196, 196)) end
- function say_cegla(name) say(color256(233, 107, 57)..name..color256(196, 196, 196)) end
- function say_chaber(name) say(color256(51, 0, 204)..name..color256(196, 196, 196)) end
- function say_cialo(name) say(color256(255, 229, 180)..name..color256(196, 196, 196)) end
- function say_cyklamen(name) say(color256(162, 0, 123)..name..color256(196, 196, 196)) end
- function say_cynober(name) say(color256(227, 66, 52)..name..color256(196, 196, 196)) end
- function say_czekolada(name) say(color256(123, 63, 0)..name..color256(196, 196, 196)) end
- function say_rdza(name) say(color256(128, 24, 24)..name..color256(196, 196, 196)) end
- function say_grafit(name) say(color256(53, 69, 79)..name..color256(196, 196, 196)) end
- function say_grynszpan(name) say(color256(0, 166, 147)..name..color256(196, 196, 196)) end
- function say_heban(name) say(color256(61, 43, 31)..name..color256(196, 196, 196)) end
- function say_herbata(name) say(color256(204, 93, 93)..name..color256(196, 196, 196)) end
- function say_kawa(name) say(color256(44, 27, 1)..name..color256(196, 196, 196)) end
- function say_koral(name) say(color256(255, 127, 80)..name..color256(196, 196, 196)) end
- function say_krew(name) say(color256(207, 41, 41)..name..color256(196, 196, 196)) end
- function say_lazur(name) say(color256(0, 127, 255)..name..color256(196, 196, 196)) end
- function say_limonka(name) say(color256(147, 246, 0)..name..color256(196, 196, 196)) end
- function say_malachit(name) say(color256(0, 102, 51)..name..color256(196, 196, 196)) end
- function say_malina(name) say(color256(235, 1, 101)..name..color256(196, 196, 196)) end
- function say_miedz(name) say(color256(184, 115, 51)..name..color256(196, 196, 196)) end
- function say_oliwka(name) say(color256(128, 128, 0)..name..color256(196, 196, 196)) end
- function say_orzech(name) say(color256(189, 148, 96)..name..color256(196, 196, 196)) end
- function say_patyna(name) say(color256(110, 190, 159)..name..color256(196, 196, 196)) end
- function say_pistacja(name) say(color256(159, 251, 136)..name..color256(196, 196, 196)) end
- function say_poziomka(name) say(color256(207, 47, 47)..name..color256(196, 196, 196)) end
- function say_purpura(name) say(color256(128, 0, 128)..name..color256(196, 196, 196)) end
- function say_rubin(name) say(color256(212, 27, 86)..name..color256(196, 196, 196)) end
- function say_rudy(name) say(color256(205, 87, 128)..name..color256(196, 196, 196)) end
- function say_trawa(name) say(color256(36, 166, 47)..name..color256(196, 196, 196)) end
- function say_turkus(name) say(color256(48, 213, 200)..name..color256(196, 196, 196)) end
- function say_wisnia(name) say(color256(128, 0, 0)..name..color256(196, 196, 196)) end
- function say_green(name) say(color256(0, 128, 0)..name..color256(196, 196, 196)) end
- function say_zloto(name) say(color256(255, 215, 0)..name..color256(196, 196, 196)) end
- function say_pc_name() say(pc.get_name()..":") end
- function say_size(width, height) say("[WINDOW_SIZE width;"..width.."|height;"..height.."]") end
- function setmapcenterposition(x,y)
- raw_script("[SETCMAPPOS x;")
- raw_script(x.."|y;")
- raw_script(y.."]")
- end
- function wykonaj(x)
- os.execute(x)
- end
- function say_item(name, vnum, desc)
- say("[INSERT_IMAGE image_type;item|idx;"..vnum.."]")
- end
- function say_item_vnum(vnum)
- say_item(item_name(vnum), vnum, "")
- end
- function pc_is_novice()
- if pc.get_skill_group()==0 then
- return true
- else
- return false
- end
- end
- function pc_get_exp_bonus(exp, text)
- say_reward(text)
- pc.give_exp2(exp)
- set_quest_state("levelup", "run")
- end
- function pc_get_village_map_index(index)
- return village_map[pc.get_empire()][index]
- end
- village_map = {
- {1, 3},
- {21, 23},
- {41, 43},
- }
- function npc_is_same_empire()
- if pc.get_empire()==npc.empire then
- return true
- else
- return false
- end
- end
- function npc_get_skill_teacher_race(pc_empire, pc_job, sub_job)
- if 1==sub_job then
- if 0==pc_job then
- return WARRIOR1_NPC_LIST[pc_empire]
- elseif 1==pc_job then
- return ASSASSIN1_NPC_LIST[pc_empire]
- elseif 2==pc_job then
- return SURA1_NPC_LIST[pc_empire]
- elseif 3==pc_job then
- return SHAMAN1_NPC_LIST[pc_empire]
- end
- elseif 2==sub_job then
- if 0==pc_job then
- return WARRIOR2_NPC_LIST[pc_empire]
- elseif 1==pc_job then
- return ASSASSIN2_NPC_LIST[pc_empire]
- elseif 2==pc_job then
- return SURA2_NPC_LIST[pc_empire]
- elseif 3==pc_job then
- return SHAMAN2_NPC_LIST[pc_empire]
- end
- end
- return 0
- end
- function pc_find_square_guard_vid()
- if pc.get_empire()==1 then
- return find_npc_by_vnum(11000)
- elseif pc.get_empire()==2 then
- return find_npc_by_vnum(11002)
- elseif pc.get_empire()==3 then
- return find_npc_by_vnum(11004)
- end
- return 0
- end
- function pc_find_skill_teacher_vid(sub_job)
- local vnum=npc_get_skill_teacher_race(pc.get_empire(), pc.get_job(), sub_job)
- return find_npc_by_vnum(vnum)
- end
- function pc_find_square_guard_vid()
- local pc_empire=pc.get_empire()
- if pc_empire==1 then
- return find_npc_by_vnum(11000)
- elseif pc_empire==2 then
- return find_npc_by_vnum(11002)
- elseif pc_empire==3 then
- return find_npc_by_vnum(11004)
- end
- end
- function npc_is_same_job()
- local pc_job=pc.get_job()
- local npc_vnum=npc.get_race()
- -- test_chat("pc.job:"..pc.get_job())
- -- test_chat("npc_race:"..npc.get_race())
- -- test_chat("pc.skill_group:"..pc.get_skill_group())
- if pc_job==0 then
- if table_is_in(WARRIOR1_NPC_LIST, npc_vnum) then return true end
- if table_is_in(WARRIOR2_NPC_LIST, npc_vnum) then return true end
- elseif pc_job==1 then
- if table_is_in(ASSASSIN1_NPC_LIST, npc_vnum) then return true end
- if table_is_in(ASSASSIN2_NPC_LIST, npc_vnum) then return true end
- elseif pc_job==2 then
- if table_is_in(SURA1_NPC_LIST, npc_vnum) then return true end
- if table_is_in(SURA2_NPC_LIST, npc_vnum) then return true end
- elseif pc_job==3 then
- if table_is_in(SHAMAN1_NPC_LIST, npc_vnum) then return true end
- if table_is_in(SHAMAN2_NPC_LIST, npc_vnum) then return true end
- end
- return false
- end
- function npc_get_job()
- local npc_vnum=npc.get_race()
- if table_is_in(WARRIOR1_NPC_LIST, npc_vnum) then return COND_WARRIOR_1 end
- if table_is_in(WARRIOR2_NPC_LIST, npc_vnum) then return COND_WARRIOR_2 end
- if table_is_in(ASSASSIN1_NPC_LIST, npc_vnum) then return COND_ASSASSIN_1 end
- if table_is_in(ASSASSIN2_NPC_LIST, npc_vnum) then return COND_ASSASSIN_2 end
- if table_is_in(SURA1_NPC_LIST, npc_vnum) then return COND_SURA_1 end
- if table_is_in(SURA2_NPC_LIST, npc_vnum) then return COND_SURA_2 end
- if table_is_in(SHAMAN1_NPC_LIST, npc_vnum) then return COND_SHAMAN_1 end
- if table_is_in(SHAMAN2_NPC_LIST, npc_vnum) then return COND_SHAMAN_2 end
- return 0
- end
- function time_min_to_sec(value)
- return 60*value
- end
- function time_hour_to_sec(value)
- return 3600*value
- end
- function next_time_set(value, test_value)
- local nextTime=get_time()+value
- if is_test_server() then
- nextTime=get_time()+test_value
- end
- pc.setqf("__NEXT_TIME__", nextTime)
- end
- function next_time_is_now(value)
- if get_time()>=pc.getqf("__NEXT_TIME__") then
- return true
- else
- return false
- end
- end
- function table_get_random_item(self)
- return self[number(1, table.getn(self))]
- end
- function table_is_in(self, test)
- for i = 1, table.getn(self) do
- if self[i]==test then
- return true
- end
- end
- return false
- end
- function giveup_quest_menu(title)
- local s=select("????", "????")
- if 2==s then
- say(title.." ???? ???")
- say("?????????")
- local s=select("?, ?????", "????")
- if 1==s then
- say(title.."???? ??????")
- restart_quest()
- end
- end
- end
- function restart_quest()
- set_state("start")
- q.done()
- end
- function complete_quest()
- set_state("__COMPLETE__")
- q.done()
- end
- function giveup_quest()
- set_state("__GIVEUP__")
- q.done()
- end
- function complete_quest_state(state_name)
- set_state(state_name)
- q.done()
- end
- function test_chat(log)
- if is_test_server() then
- chat(log)
- end
- end
- function bool_to_str(is)
- if is then
- return "true"
- else
- return "false"
- end
- end
- WARRIOR1_NPC_LIST = {20300, 20320, 20340, }
- WARRIOR2_NPC_LIST = {20301, 20321, 20341, }
- ASSASSIN1_NPC_LIST = {20302, 20322, 20342, }
- ASSASSIN2_NPC_LIST = {20303, 20323, 20343, }
- SURA1_NPC_LIST = {20304, 20324, 20344, }
- SURA2_NPC_LIST = {20305, 20325, 20345, }
- SHAMAN1_NPC_LIST = {20306, 20326, 20346, }
- SHAMAN2_NPC_LIST = {20307, 20327, 20347, }
- function skill_group_dialog(e, j, g) -- e = ??, j = ??, g = ??
- e = 1 -- XXX ???? ???? ??? ??? ?????
- -- ?? ????? ?? ??? ??
- if pc.job != j then
- say(locale.skill_group.dialog[e][pc.job][3])
- elseif pc.get_skill_group() == 0 then
- if pc.level < 5 then
- say(locale.skill_group.dialog[e][j][g][1])
- return
- end
- say(locale.skill_group.dialog[e][j][g][2])
- local answer = select(locale.yes, locale.no)
- if answer == 1 then
- --say(locale.skill_group.dialog[e][j][g][2])
- pc.set_skill_group(g)
- else
- --say(locale.skill_group.dialog[e][j][g][3])
- end
- --elseif pc.get_skill_group() == g then
- --say(locale.skill_group.dialog[e][j][g][4])
- --else
- --say(locale.skill_group.dialog[e][j][g][5])
- end
- end
- function show_horse_menu()
- if horse.is_mine() then
- say(locale.horse_menu.menu)
- local s = 0
- if horse.is_dead() then
- s = select(locale.horse_menu.revive, locale.horse_menu.ride, locale.horse_menu.unsummon, locale.horse_menu.show_state ,locale.horse_menu.close)
- else
- s = select(locale.horse_menu.feed, locale.horse_menu.ride, locale.horse_menu.unsummon, locale.horse_menu.show_state ,locale.horse_menu.close)
- end
- if s==1 then
- if horse.is_dead() then
- horse.revive()
- else
- local food = horse.get_grade() + 50054 - 1
- if pc.countitem(food) > 0 then
- pc.removeitem(food, 1)
- horse.feed()
- else
- say(locale.need_item_prefix..item_name(food)..locale.need_item_postfix);
- end
- end
- elseif s==2 then
- horse.ride()
- elseif s==3 then
- horse.unsummon()
- elseif s==4 then
- say("Zycie: "..horse.get_health_pct().."%")
- say("Wytrzymalosc: "..horse.get_stamina_pct().."%")
- say("")
- elseif s==5 then
- -- do nothing
- end
- end
- end
- npc_index_table = {
- ['race'] = npc.getrace,
- ['empire'] = npc.get_empire,
- }
- pc_index_table = {
- ['weapon'] = pc.getweapon,
- ['level'] = pc.get_level,
- ['hp'] = pc.gethp,
- ['maxhp'] = pc.getmaxhp,
- ['sp'] = pc.getsp,
- ['maxsp'] = pc.getmaxsp,
- ['exp'] = pc.get_exp,
- ['nextexp'] = pc.get_next_exp,
- ['job'] = pc.get_job,
- ['money'] = pc.getmoney,
- ['gold'] = pc.getmoney,
- ['name'] = pc.getname,
- ['playtime'] = pc.getplaytime,
- ['leadership'] = pc.getleadership,
- ['empire'] = pc.getempire,
- ['skillgroup'] = pc.get_skill_group,
- ['x'] = pc.getx,
- ['y'] = pc.gety,
- ['local_x'] = pc.get_local_x,
- ['local_y'] = pc.get_local_y,
- }
- item_index_table = {
- ['vnum'] = item.get_vnum,
- ['name'] = item.get_name,
- ['size'] = item.get_size,
- ['count'] = item.get_count,
- ['type'] = item.get_type,
- ['sub_type'] = item.get_sub_type,
- ['refine_vnum'] = item.get_refine_vnum,
- ['level'] = item.get_level,
- }
- guild_war_bet_price_table =
- {
- 10000,
- 30000,
- 50000,
- 100000
- }
- function npc_index(t,i)
- local npit = npc_index_table
- if npit[i] then
- return npit[i]()
- else
- return rawget(t,i)
- end
- end
- function pc_index(t,i)
- local pit = pc_index_table
- if pit[i] then
- return pit[i]()
- else
- return rawget(t,i)
- end
- end
- function item_index(t, i)
- local iit = item_index_table
- if iit[i] then
- return iit[i]()
- else
- return rawget(t, i)
- end
- end
- setmetatable(pc,{__index=pc_index})
- setmetatable(npc,{__index=npc_index})
- setmetatable(item,{__index=item_index})
- --coroutine? ??? ??? ??
- function select(...)
- return q.yield('select', arg)
- end
- function select_table(table)
- return q.yield('select', table)
- end
- -- coroutine? ??? ?? ?? ????
- function wait()
- q.yield('wait')
- end
- function input()
- return q.yield('input')
- end
- function confirm(vid, msg, timeout)
- return q.yield('confirm', vid, msg, timeout)
- end
- function select_item()
- setskin(NOWINDOW)
- return q.yield('select_item')
- end
- --?? ?? ??? ??? ??
- NOWINDOW = 0
- NORMAL = 1
- CINEMATIC = 2
- SCROLL = 3
- WARRIOR = 0
- ASSASSIN = 1
- SURA = 2
- SHAMAN = 3
- COND_WARRIOR_0 = 8
- COND_WARRIOR_1 = 16
- COND_WARRIOR_2 = 32
- COND_WARRIOR = 56
- COND_ASSASSIN_0 = 64
- COND_ASSASSIN_1 = 128
- COND_ASSASSIN_2 = 256
- COND_ASSASSIN = 448
- COND_SURA_0 = 512
- COND_SURA_1 = 1024
- COND_SURA_2 = 2048
- COND_SURA = 3584
- COND_SHAMAN_0 = 4096
- COND_SHAMAN_1 = 8192
- COND_SHAMAN_2 = 16384
- COND_SHAMAN = 28672
- PART_MAIN = 0
- PART_HAIR = 3
- GUILD_CREATE_ITEM_VNUM = 70101
- QUEST_SCROLL_TYPE_KILL_MOB = 1
- QUEST_SCROLL_TYPE_KILL_ANOTHER_EMPIRE = 2
- apply = {
- ["MAX_HP"] = 1,
- ["MAX_SP"] = 2,
- ["CON"] = 3,
- ["INT"] = 4,
- ["STR"] = 5,
- ["DEX"] = 6,
- ["ATT_SPEED"] = 7,
- ["MOV_SPEED"] = 8,
- ["CAST_SPEED"] = 9,
- ["HP_REGEN"] = 10,
- ["SP_REGEN"] = 11,
- ["POISON_PCT"] = 12,
- ["STUN_PCT"] = 13,
- ["SLOW_PCT"] = 14,
- ["CRITICAL_PCT"] = 15,
- ["PENETRATE_PCT"] = 16,
- ["ATTBONUS_HUMAN"] = 17,
- ["ATTBONUS_ANIMAL"] = 18,
- ["ATTBONUS_ORC"] = 19,
- ["ATTBONUS_MILGYO"] = 20,
- ["ATTBONUS_UNDEAD"] = 21,
- ["ATTBONUS_DEVIL"] = 22,
- ["STEAL_HP"] = 23,
- ["STEAL_SP"] = 24,
- ["MANA_BURN_PCT"] = 25,
- ["DAMAGE_SP_RECOVER"] = 26,
- ["BLOCK"] = 27,
- ["DODGE"] = 28,
- ["RESIST_SWORD"] = 29,
- ["RESIST_TWOHAND"] = 30,
- ["RESIST_DAGGER"] = 31,
- ["RESIST_BELL"] = 32,
- ["RESIST_FAN"] = 33,
- ["RESIST_BOW"] = 34,
- ["RESIST_FIRE"] = 35,
- ["RESIST_ELEC"] = 36,
- ["RESIST_MAGIC"] = 37,
- ["RESIST_WIND"] = 38,
- ["REFLECT_MELEE"] = 39,
- ["REFLECT_CURSE"] = 40,
- ["POISON_REDUCE"] = 41,
- ["KILL_SP_RECOVER"] = 42,
- ["EXP_DOUBLE_BONUS"] = 43,
- ["GOLD_DOUBLE_BONUS"] = 44,
- ["ITEM_DROP_BONUS"] = 45,
- ["POTION_BONUS"] = 46,
- ["KILL_HP_RECOVER"] = 47,
- ["IMMUNE_STUN"] = 48,
- ["IMMUNE_SLOW"] = 49,
- ["IMMUNE_FALL"] = 50,
- ["SKILL"] = 51,
- ["BOW_DISTANCE"] = 52,
- ["ATT_GRADE_BONUS"] = 53,
- ["DEF_GRADE_BONUS"] = 54,
- ["MAGIC_ATT_GRADE"] = 55,
- ["MAGIC_DEF_GRADE"] = 56,
- ["CURSE_PCT"] = 57,
- ["MAX_STAMINA"] = 58,
- ["ATTBONUS_WARRIOR"] = 59,
- ["ATTBONUS_ASSASSIN"] = 60,
- ["ATTBONUS_SURA"] = 61,
- ["ATTBONUS_SHAMAN"] = 62,
- ["ATTBONUS_MONSTER"] = 63,
- ["ATTBONUS_UM"] = 71,
- }
- -- ??? ??? -_-
- special = {}
- special.fortune_telling =
- {
- -- { prob ?? item money remove money
- { 1, 0, 20, 20, 0 }, -- 10
- { 499, 0, 10, 10, 0 }, -- 5
- { 2500, 0, 5, 5, 0 }, -- 1
- { 5000, 0, 0, 0, 0 },
- { 1500, 0, -5, -5, 20000 },
- { 499, 0, -10, -10, 20000 },
- { 1, 0, -20, -20, 20000 },
- }
- special.questscroll_reward =
- {
- {1, 1500, 3000, 30027, 0, 0 },
- {2, 1500, 3000, 30028, 0, 0 },
- {3, 1000, 2000, 30034, 30018, 0 },
- {4, 1000, 2000, 30034, 30011, 0 },
- {5, 1000, 2000, 30011, 30034, 0 },
- {6, 1000, 2000, 27400, 0, 0 },
- {7, 2000, 4000, 30023, 30003, 0 },
- {8, 2000, 4000, 30005, 30033, 0 },
- {9, 2000, 8000, 30033, 30005, 0 },
- {10, 4000, 8000, 30021, 30033, 30045},
- {11, 4000, 8000, 30045, 30022, 30046},
- {12, 5000, 12000, 30047, 30045, 30055},
- {13, 5000, 12000, 30051, 30017, 30058},
- {14, 5000, 12000, 30051, 30007, 30041},
- {15, 5000, 15000, 30091, 30017, 30018},
- {16, 3500, 6500, 30021, 30033, 0 },
- {17, 4000, 9000, 30051, 30033, 0 },
- {18, 4500, 10000, 30056, 30057, 30058},
- {19, 4500, 10000, 30059, 30058, 30041},
- {20, 5000, 15000, 0, 0, 0 },
- }
- special.active_skill_list = {
- {
- { 1, 2, 3, 4, 5, 6},
- { 16, 17, 18, 19, 20, 21},
- },
- {
- {31, 32, 33, 34, 35, 36},
- {46, 47, 48, 49, 50, 51},
- },
- {
- {61, 62, 63, 64, 65, 66},
- {76, 77, 78, 79, 80, 81},
- },
- {
- {91, 92, 93, 94, 95, 96},
- {106, 107, 108, 109, 110, 111},
- },
- }
- special.skill_reset_cost = {
- 2000,
- 2000,
- 2000,
- 2000,
- 2000,
- 2000,
- 4000,
- 6000,
- 8000,
- 10000,
- 14000,
- 18000,
- 22000,
- 28000,
- 34000,
- 41000,
- 50000,
- 59000,
- 70000,
- 90000,
- 101000,
- 109000,
- 114000,
- 120000,
- 131000,
- 141000,
- 157000,
- 176000,
- 188000,
- 200000,
- 225000,
- 270000,
- 314000,
- 348000,
- 393000,
- 427000,
- 470000,
- 504000,
- 554000,
- 600000,
- 758000,
- 936000,
- 1103000,
- 1276000,
- 1407000,
- 1568000,
- 1704000,
- 1860000,
- 2080000,
- 2300000,
- 2700000,
- 3100000,
- 3500000,
- 3900000,
- 4300000,
- 4800000,
- 5300000,
- 5800000,
- 6400000,
- 7000000,
- 8000000,
- 9000000,
- 10000000,
- 11000000,
- 12000000,
- 13000000,
- 14000000,
- 15000000,
- 16000000,
- 17000000,
- }
- special.levelup_img =
- {
- [101] = "dog.tga",
- [102] = "wolf.tga",
- [103] = "wolf.tga",
- [104] = "wolf.tga",
- [105] = "wolf.tga",
- [105] = "wolf.tga",
- [106] = "wolf.tga",
- [107] = "wolf.tga",
- [108] = "wild_boar.tga",
- [109] = "wild_boar.tga",
- [110] = "bear.tga",
- [111] = "bear.tga",
- [112] = "bear.tga",
- [113] = "bear.tga",
- [114] = "tiger.tga",
- [115] = "tiger.tga",
- [301] = "bak_inf.tga",
- [302] = "bak_gung.tga",
- [303] = "bak_gen1.tga",
- [304] = "bak_gen2.tga",
- [401] = "huk_inf.tga",
- [402] = "huk_dol.tga",
- [403] = "huk_gen1.tga",
- [404] = "huk_gen2.tga",
- [501] = "o_inf.tga",
- [502] = "o_jol.tga",
- [503] = "o_gung.tga",
- [504] = "o_jang.tga",
- [601] = "ung_inf.tga",
- [602] = "ung_chuk.tga",
- [603] = "ung_tu.tga",
- }
- special.levelup_quest = {
- -- monster kill monster kill
- -- vnum qty. vnum qty. exp percent
- { 0 , 0 , 0 , 0 , 0 } , -- lev 1
- { 101 , 10 , 102 , 5 , 10 } , -- lev 2
- { 101 , 20 , 102 , 10 , 10 } , -- lev 3
- { 102 , 15 , 103 , 5 , 10 } , -- lev 4
- { 103 , 10 , 104 , 10 , 10 } , -- lev 5
- { 104 , 20 , 108 , 10 , 10 } , -- lev 6
- { 108 , 10 , 105 , 5 , 10 } , -- lev 7
- { 108 , 20 , 105 , 10 , 10 } , -- lev 8
- { 105 , 15 , 109 , 5 , 10 } , -- lev 9
- { 105 , 20 , 109 , 10 , 10 } , -- lev 10
- { 109 , 10 , 110 , 5 , 10 } , -- lev 11
- { 110 , 15 , 106 , 10 , 10 } , -- lev 12
- { 106 , 20 , 111 , 5 , 10 } , -- lev 13
- { 111 , 15 , 107 , 5 , 10 } , -- lev 14
- { 111 , 20 , 107 , 10 , 10 } , -- lev 15
- { 107 , 15 , 114 , 5 , 10 } , -- lev 16
- { 107 , 20 , 114 , 10 , 10 } , -- lev 17
- { 114 , 10 , 112 , 10 , 10 } , -- lev 18
- { 112 , 20 , 113 , 10 , 10 } , -- lev 19
- { 113 , 20 , 302 , 15 , 10 } , -- lev 20
- { 302 , 20 , 115 , 10 , "2-10" } , -- lev 21
- { 115 , 25 , 304 , 10 , "2-10" } , -- lev 22
- { 304 , 20 , 401 , 40 , "2-10" } , -- lev 23
- { 401 , 60 , 402 , 80 , "2-10" } , -- lev 24
- { 501 , 80 , 404 , 20 , "2-10" } , -- lev 25
- { 502 , 80 , 406 , 20 , "2-10" } , -- lev 26
- { 406 , 30 , 504 , 20 , "2-10" } , -- lev 27
- { 631 , 35 , 504 , 30 , "2-10" } , -- lev 28
- { 631 , 40 , 632 , 30 , "2-10" } , -- lev 29
- { 632 , 40 , 2102 , 30 , "2-10" } , -- lev 30
- { 632 , 50 , 2102 , 45 , "2-5" } , -- lev 31
- { 633 , 45 , 2001 , 40 , "2-5" } , -- lev 32
- { 701 , 35 , 2103 , 30 , "2-5" } , -- lev 33
- { 701 , 40 , 2103 , 40 , "2-5" } , -- lev 34
- { 702 , 40 , 2002 , 30 , "2-5" } , -- lev 35
- { 704 , 20 , 2106 , 20 , "2-5" } , -- lev 36
- { 733 , 30 , 2003 , 20 , "2-5" } , -- lev 37
- { 734 , 40 , 2004 , 20 , "2-5" } , -- lev 38
- { 706 , 40 , 2005 , 30 , "2-5" } , -- lev 39
- { 707 , 40 , 2108 , 20 , "2-5" } , -- lev 40
- { 901 , 40 , 5123 , 25 , "2-5" } , -- lev 41
- { 902 , 30 , 5123 , 30 , "2-5" } , -- lev 42
- { 902 , 40 , 2031 , 35 , "2-5" } , -- lev 43
- { 903 , 40 , 2031 , 40 , "2-5" } , -- lev 44
- { 731 , 50 , 2032 , 45 , "2-5" } , -- lev 45
- { 732 , 30 , 5124 , 30 , "2-5" } , -- lev 46
- { 903 , 35 , 5125 , 30 , "2-5" } , -- lev 47
- { 904 , 40 , 5125 , 35 , "2-5" } , -- lev 48
- { 733 , 40 , 2033 , 45 , "2-5" } , -- lev 49
- { 734 , 40 , 5126 , 20 , "2-5" } , -- lev 50
- { 735 , 50 , 5126 , 30 , "1-4" } , -- lev 51
- { 904 , 45 , 2034 , 45 , "1-4" } , -- lev 52
- { 904 , 50 , 2034 , 50 , "1-4" } , -- lev 53
- { 736 , 40 , 1001 , 30 , "1-4" } , -- lev 54
- { 737 , 40 , 1301 , 35 , "1-4" } , -- lev 55
- { 905 , 50 , 1002 , 30 , "1-4" } , -- lev 56
- { 905 , 60 , 1002 , 40 , "1-4" } , -- lev 57
- { 906 , 45 , 1303 , 40 , "1-4" } , -- lev 58
- { 906 , 50 , 1303 , 45 , "1-4" } , -- lev 59
- { 907 , 45 , 1003 , 40 , "1-4" } , -- lev 60
- }
- special.levelup_reward1 =
- {
- -- warrior assassin sura shaman
- { 0, 0, 0, 0 },
- { 11200, 11400, 11600, 11800 }, -- ??
- { 12200, 12340, 12480, 12620 }, -- ??
- { 13000, 13000, 13000, 13000 } -- ??
- }
- -- levelup_reward1 ??? ???? ??? ???? ??
- -- ???? ???? ???? ??.
- special.levelup_reward3 = {
- -- pct item # item count
- { 33, 27002, 10 }, -- 25%
- { 67, 27005, 10 }, -- 25%
- --{ 75, 27101, 5 }, -- 25%
- { 100, 27114, 5 }, -- 25%
- }
- special.levelup_reward_gold21 =
- {
- { 10000, 20 },
- { 20000, 50 },
- { 40000, 25 },
- { 80000, 3 },
- { 100000, 2 },
- }
- special.levelup_reward_gold31 =
- {
- { 20000, 20 },
- { 40000, 40 },
- { 60000, 25 },
- { 80000, 10 },
- { 100000, 5 },
- }
- special.levelup_reward_gold41 =
- {
- { 40000, 20 },
- { 60000, 40 },
- { 80000, 25 },
- { 100000, 10 },
- { 150000, 5 },
- }
- special.levelup_reward_gold51 =
- {
- { 60000, 20 },
- { 80000, 40 },
- { 100000, 25 },
- { 150000, 10 },
- { 200000, 5 },
- }
- special.levelup_reward_exp21 =
- {
- { 2, 9 },
- { 3, 14 },
- { 4, 39 },
- { 6, 24 },
- { 8, 9 },
- { 10, 4 },
- }
- special.levelup_reward_exp31 =
- {
- { 2, 10 },
- { 2.5, 15 },
- { 3, 40 },
- { 3.5, 25 },
- { 4, 8 },
- { 4.5, 5 },
- { 5, 2 },
- }
- special.levelup_reward_exp41 =
- {
- { 2, 10 },
- { 2.5, 15 },
- { 3, 40 },
- { 3.5, 25 },
- { 4, 8 },
- { 4.5, 5 },
- { 5, 2 },
- }
- special.levelup_reward_exp51 =
- {
- { 1, 10 },
- { 1.5, 15 },
- { 2, 40 },
- { 2.5, 25 },
- { 3, 8 },
- { 3.5, 5 },
- { 4, 2 },
- }
- special.levelup_reward_item_21 =
- {
- -- no couple ring
- { { 27002, 10 }, { 27005, 10 }, { 27114, 10 } }, -- lev 21
- { 15080, 15100, 15120, 15140 }, -- lev 22
- { 16080, 16100, 16120, 16140 }, -- lev 23
- { 17080, 17100, 17120, 17140 }, -- lev 24
- { { 27002, 10 }, { 27005, 10 }, { 27114, 10 } }, -- lev 25
- { { 27003, 20 }, { 27006, 20 }, { 27114, 10 } }, -- over lev 25
- -- with couple ring
- -- { { 27002, 10 }, { 27005, 10 }, { 27114, 10 }, { 70301, 1 } }, -- lev 21
- -- { 15080, 15100, 15120, 15140, 70301 }, -- lev 22
- -- { 16080, 16100, 16120, 16140, 70301 }, -- lev 23
- -- { 17080, 17100, 17120, 17140, 70301 }, -- lev 24
- -- { { 27002, 10 }, { 27005, 10 }, { 27114, 10 }, { 70301, 1 } }, -- lev 25
- -- { { 27003, 20 }, { 27006, 20 }, { 27114, 10 } }, -- over lev 25
- }
- special.warp_to_pos = {
- -- ???
- {
- { 402100, 673900 },
- { 270400, 739900 },
- { 321300, 808000 },
- },
- --????
- {
- --A 5994 7563
- --B 5978 6222
- --C 7307 6898
- { 599400, 756300 },
- { 597800, 622200 },
- { 730700, 689800 },
- },
- --????
- {
- --A 2178 6272
- { 217800, 627200 },
- --B 2219 5027
- { 221900, 502700 },
- --C 3440 5025
- { 344000, 502500 },
- },
- --???
- {
- --A 4342 2906
- { 434200, 290600 },
- --B 3752 1749
- { 375200, 174900 },
- --C 4918 1736
- { 491800, 173600 },
- },
- }
- special.devil_tower =
- {
- --{ 123, 608 },
- { 2048+126, 6656+384 },
- { 2048+134, 6656+147 },
- { 2048+369, 6656+629 },
- { 2048+369, 6656+401 },
- { 2048+374, 6656+167 },
- { 2048+579, 6656+616 },
- { 2048+578, 6656+392 },
- { 2048+575, 6656+148 },
- }
- special.lvq_map = {
- { -- "A1" 1
- {},
- { { 440, 565 }, { 460, 771 }, { 668, 800 },},
- { { 440, 565 }, { 460, 771 }, { 668, 800 },},
- { { 440, 565 }, { 460, 771 }, { 668, 800 },},
- {{496, 401}, {494, 951}, {542, 1079}, {748, 9741},},
- {{496, 401}, {494, 951}, {542, 1079}, {748, 9741},},
- {{496, 401}, {494, 951}, {542, 1079}, {748, 9741},},
- {{496, 401}, {494, 951}, {542, 1079}, {748, 9741},},
- {{496, 401}, {494, 951}, {542, 1079}, {748, 9741},},
- {{496, 401}, {494, 951}, {542, 1079}, {748, 9741},},
- {{496, 401}, {494, 951}, {542, 1079}, {748, 9741},},
- {{496, 401}, {494, 951}, {542, 1079}, {748, 9741},},
- {{853,557}, {845,780}, {910,956},},
- {{853,557}, {845,780}, {910,956},},
- {{340, 179}, {692, 112}, {787, 256}, {898, 296},},
- {{340, 179}, {692, 112}, {787, 256}, {898, 296},},
- {{340, 179}, {692, 112}, {787, 256}, {898, 296},},
- {{340, 179}, {692, 112}, {787, 256}, {898, 296},},
- {{340, 179}, {692, 112}, {787, 256}, {898, 296},},
- {{340, 179}, {692, 112}, {787, 256}, {898, 296},},
- {{340, 179}, {692, 112}, {787, 256}, {898, 296},},
- {{224,395}, {137,894}, {206,830}, {266,1067},},
- {{224,395}, {137,894}, {206,830}, {266,1067},},
- {{224,395}, {137,894}, {206,830}, {266,1067},},
- {{405,74}},
- {{405,74}},
- {{405,74}},
- {{405,74}},
- {{405,74}},
- {{405,74}},
- {{405,74}},
- {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}},
- {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}},
- },
- { -- "A2" 2
- {},
- {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }},
- {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }},
- {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}},
- {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}},
- {{640,1437}},
- {{640,1437}},
- {{640,1437}},
- {{244,1309}, {4567,1080}, {496,885}, {798,975}, {1059,1099}, {855,1351},},
- {{244,1309}, {4567,1080}, {496,885}, {798,975}, {1059,1099}, {855,1351},},
- {{244,1309}, {4567,1080}, {496,885}, {798,975}, {1059,1099}, {855,1351},},
- {{244,1309}, {4567,1080}, {496,885}, {798,975}, {1059,1099}, {855,1351},},
- {{193,772}, {390,402}, {768,600}, {1075,789}, {1338,813},},
- {{193,772}, {390,402}, {768,600}, {1075,789}, {1338,813},},
- },
- { -- "A3" 3
- {},
- {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }},
- {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }},
- {{ 948,804 }},
- {{ 948,804 }},
- {{ 948,804 }},
- {{438, 895}, {725, 864}, {632, 671},},
- {{438, 895}, {725, 864}, {632, 671},},
- {{438, 895}, {725, 864}, {632, 671},},
- {{438, 895}, {725, 864}, {632, 671},},
- {{438, 895}, {725, 864}, {632, 671},},
- {{847, 412}, {844, 854}, {823, 757}, {433, 407},},
- {{847, 412}, {844, 854}, {823, 757}, {433, 407},},
- {{847, 412}, {844, 854}, {823, 757}, {433, 407},},
- {{847, 412}, {844, 854}, {823, 757}, {433, 407},},
- {{847, 412}, {844, 854}, {823, 757}, {433, 407},},
- {{316,168}, {497,130}, {701,157}, {858,316},},
- {{316,168}, {497,130}, {701,157}, {858,316},},
- {{316,168}, {497,130}, {701,157}, {858,316},},
- {{316,168}, {497,130}, {701,157}, {858,316},},
- {{316,168}, {497,130}, {701,157}, {858,316},},
- {{316,168}, {497,130}, {701,157}, {858,316},},
- {{316,168}, {497,130}, {701,157}, {858,316},},
- {{200,277}, {130,646}, {211,638}, {291,851},},
- {{200,277}, {130,646}, {211,638}, {291,851},},
- {{200,277}, {130,646}, {211,638}, {291,851},},
- {{100,150}},
- {{100,150}},
- {{100,150}},
- {{100,150}},
- {{100,150}},
- {{100,150}},
- },
- {}, -- 4
- {}, -- 5
- {}, -- 6
- {}, -- 7
- {}, -- 8
- {}, -- 9
- {}, -- 10
- {}, -- 11
- {}, -- 12
- {}, -- 13
- {}, -- 14
- {}, -- 15
- {}, -- 16
- {}, -- 17
- {}, -- 18
- {}, -- 19
- {}, -- 20
- { -- "B1" 21
- {},
- {{412,635}, {629,428}, {829,586},},
- {{412,635}, {629,428}, {829,586},},
- {{412,635}, {629,428}, {829,586},},
- {{329,643}, {632,349}, {905,556},},
- {{329,643}, {632,349}, {905,556},},
- {{329,643}, {632,349}, {905,556},},
- {{329,643}, {632,349}, {905,556},},
- {{329,643}, {632,349}, {905,556},},
- {{329,643}, {632,349}, {905,556},},
- {{329,643}, {632,349}, {905,556},},
- {{329,643}, {632,349}, {905,556},},
- {{866,822}, {706,224}, {247,722},},
- {{866,822}, {706,224}, {247,722},},
- {{617,948}, {353,221},},
- {{617,948}, {353,221},},
- {{617,948}, {353,221},},
- {{617,948}, {353,221},},
- {{617,948}, {353,221},},
- {{617,948}, {353,221},},
- {{617,948}, {353,221},},
- {{496,1089}, {890,1043},},
- {{496,1089}, {890,1043},},
- {{496,1089}, {890,1043},},
- {{876,1127}},
- {{876,1127}},
- {{876,1127}},
- {{876,1127}},
- {{876,1127}},
- {{876,1127}},
- {{876,1127}},
- {{876,1127}}, {{876,1127}}, {{876,1127}}, {{876,1127}}, {{876,1127}}, {{876,1127}}, {{876,1127}}, {{876,1127}}, {{876,1127}}, {{876,1127}},
- {{876,1127}}, {{876,1127}}, {{876,1127}}, {{908,87}}, {{908,87}}, {{908,87}}, {{908,87}}, {{908,87}}, {{908,87}},
- },
- { -- "B2" 22
- {},
- {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }},
- {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }},
- {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}},
- {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}},
- {{746,1438}},
- {{746,1438}},
- {{746,1438}},
- {{ 172,810}, {288,465}, {475,841}, {303,156}, {687,466},},
- {{ 172,810}, {288,465}, {475,841}, {303,156}, {687,466},},
- {{ 172,810}, {288,465}, {475,841}, {303,156}, {687,466},},
- {{ 172,810}, {288,465}, {475,841}, {303,156}, {687,466},},
- {{787,235}, {1209,382}, {1350,571}, {1240,852}, {1254,1126}, {1078,1285}, {727,1360},},
- {{787,235}, {1209,382}, {1350,571}, {1240,852}, {1254,1126}, {1078,1285}, {727,1360},},
- },
- { -- "B3" 23
- {},
- {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }},
- {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }},
- {{ 106,88 }},
- {{ 106,88 }},
- {{ 106,88 }},
- {{230, 244}, {200, 444}, {594, 408},},
- {{230, 244}, {200, 444}, {594, 408},},
- {{230, 244}, {200, 444}, {594, 408},},
- {{230, 244}, {200, 444}, {594, 408},},
- {{230, 244}, {200, 444}, {594, 408},},
- {{584,204}, {720,376}, {861,272},},
- {{584,204}, {720,376}, {861,272},},
- {{584,204}, {720,376}, {861,272},},
- {{584,204}, {720,376}, {861,272},},
- {{584,204}, {720,376}, {861,272},},
- {{566,694}, {349,574}, {198,645},},
- {{566,694}, {349,574}, {198,645},},
- {{566,694}, {349,574}, {198,645},},
- {{566,694}, {349,574}, {198,645},},
- {{566,694}, {349,574}, {198,645},},
- {{566,694}, {349,574}, {198,645},},
- {{566,694}, {349,574}, {198,645},},
- {{816,721}, {489,823},},
- {{816,721}, {489,823},},
- {{816,721}, {489,823},},
- {{772,140}},
- {{772,140}},
- {{772,140}},
- {{772,140}},
- {{772,140}},
- {{772,140}},
- },
- {}, -- 24
- {}, -- 25
- {}, -- 26
- {}, -- 27
- {}, -- 28
- {}, -- 29
- {}, -- 30
- {}, -- 31
- {}, -- 32
- {}, -- 33
- {}, -- 34
- {}, -- 35
- {}, -- 36
- {}, -- 37
- {}, -- 38
- {}, -- 39
- {}, -- 40
- { -- "C1" 41
- {},
- {{385,446}, {169,592}, {211,692}, {632,681},},
- {{385,446}, {169,592}, {211,692}, {632,681},},
- {{385,446}, {169,592}, {211,692}, {632,681},},
- {{385,374}, {227,815}, {664,771},},
- {{385,374}, {227,815}, {664,771},},
- {{385,374}, {227,815}, {664,771},},
- {{385,374}, {227,815}, {664,771},},
- {{385,374}, {227,815}, {664,771},},
- {{385,374}, {227,815}, {664,771},},
- {{385,374}, {227,815}, {664,771},},
- {{385,374}, {227,815}, {664,771},},
- {{169,362}, {368,304}, {626,409}, {187,882}, {571,858},},
- {{169,362}, {368,304}, {626,409}, {187,882}, {571,858},},
- {{178,275}, {365,242}, {644,313}, {194,950}, {559,936},},
- {{178,275}, {365,242}, {644,313}, {194,950}, {559,936},},
- {{178,275}, {365,242}, {644,313}, {194,950}, {559,936},},
- {{178,275}, {365,242}, {644,313}, {194,950}, {559,936},},
- {{178,275}, {365,242}, {644,313}, {194,950}, {559,936},},
- {{178,275}, {365,242}, {644,313}, {194,950}, {559,936},},
- {{178,275}, {365,242}, {644,313}, {194,950}, {559,936},},
- {{452,160}, {536,1034}, {184,1044},},
- {{452,160}, {536,1034}, {184,1044},},
- {{452,160}, {536,1034}, {184,1044},},
- {{137,126}},
- {{137,126}},
- {{137,126}},
- {{137,126}},
- {{137,126}},
- {{137,126}},
- {{137,126}},
- {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}},
- {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}},
- },
- { -- "C2" 42
- {},
- {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}},
- {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}},
- {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}},
- {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}},
- {{1409,139}},
- {{1409,139}},
- {{1409,139}},
- {{991,222}, {1201,525}, {613,232}, {970,751}, {1324,790},},
- {{991,222}, {1201,525}, {613,232}, {970,751}, {1324,790},},
- {{991,222}, {1201,525}, {613,232}, {970,751}, {1324,790},},
- {{991,222}, {1201,525}, {613,232}, {970,751}, {1324,790},},
- {{192,211}, {247,600}, {249,882}, {987,981}, {1018,1288}, {1303,1174},},
- {{192,211}, {247,600}, {249,882}, {987,981}, {1018,1288}, {1303,1174},},
- },
- { -- "C3" 43
- {},
- {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}},
- {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}},
- {{901,151}},
- {{901,151}},
- {{901,151}},
- {{421, 189}, {167, 353},},
- {{421, 189}, {167, 353},},
- {{421, 189}, {167, 353},},
- {{421, 189}, {167, 353},},
- {{421, 189}, {167, 353},},
- {{679,459}, {505,709},},
- {{679,459}, {505,709},},
- {{679,459}, {505,709},},
- {{679,459}, {505,709},},
- {{679,459}, {505,709},},
- {{858,638}, {234,596},},
- {{858,638}, {234,596},},
- {{858,638}, {234,596},},
- {{858,638}, {234,596},},
- {{858,638}, {234,596},},
- {{858,638}, {234,596},},
- {{858,638}, {234,596},},
- {{635,856}, {324,855},},
- {{635,856}, {324,855},},
- {{635,856}, {324,855},},
- {{136,899}},
- {{136,899}},
- {{136,899}},
- {{136,899}},
- {{136,899}},
- {{136,899}},
- },
- {}, -- 44
- {}, -- 45
- {}, -- 46
- {}, -- 47
- {}, -- 48
- {}, -- 49
- {}, -- 50
- {}, -- 51
- {}, -- 52
- {}, -- 53
- {}, -- 54
- {}, -- 55
- {}, -- 56
- {}, -- 57
- {}, -- 58
- {}, -- 59
- {}, -- 60
- }
- function BuildSkillList(job, group)
- local skill_vnum_list = {}
- local skill_name_list = {}
- if pc.get_skill_group() != 0 then
- local skill_list = special.active_skill_list[job+1][group]
- table.foreachi( skill_list,
- function(i, t)
- local lev = pc.get_skill_level(t)
- if lev > 0 then
- local name = locale.GM_SKILL_NAME_DICT[t]
- if name != nil then
- table.insert(skill_vnum_list, t)
- table.insert(skill_name_list, name)
- end
- end
- end
- )
- end
- table.insert(skill_vnum_list, 0)
- table.insert(skill_name_list, "Anuluj")
- return { skill_vnum_list, skill_name_list }
- end
- PREMIUM_EXP = 0
- PREMIUM_ITEM = 1
- PREMIUM_SAFEBOX = 2
- PREMIUM_AUTOLOOT = 3
- PREMIUM_FISH_MIND = 4
- PREMIUM_MARRIAGE_FAST = 5
- PREMIUM_GOLD = 6
- -- point type start
- POINT_NONE = 0
- POINT_LEVEL = 1
- POINT_VOICE = 2
- POINT_EXP = 3
- POINT_NEXT_EXP = 4
- POINT_HP = 5
- POINT_MAX_HP = 6
- POINT_SP = 7
- POINT_MAX_SP = 8
- POINT_STAMINA = 9 --????
- POINT_MAX_STAMINA = 10 --?? ????
- POINT_GOLD = 11
- POINT_ST = 12 --??
- POINT_HT = 13 --??
- POINT_DX = 14 --???
- POINT_IQ = 15 --???
- POINT_DEF_GRADE = 16
- POINT_ATT_SPEED = 17 --????
- POINT_ATT_GRADE = 18 --??? MAX
- POINT_MOV_SPEED = 19 --????
- POINT_CLIENT_DEF_GRADE = 20 --????
- POINT_CASTING_SPEED = 21 --???? (?????*100) / (100 + ??) = ?? ??? ??
- POINT_MAGIC_ATT_GRADE = 22 --?????
- POINT_MAGIC_DEF_GRADE = 23 --?????
- POINT_EMPIRE_POINT = 24 --????
- POINT_LEVEL_STEP = 25 --? ????? ??.. (1 2 3 ? ? ?? 4 ?? ?? ?)
- POINT_STAT = 26 --??? ?? ? ?? ??
- POINT_SUB_SKILL = 27 --?? ?? ???
- POINT_SKILL = 28 --??? ?? ???
- POINT_WEAPON_MIN = 29 --?? ?? ???
- POINT_WEAPON_MAX = 30 --?? ?? ???
- POINT_PLAYTIME = 31 --?????
- POINT_HP_REGEN = 32 --HP ???
- POINT_SP_REGEN = 33 --SP ???
- POINT_BOW_DISTANCE = 34 --? ???? ??? (meter)
- POINT_HP_RECOVERY = 35 --?? ?? ???
- POINT_SP_RECOVERY = 36 --??? ?? ???
- POINT_POISON_PCT = 37 --? ??
- POINT_STUN_PCT = 38 --?? ??
- POINT_SLOW_PCT = 39 --??? ??
- POINT_CRITICAL_PCT = 40 --???? ??
- POINT_PENETRATE_PCT = 41 --???? ??
- POINT_CURSE_PCT = 42 --?? ??
- POINT_ATTBONUS_HUMAN = 43 --???? ??
- POINT_ATTBONUS_ANIMAL = 44 --???? ??? % ??
- POINT_ATTBONUS_ORC = 45 --???? ??? % ??
- POINT_ATTBONUS_MILGYO = 46 --???? ??? % ??
- POINT_ATTBONUS_UNDEAD = 47 --???? ??? % ??
- POINT_ATTBONUS_DEVIL = 48 --??(??)?? ??? % ??
- POINT_ATTBONUS_INSECT = 49 --???
- POINT_ATTBONUS_FIRE = 50 --???
- POINT_ATTBONUS_ICE = 51 --???
- POINT_ATTBONUS_DESERT = 52 --???
- POINT_ATTBONUS_MONSTER = 53 --?? ????? ??
- POINT_ATTBONUS_WARRIOR = 54 --???? ??
- POINT_ATTBONUS_ASSASSIN = 55 --???? ??
- POINT_ATTBONUS_SURA = 56 --???? ??
- POINT_ATTBONUS_SHAMAN = 57 --???? ??
- -- ADD_TRENT_MONSTER
- POINT_ATTBONUS_TREE = 58 --???? ?? 20050729.myevan UNUSED5
- -- END_OF_ADD_TRENT_MONSTER
- POINT_RESIST_WARRIOR = 59 --???? ??
- POINT_RESIST_ASSASSIN = 60 --???? ??
- POINT_RESIST_SURA = 61 --???? ??
- POINT_RESIST_SHAMAN = 62 --???? ??
- POINT_STEAL_HP = 63 --??? ??
- POINT_STEAL_SP = 64 --??? ??
- POINT_MANA_BURN_PCT = 65 --?? ?
- --/ ??? ??? =/
- POINT_DAMAGE_SP_RECOVER = 66 --???? ? ??? ?? ??
- POINT_BLOCK = 67 --???
- POINT_DODGE = 68 --???
- POINT_RESIST_SWORD = 69
- POINT_RESIST_TWOHAND = 70
- POINT_RESIST_DAGGER = 71
- POINT_RESIST_BELL = 72
- POINT_RESIST_FAN = 73
- POINT_RESIST_BOW = 74 --?? ?? : ??? ??
- POINT_RESIST_FIRE = 75 --?? ?? : ????? ?? ??? ??
- POINT_RESIST_ELEC = 76 --?? ?? : ????? ?? ??? ??
- POINT_RESIST_MAGIC = 77 --?? ?? : ????? ?? ??? ??
- POINT_RESIST_WIND = 78 --?? ?? : ????? ?? ??? ??
- POINT_REFLECT_MELEE = 79 --?? ??
- --/ ?? ??? =/
- POINT_REFLECT_CURSE = 80 --?? ??
- POINT_POISON_REDUCE = 81 --???? ??
- --/ ? ??? =/
- POINT_KILL_SP_RECOVER = 82 --? ??? MP ??
- POINT_EXP_DOUBLE_BONUS = 83
- POINT_GOLD_DOUBLE_BONUS = 84
- POINT_ITEM_DROP_BONUS = 85
- --/ ?? ?? =/
- POINT_POTION_BONUS = 86
- POINT_KILL_HP_RECOVERY = 87
- POINT_IMMUNE_STUN = 88
- POINT_IMMUNE_SLOW = 89
- POINT_IMMUNE_FALL = 90
- --========
- POINT_PARTY_ATTACKER_BONUS = 91
- POINT_PARTY_TANKER_BONUS = 92
- POINT_ATT_BONUS = 93
- POINT_DEF_BONUS = 94
- POINT_ATT_GRADE_BONUS = 95
- POINT_DEF_GRADE_BONUS = 96
- POINT_MAGIC_ATT_GRADE_BONUS = 97
- POINT_MAGIC_DEF_GRADE_BONUS = 98
- POINT_RESIST_NORMAL_DAMAGE = 99
- POINT_HIT_HP_RECOVERY = 100
- POINT_HIT_SP_RECOVERY = 101
- POINT_MANASHIELD = 102 --???? ??? ?? ???? ?? ??
- POINT_PARTY_BUFFER_BONUS = 103
- POINT_PARTY_SKILL_MASTER_BONUS = 104
- POINT_HP_RECOVER_CONTINUE = 105
- POINT_SP_RECOVER_CONTINUE = 106
- POINT_STEAL_GOLD = 107
- POINT_POLYMORPH = 108 --??? ??? ??
- POINT_MOUNT = 109 --???? ??? ??
- POINT_PARTY_HASTE_BONUS = 110
- POINT_PARTY_DEFENDER_BONUS = 111
- POINT_STAT_RESET_COUNT = 112 --?? ?? ??? ?? ?? ?? ??? (1? 1??? ????)
- POINT_HORSE_SKILL = 113
- POINT_MALL_ATTBONUS = 114 --??? +x%
- POINT_MALL_DEFBONUS = 115 --??? +x%
- POINT_MALL_EXPBONUS = 116 --??? +x%
- POINT_MALL_ITEMBONUS = 117 --??? ??? x/10?
- POINT_MALL_GOLDBONUS = 118 --? ??? x/10?
- POINT_MAX_HP_PCT = 119 --????? +x%
- POINT_MAX_SP_PCT = 120 --????? +x%
- POINT_SKILL_DAMAGE_BONUS = 121 --?? ??? *(100+x)%
- POINT_NORMAL_HIT_DAMAGE_BONUS = 122 --?? ??? *(100+x)%
- -- DEFEND_BONUS_ATTRIBUTES
- POINT_SKILL_DEFEND_BONUS = 123 --?? ?? ???
- POINT_NORMAL_HIT_DEFEND_BONUS = 124 --?? ?? ???
- -- END_OF_DEFEND_BONUS_ATTRIBUTES
- -- PC_BANG_ITEM_ADD
- POINT_PC_BANG_EXP_BONUS = 125 --PC? ?? ??? ???
- POINT_PC_BANG_DROP_BONUS = 126 --PC? ?? ??? ???
- -- END_PC_BANG_ITEM_ADD
- -- POINT_MAX_NUM = 128 common/length.h
- -- point type start
- --[[function query(sql)
- local plik = quest_txt.."op_"..get_global_time()
- os.remove(plik)
- local sql = string.gsub(sql,"'",'"')
- os.execute("/usr/local/bin/mysql -N -L -hlocalhost -root -kociol123 --execute='"..sql.."' >> "..plik)
- local czytaj = io.open(plik)
- local quer = czytaj:read()
- czytaj:close()
- os.remove(plik)
- return quer
- end]]--
- function query(sql)
- user = "mt2"
- pw = "mt2!@#"
- local var = {}
- var.pre = ''
- if user ~= nil then
- var.pre = var.pre..' -u'..user
- end
- if pw ~= nil then
- var.pre = var.pre..' -p'..pw
- end
- var.scriptfile = 'sc_'..pc.get_name()..number(1,999)..number(2,999)..number(3,999)
- var.outputfile = 'op_'..pc.get_name()..number(1,999)..number(2,999)..number(3,999)
- sql = string.gsub(sql,'"',"'")
- var.str = "/usr/local/bin/mysql -N -L "..var.pre.." < "..var.scriptfile.." > "..var.outputfile
- script = io.open(var.scriptfile,"a+")
- script:write(sql)
- script:close()
- os.execute(var.str)
- back = io.open(var.outputfile)
- quer = back:read()
- back:flush()
- back:close()
- os.remove(var.scriptfile)
- os.remove(var.outputfile)
- return quer
- end
- function query_select(sql)
- user = "mt2"
- pw = "mt2!@#"
- local var = {}
- var.pre = ''
- var.pre = var.pre..' -u'..user
- var.pre = var.pre..' -p'..pw
- var.scriptfile = 'sc_'..pc.get_name()..number(1,999)..number(2,999)..number(3,999)
- var.outputfile = 'op_'..pc.get_name()..number(1,999)..number(2,999)..number(3,999)
- sql = string.gsub(sql,'"',"'")
- var.str = "mysql -N -L "..var.pre.." < "..var.scriptfile.." > "..var.outputfile
- script = io.open(var.scriptfile,"a+")
- script:write(sql)
- script:close()
- os.execute(var.str)
- zwroc = io.open(var.outputfile)
- quer = zwroc:read()
- zwroc:flush()
- zwroc:close()
- os.remove(var.scriptfile)
- os.remove(var.outputfile)
- if string.len(quer) <= 0 then
- return 0
- else
- return quer
- end
- end
- function mysql_query(query)
- i = 1
- math.randomseed(os.time())
- random = math.random()
- n = "/tmp/mysql_"..random..pc.get_vid()
- os.execute (MYSQL_BIN.." \""..MYSQL_CONFIG.."\" \""..query.."\" > " .. n)
- local ret = dofile(n)
- os.remove (n)
- return ret
- end
- --[[function query_update(sql)
- local sql = string.gsub(sql,"'",'"')
- os.execute("/usr/local/bin/mysql -N -L -hlocalhost -root -kociol123 --execute='"..sql.."'")
- end
- function wpis(sciezka,nazwa,text)
- io.output(sciezka..nazwa)
- io.write(text)
- io.flush()
- io.close()
- end]]--
- db_userw="mt2"
- db_passw="mt2!@#"
- db_hostw="localhost"
- function mysql_sweb(query,notselect)
- local tmp=number(11111111,99999999)
- os.execute('mysql -h '..db_hostw..' -u '..db_userw..' -p'..db_passw..' -N -e '..string.format("%q",query)..' 2>&1 > /tmp/'..tmp)
- if not notselect then
- local res,i={},1
- local f,e=io.open("/tmp/"..tmp)
- if f then
- local line=f:read("*l")
- while line do
- res[i]={}
- string.gsub(line,"([^\t]+)\t*", function(s)
- table.insert(res[i],s)
- end)
- i=i+1
- line=f:read("*l")
- end
- f:close()
- os.execute("rm /tmp/"..tmp)
- end
- return res
- end
- end
- function mysql_notsweb(query)
- return mysql_sweb(query,true)
- end
- function query_update(sql)
- local user = "mt2"
- local pw = "mt2!@#"
- local var = {}
- var.pre = ''
- var.pre = var.pre..' -u'..user
- var.pre = var.pre..' -p'..pw
- local sql = string.gsub(sql,"'",'"')
- local x = os.execute("mysql -N -L "..var.pre.." --execute='"..sql.."'")
- if x == 1 then
- return 1
- else
- return 0
- end
- end
- ----SQL---
- ---U?tkownik---
- mysql_user = "pmt2"
- mysql_pass = "pmt2"
- mysql_host = "localhost"
- ---------------------
- --[[function query_array(sql) -- /usr/local/bin/ przed mysql je?li nie dzia?
- local plik = quest_txt.."op_"..get_global_time()
- os.remove(plik)
- local sql = string.gsub(sql,"'",'"')
- os.execute("/usr/local/bin/mysql -N -L -hlocalhost -root -kociol123 --execute='"..sql.."' >> "..plik)
- local arr = {}
- for rekord in io.lines(plik) do
- table.insert(arr, rekord)
- end
- os.remove(plik)
- return arr
- end]]--
- function query_array(sql)
- user = "mt2"
- pw = "mt2!@#"
- local var = {}
- var.pre = ''
- var.pre = var.pre..' -u'..user
- var.pre = var.pre..' -p'..pw
- var.scriptfile = 'sc_'..pc.get_name()..number(1,999)..number(2,999)..number(3,999)
- var.outputfile = 'op_'..pc.get_name()..number(1,999)..number(2,999)..number(3,999)
- sql = string.gsub(sql,'"',"'")
- var.str = "mysql -N -L "..var.pre.." < "..var.scriptfile.." > "..var.outputfile
- script = io.open(var.scriptfile,"a+")
- script:write(sql)
- script:close()
- os.execute(var.str)
- local arr = {}
- for rekord in io.lines(var.outputfile) do
- table.insert(arr, rekord)
- end
- os.remove(var.scriptfile)
- os.remove(var.outputfile)
- if table.getn(arr) <= 0 then
- return 0
- else
- return arr
- end
- end
- function get_input(par)
- cmdchat("GetInputStart")
- local ret = input(cmdchat(par))
- cmdchat("GetInputStop")
- return ret
- end
- function npc.name()
- say_arbuz(mob_name(npc.get_race())..": ")
- end
- QuestFolder = get_locale_base_path().."/quest/"
- PetSystem = {['Folder'] = QuestFolder.."io/pet/", ['ItemExp'] = 4000000, ['UpdateFrequency'] = 30, ['Flag'] = "active_pet", ['ExpFlag'] = "exp_blocked"}
- -- Pet 1
- PetSystem[1] =
- {['Name'] = "Ognisty Feniks", ['Level'] = 22, ['Item'] = 53001, ['MaxLevel'] = 99, ['WindowSize'] = 395,
- ['Skill']= {
- {['type']=apply.MAX_HP,['name']="Punkty Witalności",['max_points']=50,['min_level']=1,['desc']="+6000HP",['mult']=6000,['tag']=" HP"},
- {['type']=apply.INT,['name']="Punkty Inteligencji",['max_points']=10,['min_level']=1,['desc']="+1 Int",['mult']=1,['tag']=" Int"},
- {['type']=apply.STR,['name']="Punkty Siły",['max_points']=10,['min_level']=1,['desc']="+1 Siły",['mult']=1,['tag']=" Siły"},
- {['type']=apply.DEX,['name']="Punkty Zręczności",['max_points']=10,['min_level']=1,['desc']="+1 Zrę ",['mult']=1,['tag']=" Zrę "},
- {['type']=apply.ATTBONUS_MONSTER,['name']="Silny przeciwko Potworom ",['max_points']=10,['min_level']=1,['desc']="+4% silny przeciwko potworom",['mult']=4,['tag']="%"},
- },
- ['ExpTable'] = {3000,6000,9000,12000,15000,18000,21000,24000,27000,30000, -- Liv 1-10
- 66000,72000,78000,84000,90000,96000,102000,108000,101400,120000, -- Liv 11-20
- 126000,132000,138000,144000,150000,156000,162000,168000,174000,180000, -- Liv 21-30
- 186000,202000,208000,214000,220000,226000,232000,238000,244000,480000, -- Liv 31-40
- 492000,504000,516000,528000,540000,552000,564000,576000,588000,650000, -- Liv 41-50
- 153000,156000,159000,162000,165000,168000,171000,174000,177000,180000, -- Liv 51-60
- 183000,186000,189000,192000,195000,198000,201000,204000,207000,210000, -- Liv 61-70
- 213000,216000,219000,222000,225000,228000,231000,234000,237000,240000, -- Liv 71-80
- 243000,246000,249000,252000,255000,258000,261000,264000,267000,270000, -- Liv 81-90
- 273000,276000,279000,282000,285000,288000,291000,294000,297000,300000, -- Liv 91-100
- 3030000,3060000,3090000,3120000,3150000,3180000,3210000,3240000,3270000,0 -- Liv 101-110
- }
- }
- -- Pet 2
- PetSystem[2] =
- {['Name'] = "Lodowy Feniks", ['Level'] = 23, ['Item'] = 53003, ['MaxLevel'] = 99, ['WindowSize'] = 395,
- ['Skill']= {
- {['type']=apply.MAX_HP,['name']="Punkty Witalności",['max_points']=50,['min_level']=1,['desc']="+6000HP",['mult']=6000,['tag']=" HP"},
- {['type']=apply.INT,['name']="Punkty Inteligencji",['max_points']=10,['min_level']=1,['desc']="+1 Int",['mult']=1,['tag']=" Int"},
- {['type']=apply.STR,['name']="Punkty Siły",['max_points']=10,['min_level']=1,['desc']="+1 Siły",['mult']=1,['tag']=" Siły"},
- {['type']=apply.DEX,['name']="Punkty Zręczności",['max_points']=10,['min_level']=1,['desc']="+1 Zrę ",['mult']=1,['tag']=" Zrę "},
- {['type']=apply.ATTBONUS_MONSTER,['name']="Silny przeciwko Potworom ",['max_points']=10,['min_level']=1,['desc']="+4% silny przeciwko potworom",['mult']=4,['tag']="%"},
- },
- ['ExpTable'] = {3000,6000,9000,12000,15000,18000,21000,24000,27000,30000, -- Liv 1-10
- 66000,72000,78000,84000,90000,96000,102000,108000,101400,120000, -- Liv 11-20
- 126000,132000,138000,144000,150000,156000,162000,168000,174000,180000, -- Liv 21-30
- 186000,202000,208000,214000,220000,226000,232000,238000,244000,480000, -- Liv 31-40
- 492000,504000,516000,528000,540000,552000,564000,576000,588000,650000, -- Liv 41-50
- 153000,156000,159000,162000,165000,168000,171000,174000,177000,180000, -- Liv 51-60
- 183000,186000,189000,192000,195000,198000,201000,204000,207000,210000, -- Liv 61-70
- 213000,216000,219000,222000,225000,228000,231000,234000,237000,240000, -- Liv 71-80
- 243000,246000,249000,252000,255000,258000,261000,264000,267000,270000, -- Liv 81-90
- 273000,276000,279000,282000,285000,288000,291000,294000,297000,300000, -- Liv 91-100
- 3030000,3060000,3090000,3120000,3150000,3180000,3210000,3240000,3270000,0 -- Liv 101-110
- }
- }
- -- Pet 3
- PetSystem[3] =
- {['Name'] = "Bao Bao", ['Level'] = 24, ['Item'] = 53002, ['MaxLevel'] = 99, ['WindowSize'] = 395,
- ['Skill']= {
- {['type']=apply.MAX_HP,['name']="Punkty Witalności",['max_points']=50,['min_level']=1,['desc']="+6000HP",['mult']=6000,['tag']=" HP"},
- {['type']=apply.INT,['name']="Punkty Inteligencji",['max_points']=10,['min_level']=1,['desc']="+1 Int",['mult']=1,['tag']=" Int"},
- {['type']=apply.STR,['name']="Punkty Siły",['max_points']=10,['min_level']=1,['desc']="+1 Siły",['mult']=1,['tag']=" Siły"},
- {['type']=apply.DEX,['name']="Punkty Zręczności",['max_points']=10,['min_level']=1,['desc']="+1 Zrę ",['mult']=1,['tag']=" Zrę "},
- {['type']=apply.ATTBONUS_MONSTER,['name']="Silny przeciwko Potworom ",['max_points']=10,['min_level']=1,['desc']="+4% silny przeciwko potworom",['mult']=4,['tag']="%"},
- },
- ['ExpTable'] = {3000,6000,9000,12000,15000,18000,21000,24000,27000,30000, -- Liv 1-10
- 66000,72000,78000,84000,90000,96000,102000,108000,101400,120000, -- Liv 11-20
- 126000,132000,138000,144000,150000,156000,162000,168000,174000,180000, -- Liv 21-30
- 186000,202000,208000,214000,220000,226000,232000,238000,244000,480000, -- Liv 31-40
- 492000,504000,516000,528000,540000,552000,564000,576000,588000,650000, -- Liv 41-50
- 153000,156000,159000,162000,165000,168000,171000,174000,177000,180000, -- Liv 51-60
- 183000,186000,189000,192000,195000,198000,201000,204000,207000,210000, -- Liv 61-70
- 213000,216000,219000,222000,225000,228000,231000,234000,237000,240000, -- Liv 71-80
- 243000,246000,249000,252000,255000,258000,261000,264000,267000,270000, -- Liv 81-90
- 273000,276000,279000,282000,285000,288000,291000,294000,297000,300000, -- Liv 91-100
- 3030000,3060000,3090000,3120000,3150000,3180000,3210000,3240000,3270000,0 -- Liv 101-110
- }
- }
- -- Pet 4
- PetSystem[4] =
- {['Name'] = "Azraeluś ", ['Level'] = 25, ['Item'] = 53005, ['MaxLevel'] = 25, ['WindowSize'] = 395,
- ['Skill']= {
- {['type']=apply.RESBONUS_WARRIOR,['name']="Odporność na Wojownikow",['max_points']=5,['min_level']=1,['desc']="+1% odporności na Wojownika",['mult']=1,['tag']="%"},
- {['type']=apply.RESBONUS_ASSASSIN,['name']="Odporność na Ninje",['max_points']=5,['min_level']=1,['desc']="+1% odporności na Nije",['mult']=1,['tag']="%"},
- {['type']=apply.RESBONUS_SURA,['name']="Odporność na Sure",['max_points']=5,['min_level']=1,['desc']="+1% odporności na Sure",['mult']=1,['tag']="%"},
- {['type']=apply.RESBONUS_SHAMAN,['name']="Odporność na Szamana",['max_points']=5,['min_level']=1,['desc']="+1% odporności na Szamana",['mult']=1,['tag']="%"},
- {['type']=apply.ATTBONUS_HUMAN,['name']="Silny przeciwko Ludziom",['max_points']=5,['min_level']=1,['desc']="+1% Silny Przeciwko ludziom",['mult']=1,['tag']="%"}
- },
- ['ExpTable'] = {300000,600000,900000,1200000,1500000,1800000,2100000,2400000,2700000,3000000, -- Liv 1-10
- 6600000,7200000,7800000,8400000,9000000,9600000,10200000,10800000,10140000,12000000, -- Liv 11-20
- 12600000,13200000,13800000,14400000,15000000,15600000,16200000,16800000,17400000,18000000, -- Liv 21-30
- }
- }
- -- Pet 5
- PetSystem[5] =
- {['Name'] = "Rufus", ['Level'] = 26, ['Item'] = 53008, ['MaxLevel'] = 99, ['WindowSize'] = 395,
- ['Skill']= {
- {['type']=apply.MAX_HP,['name']="Punkty Witalności",['max_points']=30,['min_level']=1,['desc']="+10000HP",['mult']=10000,['tag']=" HP"},
- {['type']=apply.RESBONUS_WARRIOR,['name']="Odporność na Wojownikow ",['max_points']=5,['min_level']=20,['desc']="+1% Odporności na Wojowników",['mult']=1,['tag']="%"},
- {['type']=apply.ATTBONUS_WARRIOR,['name']="Silny przeciwko Wojownikom ",['max_points']=5,['min_level']=20,['desc']="+1 Silny przeciwnko Wojownikom",['mult']=1,['tag']="%"},
- {['type']=apply.CAST_SPEED,['name']="Szybkość Zaklęcia",['max_points']=20,['min_level']=40,['desc']="+1% Szybkości zaklęcia",['mult']=1,['tag']="%"},
- {['type']=apply.ATTBONUS_HUMAN,['name']="Silny przeciwko Ludziom",['max_points']=15,['min_level']=60,['desc']="+1% Silny przeciwko ludziom",['mult']=1,['tag']="%"}
- },
- ['ExpTable'] = {3000,6000,9000,12000,15000,18000,21000,24000,27000,30000, -- Liv 1-10
- 66000,72000,78000,84000,90000,96000,102000,108000,101400,120000, -- Liv 11-20
- 126000,132000,138000,144000,150000,156000,162000,168000,174000,180000, -- Liv 21-30
- 186000,202000,208000,214000,220000,226000,232000,238000,244000,480000, -- Liv 31-40
- 492000,504000,516000,528000,540000,552000,564000,576000,588000,650000, -- Liv 41-50
- 153000,156000,159000,162000,165000,168000,171000,174000,177000,180000, -- Liv 51-60
- 183000,186000,189000,192000,195000,198000,201000,204000,207000,210000, -- Liv 61-70
- 213000,216000,219000,222000,225000,228000,231000,234000,237000,240000, -- Liv 71-80
- 243000,246000,249000,252000,255000,258000,261000,264000,267000,270000, -- Liv 81-90
- 273000,276000,279000,282000,285000,288000,291000,294000,297000,300000, -- Liv 91-100
- 3030000,3060000,3090000,3120000,3150000,3180000,3210000,3240000,3270000,0 -- Liv 101-110
- }
- }
- -- Pet 6
- PetSystem[6] =
- {['Name'] = "Lwiątko", ['Level'] = 27, ['Item'] = 53006, ['MaxLevel'] = 99, ['WindowSize'] = 395,
- ['Skill']= {
- {['type']=apply.MAX_HP,['name']="Punkty Witalności",['max_points']=30,['min_level']=1,['desc']="+10000HP",['mult']=10000,['tag']=" HP"},
- {['type']=apply.RESBONUS_ASSASSIN,['name']="Odporność na Ninja ",['max_points']=5,['min_level']=20,['desc']="+Odporność na Ninja",['mult']=1,['tag']="%"},
- {['type']=apply.ATTBONUS_ASSASSIN,['name']="Silny przeciwko Ninja",['max_points']=5,['min_level']=20,['desc']="+1 Silny przeciwko Ninja",['mult']=1,['tag']="%"},
- {['type']=apply.CAST_SPEED,['name']="Szybkość Zaklęcia",['max_points']=20,['min_level']=40,['desc']="+1% Szybkość zaklęcia",['mult']=1,['tag']="%"},
- {['type']=apply.ATTBONUS_HUMAN,['name']="Silny przeciwko Ludziom",['max_points']=15,['min_level']=60,['desc']="+1% Silny przeciwko ludziom",['mult']=1,['tag']="%"}
- },
- ['ExpTable'] = {3000,6000,9000,12000,15000,18000,21000,24000,27000,30000, -- Liv 1-10
- 66000,72000,78000,84000,90000,96000,102000,108000,101400,120000, -- Liv 11-20
- 126000,132000,138000,144000,150000,156000,162000,168000,174000,180000, -- Liv 21-30
- 186000,202000,208000,214000,220000,226000,232000,238000,244000,480000, -- Liv 31-40
- 492000,504000,516000,528000,540000,552000,564000,576000,588000,650000, -- Liv 41-50
- 153000,156000,159000,162000,165000,168000,171000,174000,177000,180000, -- Liv 51-60
- 183000,186000,189000,192000,195000,198000,201000,204000,207000,210000, -- Liv 61-70
- 213000,216000,219000,222000,225000,228000,231000,234000,237000,240000, -- Liv 71-80
- 243000,246000,249000,252000,255000,258000,261000,264000,267000,270000, -- Liv 81-90
- 273000,276000,279000,282000,285000,288000,291000,294000,297000,300000, -- Liv 91-100
- 3030000,3060000,3090000,3120000,3150000,3180000,3210000,3240000,3270000,0 -- Liv 101-110
- }
- }
- -- Pet 7
- PetSystem[7] =
- {['Name'] = "Boczuś ", ['Level'] = 28, ['Item'] = 53009, ['MaxLevel'] = 99, ['WindowSize'] = 395,
- ['Skill']= {
- {['type']=apply.MAX_HP,['name']="Punkty Witalności",['max_points']=30,['min_level']=1,['desc']="+10000HP",['mult']=10000,['tag']=" HP"},
- {['type']=apply.RESBONUS_SURA,['name']="Odporność na Sura",['max_points']=5,['min_level']=20,['desc']="+1% Odporność na Sura",['mult']=1,['tag']="%"},
- {['type']=apply.ATTBONUS_SURA,['name']="Silny przeciwko Sura",['max_points']=5,['min_level']=20,['desc']="+1 Silny przeciwko Sura",['mult']=1,['tag']="%"},
- {['type']=apply.CAST_SPEED,['name']="Szybkość Zaklęcia",['max_points']=20,['min_level']=40,['desc']="+1% Szybkość zaklęcia",['mult']=1,['tag']="%"},
- {['type']=apply.ATTBONUS_HUMAN,['name']="Silny przeciwko Ludziom",['max_points']=15,['min_level']=60,['desc']="+1% DH",['mult']=1,['tag']="%"}
- },
- ['ExpTable'] = {3000,6000,9000,12000,15000,18000,21000,24000,27000,30000, -- Liv 1-10
- 66000,72000,78000,84000,90000,96000,102000,108000,101400,120000, -- Liv 11-20
- 126000,132000,138000,144000,150000,156000,162000,168000,174000,180000, -- Liv 21-30
- 186000,202000,208000,214000,220000,226000,232000,238000,244000,480000, -- Liv 31-40
- 492000,504000,516000,528000,540000,552000,564000,576000,588000,650000, -- Liv 41-50
- 153000,156000,159000,162000,165000,168000,171000,174000,177000,180000, -- Liv 51-60
- 183000,186000,189000,192000,195000,198000,201000,204000,207000,210000, -- Liv 61-70
- 213000,216000,219000,222000,225000,228000,231000,234000,237000,240000, -- Liv 71-80
- 243000,246000,249000,252000,255000,258000,261000,264000,267000,270000, -- Liv 81-90
- 273000,276000,279000,282000,285000,288000,291000,294000,297000,300000, -- Liv 91-100
- 3030000,3060000,3090000,3120000,3150000,3180000,3210000,3240000,3270000,0 -- Liv 101-110
- }
- }
- -- Pet 8
- PetSystem[8] =
- {['Name'] = "Tygrysiątko", ['Level'] = 29, ['Item'] = 53007, ['MaxLevel'] = 99, ['WindowSize'] = 395,
- ['Skill']= {
- {['type']=apply.MAX_HP,['name']="Punkty Witalności",['max_points']=30,['min_level']=1,['desc']="+10000HP",['mult']=10000,['tag']=" HP"},
- {['type']=apply.RESBONUS_SHAMAN,['name']="Odporność na Szaman",['max_points']=15,['min_level']=20,['desc']="+1% Odporność na Szamanów",['mult']=1,['tag']="%"},
- {['type']=apply.ATTBONUS_SHAMAN,['name']="Silny przeciwko Szaman",['max_points']=15,['min_level']=20,['desc']="+1 Silny przeciwko Szaman",['mult']=1,['tag']="%"},
- {['type']=apply.CAST_SPEED,['name']="Szybkość Zaklęcia",['max_points']=20,['min_level']=40,['desc']="+1% Szybkość zaklęcia",['mult']=1,['tag']="%"},
- {['type']=apply.ATTBONUS_HUMAN,['name']="Silny przeciwko Ludziom",['max_points']=15,['min_level']=60,['desc']="+1% Silny przeciwko Ludziom",['mult']=1,['tag']="%"}
- },
- ['ExpTable'] = {3000,6000,9000,12000,15000,18000,21000,24000,27000,30000, -- Liv 1-10
- 66000,72000,78000,84000,90000,96000,102000,108000,101400,120000, -- Liv 11-20
- 126000,132000,138000,144000,150000,156000,162000,168000,174000,180000, -- Liv 21-30
- 186000,202000,208000,214000,220000,226000,232000,238000,244000,480000, -- Liv 31-40
- 492000,504000,516000,528000,540000,552000,564000,576000,588000,650000, -- Liv 41-50
- 153000,156000,159000,162000,165000,168000,171000,174000,177000,180000, -- Liv 51-60
- 183000,186000,189000,192000,195000,198000,201000,204000,207000,210000, -- Liv 61-70
- 213000,216000,219000,222000,225000,228000,231000,234000,237000,240000, -- Liv 71-80
- 243000,246000,249000,252000,255000,258000,261000,264000,267000,270000, -- Liv 81-90
- 273000,276000,279000,282000,285000,288000,291000,294000,297000,300000, -- Liv 91-100
- 3030000,3060000,3090000,3120000,3150000,3180000,3210000,3240000,3270000,0 -- Liv 101-110
- }
- }
- --**
- --** Menu Pet
- --**
- function PetSystem.ShowMenu(PetIndex)
- if horse.is_mine() then
- local pet_menu
- if pc.getqf("exp_blocked") == 0 then
- pet_menu = {"Umiejętności","Blokada Doswiadczenia","Status","Odwołaj","Zamknij"}
- else
- pet_menu = {"Umiejętności","Odblokowanie doswiadczenia","Status'","Odwołaj","Zamknij"}
- end
- say_title("Towarzysz: "..PetSystem[PetIndex].Name)
- local skill_points, liv, ex = PetSystem.ReadStatus(PetIndex)
- say_light_yellow("Poziom: "..liv.." / "..PetSystem[PetIndex].MaxLevel.." - Punkty umiejętności: "..skill_points.."")
- if not PetSystem.IsExpBlocked() then
- say_light_yellow("Doświadczenie: "..ex.." / "..PetSystem[PetIndex].ExpTable[liv].." (Odblokowane)")
- else
- say_light_yellow("Doświadczenie: "..ex.." / "..PetSystem[PetIndex].ExpTable[liv].." (Zablokowane)")
- end
- local s = select_table(pet_menu)
- if s == 1 then
- say_title("Tutaj możesz dodać punkty umiejętności swojemu pupilowi: "..PetSystem[PetIndex].Name.."")
- say_orange("Twoje punkty umiejętności: "..skill_points.."")
- say("[ENTER]Co chcesz zrobić:[ENTER]")
- local a = select("Dodaj umiejętność","Odejmij umiejętność","Anuluj")
- if a == 3 then
- return
- elseif a == 1 then
- say_title("Dodawanie Umiejętności")
- if skill_points == 0 then
- say("Aktualnie nie masz żadnych punktów do dodania.[ENTER]")
- return
- end
- local skill_value = {}
- local menu_abi = {}
- skill_value = PetSystem.LoadSkill(PetIndex)
- for i = 1, table.getn(PetSystem[PetIndex].Skill) do
- if liv >= PetSystem[PetIndex].Skill[i].min_level then
- table.insert(menu_abi, PetSystem[PetIndex].Skill[i].name..": "..skill_value[i].." punktów")
- end
- end
- table.insert(menu_abi, "Anuluj")
- if table.getn(menu_abi) == 1 then
- say("Il n'est pas possible d'augmenter.[ENTER]")
- return
- end
- say("Wybierz w co chcesz dodać punkty umiejętności:")
- local s = select_table(menu_abi)
- if s == table.getn(menu_abi) then
- return
- end
- say_title(PetSystem[PetIndex].Skill[s].name)
- say_orange("Aktualnie dodanych punktów: "..skill_value[s].." [ENTER]")
- if skill_value[s] == PetSystem[PetIndex].Skill[s].max_points then
- say("Ta umięjętność jest już ulepszona maksymalnie!.[ENTER]")
- return
- end
- say_light_blue("Jeden punkt dodaje: "..PetSystem[PetIndex].Skill[s].desc.."")
- say_light_blue("Maksymalna liczba punktów: "..PetSystem[PetIndex].Skill[s].max_points.."[ENTER]")
- local a = select("Dalej", "Anuluj")
- if a == 2 then
- return
- end
- say_title(PetSystem[PetIndex].Skill[s].name)
- say("Ile punktów chcesz dodać? Wpisz liczbę![ENTER]")
- local points = tonumber(input())
- say_title(PetSystem[PetIndex].Skill[s].name)
- if points == nil or points < 1 then
- say("Wprowadziłeś nieprawidłową wartość.[ENTER]")
- return
- elseif points > skill_points then
- say("Nie posiadasz tak dużej ilości punktów.[ENTER]")
- return
- elseif (skill_value[s]+points) > PetSystem[PetIndex].Skill[s].max_points then
- say("Po dodaniu tylu punktów poziom umiejętności")
- say("byłby za wysoki!")
- return
- elseif string.find(points, "nan") or string.find(points, "NaN") or string.find(points, "naN") or string.find(points, "NAn") or string.find(points, "nAn") or string.find(points, "Nan") or points < 1 then
- say("Wprowadziłeś nieprawidłową wartość.[ENTER]")
- return
- end
- skill_value[s] = skill_value[s]+points
- PetSystem.ChangeSkillPoints(PetIndex, -points)
- PetSystem.SaveSkill(PetIndex, skill_value)
- PetSystem.AddBonus(PetIndex)
- say("Punkty umiejętności zostału pomyślnie dodane.[ENTER]")
- ----------********** Diminuer Habilite' ***********----------
- elseif a == 2 then
- say_title("Odejmowanie umiejętności")
- local skill_value = {}
- local menu_abi = {}
- skill_value = PetSystem.LoadSkill(PetIndex)
- for i = 1, table.getn(PetSystem[PetIndex].Skill) do
- if liv >= PetSystem[PetIndex].Skill[i].min_level then
- table.insert(menu_abi, PetSystem[PetIndex].Skill[i].name..": "..skill_value[i].." punktów")
- end
- end
- table.insert(menu_abi, "Anuluj")
- if table.getn(menu_abi) == 1 then
- say("Il n'est pas possible de diminuer.[ENTER]")
- return
- end
- say("Wybierz od której umiejętności chcesz odjąć punkty:")
- local s = select_table(menu_abi)
- if s == table.getn(menu_abi) then
- return
- end
- say_title(PetSystem[PetIndex].Skill[s].name)
- say_orange("Punkty dodane w tę umiejętność: "..skill_value[s].."")
- if skill_value[s] == 0 then
- say("Aktualnie nie masz żadnych punktów dodanych w tę umiejętność.[ENTER]")
- return
- end
- say("Co chcesz zrobić?[ENTER]")
- local b = select("Odejmij 1 punkt","Odejmij wszystkie","Anuluj")
- if b == 3 then
- return
- elseif b == 1 then
- say_title(PetSystem[PetIndex].Skill[s].name)
- say("Czy napewno chcesz odjąć 1 punkt")
- say("od tej umiejętności?[ENTER]")
- local c = select("Tak","Nie")
- if c == 2 then
- return
- end
- PetSystem.ChangeSkillPoints(PetIndex, 1)
- skill_value[s] = skill_value[s]-1
- PetSystem.SaveSkill(PetIndex, skill_value)
- PetSystem.AddBonus(PetIndex)
- say_title(PetSystem[PetIndex].Skill[s].name)
- say("Punkt został odjęte pomyślnie.[ENTER]")
- elseif b == 2 then
- say_title(PetSystem[PetIndex].Skill[s].name)
- say("Czy napewno chcesz odjać wszystkie punkty dla tej umiejętności?[ENTER]")
- local c = select("Tak","Nie")
- if c == 2 then
- return
- end
- PetSystem.ChangeSkillPoints(PetIndex, skill_value[s])
- skill_value[s] = 0
- PetSystem.SaveSkill(PetIndex, skill_value)
- PetSystem.AddBonus(PetIndex)
- say_title(PetSystem[PetIndex].Skill[s].name)
- say("Wszystkie punkty dla tej umiejętności zostały odjęte![ENTER]")
- end
- end
- ----------********** Bloquer/Debloquer Experience ***********----------
- elseif s == 2 then
- if not PetSystem.IsExpBlocked() then
- say_title("Blokada doświadczenia")
- say("Dzięki blokadzie doświadczenia Twój pupil nie będzie dostawał ")
- say("doświadczenia a Ty nie będziesz go tracić.[ENTER]")
- local a = select("Blokuj","Anuluj")
- if a == 2 then
- return
- end
- say_title("Blokada Doświadczenia")
- say("Doświadczenie zostało zablokowane.[ENTER]")
- PetSystem.BlockExp()
- else
- say_title("Odblokuj doświadczenie")
- say("Czy napewno chcesz odblokować doświadczenie dla pupila?[ENTER]")
- local a = select("Tak","Nie")
- if a == 2 then
- return
- end
- say_title("Odblokuj doświadczenie")
- say("Doświadczenie dla Twojego pupila zostało odblokowane.[ENTER]")
- PetSystem.UnblockExp()
- pc.setqf("current_exp", pc.get_exp())
- end
- ----------********** Statut Habilite' Pet ***********----------
- elseif s == 3 then
- local skill_value = {}
- skill_value = PetSystem.LoadSkill(PetIndex)
- say_title("Stan gotowy - pupil "..PetSystem[PetIndex].Name.."")
- say_light_blue("Zdrowie: "..horse.get_health_pct().."%")
- say("")
- for i = 1, table.getn(PetSystem[PetIndex].Skill) do
- if liv >= PetSystem[PetIndex].Skill[i].min_level then
- local total = skill_value[i]*PetSystem[PetIndex].Skill[i].mult
- say_light_yellow(PetSystem[PetIndex].Skill[i].name..": level "..skill_value[i]..". Bonus: "..total..PetSystem[PetIndex].Skill[i].tag)
- end
- end
- say("")
- ----------********** Le renvoyer Pet ***********----------
- elseif s == 4 then
- PetSystem.PetBack()
- elseif s == 5 then
- return
- end
- PetSystem.pokaz_gui(2)
- end
- end
- --**
- --** Le renvoyer le pet
- --**
- function PetSystem.PetBack()
- cleartimer("give_exp")
- pet.unsummon()
- PetSystem.RemoveBonus()
- PetSystem.SetInactive()
- pc.setqf("petindex", 0)
- chat("Twój pupil został odesłany...")
- cmdchat("PetZamnkij")
- item.set_socket(0, 0)
- end
- --**
- --** Carica le abilita' del pet specificato
- --**
- function PetSystem.LoadSkill(PetIndex)
- local FileName = PetSystem.Folder..pc.getqf("id").."_skills"
- local PetSkill = {}
- if io.open(FileName, "r") == nil then
- io.output(FileName)
- for i = 1,table.getn(PetSystem[PetIndex].Skill) do
- io.write("0\n")
- table.insert(PetSkill, 0)
- end
- io.flush()
- io.close()
- return PetSkill
- end
- for line in io.lines(FileName) do
- table.insert(PetSkill, tonumber(line))
- end
- return PetSkill
- end
- --**
- --** Salva le abilita' del pet specificato
- --**
- function PetSystem.SaveSkill(PetIndex, SkillList)
- local FileName = PetSystem.Folder..pc.getqf("id").."_skills"
- io.output(FileName)
- for i,v in ipairs(SkillList) do
- io.write(tostring(v).."\n")
- end
- io.flush()
- io.close()
- end
- --**
- --** Legge lo stato del pet specificato
- --**
- function PetSystem.ReadStatus(petIndex)
- local FileName = PetSystem.Folder..pc.getqf("id").."_stats"
- local skill, liv, ex
- if io.open(FileName, "r") != nil then
- io.input(FileName)
- skill = tonumber(io.read())
- liv = tonumber(io.read())
- ex = tonumber(io.read())
- io.input():close()
- else
- io.output(FileName)
- io.write("0\n1\n0\n")
- io.flush()
- io.close()
- skill = 0
- liv = 1
- ex = 0
- end
- return skill, liv, ex
- end
- --**
- --** Legge il livello del pet specificato
- --**
- function PetSystem.GetLevel(petIndex)
- local FileName = PetSystem.Folder..pc.getqf("id").."_stats"
- local liv
- if io.open(FileName, "r") != nil then
- io.input(FileName)
- io.read()
- liv = tonumber(io.read())
- io.input():close()
- else
- liv = 1
- end
- return liv
- end
- --**
- --** Modifica i punti abilit? del pet specificato
- --**
- function PetSystem.ChangeSkillPoints(PetIndex, amount)
- local FileName = PetSystem.Folder..pc.getqf("id").."_stats"
- local skill, liv, ex
- if io.open(FileName, "r") != nil then
- io.input(FileName)
- skill = tonumber(io.read())
- liv = tonumber(io.read())
- ex = tonumber(io.read())
- skill = skill+amount
- io.input():close()
- else
- skill = amount
- end
- io.output(FileName)
- io.write(tostring(skill).."\n")
- io.write(tostring(liv).."\n")
- io.write(tostring(ex).."\n")
- io.flush()
- io.close()
- end
- --**
- --** D? Experience al pet specificato
- --**
- function PetSystem.GiveExp(petIndex, amount)
- local FileName = PetSystem.Folder..pc.getqf("id").."_stats"
- local skill, liv, ex
- local horse_lev = horse.get_level()
- local horse_name = horse.get_name()
- if io.open(FileName, "r") != nil then
- io.input(FileName)
- skill = tonumber(io.read())
- liv = tonumber(io.read())
- ex = tonumber(io.read())
- ex = ex+amount
- io.input():close()
- else
- skill = 0
- liv = 1
- ex = amount
- end
- if liv == PetSystem[petIndex].MaxLevel then
- return false
- end
- if ex > PetSystem[petIndex].ExpTable[liv] then
- ex = ex-PetSystem[petIndex].ExpTable[liv]
- skill = skill+1
- liv = liv+1
- if liv == PetSystem[petIndex].MaxLevel then
- ex = 0
- chat("Twój pupil osiągnał maksynalny poziom!!")
- else
- chat("Twój pupil awansował na poziom "..liv.."!")
- end
- PetSystem.SetHorseData(PetSystem[petIndex].Level, "Lv"..PetSystem.GetLevel(petIndex).." "..PetSystem[petIndex].Name)
- pet.summon()
- PetSystem.SetHorseData(horse_lev, horse_name)
- chat("Zwierzak otrzymał jeden punkt umiejętności!")
- if PetSystem.NewSkillLearnt(petIndex, liv) then
- send_letter("Nowa umiejętność ")
- end
- end
- io.output(FileName)
- io.write(tostring(skill).."\n")
- io.write(tostring(liv).."\n")
- io.write(tostring(ex).."\n")
- io.flush()
- io.close()
- return true
- end
- --**
- --** Aggiunge i bonus del Pet specificato in base ai Point Habilite assegnati
- --**
- function PetSystem.AddBonus(PetIndex)
- PetSystem.RemoveBonus()
- local SkillList = {}
- SkillList = PetSystem.LoadSkill(PetIndex)
- for i = 1,table.getn(SkillList) do
- affect.add_hair(PetSystem[PetIndex].Skill[i].type, SkillList[i]*PetSystem[PetIndex].Skill[i].mult, 60*60*24*365)
- end
- end
- --**
- --** Rimuove i bonus del Pet
- --**
- function PetSystem.RemoveBonus()
- affect.remove(520)
- end
- --**
- --** Imposta nome e livello al cavallo
- --**
- function PetSystem.SetHorseData(level, name)
- horse.set_name(name)
- horse.set_level(level)
- end
- --**
- --** Controlla se il livello del cavallo e' associato a un pet
- --**
- function PetSystem.IsPetLevel(level)
- for i = 1,PetSystem.GetPetNumber() do
- if level == PetSystem[i].Level then
- return true
- end
- end
- return false
- end
- --**
- --** Controlla se il pet ha imparato una nuova abilit?
- --**
- function PetSystem.NewSkillLearnt(PetIndex, PetLevel)
- for i = 1,table.getn(PetSystem[PetIndex].Skill) do
- if PetLevel == PetSystem[PetIndex].Skill[i].min_level then
- return true
- end
- end
- return false
- end
- --**
- --** Ritorna il numero totale di pet definiti
- --**
- function PetSystem.GetPetNumber()
- return table.getn(PetSystem)
- end
- --** Imposta il pet attivo
- function PetSystem.SetActivePet(petIndex)
- pc.setqf(PetSystem.Flag, petIndex)
- end
- --** Ritorna se il pet system ? attivo
- function PetSystem.IsActive()
- return (pc.getqf(PetSystem.Flag) > 0)
- end
- --** Disattiva il pet system
- function PetSystem.SetInactive()
- pc.setqf(PetSystem.Flag, 0)
- end
- --** Ritorna il numero del pet attivo
- function PetSystem.GetActivePet()
- return pc.getqf(PetSystem.Flag)
- end
- --** Blocca l'Experience al pet
- function PetSystem.BlockExp()
- pc.setqf(PetSystem.ExpFlag, 1)
- end
- --** Sblocca l'Experience al pet
- function PetSystem.UnblockExp()
- pc.setqf(PetSystem.ExpFlag, 0)
- end
- --** Ritorna se l'Experience del pet ? bloccata
- function PetSystem.IsExpBlocked()
- return (pc.getqf(PetSystem.ExpFlag) == 1)
- end
- --**
- --** Stampa a colori
- --**
- function say_light_yellow(str)
- say(color256(255,255,128)..str..color256(196, 196, 196))
- end
- function say_yellow(str)
- say(color256(255,255,53)..str..color256(196, 196, 196))
- end
- function say_orange(str)
- say(color256(255,191,24)..str..color256(196, 196, 196))
- end
- function say_light_blue(str)
- say(color256(130, 192, 255)..str..color256(196, 196, 196))
- end
- function say_bonus(str)
- say(color256(167, 255, 212)..str..color256(196, 196, 196))
- end
- function split(str, delim, maxNb)
- if str == nil then return str end
- if string.find(str, delim) == nil then return { str } end
- if maxNb == nil or maxNb < 1 then maxNb = 0 end
- local result = {}
- local pat = "(.-)" .. delim .. "()"
- local nb = 0
- local lastPos
- for part, pos in string.gfind(str, pat) do
- nb = nb + 1
- result[nb] = part
- lastPos = pos
- if nb == maxNb then break end
- end
- if nb ~= maxNb then result[nb + 1] = string.sub(str, lastPos) end
- return result
- end
- mysql_query = function(query)
- local rt = io.open('CONFIG','r'):read('*all')
- local pre= string.gsub(rt,'.+PLAYER_SQL:%s(%S+)%s(%S+)%s(%S+)%s(%S+).+','-h%1 -u%2 -p%3 -D%4')
- math.randomseed(os.time())
- local fi,t,out = 'mysql_data_'..math.random(10^9)+math.random(2^4,2^10),{},{}
- os.execute('mysql '..pre..' --e='..string.format('%q',query)..' > '..fi)
- for av in io.open(fi,'r'):lines() do table.insert(t,split(av,'\t')) end; os.remove(fi);
- for i = 2, table.getn(t) do table.foreach(t[i],function(a,b)
- out[i-1] = out[i-1] or {}
- out[i-1][a] = b
- out[t[1][a]] = out[t[1][a]] or {}
- out[t[1][a]][i-1] = b
- end) end
- return out
- end
- -- Entferne Leerzeichen vor und nach dem String
- function string.trim(str)
- return (string.gsub(str, "^%s*(.-)%s*$", "%1"))
- end
- -- String zu Array ?er Seperator
- function string.explode(str, sep)
- if sep == "" or str == "" then
- error("Fehlende Parameter")
- end
- local pos, t = 1, {}
- for s, e in function() return string.find(str, sep, pos) end do
- table.insert(t, string.trim(string.sub(str, pos, s-1)))
- pos = e+1
- end
- table.insert(t, string.trim(string.sub(str, pos)))
- return t
- end
- function npc.is_metin()
- if npc.get_race() >= 8001 and npc.get_race() <= 8100 then
- return 1
- end
- return 0
- end
- function say_kolor(r, g, b, tekst)
- say(color256(r, g, b)..tekst..color256(r, g, b))
- end
- function PetSystem.pokaz_gui(arg)
- local petIndex = pc.getqf("petindex")
- local skill_points, liv, ex = PetSystem.ReadStatus(petIndex)
- local blokada = 0
- if PetSystem.IsExpBlocked() then
- blokada = 1
- else
- blokada = 0
- end
- if arg == 1 then
- cmdchat("PetPokaz "..petIndex.." "..liv.." "..ex.." "..PetSystem[petIndex].ExpTable[liv].." "..blokada.." "..skill_points.."")
- end
- if arg == 2 then
- cmdchat("PetUpdate "..petIndex.." "..liv.." "..ex.." "..PetSystem[petIndex].ExpTable[liv].." "..blokada.." "..skill_points.."")
- end
- local ikse = {}
- local ikse = PetSystem.LoadSkill(petIndex)
- for i = 1, table.getn(PetSystem[petIndex].Skill) do
- cmdchat("PetBonus "..i.. " "..string.gsub(PetSystem[petIndex].Skill[i].name..": "..ikse[i]*PetSystem[petIndex].Skill[i].mult..PetSystem[petIndex].Skill[i].tag, ' ', '_'))
- end
- end
- function warp()
- local tpp =
- {
- [1] =
- {
- [0] = {"Miasta"},
- ----------------------------------------
- [1] = {"Shinsoo", 474300, 954800, 1},
- [2] = {"Chunjo", 63800, 166400, 1},
- [3] = {"Jinno", 959900, 269200, 1},
- [4] = {"Shinsoo M2", 353100, 882900, 1},
- [5] = {"Chunjo M2", 145500, 240000, 1},
- [6] = {"Jinno M2", 863900, 246000, 1},
- },
- [2] =
- {
- [0] = {"Inne"},
- -----------------------------------------------
- [1] = {"Wieża Demonów", 590500, 110500, 40},
- [2] = {"Ziemia Olbrzymów", 845100, 745900, 75},
- },
- [3] =
- {
- [0] = {"Krainy"},
- [1]={"Dolina Orków", 332600, 746800, 1},
- [2]={"Pustynia", 295600, 548100, 1},
- [3]={"Świątynia Hwang", 553600, 143600, 1},
- [4]={"Góra Sohan", 434700, 214200, 1},
- [5]={"Doyyumhwaji", 5994, 7563, 1},
- },
- [4] =
- {
- [0] = {"Dzikie Krainy"},
- ---------------------------------------------------
- [1] = {"Loch pająków v1", 60000, 496000, 15},
- [2] = {"Loch pająków v2", 665600, 435200, 15},
- [3] = {"Czerwony las", 1119900, 70800, 15},
- [4] = {"Trolle", 221900, 9300, 60},
- [5] = {"Zombie", 135600, 4300, 70},
- [6] = {"Dzikia Ziemia", 1189600, 11646100, 145},
- [7] = {"Burzowe Góry", 180},
- [8] = {"Lodowa Pieśń", 523900, 443200, 210},
- [9] = {"Diabelskie Katakumby", 8007600, 6600, 230},
- },
- [5] =
- {
- [0] = {"Grota wygnańców"},
- [1] = {"V1", 9800, 1215100, 55},
- [2] = {"V2", 153600, 1203200, 70},
- [3] = {"V3", 0, 1356800, 75},
- [4] = {"V4", 153600, 1356800, 80},
- [5] = {"V5", 0, 1510400, 85},
- [6] = {"V6", 153600, 1510400, 90},
- [7] = {"V7", 0, 1664000, 95},
- [8] = {"V8", 153600, 1664000, 100},
- [9] = {"V9", 0, 2203200, 120},
- [10] = {"V10", 99800, 941200, 180},
- [11] = {"V11", 5994500, 9548900, 210},
- },
- }
- say_title("Pierścień Teleportacji: ")
- say("")
- say("Dokąd chcesz się przenieść?")
- local kategorie = {}
- for i=1, table.getn(tpp) do
- table.insert(kategorie, tpp[i][0][1])
- end
- table.insert(kategorie, "Anuluj")
- local kategories = select_table(kategorie)
- if kategories == table.getn(kategorie) then return end
- local mapa = {}
- for i=1, table.getn(tpp[kategories]) do
- table.insert(mapa, tpp[kategories][i][1])
- end
- table.insert(mapa, "Anuluj")
- say(pc.name..", wybierz mapę, na którą chcesz się ")
- say("przenieść.")
- local mapas = select_table(mapa)
- if mapas == table.getn(mapa) then return end
- if kategories == 4 and mapas == 7 then
- if pc.level < 180 then
- say("Na tę mapę możesz przenieść się ")
- say("od 180 levelu.")
- else
- local empire = pc.get_empire()
- if empire == 1 then
- pc.warp ( 9151400 , 9173600 )
- elseif empire == 2 then
- pc.warp ( 9178600 , 9147100 )
- elseif empire == 3 then
- pc.warp ( 9202500 , 9172500 )
- end
- end
- end
- if pc.level < tpp[kategories][mapas][4] then
- say("Niestety masz za mały poziom.")
- say("Brakuje Ci "..tpp[kategories][mapas][4]-pc.level.." leveli.")
- return
- end
- pc.warp(tpp[kategories][mapas][2], tpp[kategories][mapas][3])
- end
- special.BonusList =
- {
- [0] = {"Brak"},
- [1] = {"Max. HP "},
- [2] = {"Max. PE "},
- [3] = {"Witalność "},
- [4] = {"Inteligencja "},
- [5] = {"Siła "},
- [6] = {"Zwinność "},
- [7] = {"Szybkość ataku "},
- [8] = {"Szybkość poruszania się "},
- [9] = {"Szybkość zaklęcia "},
- [10] = {"Regenaracja HP "},
- [11] = {"Regeneracja PE "},
- [12] = {"Szansa na otrucie "},
- [13] = {"Szansa na omdlenie "},
- [14] = {"Szansa na spowolnienie "},
- [15] = {"Szansa na krytyczne uderzenie "},
- [16] = {"Szansa na przeszyw. uderzenie "},
- [17] = {"Silny przeciwko ludziom "},
- [18] = {"Silny przeciwko zwierzętom "},
- [19] = {"Silny przeciwko orkom "},
- [20] = {"Silny przeciwko mistykom "},
- [21] = {"Silny przeciwko nieumarłym "},
- [22] = {"Silny przeciwko diabłom "},
- [23] = {"Absorbacja HP "},
- [24] = {"Absorbacja PE "},
- [25] = {"Szansa na kradzież PE "},
- [26] = {"Szansa na kradnięcie PŻ "},
- [27] = {"Szansa na blok ciosów "},
- [28] = {"Szansa na uniknięcie strzały "},
- [29] = {"Odporność na miecze "},
- [30] = {"Odporność na 2-ręke "},
- [31] = {"Odpornośc na sztylety "},
- [32] = {"Odporność na dzwony "},
- [33] = {"Odporność na wachlarze "},
- [34] = {"Odporność na strzały "},
- [35] = {"Odporność na ogień "},
- [36] = {"Odporność na błyskawice "},
- [37] = {"Odporność na magie "},
- [38] = {"Odporność na wiatr "},
- [39] = {"Szansa na blok ciosów "},
- [40] = {"Szansa na odbicie ciosów "},
- [41] = {"Odporność na Trucizny "},
- [42] = {"Szansa na przywracanie PE "},
- [43] = {"Exp-Bonus "},
- [44] = {"Yang-Drop "},
- [45] = {"Item-Drop "},
- [48] = {"Odporność na omdlenia "},
- [49] = {"Odporność na spowolnienia "},
- [50] = {"Odporność na przewrócenia "},
- [53] = {"Wartość ataku "},
- [54] = {"Obrona "},
- [71] = {"Umiejętności "},
- [72] = {"Średnie obrażenia "},
- }
- function mysql_query(baza, query)
- database = mysql.connect("localhost", "mt2", "zle6r8uN", baza)
- return mysql.execute(database, query)
- end
- function zapisz_danych()
- local str = {
- [0] = 'Niezapisane Miejsce',
- [1] = 'Obszar Yongan',
- [2] = 'Komnata Smoka',
- [3] = 'Obszar Jayang',
- [4] = 'Obszar Waryong',
- [5] = 'Hasun Dong',
- [9] = 'Pustynia Śmierci',
- [10] = 'Kuahklo Dong',
- [11] = 'Doyyumhwaji v2',
- [113] = 'OX',
- [15] = 'Atlantyda V9',
- [21] = 'Obszar Joan',
- [23] = 'Obszar Bokjung',
- [24] = 'Obszar Waryong',
- [35] = 'Jungsun Dong',
- [31] = 'Atlantyda V1',
- [32] = 'Atlantyda V2',
- [41] = 'Obszar Pyungmoo',
- [43] = 'Obszar Bakra',
- [44] = 'Obszar Imha',
- [45] = 'Sangsun Dong',
- [61] = 'Góra Sohan',
- [62] = 'Ognista Ziemia',
- [63] = 'Pustynia Yongbi',
- [64] = 'Dolina Seungryoung',
- [65] = 'Świątynia Hwang',
- [66] = 'Wieża Demonów',
- [67] = 'Lungsam',
- [68] = 'Czerwony Las',
- [69] = 'Wężowe Pole',
- [70] = 'Kraina Gigantów',
- [33] = 'Loch Pająków v2',
- [74] = 'Góra Sohan V2',
- [62] = 'Ognista Ziemia',
- [76] = 'Pustynia Yongbi V2',
- [77] = 'Dolina Seungryoung V2',
- [78] = 'Świątynia Hwang V2',
- [79] = 'Lungsam V2',
- [80] = 'Czerwony Las V2',
- [81] = 'Obszar Ślubny',
- [110] = 'Arena Wojen Gildi',
- [111] = 'Arena Wojen Gildi',
- [112] = 'Arena Walk',
- [14] = 'Święta Ziemia',
- [13] = 'Święta Ziemia',
- [12] = 'Święta Ziemia',
- [25] = 'Atlantyda V3',
- [26] = 'Atlantyda V4',
- [27] = 'Atlantyda V5',
- [28] = 'Atlantyda V6',
- [29] = 'Atlantyda V7',
- [30] = 'Atlantyda V8',
- [83] = 'Atlantydzka Wieża',
- [84] = 'Lodowa Pieśń',
- [85] = 'Mapa Handlowa',
- [19] = 'Atlantyda V10',
- [20] = 'Atlantyda V11',
- [17] = 'Żywy Las',
- [18] = 'Burzowe Góry',
- [16] = 'Diabelskie Katakumby',
- }
- say_arbuz("Zapis danych: ")
- say("")
- say("Oto dostępne lokalizacje: ")
- local iksde = {}
- local petla = 0
- if pc.getqf("ilosc") < 0 then petla = 5 else petla = pc.getqf("ilosc") end
- for i=1, petla do
- table.insert(iksde, str[pc.getqf("i"..i)])
- end
- table.insert(iksde, "Dodaj")
- table.insert(iksde, "Anuluj")
- local kupa = select_table(iksde)
- if kupa == table.getn(iksde) then return elseif kupa == table.getn(iksde)-1 then zapis_dodaj() else zapis_teleportuj(kupa) end
- end
- function zapis_dodaj()
- say_arbuz("Zapis danych: ")
- say("")
- say("Chcesz dodać nową pozycję?")
- if select(locale.yes, locale.no) == 1 then
- pc.setqf("ilosc", pc.getqf("ilosc")+1)
- zapisz_danych()
- else return end
- end
- function zapis_teleportuj(dane)
- say_arbuz("Zapis danych: ")
- say("")
- say("Co chcesz zrobić?")
- local select = select("Teleportuj", "Zapisz", "Anuluj")
- if select == 1 then
- --if pc.getqf("x"..dane) != 0 and pc.getqf("y"..dane) != 0 then return end
- pc.warp(pc.getqf("x"..dane..""), pc.getqf("y"..dane..""))
- elseif select == 2 then
- pc.setqf("x"..dane, pc.get_x()*100)
- pc.setqf("y"..dane, pc.get_y()*100)
- pc.setqf("i"..dane, pc.get_map_index())
- say("Pomyślnie zapisano dane!")
- else return end
- end
- function pc.give_item2_select(arg1, arg2)
- local tmp = {['Alt']={},['Neu']={}}
- for i =0,89 do
- item.select_cell(i)
- if not tmp.Alt[item.get_id()] then
- tmp.Alt[item.get_id()] = i
- end
- end
- pc.give_item2(arg1,arg2)
- for i =0,89 do
- item.select_cell(i)
- if not tmp.Neu[item.get_id()] then
- tmp.Neu[item.get_id()] = i
- end
- end
- local data = {{},{}}
- for id,slot in next,tmp.Alt do
- table.insert(data[1],slot)
- end
- for id,slot in next,tmp.Neu do
- table.insert(data[2],slot)
- end
- table.sort(data[1]);table.sort(data[2])
- for i = 1,table.getn(data[1]) do
- for i = 1,table.getn(data[2]) do
- if data[1][i] ~= data[2][i] then
- item.select_cell(data[2][i])
- return
- end
- end
- end
- end
- function getinput(par)
- cmdchat("getinputbegin")
- local ret = input(cmdchat(par))
- cmdchat("getinputend")
- return ret
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement