Jump to content
Sign in to follow this  
FapFap

Lots

Recommended Posts

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 )

Share this post


Link to post
Share on other sites

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 by iZae
typo
  • Like 1

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...