252 lines
		
	
	
		
			8.7 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
		
		
			
		
	
	
			252 lines
		
	
	
		
			8.7 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
|  | function Sq_DrawMainMaxLayerCustomUI(pack) { | ||
|  |     local obj = sq_GetMyMasterCharacter(); | ||
|  |     if (!obj) return; | ||
|  | 
 | ||
|  |     local RootTab = getroottable(); | ||
|  |     if (RootTab.rawin("LenheartBaseFuncTab")) { | ||
|  |         local LenheartFunc = RootTab["LenheartBaseFuncTab"]; | ||
|  |         foreach(Func in LenheartFunc) { | ||
|  |             Func(obj); | ||
|  |         } | ||
|  |     } | ||
|  | 
 | ||
|  |     DrawYosinEventIconSystem(obj); | ||
|  |     DrawYosinPlayerEachSystem(obj); | ||
|  | 
 | ||
|  |     // AvatarShape(obj); //时装变身 | ||
|  |     DamageFont(obj); //伤害字体 | ||
|  | 
 | ||
|  |     DargonBox(obj); //龙盒 | ||
|  |     Medal(obj); //勋章系统 | ||
|  | 
 | ||
|  |     Anton(obj); //安图恩 | ||
|  |     AntonTopDraw(obj); //安图恩绘制 | ||
|  |     Luke(obj); //卢克 | ||
|  |     DrawLukeParty(obj); //卢克绘制 | ||
|  | 
 | ||
|  |     //TeamDPS(obj);//队伍dps | ||
|  | 
 | ||
|  |     BuffSwitching(obj); //buff换装 | ||
|  |     UpgradeSystem(obj); //新版强化系统 | ||
|  |     Ptst(obj); //护石系统 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |     Raid_Auction(obj); //团本竞拍 | ||
|  | 
 | ||
|  |     // SignIn(obj); //每日签到 | ||
|  | 
 | ||
|  |     ServerAuction(obj); //全服拍卖 | ||
|  | 
 | ||
|  |     // OnlineEvent(obj); //在线活动 | ||
|  | 
 | ||
|  |     MarrySystem(obj); //结婚系统 | ||
|  | 
 | ||
|  |     WorldTower(obj); //世界之塔 | ||
|  | 
 | ||
|  |     Fate_Select(obj); //命运的抉择 | ||
|  | 
 | ||
|  |     local RootTab = getroottable(); | ||
|  |     if (RootTab.rawin("LenheartFuncTab")) { | ||
|  |         local LenheartFunc = RootTab["LenheartFuncTab"]; | ||
|  |         foreach(Func in LenheartFunc) { | ||
|  |             Func(obj); | ||
|  |         } | ||
|  |     } | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |     Lenheartancient(obj); | ||
|  | 
 | ||
|  | 
 | ||
|  |     LenheartSeverNotiAnimotion(obj); | ||
|  | } | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | /* | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | */ | ||
|  | 
 | ||
|  | 
 | ||
