Discussion on [RELEASE] Fullversion: Kostümsystem .Minton™ within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.
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)
if pc.getqf('costume_system_main_active') == 1 then
costume_system_update("part_main_old", pc.get_part(PART_MAIN))
pc.set_part(PART_MAIN, pc.getqf('costume_system_main_vnum'))
cmdchat("CostumeMain "..pc.getqf('costume_system_main_vnum').."")
end
if pc.getqf('costume_system_hair_active') == 1 then
costume_system_update("part_hair_old", pc.get_part(PART_HAIR))
pc.set_part(PART_MAIN, pc.getqf('costume_system_hair_vnum'))
cmdchat("CostumeHair "..pc.getqf('costume_system_hair_vnum').."")
end
if pc.getqf('costume_system') == 1 then
return
elseif pc.getqf('costume_system') ~= 1 then
costume_system_create()
pc.setqf('costume_system', 1)
end
end
when costume_system_check.timer begin
if pc.getqf('costume_system_main_active') == 1 and pc.get_part(PART_MAIN) ~= pc.getqf('costume_system_main_vnum') then
pc.set_part(PART_MAIN, pc.getqf('costume_system_main_vnum'))
end
if pc.getqf('costume_system_hair_active') == 1 and pc.get_part(PART_HAIR) ~= pc.getqf('costume_system_hair_vnum') then
pc.set_part(PART_HAIR, pc.getqf('costume_system_hair_vnum'))
end
end
when 41001.use or
41002.use or
41003.use or
41004.use or
41005.use or
41006.use or
41007.use or
41008.use or
41009.use or
41010.use or
41011.use or
41012.use or
41013.use or
41014.use or
41015.use or
41016.use or
41017.use or
41018.use or
41019.use or
41020.use or
41021.use or
41022.use or
41023.use or
41024.use or
41025.use or
41026.use or
41027.use or
41028.use or
45001.use or
45002.use or
45003.use or
45004.use or
45005.use or
45006.use or
45007.use or
45008.use or
45009.use or
45010.use begin
local vnum = item.get_vnum()
local hair_vnum = costume_system.get_real_hair_id(vnum)
if tonumber(vnum) > 41000 and tonumber(vnum) < 41029 then
if pc.get_part(PART_MAIN) == vnum and pc.getqf('costume_system_main_active') == 1 then
pc.set_part(PART_MAIN, (tonumber(costume_system_read("part_main_old"))))
pc.setqf('costume_system_main_active', 0)
pc.setqf('costume_system_main_vnum', 0)
cmdchat("CostumeMain "..vnum.."")
else
costume_system_update("part_main_old", pc.get_armor())
pc.set_part(PART_MAIN, vnum)
pc.setqf('costume_system_main_active', 1)
pc.setqf('costume_system_main_vnum', vnum)
cmdchat("CostumeMain "..vnum.."")
end
elseif tonumber(vnum) > 45000 and tonumber(vnum) < 45011 then
if pc.getqf('costume_system_hair_active') == 1 and pc.get_part(PART_HAIR) == hair_vnum then
pc.set_part(PART_HAIR, (tonumber(costume_system_read("part_hair_old"))))
chat((tonumber(costume_system_read("part_hair_old" ))))
pc.setqf('costume_system_hair_active', 0)
pc.setqf('costume_system_hair_vnum', 0)
cmdchat("CostumeHair "..vnum.."")
elseif pc.get_part(PART_HAIR) ~= hair_vnum and pc.getqf('costume_system_hair_active') == 1 then
pc.set_part(PART_HAIR, hair_vnum)
pc.setqf('costume_system_hair_vnum', hair_vnum)
cmdchat("CostumeHair "..vnum.."")
else
costume_system_update("part_hair_old", pc.get_part(PART_HAIR))
pc.set_part(PART_HAIR, hair_vnum)
pc.setqf('costume_system_hair_active', 1)
pc.setqf('costume_system_hair_vnum', hair_vnum)
cmdchat("CostumeHair "..vnum.."")
end
end
end
end
end
dofile("locale/germany/quest/questlib_costum.lua")
function costume_system_create()
os.execute("mysql -u root player --execute=\"INSERT INTO costume_system(pid) VALUES ('".. pc.get_player_id() .."')\"")
end
function costume_system_read(type_v)
local mysql_read = (mysql_query("SELECT "..type_v.." as result_value from player.costume_system where pid = ('".. pc.get_player_id() .."')") or {["result_value"] = 0})
return mysql_read.result_value[1]
end
function costume_system_update(type_s, value)
if type_s == "part_main_old" then
if value < 41002 then
os.execute("mysql -u root player --execute=\"UPDATE costume_system SET "..type_s.." =('"..value.."') where pid = ('".. pc.get_player_id() .."')\"")
end
elseif type_s == "part_hair_old" then
os.execute("mysql -u root player --execute=\"UPDATE costume_system SET "..type_s.." =('"..value.."') where pid = ('".. pc.get_player_id() .."')\"")
end
end
mysql_query = function(query)
if not pre then
local rt = io.open('CONFIG', 'r'):read('*all')
pre = string.gsub(rt, '.+PLAYER_SQL:%s(%S+)%s(%S+)%s(%S+)%s(%S+).+', '-h%1 -u%2 -p%3 -D%4')
end
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] = tonumber(b) or b
out[t[1][a]] = out[t[1][a]] or {}
out[t[1][a]][i-1] = tonumber(b) or b
end) end
return out
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
Hast du überhaupt die erlaubnis das zu releasen? und überhaupt als deins
auszugeben? nicht das wir undankbar sind "WENN" das überhaupt Full ist
sondern es geht um Prinzip.
[RELEASE] Liteversion: Kostümsystem 05/05/2014 - Metin2 PServer Guides & Strategies - 717 Replies Aktuelle Liteversion: 1.0.0.0
Guten Tag, ich veröffentliche hier die offizielle Liteversion des Kostümsystems
ohne Fehler, die jetzige ist ja leider geklaut worden und hat noch die
ein und anderen Fehler, zum Beispiel das es verschwindet wenn die "GAME"
Informationen zurücksendet mit der "ARMOR-ID", dies passiert wenn man
auf ein Pferd raufgeht, Status- oder Fertigkeitenpunkte verteilt und
das automatische Tränke verwenden deaktiviert.
In dieser Version, die hier veröffentlicht...
[Release] Kostümsystem mit Download! 09/09/2012 - Metin2 PServer Guides & Strategies - 66 Replies Gelöscht!
Verbesserte Version nun von Paylasici !
http://www.elitepvpers.com/forum/metin2-pserver-g uides-strategies/2112444-release-kost-msystem.html #post18644669
[Release]Kostümsystem 09/09/2012 - Metin2 PServer Guides & Strategies - 60 Replies Sers,
hier release ich euch jetzt mal das tolle Kostümsystem.
Kostümsystem by .Awesoome' - YouTube
Downloadlink gibts per PN,