FapFap 13 Report post Posted September 29, 2017 Can someone help make a new Lot, just like Career Lot, but i want the new lot to give just stats ( no exp ), i went through career lot and i was so much confuse from those scripts.. it uses like 3-4 and with some random codes that i cant understand x.x Can someone help me make a new lot which gives just stats? ( max / def / agi / hr / aspd - not much but abit ) Quote Share this post Link to post Share on other sites
iZae 55 Report post Posted September 30, 2017 (edited) Just make a new usable Item (you can copy iteminfo's line from career lot and edit name, id, price, description and so on) and inside itemeffect.lua just add the following code function ItemUse_AAAA( role , Item ) local Cha_Boat = 0 Cha_Boat = GetCtrlBoat ( role ) if Cha_Boat == nil then local attr_xxxx = GetChaAttr( role , ATTR_XXX ) local attr_add = YY attr_xxxx = attr_xxxx + attr_add SetCharaAttr( attr_xxxx, role, ATTR_XXX ) RefreshCha(role) else SystemNotice( role , "Cannot use while sailing" ) UseItemFailed ( role ) return end end where ItemUse_AAAA is the usage script name (one of the last columns of Iteminfo.txt) attr_xxxx is just a variable name, you can asign what you want, but I suggest you to use the attr you're going to give with the lot (e.g. attr_aspd for attack speed) ATTR_XXX is the attribute name as you find it on attrtype.lua YY is the number of the ammount you're going to give. List of attrtypes you may want: ATTR_STR : Strength ATTR_DEX : Accuracy ATTR_AGI : Agility ATTR_CON : Constitution ATTR_STA : Spirit ATTR_LUK : Cant remember ATTR_MXHP : Max Hp ATTR_MXSP : Max Sp ATTR_MNATK : Min Attack ATTR_MXATK : Max Attack ATTR_DEF : Defense ATTR_HIT : Hit Rate ATTR_FLEE : Dodge rate ATTR_MF : Can't remember ATTR_CRT : Critical Rate ATTR_HREC : Hp recovery rate ATTR_SREC : Sp recovery rate ATTR_ASPD : Attack Speed ATTR_ADIS : Can't remember ATTR_MSPD : Movement Speed ATTR_COL : Can't remember ATTR_PDEF : Physical Defense I Hope it's clear and helpful. Edited September 30, 2017 by iZae typo 1 Quote Share this post Link to post Share on other sites
FapFap 13 Report post Posted September 30, 2017 @iZae what if i want to add more than 1, like def/max/hr etc.. from 1 lot.. how can i use the script?! Quote Share this post Link to post Share on other sites
iZae 55 Report post Posted September 30, 2017 add the same lines local attr_xxxx = GetChaAttr( role , ATTR_XXX ) local attr_add = YY attr_xxxx = attr_xxxx + attr_add SetCharaAttr( attr_xxxx, role, ATTR_XXX ) replacing everything I told you. Final example: (1 item that adds 20 movement speed and 10 attack speed) function ItemUse_AAAA( role , Item ) local Cha_Boat = 0 Cha_Boat = GetCtrlBoat ( role ) if Cha_Boat == nil then local attr_mspd = GetChaAttr( role , ATTR_MSPD ) local attr_add_mspd = 20 attr_mspd = attr_mspd + attr_add_mspd SetCharaAttr( attr_mspd, role, ATTR_MSPD ) local attr_aspd = GetChaAttr( role , ATTR_ASPD ) local attr_add_aspd = 10 attr_aspd = attr_aspd + attr_add_aspd SetCharaAttr( attr_aspd, role, ATTR_ASPD ) RefreshCha(role) else SystemNotice( role , "Cannot use while sailing" ) UseItemFailed ( role ) return end end Take in consideration that this kind of item will permanently add those attributes. If you want to temporaly add stats, you have to do it trough STATES (Check potion of lion or skating potion to see an example) Quote Share this post Link to post Share on other sites