M.Sorin 282 Posted June 7, 2014 Share Posted June 7, 2014 Ok , a few months ago my hairstyles was type 18 and now they are type 28. And ... they remain equiped on the player and the bonus is x2 ( the type 18 hair and type 28 ) quest hair begin state start begin when login with pc.getqf("limit_time") >= 0 begin if pc.get_part( PART_HAIR ) >= 1000 then affect.remove_hair() pc.setqf("limit_time", 0) pc.set_part( PART_HAIR , 0 ) end end end end I tried a little fix but is not working properly because when they mount the horse the old hair appears again. Original hair.quest quest hair begin state start begin function My_hair_item(vnum,index) hair_list={} -- vnum /hair/ option / howmuch / duration hair_list [74001] = {1001, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [74002] = {1002, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [74003] = {1003, apply.ATTBONUS_SURA, 10, 2592000} hair_list [74004] = {1004, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [74005] = {1005, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [74006] = {1006, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [74007] = {1007, apply.ATTBONUS_SURA, 10, 2592000} hair_list [74008] = {1008, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [74009] = {1009, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [74010] = {1010, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [74011] = {1011, apply.ATTBONUS_SURA, 10, 2592000} hair_list [74012] = {1012, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [74251] = {2001, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [74252] = {2002, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [74253] = {2003, apply.ATTBONUS_SURA, 10, 2592000} hair_list [74254] = {2004, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [74255] = {2005, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [74256] = {2006, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [74257] = {2007, apply.ATTBONUS_SURA, 10, 2592000} hair_list [74258] = {2008, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [74259] = {2009, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [74260] = {2010, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [74261] = {2011, apply.ATTBONUS_SURA, 10, 2592000} hair_list [74262] = {2012, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [74501] = {3001, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [74502] = {3002, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [74503] = {3003, apply.ATTBONUS_SURA, 10, 2592000} hair_list [74504] = {3004, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [74505] = {3005, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [74506] = {3006, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [74507] = {3007, apply.ATTBONUS_SURA, 10, 2592000} hair_list [74508] = {3008, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [74509] = {3009, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [74510] = {3010, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [74511] = {3011, apply.ATTBONUS_SURA, 10, 2592000} hair_list [74512] = {3012, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [74751] = {4001, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [74752] = {4002, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [74753] = {4003, apply.ATTBONUS_SURA, 10, 2592000} hair_list [74754] = {4004, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [74755] = {4005, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [74756] = {4006, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [74757] = {4007, apply.ATTBONUS_SURA, 10, 2592000} hair_list [74758] = {4008, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [74759] = {4009, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [74760] = {4010, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [74761] = {4011, apply.ATTBONUS_SURA, 10, 2592000} hair_list [74762] = {4012, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [75001] = {1001, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [75002] = {1002, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [75003] = {1003, apply.ATTBONUS_SURA, 10, 2592000} hair_list [75004] = {1004, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [75005] = {1005, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [75006] = {1006, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [75007] = {1007, apply.ATTBONUS_SURA, 10, 2592000} hair_list [75008] = {1008, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [75009] = {1009, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [75010] = {1010, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [75011] = {1011, apply.ATTBONUS_SURA, 10, 2592000} hair_list [75012] = {1012, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [75201] = {2001, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [75202] = {2002, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [75203] = {2003, apply.ATTBONUS_SURA, 10, 2592000} hair_list [75204] = {2004, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [75205] = {2005, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [75206] = {2006, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [75207] = {2007, apply.ATTBONUS_SURA, 10, 2592000} hair_list [75208] = {2008, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [75209] = {2009, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [75210] = {2010, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [75211] = {2011, apply.ATTBONUS_SURA, 10, 2592000} hair_list [75212] = {2012, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [75401] = {3001, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [75402] = {3002, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [75403] = {3003, apply.ATTBONUS_SURA, 10, 2592000} hair_list [75404] = {3004, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [75405] = {3005, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [75406] = {3006, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [75407] = {3007, apply.ATTBONUS_SURA, 10, 2592000} hair_list [75408] = {3008, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [75409] = {3009, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [75410] = {3010, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [75411] = {3011, apply.ATTBONUS_SURA, 10, 2592000} hair_list [75412] = {3012, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [75601] = {4001, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [75602] = {4002, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [75603] = {4003, apply.ATTBONUS_SURA, 10, 2592000} hair_list [75604] = {4004, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [75605] = {4005, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [75606] = {4006, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [75607] = {4007, apply.ATTBONUS_SURA, 10, 2592000} hair_list [75608] = {4008, apply.ATTBONUS_SHAMAN, 10, 2592000} hair_list [75609] = {4009, apply.ATTBONUS_WARRIOR, 10, 2592000} hair_list [75610] = {4010, apply.ATTBONUS_ASSASSIN, 10, 2592000} hair_list [75611] = {4011, apply.ATTBONUS_SURA, 10, 2592000} hair_list [75612] = {4012, apply.ATTBONUS_SHAMAN, 10, 2592000} return hair_list[vnum][index] end function leave_log(item_vnum) char_log(0, "CHANGE_HAIR", string.format("USE_ITEM(%d)",item_vnum)) -- Set Item log --char_log(0, "CHANGE_HAIR", string.format("SET_HAIR(%d)",item_vnum)) --Set Item log char_log(0, "CHANGE_HAIR", string.format("END_SEC(%d)",get_time()+ hair.My_hair_item(item_vnum,4)) ) -- Duration log --char_log(0, "CHANGE_HAIR", string.format("AFFECT(%s), DURATION:%d)",hair.My_hair_item(item_vnum,2),get_time()+ hair.My_hair_item(item_vnum,4))) -- Effect set log char_log(0, "CHANGE_HAIR", "CHANGE_HAIR_END") -- End log end when 74001.use or 74002.use or 74003.use or 74004.use or 74005.use or 74006.use or 74007.use or 74008.use or 74009.use or 74010.use or 74011.use or 74012.use or 75001.use or 75002.use or 75003.use or 75004.use or 75005.use or 75006.use or 75007.use or 75008.use or 75009.use or 75010.use or 75011.use or 75012.use with pc.get_job()==0 begin pc.set_part(PART_HAIR, hair.My_hair_item(item.vnum,1)) affect.remove_hair() affect.add_hair(hair.My_hair_item(item.vnum,2),hair.My_hair_item(item.vnum,3) , hair.My_hair_item(item.vnum,4)) pc.setqf("limit_time",get_time()+ hair.My_hair_item(item.vnum,4)) hair.leave_log(item.vnum) item.remove() end when 74251.use or 74252.use or 74253.use or 74254.use or 74255.use or 74256.use or 74257.use or 74258.use or 74259.use or 74260.use or 74261.use or 74262.use or 75201.use or 75202.use or 75203.use or 75204.use or 75205.use or 75206.use or 75207.use or 75208.use or 75209.use or 75210.use or 75211.use or 75212.use with pc.get_job()==1 begin pc.set_part(PART_HAIR, hair.My_hair_item(item.vnum,1)) affect.remove_hair() affect.add_hair(hair.My_hair_item(item.vnum,2),hair.My_hair_item(item.vnum,3) , hair.My_hair_item(item.vnum,4)) pc.setqf("limit_time",get_time()+hair.My_hair_item(item.vnum,4)) hair.leave_log(item.vnum) item.remove() end when 74501.use or 74502.use or 74503.use or 74504.use or 74505.use or 74506.use or 74507.use or 74508.use or 74509.use or 74510.use or 74511.use or 74512.use or 75401.use or 75402.use or 75403.use or 75404.use or 75405.use or 75406.use or 75407.use or 75408.use or 75409.use or 75410.use or 75411.use or 75412.use with pc.get_job()==2 begin pc.set_part(PART_HAIR, hair.My_hair_item(item.vnum,1)) affect.remove_hair() affect.add_hair(hair.My_hair_item(item.vnum,2),hair.My_hair_item(item.vnum,3) , hair.My_hair_item(item.vnum,4)) pc.setqf("limit_time",get_time()+hair.My_hair_item(item.vnum,4)) hair.leave_log(item.vnum) item.remove() end when 74751.use or 74752.use or 74753.use or 74754.use or 74755.use or 74756.use or 74757.use or 74758.use or 74759.use or 74760.use or 74761.use or 74762.use or 75601.use or 75602.use or 75603.use or 75604.use or 75605.use or 75606.use or 75607.use or 75608.use or 75609.use or 75610.use or 75611.use or 75612.use with pc.get_job()==3 begin pc.set_part(PART_HAIR, hair.My_hair_item(item.vnum,1)) affect.remove_hair() affect.add_hair(hair.My_hair_item(item.vnum,2),hair.My_hair_item(item.vnum,3) , hair.My_hair_item(item.vnum,4)) pc.setqf("limit_time",get_time()+ hair.My_hair_item(item.vnum,4)) hair.leave_log(item.vnum) item.remove() end end end PS: I pay for the best fix and sorry for my poor english. Link to comment Share on other sites More sharing options...
Sober 37 Posted June 7, 2014 Share Posted June 7, 2014 If you set them at type=28 then they are equiped at the costume slot, else if you set them type=18 then when you use them they will be dissapeared from the inventory and the bonus will be running Link to comment Share on other sites More sharing options...
M.Sorin 282 Posted June 7, 2014 Author Share Posted June 7, 2014 Already type 28 for months , but the bonus and part_main from the old quest remains. Link to comment Share on other sites More sharing options...
Chun-Chun 60 Posted June 8, 2014 Share Posted June 8, 2014 Uninstall the quest / delete it from each hairstyle from object :? // Or you can delete the hole folder for those haristyles, because on type 28 it dosen't run with a quest if i remeber corectly . Link to comment Share on other sites More sharing options...
Active Member ATAG 310 Posted June 8, 2014 Active Member Share Posted June 8, 2014 Try a quest with: quest hairbugfix begin state start begin when login begin affect.remove_hair() pc.set_part(PART_HAIR, 0) set_state(_COMPLETE_) end end state _COMPLETE_ begin end end Link to comment Share on other sites More sharing options...
M.Sorin 282 Posted June 8, 2014 Author Share Posted June 8, 2014 Try a quest with: quest hairbugfix begin state start begin when login begin affect.remove_hair() pc.set_part(PART_HAIR, 0) set_state(_COMPLETE_) end end state _COMPLETE_ begin end end Nope , not working Link to comment Share on other sites More sharing options...
M.Sorin 282 Posted June 9, 2014 Author Share Posted June 9, 2014 UP ... Link to comment Share on other sites More sharing options...
M.Sorin 282 Posted June 11, 2014 Author Share Posted June 11, 2014 UP... i pay for the fix. Link to comment Share on other sites More sharing options...
lux 5 Posted June 12, 2014 Share Posted June 12, 2014 Not sure to undestand my english is bad.. want remove all hair from player? if yes, try from db with sql like update player.player set part_hair = '0' where part_hair >= '1' if the question is another sry Link to comment Share on other sites More sharing options...
M.Sorin 282 Posted June 12, 2014 Author Share Posted June 12, 2014 Not sure to undestand my english is bad.. want remove all hair from player? if yes, try from db with sql like update player.player set part_hair = '0' where part_hair >= '1' if the question is another sry That`s the problem ... i set manualy and by query and the old part_hair apears again and again and again when i use bersek or mount & horse.. Link to comment Share on other sites More sharing options...
lux 5 Posted June 13, 2014 Share Posted June 13, 2014 (edited) so i think u need to remove it from quest to still with sql .. put server off then delete from player.quest where szName = 'hair' this is on my case.. Edited August 15, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Active Member ATAG 310 Posted June 13, 2014 Active Member Share Posted June 13, 2014 Not sure to undestand my english is bad.. want remove all hair from player? if yes, try from db with sql like update player.player set part_hair = '0' where part_hair >= '1' if the question is another sry That`s the problem ... i set manualy and by query and the old part_hair apears again and again and again when i use bersek or mount & horse.. Do you modify the database when the server is off? What db/game versin do you use? Link to comment Share on other sites More sharing options...
M.Sorin 282 Posted June 13, 2014 Author Share Posted June 13, 2014 34083 - game revision 33820 - db chache revision And yes the server was off when i modify. Edit: the problem is from the old part_hair .. how i can disable that old part_hair. Practically the affect.remove_hair() is useless. Link to comment Share on other sites More sharing options...
Think 117 Posted June 14, 2014 Share Posted June 14, 2014 Your changes to part_hair on player shouldn't change much, I guess what's messing in here is the old affect, or the items itselves. The affects are stored at the affect table. With server off, try the following query: DELETE FROM affect WHERE bType = 514 (although by this logic, that'd mean that affect.remove_hair is not really working... which I guess can be but it may not be this and you'd need to unequip the items that are equipped) Link to comment Share on other sites More sharing options...
M.Sorin 282 Posted June 14, 2014 Author Share Posted June 14, 2014 Already do that part .. delete bType = 514 from affect and nothing changes. Is strange that the affect.remove_hair() work`s perfectly on the compiled rev ( 40250 with some modifications ) Link to comment Share on other sites More sharing options...
Think 117 Posted June 14, 2014 Share Posted June 14, 2014 If it's not the affect nor part_hair it's the item. Why don't you unequip them all from db? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now