Jump to content
Sign in to follow this  
WVWMK

Sensing additional characteristics of the subject and work with them

Recommended Posts

How to read the additional characteristics of the subject - strength\agility\accuracy\speed(blue color)?
ITEMATTR_VAL_STR\AGI and so do not work.

 

Only works ITEMATTR_VAL_DEF\HIT\PDEF\FLEE Protection\Chance to hit\PDEF\Dodge - the basic characteristics of the subject(white color)

 

ATTR_STR, ATTR_BSTR, ATTR_ITEMC_STR, ATTR_ITEMV_STR, ATTR_STATEC_STR, ATTR_STATEV_STR - not work too

 

cF2P3Jg5mh8.jpg

The subject has STR , but to rely on this characteristic impossible. Need a way to read this characteristic.


Делай добро и бросай его в воду

Share this post


Link to post
Share on other sites

If the item has the attribute edited (eg pets, items with collosous/mammoth etc) you read it with ITEMATTR_VAL_XXXX etc

 

If the item does not have the stat as an additional attribute, you would need to read in iteminfo line by line and create a table of item ID and its stat, since these are not stored as attributes on the individual item.

Share this post


Link to post
Share on other sites

I dunno if I understand(my english is bad), but i'm gonna try.

 

As @7n6 mention it before.

 

Item attribute's are stored, if its between a range, and while the attribute it's greater than minimum value, if you get 9/9 and minimun is 8 while at  time creating, It will be stored due dynamic value; otherwise it won't, but if you need this value, you can get it from its template/resource.

Edited by Totoka

Discord: andresc

Share this post


Link to post
Share on other sites
10 часов назад, 7n6 сказал:

If the item has the attribute edited (eg pets, items with collosous/mammoth etc) you read it with ITEMATTR_VAL_XXXX etc

 

If the item does not have the stat as an additional attribute, you would need to read in iteminfo line by line and create a table of item ID and its stat, since these are not stored as attributes on the individual item.

The protection is the same attribute as the power, is almost in the same place at iteminfo, but the protection can be considered with the subject matter, and force can not, here is my question.

Your method is good, but it does not fit me, because I'm going to work with each subject separately.

 

That's how I read the attribute Protection:

	local Item_DEF = GetItemAttr ( Item_Traget , ITEMATTR_VAL_DEF )
	if (Item_DEF <= 0 or Item_DEF == nil) then 
		SystemNotice ( role , 'Your equipment has no defense!' )
		UseItemFailed ( role )
		return
	end
    
    SystemNotice ( role , 'Defense = '..Item_DEF )

I need a way to read extended attributes from an object

 

jhjh.png

 

dfghju.png

 

 


Делай добро и бросай его в воду

Share this post


Link to post
Share on other sites
function ItemUse_Scroll_Str ( role , Item , Item_Traget )
	local Item_Traget_Type = GetItemType ( Item_Traget )
	
	--Проверка на тип предмета
	if ( (Item_Traget_Type == 1) or (Item_Traget_Type == 2) or (Item_Traget_Type == 3) or (Item_Traget_Type == 4) or (Item_Traget_Type == 7) or (Item_Traget_Type == 9) or (Item_Traget_Type == 11) or (Item_Traget_Type == 20) or (Item_Traget_Type == 22) or (Item_Traget_Type == 23) or (Item_Traget_Type == 24) or (Item_Traget_Type == 25) or (Item_Traget_Type == 26) or (Item_Traget_Type == 27) or (Item_Traget_Type == 29)) then
	
	--Проверка на наличие характеристики
	local Item_DEF = GetItemAttr ( Item_Traget , ITEMATTR_VAL_DEF )
	local Item_DEF1 = GetItemAttr ( Item_Traget , ITEMATTR_VAL_STR )
	local Item_DEF2 = GetItemAttr ( Item_Traget , ITEMATTR_VAL_CON )
	local Item_DEF3 = GetItemAttr ( Item_Traget , ITEMATTR_VAL_AGI )
	local Item_DEF4 = GetItemAttr ( Item_Traget , ITEMATTR_VAL_DEX )
    local Item_DEF5 = GetItemAttr ( Item_Traget , ITEMATTR_VAL_PDEF )
	local Item_DEF6 = GetItemAttr ( Item_Traget , ITEMATTR_VAL_FLEE )
	local Item_DEF7 = GetItemAttr ( Item_Traget , ITEMATTR_VAL_HREC )
    local Item_DEF8 = GetItemAttr ( Item_Traget , ITEMATTR_VAL_SREC )
	local Item_DEF9 = GetItemAttr ( Item_Traget , ITEMATTR_VAL_MXSP )
	local Item_DEF10 = GetItemAttr ( Item_Traget , ITEMATTR_VAL_MXHP )
	
	SystemNotice ( role , 'DEF = '..Item_DEF )
	SystemNotice ( role , 'STR = '..Item_DEF1 )
	SystemNotice ( role , 'CON = '..Item_DEF2 )
	SystemNotice ( role , 'AGI = '..Item_DEF3 )
	SystemNotice ( role , 'DEX = '..Item_DEF4 )
	SystemNotice ( role , 'PDEF = '..Item_DEF5 )
	SystemNotice ( role , 'FLEE = '..Item_DEF6 )
	SystemNotice ( role , 'HREC = '..Item_DEF7 )
	SystemNotice ( role , 'SREC = '..Item_DEF8 )
	SystemNotice ( role , 'MXSP = '..Item_DEF9 )
	SystemNotice ( role , 'MXHP = '..Item_DEF10 )	
	--Улучшение характеристики
	end
end

 

123.png


Делай добро и бросай его в воду

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...