This code defines an NPC AI script for the 'JingXiBossEventAI2' character in Aion. This NPC is an aggressive monster that has a special behavior when its health drops below 10%.

The 'handleAttack' method is called when the NPC is attacked. It then calls the 'checkPercentage' method to check its health percentage.

If the NPC's health is below or equal to 10%, the 'ShadowOfOblivionType' method is triggered. This method uses the SkillEngine to apply a skill to the NPC and then spawns a random one of four different NPCs (IDs 888381, 888521, 888421, and 888401).

The 'announceShadowOfOblivion' method sends a system message to nearby players, informing them that the NPC is transforming.

Overall, this script defines a simple NPC AI that controls an aggressive monster's behavior, including its attack handling, HP percentage check, and transformation into different creatures when its health is low.


原文地址: https://www.cveoy.top/t/topic/bhK3 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录