Ximboliex 85 Report post Posted February 25, 2017 (edited) Hi PKODev! ; I bring you a Guide .. rather a script that will guide you to many people who are embarking on the development of private servers! function ItemUse_Example27( role, Item ) local GemSlotAID3 = 15 -- Gem Stone ID A ( Can be founded in stoneinfo.txt ) local GemSlotBID3 = 29 -- Gem Stone ID B ( Can be founded in stoneinfo.txt ) local GemSlotCID3 = 22 -- Gem Stone ID C ( Can be founded in stoneinfo.txt ) local GemSlotALevel3 = 9 -- Gem Level - 1 ~ 9 local GemSlotBLevel3 = 9 -- Gem Level - 1 ~ 9 local GemSlotCLevel3 = 9 -- Gem Level - 1 ~ 9 r13,r23 = MakeItem(role,####,1,18)-- Your Equip local Equipp3 = GetChaItem(role,2,r23) local param3 = GetItemForgeParam(Equipp3,1) local Item_Stone3 = {} local Item_StoneLv3 = {} param3 = TansferNum(param3) Item_Stone3[0] = GetNum_Part2(param3) Item_StoneLv3[0] = GetNum_Part3(param3) Item_Stone3[0] = GemSlotAID3 Item_StoneLv3[0] = GemSlotALevel3 param3 = SetNum_Part2(param3, Item_Stone3[0]) param3 = SetNum_Part3(param3, Item_StoneLv3[0]) SetItemForgeParam(Equipp3, 1, param3) param3= TansferNum(param3) Item_Stone3[1] = GetNum_Part2(param3) Item_StoneLv3[1] = GetNum_Part3(param3) Item_Stone3[1] = GemSlotBID3 Item_StoneLv3[1] = GemSlotBLevel3 param3 = SetNum_Part4(param3, Item_Stone3[1]) param3 = SetNum_Part5(param3, Item_StoneLv3[1]) SetItemForgeParam(Equipp3, 1, param3) param3 = TansferNum(param3) Item_Stone3[2] = GetNum_Part2(param3) Item_StoneLv3[2] = GetNum_Part3(param3) Item_Stone3[2] = GemSlotCID3 Item_StoneLv3[2] = GemSlotCLevel3 param3 = SetNum_Part6(param3, Item_Stone3[2]) param3 = SetNum_Part7(param3, Item_StoneLv3[2]) SetItemForgeParam(Equipp3, 1, param3) local Socket3 = GetItemForgeParam(Equipp3, 1) Socket3 = TansferNum(Socket3) Socket3 = SetNum_Part1(Socket3, 3) SetItemForgeParam(Equipp3, 1, Socket3) RefreshCha(role) end Edited February 26, 2017 by Ximboliex 3 Quote Share this post Link to post Share on other sites
blazi10 37 Report post Posted February 25, 2017 Usefull guide Quote Share this post Link to post Share on other sites
MonkeyCode 453 Report post Posted February 26, 2017 Hi @Ximboliex. - instead of GiveItem, use MakeItem. If inventory already have 776 (+12) which one will it forge? - instead of hardcoded values, port this function as handler. The function signature can be as followed: ForgeItem(role, item, gemid, gemlv) Where gemid/gemlv is single values or a table. Hope me that makes sense. Sorry mi English. 1 Quote Share this post Link to post Share on other sites
Ximboliex 85 Report post Posted February 26, 2017 Thank's @KONG! --Post edited Quote Share this post Link to post Share on other sites
asking12 0 Report post Posted April 28, 2019 On 2/25/2017 at 12:23 PM, Ximboliex said: Hi PKODev! ; I bring you a Guide .. rather a script that will guide you to many people who are embarking on the development of private servers! function ItemUse_Example27( role, Item ) local GemSlotAID3 = 15 -- Gem Stone ID A ( Can be founded in stoneinfo.txt ) local GemSlotBID3 = 29 -- Gem Stone ID B ( Can be founded in stoneinfo.txt ) local GemSlotCID3 = 22 -- Gem Stone ID C ( Can be founded in stoneinfo.txt ) local GemSlotALevel3 = 9 -- Gem Level - 1 ~ 9 local GemSlotBLevel3 = 9 -- Gem Level - 1 ~ 9 local GemSlotCLevel3 = 9 -- Gem Level - 1 ~ 9 r13,r23 = MakeItem(role,####,1,18)-- Your Equip local Equipp3 = GetChaItem(role,2,r23) local param3 = GetItemForgeParam(Equipp3,1) local Item_Stone3 = {} local Item_StoneLv3 = {} param3 = TansferNum(param3) Item_Stone3[0] = GetNum_Part2(param3) Item_StoneLv3[0] = GetNum_Part3(param3) Item_Stone3[0] = GemSlotAID3 Item_StoneLv3[0] = GemSlotALevel3 param3 = SetNum_Part2(param3, Item_Stone3[0]) param3 = SetNum_Part3(param3, Item_StoneLv3[0]) SetItemForgeParam(Equipp3, 1, param3) param3= TansferNum(param3) Item_Stone3[1] = GetNum_Part2(param3) Item_StoneLv3[1] = GetNum_Part3(param3) Item_Stone3[1] = GemSlotBID3 Item_StoneLv3[1] = GemSlotBLevel3 param3 = SetNum_Part4(param3, Item_Stone3[1]) param3 = SetNum_Part5(param3, Item_StoneLv3[1]) SetItemForgeParam(Equipp3, 1, param3) param3 = TansferNum(param3) Item_Stone3[2] = GetNum_Part2(param3) Item_StoneLv3[2] = GetNum_Part3(param3) Item_Stone3[2] = GemSlotCID3 Item_StoneLv3[2] = GemSlotCLevel3 param3 = SetNum_Part6(param3, Item_Stone3[2]) param3 = SetNum_Part7(param3, Item_StoneLv3[2]) SetItemForgeParam(Equipp3, 1, param3) local Socket3 = GetItemForgeParam(Equipp3, 1) Socket3 = TansferNum(Socket3) Socket3 = SetNum_Part1(Socket3, 3) SetItemForgeParam(Equipp3, 1, Socket3) RefreshCha(role) end Hmm... Where to put this code? And where to create a new chest that follow the code here? I mean let it be the new chest I can make as an item to sell in NPC Quote Share this post Link to post Share on other sites
ruubi 51 Report post Posted April 29, 2019 @asking12 Resource/script/calculate/ItemEffect.lua Quote Share this post Link to post Share on other sites
joebin99 0 Report post Posted May 7, 2019 plz usd sir Quote Share this post Link to post Share on other sites
ItzLoganDuh 1 Report post Posted July 13, 2023 (edited) I followed this tutorial but the gems dont affect the player? Quote Any ideas as to why this is happening? EDIT I relogged and the gems work now idk mb am noob Edited July 13, 2023 by ItzLoganDuh This can be deleted Quote Share this post Link to post Share on other sites