----壁炉-道具回血 For GP--------- --作者 :采购桃 2019.6.12 --QQ:48964881 欢迎讨论分享 ----------------------- Global_Reg.RegBattleOverEvent("xmc_BattleOverEvent"); function xmc_BattleOverEvent(_battle) for i=0,9 do --NLG.SystemMessage(-1,i); local PlayerIndex = Battle.GetPlayIndex( _battle, 0, i); --NLG.SystemMessage(-1,i .."【PlayerIndex】:" .. PlayerIndex ); if PlayerIndex >0 then local leo_xuemochi_CDK = Char.GetData(PlayerIndex,%对象_账号%); local leo_xuemochi_leixing = Char.GetData(PlayerIndex,0); --NLG.SystemMessage(-1,i .."【leo_xuemochi_leixing】:" .. leo_xuemochi_leixing .. "【PlayerIndex:】" .. PlayerIndex); if leo_xuemochi_leixing == 1 then local shengyu_vital = Char.GetData(PlayerIndex,%对象_血%); local shengyu_magic = Char.GetData(PlayerIndex,%对象_魔%); local max_vital = Char.GetData(PlayerIndex,%对象_最大血%); local max_magic = Char.GetData(PlayerIndex,%对象_最大魔%); local name = Char.GetData(PlayerIndex,%对象_原名%); local pos = Char.ItemNum(PlayerIndex,70039); --NLG.SystemMessage(-1,pos.."tonumber(pos)" .. tonumber(pos) .. "人物索引:" .. name); if pos == 1 then Char.SetData(PlayerIndex,%对象_血%,max_vital); Char.SetData(PlayerIndex,%对象_魔%,max_magic); NLG.SystemMessage("【系统】壁炉生效了" ); --NLG.SystemMessage(-1,i .."【主人PlayerIndex】" .. PlayerIndex .. "【饰品个数pos:】" .. pos); --NLG.SystemMessage(-1,i .."【人物血】" .. max_vital .. "【人物魔】" .. max_magic); NLG.UpChar(PlayerIndex); end end if leo_xuemochi_leixing == 3 then local tPlayerIndex = Pet.GetCharIndex(PlayerIndex); local pos1 = Char.ItemNum(tPlayerIndex,70039); local chongwuxue = Char.GetData(PlayerIndex,%对象_血%); local chongwumo = Char.GetData(PlayerIndex,%对象_魔%); local zuidaxue = Char.GetData(PlayerIndex,%对象_最大血%); local zuidamo = Char.GetData(PlayerIndex,%对象_最大魔%); if pos1 == 1 then newxue = tonumber(zuidaxue); Char.SetData(PlayerIndex,%对象_血%, zuidaxue); Char.SetData(PlayerIndex,%对象_魔%, zuidamo); NLG.UpChar(PlayerIndex); --NLG.SystemMessage(-1,i .."【tPlayerIndex宠物的主人】" .. tPlayerIndex .. "【饰品个数pos1:】" .. pos1); -- NLG.SystemMessage(-1,i .."【PlayerIndex】" .. PlayerIndex .. "【饰品个数pos1:】" .. pos1); --NLG.SystemMessage(-1,i .."【宠物血】" .. zuidaxue .. "【宠物魔法:】" .. zuidamo); end end end end end