Jump to content
Sign in to follow this  
Illusions

Medal of Honor Problem

Recommended Posts

So;

The Medal of Honor doesn't quite work as intended; it doesn't register honor pts and CA pts; tested by using famous cake (yes item functions are fine) and by killing a player. Seems something is wrong with the book itself but I cant seem to figure out what.

Share this post


Link to post
Share on other sites

i guess you didnt make the item properly. look at the npc which gives you the item, it has to be made with a certain parameter to be able to record stats.

  • Like 1

Share this post


Link to post
Share on other sites
local ATKER_RYZ = GetChaItem2 ( ATKER , 2 , 3849 )
local DEFER_RYZ = GetChaItem2 ( defer , 2 , 3849 )
local Lv_ATKER = LV( ATKER )
local Lv_DEFER = LV( defer )
local Lv_dif = Lv_ATKER - Lv_DEFER
local money = GetChaAttr ( role , ATTR_GD )

--Murder
local tester = GetItemAttr ( DEFER_RYZ , ITEMATTR_VAL_DEX )
--Honour
local chest = GetItemAttr ( ATKER_RYZ , ITEMATTR_VAL_STR )
local Chester = GetItemAttr ( DEFER_RYZ , ITEMATTR_VAL_STR )
--Deaths
local test = GetItemAttr ( ATKER_RYZ , ITEMATTR_VAL_AGI ) 

SetItemAttr ( ATKER_RYZ , ITEMATTR_VAL_STR, chest+4 )
SetItemAttr ( DEFER_RYZ , ITEMATTR_VAL_STR, Chester-5 )
--Murder\Death
SetItemAttr ( ATKER_RYZ , ITEMATTR_VAL_AGI, test+1 )
SetItemAttr ( DEFER_RYZ , ITEMATTR_VAL_DEX tester+1 )

Try this code

  • Like 1

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

Share this post


Link to post
Share on other sites
18 minutes ago, Billy said:

i guess you didnt make the item properly. look at the npc which gives you the item, it has to be made with a certain parameter to be able to record stats.

 

13 minutes ago, NMS3RR said:

local ATKER_RYZ = GetChaItem2 ( ATKER , 2 , 3849 )
local DEFER_RYZ = GetChaItem2 ( defer , 2 , 3849 )
local Lv_ATKER = LV( ATKER )
local Lv_DEFER = LV( defer )
local Lv_dif = Lv_ATKER - Lv_DEFER
local money = GetChaAttr ( role , ATTR_GD )

--Murder
local tester = GetItemAttr ( DEFER_RYZ , ITEMATTR_VAL_DEX )
--Honour
local chest = GetItemAttr ( ATKER_RYZ , ITEMATTR_VAL_STR )
local Chester = GetItemAttr ( DEFER_RYZ , ITEMATTR_VAL_STR )
--Deaths
local test = GetItemAttr ( ATKER_RYZ , ITEMATTR_VAL_AGI ) 

SetItemAttr ( ATKER_RYZ , ITEMATTR_VAL_STR, chest+4 )
SetItemAttr ( DEFER_RYZ , ITEMATTR_VAL_STR, Chester-5 )
--Murder\Death
SetItemAttr ( ATKER_RYZ , ITEMATTR_VAL_AGI, test+1 )
SetItemAttr ( DEFER_RYZ , ITEMATTR_VAL_DEX tester+1 )

Try this code

 

Cheers; I've had another look at the item functions and for some reason I've had two functions for the medal so I'm guessing the system got a bit confused lol, not sure what happened there haha all sorted now though!

Share this post


Link to post
Share on other sites
20 minutes ago, Billy said:

i guess you didnt make the item properly. look at the npc which gives you the item, it has to be made with a certain parameter to be able to record stats.

if im not wrong the parameter is 97?

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