- Katılım
- 3 Eki 2017
- Konular
- 1,673
- Mesajlar
- 18,445
- Çözüm
- 48
- Online süresi
- 9mo 24d
- Reaksiyon Skoru
- 8,721
- Altın Konu
- 297
- Başarım Puanı
- 374
- MmoLira
- 41,550
- DevLira
- 753
ROHAN2 WORLD 1-120 TR TİPİ OFFICIAL YOHARA, BALATHOR VE AMON! 80. GÜNÜNDE! +10.000 ONLİNE! HİLE VE BOT %100 ENGELLİ HEMEN TIKLA!
questlib.lua açıp aşağıdaki kodları kaldırın.
Yabancı forumdan alıntıdır.
Bu kodu ekleyin
Yabancı forumdan alıntıdır.
Kod:
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,
}
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})
Bu kodu ekleyin
Kod:
index_tables = {
pc = {
['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,
['mapindex'] = pc.get_map_index,
['guild'] = pc.get_guild,
['sex'] = pc.get_sex,
['gmlevel'] = pc.get_gm_level,
['ip'] = pc.get_ip0,
['hwid'] = pc.get_hwid,
},
npc = {
['race'] = npc.getrace,
['empire'] = npc.get_empire,
['vid'] = npc.get_vid,
['level'] = npc.get_level0,
['name'] = npc.get_name0,
['pid'] = npc.get_pid0,
['type'] = npc.get_type0,
['hwid'] = npc.get_hwid,
},
item = {
['id'] = item.get_id,
['cell'] = item.get_cell,
['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,
['levellimit'] = item.get_level_limit,
['wearflag'] = item.get_wearflag0,
['antiflag'] = item.get_antiflag0,
['immuneflag'] = item.get_immuneflag0,
},
q = {
['index'] = q.getcurrentquestindex,
['name'] = q.getcurrentquestname,
}
--add your new space
}
function generic_index(t, i)
local it = index_tables[t]
return it[i] and it[i]() or rawget(t, i)
end
setmetatable(pc, { __index = function(t, i) return generic_index("pc", i) end })
setmetatable(npc, { __index = function(t, i) return generic_index("npc", i) end })
setmetatable(item, { __index = function(t, i) return generic_index("item", i) end })
setmetatable(q, { __index = function(t, i) return generic_index("q", i) end }) --quest
--add your new space
- Katılım
- 2 Mar 2015
- Konular
- 59,189
- Mesajlar
- 88,439
- Çözüm
- 109
- Online süresi
- 4mo 16d
- Reaksiyon Skoru
- 14,280
- Altın Konu
- 2,398
- TM Yaşı
- 11 Yıl 3 Ay 7 Gün
- Başarım Puanı
- 1,051
- MmoLira
- 695,092
- DevLira
- 234
Paylaşım için teşekkürler.
- Katılım
- 3 Eki 2017
- Konular
- 1,673
- Mesajlar
- 18,445
- Çözüm
- 48
- Online süresi
- 9mo 24d
- Reaksiyon Skoru
- 8,721
- Altın Konu
- 297
- Başarım Puanı
- 374
- MmoLira
- 41,550
- DevLira
- 753
Rica ederim.Paylaşım için teşekkürler.
- Katılım
- 1 Şub 2015
- Konular
- 22
- Mesajlar
- 118
- Online süresi
- 2d 14h
- Reaksiyon Skoru
- 27
- Altın Konu
- 0
- TM Yaşı
- 11 Yıl 4 Ay 5 Gün
- Başarım Puanı
- 106
- MmoLira
- 1,177
- DevLira
- 21
yeni eklenen özelliklere veya işlevlere şimdi özel isimlerle ('custom_property_1', 'custom_property_2', 'custom_race_property', 'custom_item_property') erişebilirsin. Bu özelliklerin ilgili işlevlerinin (get_custom_property_1, get_custom_property_2, get_custom_race_property, get_custom_item_property) başka bir yerde doğru bir şekilde tanımlandığından emin ol, kanki!
Less:
-- Define a table to map index names to corresponding functions for NPCs
local npc_index_table = {
['race'] = npc.getrace,
['empire'] = npc.get_empire,
['custom_race_property'] = npc.get_custom_race_property, -- Additional entry
}
-- Define a table to map index names to corresponding functions for PCs (Players)
local 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, -- Alias for money
['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,
['custom_property_1'] = pc.get_custom_property_1, -- Additional entry
['custom_property_2'] = pc.get_custom_property_2, -- Additional entry
}
-- Define a table to map index names to corresponding functions for items
local 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,
['custom_item_property'] = item.get_custom_item_property, -- Additional entry
}
-- Define index functions for NPCs
function npc_index(t, i)
local npit = npc_index_table
if npit[i] then
return npit[i]()
else
return rawget(t, i)
end
end
-- Define index functions for PCs (Players)
function pc_index(t, i)
local pit = pc_index_table
if pit[i] then
return pit[i]()
else
return rawget(t, i)
end
end
-- Define index functions for items
function item_index(t, i)
local iit = item_index_table
if iit[i] then
return iit[i]()
else
return rawget(t, i)
end
end
-- Set metatables for 'pc', 'npc', and 'item' tables to use custom indexing
setmetatable(pc, { __index = pc_index })
setmetatable(npc, { __index = npc_index })
setmetatable(item, { __index = item_index })
Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)
Benzer konular
- Cevaplar
- 7
- Görüntüleme
- 2K
- Cevaplar
- 27
- Görüntüleme
- 4K





