I want to know how to inject custom attributes for a summoned monster. As an example I used Sand Bag Lv5 as reference and and I'am trying to understand @Angelix post to inject the attributes but I have no luck. Can someone give me clarification on how to successfully inject custom attributes to a summoned monster, thank you.
function ItemUse_ShaBao5(role, Item)
local Cha_Boat = 0
Cha_Boat = GetCtrlBoat(role)
if Cha_Boat ~= nil then
SystemNotice(role, "Cannot use while sailing")
UseItemFailed(role)
return
end
local reg = 0
reg =IsChaInRegion(role, 2)
if reg == 1 then
SystemNotice(role, "Training in Safe Zone? Dream on!")
UseItemFailed(role)
return
end
local x, y = GetChaPos(role)
local x_move=5
local y_move=5
x=x_move+x
y=y_move+y
local MonsterID = 941
local Refresh = 1900000
local life = 1800000
local new = CreateChaX(MonsterID, x, y, 145, Refresh,role)
SetChaLifeTime(new, life)
-- Attempting to insert MIN/MAX Dmg attribute
local MINDMG = BSMnatk(new) + 100
local MAXDMG = BSMxatk(new) + 100
SetCharaAttr(MINDMG, new, ATTR_BMNATK)
SetCharaAttr(MAXDMG, new, ATTR_BMXATK)
end