Jones 36 Report post Posted May 3, 2016 (edited) Does anyone know how & where it's coded? Any information is good. Thanks for the help in advance. Edited May 3, 2016 by Jones Quote Share this post Link to post Share on other sites
Billy 164 Report post Posted May 3, 2016 In ItemPre.bin each line corresponds to the prefix (text only, not colour). Then you put it on an item with attr 53/56 iirc. First digit is colour, next two digits are the id from itempre, last digit does nothing (AFAIK) (cant remember all colours off the top of my head) This doesnt actually add the stats though. To edit the stats of an item you need to edit Creat_Item_Tattr in attrcalculate.lua, but bear in mind you can only have 5 editable attributes per item (not counting energy/forge/durability/level etc) Quote Share this post Link to post Share on other sites
Jones 36 Report post Posted May 3, 2016 31 minutes ago, 7n6 said: In ItemPre.bin each line corresponds to the prefix (text only, not colour). Then you put it on an item with attr 53/56 iirc. First digit is colour, next two digits are the id from itempre, last digit does nothing (AFAIK) (cant remember all colours off the top of my head) This doesnt actually add the stats though. To edit the stats of an item you need to edit Creat_Item_Tattr in attrcalculate.lua, but bear in mind you can only have 5 editable attributes per item (not counting energy/forge/durability/level etc) thanks, ill look at that some time. i wanna know, is it possible to create items such as "cardic" "silver dragon" etc on demand? and the text that describes it, is it located in the .exes itself? @7n6 Quote Share this post Link to post Share on other sites
Billy 164 Report post Posted May 3, 2016 What do you mean by "the text that describes it"? And yes it is possible to make cardic etc items on demand Quote Share this post Link to post Share on other sites
Jones 36 Report post Posted May 3, 2016 (edited) 4 minutes ago, 7n6 said: What do you mean by "the text that describes it"? And yes it is possible to make cardic etc items on demand can you tell me how? and the text that describes it is for example, if it's strength attribute added on the normal item, it's called "Mammoth" etc. @7n6 Edited May 3, 2016 by Jones Quote Share this post Link to post Share on other sites
Billy 164 Report post Posted May 3, 2016 SetItemOneAttr / SetItemTwoAttr / SetItemThreeAttr control which prefix goes to which stat 1 Quote Share this post Link to post Share on other sites
Jones 36 Report post Posted May 3, 2016 @7n6 thanks ill try to figure it out Quote Share this post Link to post Share on other sites
Billy 164 Report post Posted May 3, 2016 (edited) You can use to generate items with cardic etc, growth/max growth is the prefix for items. Edited May 3, 2016 by 7n6 1 Quote Share this post Link to post Share on other sites
Kyren 8 Report post Posted May 21, 2017 bro can you make a guide for this? on changing the item color? Quote Share this post Link to post Share on other sites
MonkeyCode 453 Report post Posted May 22, 2017 functions.lua: function SetItemPrefix(item, pre) -- @revised by [email protected] (fixed algorithm and shifting) local baoshilv = GetItemAttr(item, 53) local oldpre = GetItemPrefix(item) if oldpre == pre then return end SetItemAttr(item, 53, ((math.floor(baoshilv/1000)*1000)+(pre*10)+(math.mod(math.abs(baoshilv),10)))) end function GetItemPrefix(item) -- Gets the items prefix local prefix = math.floor(math.mod(GetItemAttr(item,53),1000)/10) return prefix end function GetItemColour(item) local baoshilv = GetItemAttr(item, 53) local colourid = math.floor(baoshilv/1000) if colourid >= 00 and colourid < 01 then return 'gray' elseif colourid >= 01 and colourid < 03 then return 'white' elseif colourid >= 03 and colourid < 05 then return 'green' elseif colourid >= 05 and colourid < 07 then return 'purple' elseif colourid >= 07 and colourid < 09 then return 'red' elseif colourid >= 09 and colourid < 11 then return 'gold' else return nil end end function SetItemColour(item, colour) if colour == GetItemColour(item) then return end local colourid if colour == 'gray' then colourid = 00 end if colour == 'white' then colourid = 01 end if colour == 'green' then colourid = 03 end if colour == 'purple' then colourid = 05 end if colour == 'red' then colourid = 07 end if colour == 'gold' then colourid = 09 end if colour ~= nil then SetItemAttr(item, 53, ((colour*1000)+(pre*10)+(math.mod(math.abs(baoshilv),10)))) end end function SetBaoshiLv(item, colour, prefix) SetItemColour(item, colour) SetItemPrefix(item, prefix) end function CalculateBaoshiLv(base, pre) return math.floor(base/1000)*1000+pre*10+math.mod(math.abs(base),10) end usage: local item = GetChaItem(role, 2, ...) SetBaoshiLv(item, 'red', 42) -- where 'item' is the item userdata, 'red' is the colour, 42 is the prefix. Note: there are buggy ones release long ago (all public ones are buggy). do not use it 2 Quote Share this post Link to post Share on other sites
Kyren 8 Report post Posted May 22, 2017 this is the error after I add that one on 2.4 files Quote Share this post Link to post Share on other sites
iZae 55 Report post Posted May 22, 2017 Use a code editor such as notepad++ and search for a typo Go to line: 21435 and you'll find your error. 1 Quote Share this post Link to post Share on other sites
Kyren 8 Report post Posted May 23, 2017 I find the error it was about the spacing instead of using spaces I just use TAB spacing it work fine but it doesn't make the color change. Quote Share this post Link to post Share on other sites
Kyren 8 Report post Posted May 23, 2017 I guess this script is for random item that has name mammoth - colossus to make it colored. Is there any way like the certain item would color change not random name but same name Quote Share this post Link to post Share on other sites