|  | function Lenheartancient(obj) { | ||
|  |     if (!obj) | ||
|  |         return; | ||
|  |     local WeaponIndex = [28285]; | ||
|  |     local ExWeaponIndex = [28285]; | ||
|  |     local OpenSwitch = 0; | ||
|  |     foreach(v in WeaponIndex) { | ||
|  |         if (L_sq_GetCharacterAttribute(0x1c, 1) == v) OpenSwitch = 1; | ||
|  |     } | ||
|  |     foreach(v in WeaponIndex) { | ||
|  |         if (L_sq_GetCharacterAttribute(0x1c, 1) == v) OpenSwitch = 2; | ||
|  |     } | ||
|  |     if (OpenSwitch == 0) return; | ||
|  | 
 | ||
|  |     obj = sq_GetCNRDObjectToSQRCharacter(obj); | ||
|  |     local OutbreakBool = obj.getMyPassiveObject(48882, 0); //获取我创造的obj   荒古开启信号 | ||
|  |     local ap = obj.GetSquirrelAppendage("nutweapon/ancient/ap_ancient.nut"); //获取AP | ||
|  | 
 | ||
|  |     local AncientAttackHit = obj.getVar("AncientAttackHit"); //定义储存器 | ||
|  |     local AncientPowerValue = AncientAttackHit.getInt(0); //获取荒古魔能积攒数值 | ||
|  |     local AncientPowerStaAdd = 350; //获取常规状态伤害增加率 | ||
|  |     local AncientPowerLisAdd = 200; //获取魔能开启状态伤害增加率 | ||
|  |     if (OpenSwitch == 2 && AncientPowerValue == 0) { | ||
|  |         AncientAttackHit.setInt(0, 100); | ||
|  |     } | ||
|  | 
 | ||
|  |     AncientAttackHit.setInt(10, AncientPowerStaAdd); //设置技能伤害提升 -- 常规 | ||
|  | 
 | ||
|  |     if (!CNSquirrelAppendage.sq_IsAppendAppendage(obj, "nutweapon/ancient/ap_ancient.nut")) //如果AP不在身上 附加AP给 人物 | ||
|  |     { | ||
|  |         CNSquirrelAppendage.sq_RemoveAppendage(obj, "nutweapon/ancient/ap_ancient.nut"); | ||
|  |         local masterAppendage = CNSquirrelAppendage.sq_AppendAppendage(obj, obj, -1, false, "nutweapon/ancient/ap_ancient.nut", true); | ||
|  |     } | ||
|  | 
 | ||
|  | 
 | ||
|  |     if (AncientPowerValue == 101 || AncientPowerValue == 103 || AncientPowerValue == 105 || AncientPowerValue == 107) //开启魔能的后续状态 | ||
|  |     { | ||
|  |         if (OutbreakBool || AncientPowerValue == 103 || AncientPowerValue == 105) { | ||
|  |             AncientAttackHit.setInt(0, AncientPowerValue + 1); | ||
|  |             CNSquirrelAppendage.sq_RemoveAppendage(obj, "nutweapon/ancient/ap_ancient.nut"); | ||
|  |             local masterAppendage = CNSquirrelAppendage.sq_AppendAppendage(obj, obj, -1, false, "nutweapon/ancient/ap_ancient.nut", true); | ||
|  |         } | ||
|  |         if (AncientPowerValue == 107) { | ||
|  |             obj.sq_SendCreatePassiveObjectPacket(48883, 0, 0, 0, 0); | ||
|  |             AncientAttackHit.setInt(0, 0); | ||
|  |         } | ||
|  |     } | ||
|  | 
 | ||
|  | 
 | ||
|  |     if (AncientPowerValue >= 102) AncientAttackHit.setInt(10, AncientPowerStaAdd + AncientPowerLisAdd); //如果魔能开启则设置技能伤害提升 --爆发 | ||
|  | 
 | ||
|  | } | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | function proc_appendage_ancient(appendage) { | ||
|  |     if (!appendage) return; | ||
|  | 
 | ||
|  |     local obj = appendage.getParent(); //获取父对象 | ||
|  |     obj = sq_GetCNRDObjectToSQRCharacter(obj); //转换为角色类 | ||
|  |     local AncientAttackHit = obj.getVar("AncientAttackHit"); //定义储存器 | ||
|  |     local AncientPowerValue = AncientAttackHit.getInt(0); //获取荒古魔能数值 | ||
|  | 
 | ||
|  |     if (AncientAttackHit.getInt(16) != AncientAttackHit.getInt(0)) //储存器 缓冲值 不等于 荒古魔能数值 | ||
|  |     { | ||
|  |         if (AncientPowerValue == 0) //魔能为0删除动画 | ||
|  |         { | ||
|  |             appendage.sq_DeleteEffectFront(); | ||
|  |         } | ||
|  |         if (AncientPowerValue > 0 && AncientPowerValue< 20) //画动画 | ||
|  |         { | ||
|  |             if (AncientAttackHit.getInt(16) <= 0 || AncientAttackHit.getInt(16) >= 20) { | ||
|  |                 appendage.sq_DeleteEffectFront(); | ||
|  |                 appendage.sq_AddEffectFront("common/nutwepen/ancient/1/particle2.ani"); | ||
|  |             } | ||
|  |         } | ||
|  |         if (AncientPowerValue >= 20 && AncientPowerValue< 40) //画动画 | ||
|  |         { | ||
|  |             if (AncientAttackHit.getInt(16)< 20 || AncientAttackHit.getInt(16) >= 40) { | ||
|  |                 appendage.sq_DeleteEffectFront(); | ||
|  |                 appendage.sq_AddEffectFront("common/nutwepen/ancient/2/particle2.ani"); | ||
|  |             } | ||
|  |         } | ||
|  |         if (AncientPowerValue >= 40 && AncientPowerValue< 60) //画动画 | ||
|  |         { | ||
|  |             if (AncientAttackHit.getInt(16)< 40 || AncientAttackHit.getInt(16) >= 60) { | ||
|  |                 appendage.sq_DeleteEffectFront(); | ||
|  |                 appendage.sq_AddEffectFront("common/nutwepen/ancient/3/particle1.ani"); | ||
|  |             } | ||
|  |         } | ||
|  |         if (AncientPowerValue >= 60 && AncientPowerValue< 80) //画动画 | ||
|  |         { | ||
|  |             if (AncientAttackHit.getInt(16)< 60 || AncientAttackHit.getInt(16) >= 80) { | ||
|  |                 appendage.sq_DeleteEffectFront(); | ||
|  |                 appendage.sq_AddEffectFront("common/nutwepen/ancient/4/particle1.ani"); | ||
|  |             } | ||
|  |         } | ||
|  |         if (AncientPowerValue >= 80 && AncientPowerValue< 100) //画动画 | ||
|  |         { | ||
|  |             if (AncientAttackHit.getInt(16)< 80 || AncientAttackHit.getInt(16) >= 100) { | ||
|  |                 appendage.sq_DeleteEffectFront(); | ||
|  |                 appendage.sq_AddEffectFront("common/nutwepen/ancient/5/particle1.ani"); | ||
|  |             } | ||
|  |         } | ||
|  |         if (AncientPowerValue == 100) //画动画 | ||
|  |         { | ||
|  |             if (AncientAttackHit.getInt(16)< 100) { | ||
|  |                 appendage.sq_DeleteEffectFront(); | ||
|  |                 appendage.sq_AddEffectFront("common/nutwepen/ancient/6/new_effect.ani"); | ||
|  |                 AncientAttackHit.setInt(0, AncientAttackHit.getInt(0) + 1); | ||
|  |             } | ||
|  |         } | ||
|  | 
 | ||
|  |         //开启魔能后 | ||
|  |         if (AncientPowerValue == 102 && AncientAttackHit.getInt(16) != 102) { | ||
|  |             appendage.sq_DeleteEffectFront(); | ||
|  |             appendage.sq_AddEffectFront("common/nutwepen/ancient/open/01_red/red_onedodge2.ani"); | ||
|  |         } | ||
|  |         if (AncientPowerValue == 104 && AncientAttackHit.getInt(16) != 104) { | ||
|  |             appendage.sq_DeleteEffectFront(); | ||
|  |             appendage.sq_AddEffectFront("common/nutwepen/ancient/open/02_yellow/yellow_onedodge2.ani"); | ||
|  |         } | ||
|  |         if (AncientPowerValue == 106 && AncientAttackHit.getInt(16) != 106) { | ||
|  |             appendage.sq_DeleteEffectFront(); | ||
|  |             appendage.sq_AddEffectFront("common/nutwepen/ancient/open/03_white/white_onedodge2.ani"); | ||
|  |         } | ||
|  | 
 | ||
|  |         AncientAttackHit.setInt(16, AncientAttackHit.getInt(0)); //同步储存器 缓冲值和魔能值 | ||
|  |     } | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |     local Time = appendage.getTimer().Get(); //获取AP持续时间 | ||
|  |     if (Time > AncientAttackHit.getInt(15) && AncientPowerValue< 100) //AP时间大于 储存器中的缓冲时间 并且魔能值小于100 | ||
|  |     { | ||
|  |         if (Time - AncientAttackHit.getInt(15) >= 5000) //如果超过五秒没有攻击 | ||
|  |         { | ||
|  |             AncientAttackHit.setInt(0, AncientPowerValue - 10); //减少十点魔能 | ||
|  |             AncientAttackHit.setInt(15, appendage.getTimer().Get()); //同步缓冲区 | ||
|  |             if (AncientAttackHit.getInt(0)< 0) AncientAttackHit.setInt(0, 0); //如果是负数就归零 | ||
|  |         } | ||
|  |     } | ||
|  |     if (AncientPowerValue > 101) //如果处于魔能开启状态 | ||
|  |     { | ||
|  |         if (Time > 7000) //每过7秒 进入下一阶段 | ||
|  |         { | ||
|  |             AncientAttackHit.setInt(0, AncientPowerValue + 1); | ||
|  |             appendage.setValid(false); | ||
|  |         } | ||
|  |     } | ||
|  | } | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | function onAttackParent_appendage_ancient(appendage, realAttacker, damager, boundingBox, isStuck) { | ||
|  |     if (!appendage) return; | ||
|  | 
 | ||
|  |     local obj = appendage.getParent(); //获取父对象 | ||
|  |     obj = sq_GetCNRDObjectToSQRCharacter(obj); //转化为角色类对象 | ||
|  | 
 | ||
|  |     local AncientAttackHit = obj.getVar("AncientAttackHit"); //定义储存器 | ||
|  |     AncientAttackHit.clear_vector(); //清栈 初始化储存器 | ||
|  | 
 | ||
|  |     local AncientPowerValue = AncientAttackHit.getInt(0); //获取魔能值 | ||
|  | 
 | ||
|  |     if (AncientPowerValue< 100) //魔能值小于100时 | ||
|  |     { | ||
|  |         AncientAttackHit.setInt(0, AncientPowerValue + 1); //攻击魔能值+1 | ||
|  |         AncientAttackHit.setInt(15, appendage.getTimer().Get()); //同步储存器缓冲时间 | ||
|  |     } | ||
|  | 
 | ||
|  | } |