Quote:
Originally Posted by sema1995
Game? or Metin2.bin xD
You need disblock the slots in metin2.bin not game xd
and need fuctions to types 28 + subtypes 0 and 1
|
This depend how you want do, many solutions are possible. If you disblock slot on metin2.bin (Actually slot max is 101 on bin) you need disblock on game too.
But you need a quest too, I mean this style
Code:
quest costume_system begin
state start begin
function get_real_hair_id(id)
return ({
[45001] = 5001,
[45002] = 5001,
[45003] = 5002,
[45004] = 5002,
[45005] = 5003,
[45006] = 5003,
[45007] = 5004,
[45008] = 5004,
[45009] = 5005,
[45010] = 5005
})[id] or 0
end
when login begin
loop_timer('costume_system_check', 0.3)
end
function real_real_hair_id(vnum)
if costume_system.get_real_hair_id(vnum) == 0 then
return vnum
else
return costume_system.get_real_hair_id(vnum)
end
end
function check_have_costume(slot)
item.select_cell(slot)
if item.get_cell() == slot then
return true
else
return false
end
end
function get_real_armor()
item.select_cell(90)
if item.get_cell() != 90 then
return 0
else
return item.get_vnum()
end
end
function check_costume(slot)
item.select_cell(slot)
if pc.get_part(PART_MAIN) != item.get_vnum() then
return false
else
if item.get_cell() != slot then
return false
else
return true
end
end
end
function empty_player()
if pc.get_armor() == pc.get_part(PART_MAIN) then
return true
else
return false
end
end
function equip_costume(slot)
item.select_cell(slot)
pc.set_part(PART_MAIN,item.get_vnum())
end
function check_hair()
item.select_cell(102)
if item.get_cell() == 102 then
return true
else
return false
end
end
function put_hair()
item.select_cell(102)
local vnum = costume_system.real_real_hair_id(item.get_vnum())
pc.setf("costume_system","old_hair_vnum",pc.get_part(PART_HAIR))
pc.set_part(PART_HAIR, vnum)
end
function restore_hair()
pc.setf("costume_system","old_hair_vnum",pc.get_part(PART_HAIR))
pc.set_part(PART_HAIR, pc.getf("costume_system","old_hair_vnum"))
end
function check_real_hair()
item.select_cell(102)
if costume_system.check_hair() == true and pc.get_part(PART_HAIR) == costume_system.real_real_hair_id(item.get_vnum()) then
return true
elseif costume_system.check_hair() == false and pc.get_part(PART_HAIR) == pc.getf("costume_system","old_hair_vnum") then
return true
elseif pc.getf("costume_system","old_hair_vnum") == 0 then
return true
else
return false
end
end
when costume_system_check.timer begin
-- Code quest
end
end
end