//裁决轮回斩 function checkExecutableSkill_Dismember(obj) { if (!obj) return false; local isUse = obj.sq_IsUseSkill(SKILL_BYKK_DISMEMBER); if (isUse){ obj.getVar("Dismember").setInt(0, 0); local loadSlot = obj.sq_GetSkillLoad(SKILL_BYKK_HOLYFLAME); if(loadSlot){ if(loadSlot.getRemainLoadNumber() > 0){ obj.getVar("Dismember").setInt(0, 1); loadSlot.decreaseLoadCount(1); } } obj.sq_IntVectClear(); if(obj.getState() == STATE_JUMP) obj.sq_IntVectPush(6); else obj.sq_IntVectPush(0); obj.sq_AddSetStatePacket(STATE_BYKK_DISMEMBER, STATE_PRIORITY_IGNORE_FORCE, true); return true; } return false; } function checkCommandEnable_Dismember(obj) { if (!obj) return false; return true; } function onSetState_Dismember(obj, state, datas, isResetTimer) { if(!obj) return; local subState = obj.sq_GetVectorData(datas, 0); obj.setSkillSubState(subState); obj.sq_StopMove(); obj.sq_ZStop(); switch(subState){ case 0: obj.sq_SetCurrentAnimation(ATPANI_BYKK_DISMEMBER_1_UPPERHIT_READYBODY); obj.sq_SetStaticSpeedInfo(SPEED_TYPE_ATTACK_SPEED, SPEED_TYPE_ATTACK_SPEED, SPEED_VALUE_DEFAULT, SPEED_VALUE_DEFAULT, 1.0, 1.0); local currentAni = obj.getCurrentAnimation(); local speedRate = 4000 / currentAni.getDelaySum(0, 0); local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atdismember/upperhit_slash_dodge02.ani", 0, 2, 0); local pAni = pooledObj.getCurrentAnimation(); pAni.setSpeedRate(speedRate.tofloat()); if(obj.getVar("Dismember").getInt(0) > 0){ obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/holyflameweaponeffect/dismember_1_upperhit_readybody.ani"), 0, 0); local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atdismember/upperhitfire_fire02.ani", 0, 2, 0); local pAni = pooledObj.getCurrentAnimation(); pAni.setSpeedRate(speedRate.tofloat()); } return; break; case 1: obj.sq_SetCurrentAnimation(ATPANI_BYKK_DISMEMBER_2_UPPERHIT_JUMPBODY); sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atdismember/upperjumpdust.ani", 0, -1, 0); if(obj.getVar("Dismember").getInt(0) > 0){ obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/holyflameweaponeffect/dismember_2_upperhit_jumpbody.ani"), 0, 0); } local totalDamage = obj.sq_GetBonusRateWithPassive(SKILL_BYKK_DISMEMBER, -1, 0, 1.0); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, ATPATK_BYKK_DISMEMBER_UPPER)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(obj.getVar("Dismember").getInt(0) > 0){ totalDamage = totalDamage * sq_GetLevelData(obj, SKILL_BYKK_HOLYFLAME, 0, sq_GetSkillLevel(obj, SKILL_BYKK_HOLYFLAME)) / 1000; obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } obj.sq_PlaySound("PW_DISMEMBER_01"); break; case 2: obj.sq_SetCurrentAnimation(ATPANI_BYKK_DISMEMBER_3_SPINHIT_SPINBODY); obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/atdismember/spinhit_slash_dodge03.ani"), 0, 0); if(obj.getVar("Dismember").getInt(0) > 0) obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/holyflameweaponeffect/dismember_3_spinhit_spinbody.ani"), 0, 0); local totalDamage = obj.sq_GetBonusRateWithPassive(SKILL_BYKK_DISMEMBER, -1, 0, 1.0); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, ATPATK_BYKK_DISMEMBER_SPINATTACK)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(obj.getVar("Dismember").getInt(0) > 0){ totalDamage = totalDamage * sq_GetLevelData(obj, SKILL_BYKK_HOLYFLAME, 0, sq_GetSkillLevel(obj, SKILL_BYKK_HOLYFLAME)) / 1000; obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } break; case 3: obj.sq_SetCurrentAnimation(ATPANI_BYKK_DISMEMBER_4_SPINHIT_DROPBODY); obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/atdismember/spinhit_slash_dodge03.ani"), 0, 0); if(obj.getVar("Dismember").getInt(0) > 0) obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/holyflameweaponeffect/dismember_4_spinhit_dropbody.ani"), 0, 0); break; case 4: obj.sq_SetCurrentAnimation(ATPANI_BYKK_DISMEMBER_5_DOWNHIT_BODY); obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/atdismember/downhit_slash_dodge.ani"), 0, 0); obj.sq_AddStateLayerAnimation(2,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/atdismember/downhit_slash_normal.ani"), 0, 0); sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atdismember/downhitdustfront_01.ani", 0, 1, 0); sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atdismember/downhitdustback_01.ani", 0, -1, 0); sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atdismember/downhit_dust01.ani", 0, -1, 0); if(obj.getVar("Dismember").getInt(0) > 0){ obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/holyflameweaponeffect/dismember_5_downhit_body.ani"), 0, 0); // obj.sq_AddStateLayerAnimation(10001,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/atdismember/downhitfire_smoke.ani"), 0, 0); sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atdismember/downhitfire_smoke.ani", 0, -1, 0); } else sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atdismember/downhitfloor_crack.ani", 0, -1, 0); sq_flashScreen(obj,0,100,0,127, sq_RGB(255,255,255), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM); sq_SetMyShake(obj, 8, 100); local totalDamage = obj.sq_GetBonusRateWithPassive(SKILL_BYKK_DISMEMBER, -1, 1, 1.0); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, ATPATK_BYKK_DISMEMBER_DOWNBLOW)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(obj.getVar("Dismember").getInt(0) > 0){ totalDamage = totalDamage * sq_GetLevelData(obj, SKILL_BYKK_HOLYFLAME, 0, sq_GetSkillLevel(obj, SKILL_BYKK_HOLYFLAME)) / 1000; obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } break; case 5: obj.sq_SetCurrentAnimation(ATPANI_BYKK_DISMEMBER_6_FINISHHIT_BODY); obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/atdismember/finishhit_slash_dodge02.ani"), 0, 0); if(obj.getVar("Dismember").getInt(0) > 0){ obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/holyflameweaponeffect/dismember_6_finishhit_body.ani"), 0, 0); obj.sq_AddStateLayerAnimation(10001,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/atdismember/finishhitfire_fire02.ani"), 0, 0); } local totalDamage = obj.sq_GetBonusRateWithPassive(SKILL_BYKK_DISMEMBER, -1, 1, 1.0); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, ATPATK_BYKK_DISMEMBER_FINISHBLOW)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(obj.getVar("Dismember").getInt(0) > 0){ totalDamage = totalDamage * sq_GetLevelData(obj, SKILL_BYKK_HOLYFLAME, 0, sq_GetSkillLevel(obj, SKILL_BYKK_HOLYFLAME)) / 1000; obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } break; case 6: obj.sq_SetCurrentAnimation(ATPANI_BYKK_DISMEMBER_3_BACKSTEP_BODYSPIN); obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/atdismember/backstep_slash_dodge02.ani"), 0, 0); if(obj.getVar("Dismember").getInt(0) > 0){ obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/holyflameweaponeffect/dismember_3_backstep_bodyspin.ani"), 0, 0); } local totalDamage = obj.sq_GetBonusRateWithPassive(SKILL_BYKK_DISMEMBER, -1, 0, 1.0); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, ATPATK_BYKK_DISMEMBER_SPINATTACK)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(obj.getVar("Dismember").getInt(0) > 0){ totalDamage = totalDamage * sq_GetLevelData(obj, SKILL_BYKK_HOLYFLAME, 0, sq_GetSkillLevel(obj, SKILL_BYKK_HOLYFLAME)) / 1000; obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } break; case 7: obj.sq_SetCurrentAnimation(ATPANI_BYKK_DISMEMBER_4_BACKSTEP_BODYDROP); obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/atdismember/backstep_slash_dodge02.ani"), 0, 0); if(obj.getVar("Dismember").getInt(0) > 0){ obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/holyflameweaponeffect/dismember_4_backstep_bodydrop.ani"), 0, 0); } break; } obj.sq_SetStaticSpeedInfo(SPEED_TYPE_ATTACK_SPEED, SPEED_TYPE_ATTACK_SPEED, SPEED_VALUE_DEFAULT, SPEED_VALUE_DEFAULT, 1.0, 1.0); if(subState == 3 || subState == 7){ obj.getVar("Dismember").setInt(1, sq_GetXPos(obj)); obj.getVar("Dismember").setInt(2, 120); obj.getVar("Dismember").setInt(3, 0); obj.getVar("Dismember").setInt(4, sq_GetZPos(obj)); } } function onEndCurrentAni_Dismember(obj) { if(!obj) return; local subState = obj.getSkillSubState(); switch(subState){ case 0: case 1: case 2: case 3: case 6: obj.sq_IntVectClear(); obj.sq_IntVectPush(subState + 1); obj.sq_AddSetStatePacket(STATE_BYKK_DISMEMBER, STATE_PRIORITY_AUTO, true); break; case 4: case 5: obj.sq_IntVectClear(); obj.sq_AddSetStatePacket(STATE_STAND, STATE_PRIORITY_AUTO, true); break; case 7: obj.sq_IntVectClear(); obj.sq_IntVectPush(5); obj.sq_AddSetStatePacket(STATE_BYKK_DISMEMBER, STATE_PRIORITY_AUTO, true); break; } } function onProcCon_Dismember(obj) { if(!obj) return; } function onProc_Dismember(obj) { if(!obj) return; local subState = obj.getSkillSubState(); switch(subState){ case 1: local currentAni = obj.getCurrentAnimation(); local delaySum = currentAni.getDelaySum(false); local stateTime = obj.sq_GetStateTimer(); local v = sq_GetAccel(0, 120, stateTime, delaySum, true); sq_setCurrentAxisPos(obj, 2, v); break; case 3: case 7: local currentAni = obj.getCurrentAnimation(); local delaySum = currentAni.getDelaySum(false); local stateTime = obj.sq_GetStateTimer(); local v = sq_GetAccel(obj.getVar("Dismember").getInt(4), 0, stateTime, delaySum, false); sq_setCurrentAxisPos(obj, 2, v); local vx = sq_GetAccel(obj.getVar("Dismember").getInt(3), obj.getVar("Dismember").getInt(2), stateTime, delaySum, false); local offSetX = sq_GetDistancePos(obj.getVar("Dismember").getInt(1), sq_GetDirection(obj), vx); if(obj.isMovablePos(offSetX, sq_GetYPos(obj))) sq_setCurrentAxisPos(obj, 0, offSetX); else{ obj.getVar("Dismember").setInt(1, sq_GetXPos(obj)); obj.getVar("Dismember").setInt(2, 120); obj.getVar("Dismember").setInt(3, 0); } break; } } function onKeyFrameFlag_Dismember(obj, flagIndex) { if(!obj) return false; switch(flagIndex){ case 201: sq_SetMyShake(obj, 3, 50); break; case 301: //`draw holy flame spin effect` if(obj.getVar("Dismember").getInt(0) > 0) sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atdismember/spinhitfire_fire03.ani", 0, 0, 0); break; case 302: obj.resetHitObjectList(); break; case 1301: //`draw holy flame spin effect` if(obj.getVar("Dismember").getInt(0) > 0) sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atdismember/spinhitfire_fire03.ani", 0, 0, 0); break; case 1302: //`draw holy flame spin effect` if(obj.getVar("Dismember").getInt(0) > 0) sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atdismember/spinhitfire_fire03.ani", 0, 0, 0); obj.resetHitObjectList(); break; case 1303: obj.resetHitObjectList(); break; case 501: //`holy flame enable` obj.getVar("HolyFlameEnable").setBool(0, true); obj.getVar("PurificationEnable").setBool(0, true); break; case 601: obj.sq_PlaySound("PW_DISMEMBER_02"); sq_flashScreen(obj,0,50,100,102, sq_RGB(255,255,255), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM); sq_SetMyShake(obj, 5, 60); break; case 602: //`holy flame enable` obj.getVar("HolyFlameEnable").setBool(0, true); obj.getVar("PurificationEnable").setBool(0, true); break; } return true; } function onTimeEvent_Dismember(obj, timeEventIndex, timeEventCount) { if(!obj) return false; } function onEndState_Dismember(obj, new_state) { if(!obj) return; } function onAttack_Dismember(obj, damager, boundingBox, isStuck) { if(!obj || isStuck) return; if(damager.isObjectType(OBJECTTYPE_ACTIVE)){ if(obj.getVar("Dismember").getInt(0) > 0) onAttack_EssenceofPhlege_SetFireBomb(obj, damager, boundingBox); } } //车轮刑 function checkExecutableSkill_WheelOfPunishment(obj) { if (!obj) return false; local isUse = obj.sq_IsUseSkill(SKILL_BYKK_WHEELOFPUNISHMENT); if (isUse){ obj.getVar("WheelOfPunishment").setInt(0, 0); local loadSlot = obj.sq_GetSkillLoad(SKILL_BYKK_HOLYFLAME); if(loadSlot){ if(loadSlot.getRemainLoadNumber() > 0){ obj.getVar("WheelOfPunishment").setInt(0, 1); loadSlot.decreaseLoadCount(1); } } obj.sq_IntVectClear(); obj.sq_IntVectPush(0); obj.sq_AddSetStatePacket(STATE_BYKK_WHEELOFPUNISHMENT, STATE_PRIORITY_IGNORE_FORCE, true); return true; } return false; } function checkCommandEnable_WheelOfPunishment(obj) { if (!obj) return false; return true; } function onSetState_WheelOfPunishment(obj, state, datas, isResetTimer) { if(!obj) return; local subState = obj.sq_GetVectorData(datas, 0); obj.setSkillSubState(subState); obj.sq_StopMove(); switch(subState){ case 0: obj.sq_SetCurrentAnimation(ATPANI_BYKK_WHEELOFPUNISHMENT_START_BODY); if(obj.getVar("WheelOfPunishment").getInt(0) > 0){ obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/holyflameweaponeffect/wheelofpunishment_start_body.ani"), 0, 0); } sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atwheelofpunishment/attack2fire_1.ani", 0, 0, 0); local totalDamage = obj.sq_GetBonusRateWithPassive(SKILL_BYKK_WHEELOFPUNISHMENT, -1, 0, 1.0); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, ATPATK_BYKK_WHEELOFPUNISHMENT_FIRST)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(obj.getVar("WheelOfPunishment").getInt(0) > 0){ totalDamage = totalDamage * sq_GetLevelData(obj, SKILL_BYKK_HOLYFLAME, 0, sq_GetSkillLevel(obj, SKILL_BYKK_HOLYFLAME)) / 1000; obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } break; } obj.sq_SetStaticSpeedInfo(SPEED_TYPE_ATTACK_SPEED, SPEED_TYPE_ATTACK_SPEED, SPEED_VALUE_DEFAULT, SPEED_VALUE_DEFAULT, 1.0, 1.0); } function onEndCurrentAni_WheelOfPunishment(obj) { if(!obj) return; local subState = obj.getSkillSubState(); switch(subState){ case 0: obj.sq_IntVectClear(); obj.sq_AddSetStatePacket(STATE_STAND, STATE_PRIORITY_AUTO, true); break; } } function onProcCon_WheelOfPunishment(obj) { if(!obj) return; } function onKeyFrameFlag_WheelOfPunishment(obj, flagIndex) { if(!obj) return false; switch(flagIndex){ case 101: sq_flashScreen(obj,0,80,80,51, sq_RGB(255,255,255), GRAPHICEFFECT_LINEARDODGE, ENUM_DRAWLAYER_COVER); sq_SetMyShake(obj, 5, 160); break; case 102: //`add fire effect` local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atwheelofpunishment/floor_7.ani", 0, 0, 0); sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM); break; case 103: sq_SetMyShake(obj, 5, 160); break; case 104: //`create wheel` local totalDamage = obj.sq_GetBonusRateWithPassive(SKILL_BYKK_WHEELOFPUNISHMENT, -1, 1, 1.0); local totalDamage_Exp = obj.sq_GetBonusRateWithPassive(SKILL_BYKK_WHEELOFPUNISHMENT, -1, 2, 1.0); local sizeRate = sq_GetIntData(obj, SKILL_BYKK_WHEELOFPUNISHMENT, 5); local hitMax = 25; local sub = 0; if(obj.getVar("WheelOfPunishment").getInt(0) > 0) sub = 1; // local currentAni = obj.getCurrentAnimation(); // local speedRate = 8000 / currentAni.getDelaySum(0, 0); local sub = obj.getVar("WheelOfPunishment").getInt(0); createSkillPassive_ATPriest_bykk(obj,obj,PASSIVEOBJ_BYKK_ATPRIEST,0,0,0,obj.getDirection(),2,SKILL_BYKK_WHEELOFPUNISHMENT,1,totalDamage,totalDamage_Exp,sizeRate,hitMax,sub,0,0,0); break; } return true; } function onTimeEvent_WheelOfPunishment(obj, timeEventIndex, timeEventCount) { if(!obj) return false; } function onEndState_WheelOfPunishment(obj, new_state) { if(!obj) return; } function onAttack_WheelOfPunishment(obj, damager, boundingBox, isStuck) { if(!obj || isStuck) return; if(damager.isObjectType(OBJECTTYPE_ACTIVE)){ if(obj.getVar("WheelOfPunishment").getInt(0) > 0) onAttack_EssenceofPhlege_SetFireBomb(obj, damager, boundingBox); } } //补赎逆十字 function checkExecutableSkill_EradicateCross(obj) { if (!obj) return false; local isUse = obj.sq_IsUseSkill(SKILL_BYKK_ERADICATECROSS); if (isUse){ obj.sq_IntVectClear(); obj.sq_IntVectPush(0); obj.sq_AddSetStatePacket(STATE_BYKK_ERADICATECROSS, STATE_PRIORITY_IGNORE_FORCE, true); return true; } return false; } function checkCommandEnable_EradicateCross(obj) { if (!obj) return false; return true; } function onSetState_EradicateCross(obj, state, datas, isResetTimer) { if(!obj) return; local subState = obj.sq_GetVectorData(datas, 0); obj.setSkillSubState(subState); obj.sq_StopMove(); switch(subState){ case 0: obj.sq_SetCurrentAnimation(ATPANI_BYKK_ERADICATECROSS_READY_BODY); sq_flashScreen(obj,80,240,0,165, sq_RGB(0,0,0), GRAPHICEFFECT_LINEARDODGE, ENUM_DRAWLAYER_BOTTOM); break; case 1: obj.sq_SetCurrentAnimation(ATPANI_BYKK_ERADICATECROSS_ATTACK1_BODY); sq_flashScreen(obj,0,240,0,165, sq_RGB(0,0,0), GRAPHICEFFECT_LINEARDODGE, ENUM_DRAWLAYER_BOTTOM); local totalDamage = obj.sq_GetBonusRateWithPassive(SKILL_BYKK_ERADICATECROSS, -1, 0, 1.0); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, ATPATK_BYKK_ERADICATECROSS_ATTACK1)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local loadSlot = obj.sq_GetSkillLoad(SKILL_BYKK_HOLYFLAME); if(loadSlot){ totalDamage = totalDamage * sq_GetLevelData(obj, SKILL_BYKK_HOLYFLAME, 0, sq_GetSkillLevel(obj, SKILL_BYKK_HOLYFLAME)) / 1000; obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } break; case 2: obj.sq_SetCurrentAnimation(ATPANI_BYKK_ERADICATECROSS_ATTACK2_BODY); obj.sq_SetStaticSpeedInfo(SPEED_TYPE_ATTACK_SPEED, SPEED_TYPE_ATTACK_SPEED, SPEED_VALUE_DEFAULT, SPEED_VALUE_DEFAULT, 1.0, 1.0); local currentAni = obj.getCurrentAnimation(); obj.setTimeEvent(1, currentAni.getDelaySum(0, 4), 1, false); sq_flashScreen(obj,0,320,0,165, sq_RGB(0,0,0), GRAPHICEFFECT_LINEARDODGE, ENUM_DRAWLAYER_BOTTOM); local totalDamage = obj.sq_GetBonusRateWithPassive(SKILL_BYKK_ERADICATECROSS, -1, 1, 1.0); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, ATPATK_BYKK_ERADICATECROSS_ATTACK2)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local loadSlot = obj.sq_GetSkillLoad(SKILL_BYKK_HOLYFLAME); if(loadSlot){ totalDamage = totalDamage * sq_GetLevelData(obj, SKILL_BYKK_HOLYFLAME, 0, sq_GetSkillLevel(obj, SKILL_BYKK_HOLYFLAME)) / 1000; obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } break; case 3: obj.sq_SetCurrentAnimation(ATPANI_BYKK_ERADICATECROSS_END_BODY); break; } obj.sq_SetStaticSpeedInfo(SPEED_TYPE_ATTACK_SPEED, SPEED_TYPE_ATTACK_SPEED, SPEED_VALUE_DEFAULT, SPEED_VALUE_DEFAULT, 1.0, 1.0); } function onEndCurrentAni_EradicateCross(obj) { if(!obj) return; local subState = obj.getSkillSubState(); switch(subState){ case 0: case 1: case 2: obj.sq_IntVectClear(); obj.sq_IntVectPush(subState + 1); obj.sq_AddSetStatePacket(STATE_BYKK_ERADICATECROSS, STATE_PRIORITY_AUTO, true); break; case 3: obj.sq_IntVectClear(); obj.sq_AddSetStatePacket(STATE_STAND, STATE_PRIORITY_AUTO, true); break; } } function onProcCon_EradicateCross(obj) { if(!obj) return; } function onKeyFrameFlag_EradicateCross(obj, flagIndex) { if(!obj) return false; switch(flagIndex){ case 101: sq_SetMyShake(obj, 3, 100); break; case 102: sq_flashScreen(obj,0,0,80,255, sq_RGB(0,0,0), GRAPHICEFFECT_LINEARDODGE, ENUM_DRAWLAYER_BOTTOM); //`Slash1` sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/ateradicatecross/slash1/slash1_front_00.ani", 300, 1, 0); //`Slash1Effect` break; case 201: sq_flashScreen(obj,50,40,50,255, sq_RGB(255,255,255), GRAPHICEFFECT_LINEARDODGE, ENUM_DRAWLAYER_BOTTOM); sq_SetMyShake(obj, 17, 200); //`Slash2` sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/ateradicatecross/slash2/slash2_front_00.ani", 300, 1, 0); sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/ateradicatecross/slash2/slash2_back_00.ani", 300, -1, 0); //`Slash2Effect` break; case 202: //`holy flame enable` obj.getVar("HolyFlameEnable").setBool(0, true); obj.getVar("PurificationEnable").setBool(0, true); break; } return true; } function onTimeEvent_EradicateCross(obj, timeEventIndex, timeEventCount) { if(!obj) return false; switch(timeEventIndex){ case 1: local sub = 0; local loadSlot = obj.sq_GetSkillLoad(SKILL_BYKK_HOLYFLAME); if(loadSlot) sub = 1; local totalDamage = obj.sq_GetBonusRateWithPassive(SKILL_BYKK_ERADICATECROSS, -1, 2, 1.0); local hitMax = 20; local lifeTime = 2000; obj.getVar("EradicateCrossObj").clear_obj_vector(); createSkillPassive_ATPriest_bykk(obj,obj,PASSIVEOBJ_BYKK_ATPRIEST,150,0,0,obj.getDirection(),2,SKILL_BYKK_ERADICATECROSS,1,totalDamage,hitMax,lifeTime,sub,0,0,0,0); break; } } function onEndState_EradicateCross(obj, new_state) { if(!obj) return; } function onAttack_EradicateCross(obj, damager, boundingBox, isStuck) { if(!obj || isStuck) return; if(damager.isObjectType(OBJECTTYPE_ACTIVE)){ local loadSlot = obj.sq_GetSkillLoad(SKILL_BYKK_HOLYFLAME); if(loadSlot) onAttack_EssenceofPhlege_SetFireBomb(obj, damager, boundingBox); } } //火刑 function checkExecutableSkill_BurnAtTheStake(obj) { if (!obj) return false; local isUse = obj.sq_IsUseSkill(SKILL_BYKK_BURNATTHESTAKE); if (isUse){ obj.sq_IntVectClear(); obj.sq_IntVectPush(0); obj.sq_AddSetStatePacket(STATE_BYKK_BURNATTHESTAKE, STATE_PRIORITY_IGNORE_FORCE, true); return true; } return false; } function checkCommandEnable_BurnAtTheStake(obj) { if (!obj) return false; return true; } function onSetState_BurnAtTheStake(obj, state, datas, isResetTimer) { if(!obj) return; local subState = obj.sq_GetVectorData(datas, 0); obj.setSkillSubState(subState); obj.sq_StopMove(); obj.sq_ZStop(); switch(subState){ case 0: obj.sq_SetCurrentAnimation(ATPANI_BYKK_BURNATTHESTAKE_CAST_BODY); obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/holyflameweaponeffect/burnatthestake_cast_body.ani"), 0, 0); sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atburnatthestake/cast_effect_1.ani", 0, 0, 0); if(sq_GetSkillLevel(obj, SKILL_BYKK_BURNATTHESTAKE) >= 3) sq_SendMessage(obj, 0, 1, 0); obj.sq_PlaySound("R_PW_BURN_STAKE_01"); break; case 1: obj.sq_SetCurrentAnimation(ATPANI_BYKK_BURNATTHESTAKE_A_START_BODY); obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/holyflameweaponeffect/burnatthestake_a_start_body.ani"), 0, 0); local totalDamage = obj.sq_GetBonusRateWithPassive(SKILL_BYKK_BURNATTHESTAKE, -1, 0, 1.0); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, ATPATK_BYKK_BURNATTHESTAKE_FIRST)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local loadSlot = obj.sq_GetSkillLoad(SKILL_BYKK_HOLYFLAME); if(loadSlot){ totalDamage = totalDamage * sq_GetLevelData(obj, SKILL_BYKK_HOLYFLAME, 0, sq_GetSkillLevel(obj, SKILL_BYKK_HOLYFLAME)) / 1000; obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } break; case 2: obj.sq_SetCurrentAnimation(ATPANI_BYKK_BURNATTHESTAKE_B_MOVE_BODY); obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/holyflameweaponeffect/burnatthestake_b_move_body.ani"), 0, 0); break; case 3: obj.sq_SetCurrentAnimation(ATPANI_BYKK_BURNATTHESTAKE_C_JUMP_BODY); obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/holyflameweaponeffect/burnatthestake_c_jump_body.ani"), 0, 0); break; case 4: obj.sq_SetCurrentAnimation(ATPANI_BYKK_BURNATTHESTAKE_D_SLOWJUMP_BODY); obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/holyflameweaponeffect/burnatthestake_d_slowjump_body.ani"), 0, 0); break; case 5: obj.sq_SetCurrentAnimation(ATPANI_BYKK_BURNATTHESTAKE_E_FALL_BODY); obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/holyflameweaponeffect/burnatthestake_e_fall_body.ani"), 0, 0); local totalDamage = obj.sq_GetBonusRateWithPassive(SKILL_BYKK_BURNATTHESTAKE, -1, 1, 1.0); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, ATPATK_BYKK_BURNATTHESTAKE_DOWN)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local loadSlot = obj.sq_GetSkillLoad(SKILL_BYKK_HOLYFLAME); if(loadSlot){ totalDamage = totalDamage * sq_GetLevelData(obj, SKILL_BYKK_HOLYFLAME, 0, sq_GetSkillLevel(obj, SKILL_BYKK_HOLYFLAME)) / 1000; obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } break; case 6: obj.sq_SetCurrentAnimation(ATPANI_BYKK_BURNATTHESTAKE_F_MOVEBACK_BODY); obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/holyflameweaponeffect/burnatthestake_f_moveback_body.ani"), 0, 0); obj.sq_SetStaticSpeedInfo(SPEED_TYPE_ATTACK_SPEED, SPEED_TYPE_ATTACK_SPEED, SPEED_VALUE_DEFAULT, SPEED_VALUE_DEFAULT, 1.0, 1.0); local aniPath = ["character/swordman/effect/animation/1_atpriest_bykk/atburnatthestake/cross/01front_a1.ani","character/swordman/effect/animation/1_atpriest_bykk/atburnatthestake/cross/02crossfront_1.ani","character/swordman/effect/animation/1_atpriest_bykk/atburnatthestake/cross/02frontfrie_1.ani","character/swordman/effect/animation/1_atpriest_bykk/atburnatthestake/cross/03cross_q1.ani","character/swordman/effect/animation/1_atpriest_bykk/atburnatthestake/cross/04crossback_1.ani","character/swordman/effect/animation/1_atpriest_bykk/atburnatthestake/cross/05sky_1.ani","character/swordman/effect/animation/1_atpriest_bykk/atburnatthestake/cross/06back_backobject_03.ani"]; local offSetY = [1,1,2,-1,-1,0,-1]; local currentAni = obj.getCurrentAnimation(); local speedRate = 4000 / currentAni.getDelaySum(0, 0); for(local i = 0; i < aniPath.len(); i++){ local pooledObj = sq_AddDrawOnlyAniFromParent(obj, aniPath[i], 0, offSetY[i], 0); local pAni = pooledObj.getCurrentAnimation(); pAni.setSpeedRate(speedRate.tofloat()); } local bonusRate = 1.0; if(sq_GetSkillLevel(obj, SKILL_BYKK_BURNATTHESTAKE) >= 6) bonusRate = 1.1; local totalDamage = obj.sq_GetBonusRateWithPassive(SKILL_BYKK_BURNATTHESTAKE, -1, 2, bonusRate); local hitTime = sq_GetIntData(obj, SKILL_BYKK_BURNATTHESTAKE, 4); local sub = 0; local loadSlot = obj.sq_GetSkillLoad(SKILL_BYKK_HOLYFLAME); if(loadSlot) sub = 1; createSkillPassive_ATPriest_bykk(obj,obj,PASSIVEOBJ_BYKK_ATPRIEST,0,0,0,obj.getDirection(),2,SKILL_BYKK_BURNATTHESTAKE,1,totalDamage,hitTime,sub,speedRate,0,0,0,0); obj.sq_PlaySound("R_PW_BURN_STAKE_02"); return; break; case 7: obj.sq_SetCurrentAnimation(ATPANI_BYKK_BURNATTHESTAKE_FINISH_BODY); obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("/effect/animation/1_atpriest_bykk/holyflameweaponeffect/burnatthestake_finish_body.ani"), 0, 0); break; } obj.sq_SetStaticSpeedInfo(SPEED_TYPE_ATTACK_SPEED, SPEED_TYPE_ATTACK_SPEED, SPEED_VALUE_DEFAULT, SPEED_VALUE_DEFAULT, 1.0, 1.0); } function onEndCurrentAni_BurnAtTheStake(obj) { if(!obj) return; local subState = obj.getSkillSubState(); switch(subState){ case 0: case 1: case 2: case 3: case 4: case 5: case 6: if(subState == 5) sq_SetMyShake(obj, 7, 130); obj.sq_IntVectClear(); obj.sq_IntVectPush(subState + 1); obj.sq_AddSetStatePacket(STATE_BYKK_BURNATTHESTAKE, STATE_PRIORITY_AUTO, true); break; case 7: obj.sq_IntVectClear(); obj.sq_AddSetStatePacket(STATE_STAND, STATE_PRIORITY_AUTO, true); break; } } function onProcCon_BurnAtTheStake(obj) { if(!obj) return; } function onProc_BurnAtTheStake(obj) { if(!obj) return; local subState = obj.getSkillSubState(); switch(subState){ case 3: local stateTime = obj.sq_GetStateTimer(); local currentAni = obj.getCurrentAnimation(); local fullTime = currentAni.getDelaySum(false); local v = sq_GetAccel(0, 125, stateTime, fullTime, true); sq_setCurrentAxisPos(obj, 2, v); break; case 4: local stateTime = obj.sq_GetStateTimer(); local currentAni = obj.getCurrentAnimation(); local fullTime = currentAni.getDelaySum(false); local v = sq_GetAccel(125, 150, stateTime, fullTime, true); sq_setCurrentAxisPos(obj, 2, v); break; case 5: local stateTime = obj.sq_GetStateTimer(); local currentAni = obj.getCurrentAnimation(); local fullTime = currentAni.getDelaySum(false); local v = sq_GetAccel(150, 0, stateTime, fullTime, true); sq_setCurrentAxisPos(obj, 2, v); break; } } function onKeyFrameFlag_BurnAtTheStake(obj, flagIndex) { if(!obj) return false; switch(flagIndex){ case 101: obj.sq_SetXScrollStart(50, 0); local offSetX = sq_GetDistancePos(sq_GetXPos(obj), sq_GetDirection(obj), -50); sq_setCurrentAxisPos(obj, 0, offSetX); break; } return true; } function onTimeEvent_BurnAtTheStake(obj, timeEventIndex, timeEventCount) { if(!obj) return false; } function onEndState_BurnAtTheStake(obj, new_state) { if(!obj) return; if(new_state != STATE_BYKK_BURNATTHESTAKE){ obj.sq_SetXScrollStop(0); sq_SimpleMoveToNearMovablePos(obj, 100); if(sq_GetSkillLevel(obj, SKILL_BYKK_BURNATTHESTAKE) >= 3) sq_SendMessage(obj, 0, 0, 0); if(sq_GetSkillLevel(obj, SKILL_BYKK_BURNATTHESTAKE) >= 9){ local apdPath = "character/demonicswordman/2_inquistor/ap_burnatthestake_buff.nut"; if(CNSquirrelAppendage.sq_IsAppendAppendage(obj, apdPath)) CNSquirrelAppendage.sq_RemoveAppendage(obj, apdPath); local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(obj, obj, -1, false, apdPath, true); AddAppendage.setEnableIsBuff(true); AddAppendage.setAppendCauseSkill(BUFF_CAUSE_SKILL, sq_getJob(obj), SKILL_BYKK_BURNATTHESTAKE, sq_GetSkillLevel(obj, SKILL_BYKK_BURNATTHESTAKE)); CNSquirrelAppendage.sq_Append(AddAppendage, obj, obj, true); local buffTime = sq_GetIntData(obj, SKILL_BYKK_BURNATTHESTAKE, 3); AddAppendage.sq_SetValidTime(buffTime); } } } function onAttack_BurnAtTheStake(obj, damager, boundingBox, isStuck) { if(!obj || isStuck) return; if(damager.isObjectType(OBJECTTYPE_ACTIVE)){ local loadSlot = obj.sq_GetSkillLoad(SKILL_BYKK_HOLYFLAME); if(loadSlot) onAttack_EssenceofPhlege_SetFireBomb(obj, damager, boundingBox); local subState = obj.getSkillSubState(); if(subState == 2){ local apdPath = "appendage/ap_common_hold.nut"; if(!CNSquirrelAppendage.sq_IsAppendAppendage(damager, apdPath)){ local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(damager, obj, -1, false, apdPath, true); AddAppendage.sq_SetValidTime(500); if(!sq_IsFixture(damager)) sq_MoveToAppendageForce(damager, obj, obj, 0, 0, damager.getZPos(), 150, true, AddAppendage); } } } } function onStart_appendage_burnatthestake_buff(appendage) { local parentObj = appendage.getParent(); local obj = sq_GetCNRDObjectToSQRCharacter(parentObj); local skillLevel = sq_GetSkillLevel(obj, SKILL_BYKK_BURNATTHESTAKE) local coolTime = 10; local change_appendage = appendage.sq_getChangeStatus("burnatthestake"); if(!change_appendage) change_appendage = appendage.sq_AddChangeStatus("burnatthestake",obj, obj, 0, CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, true, 1000); if(change_appendage){ change_appendage.clearParameter(); change_appendage.addParameter(CHANGE_STATUS_TYPE_COOLTIME_DECLINE, true, (coolTime * -1).tofloat()); } } //炎狱祭坛 : 炮烙 function checkExecutableSkill_Inferno(obj) { if (!obj) return false; local isUse = obj.sq_IsUseSkill(SKILL_BYKK_INFERNO); if (isUse){ obj.sq_IntVectClear(); obj.sq_IntVectPush(0); obj.sq_AddSetStatePacket(STATE_BYKK_INFERNO, STATE_PRIORITY_IGNORE_FORCE, true); return true; } return false; } function checkCommandEnable_Inferno(obj) { if (!obj) return false; return true; } function onSetState_Inferno(obj, state, datas, isResetTimer) { if(!obj) return; local subState = obj.sq_GetVectorData(datas, 0); obj.setSkillSubState(subState); obj.sq_StopMove(); switch(subState){ case 0: obj.sq_SetCurrentAnimation(ATPANI_BYKK_INFERNO_START1_BODY); obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/holyflameweaponeffect/inferno_start1_body.ani"), 0, 0); // obj.sq_SetStaticSpeedInfo(SPEED_TYPE_ATTACK_SPEED, SPEED_TYPE_ATTACK_SPEED, SPEED_VALUE_DEFAULT, SPEED_VALUE_DEFAULT, 1.0, 1.0); local currentAni = obj.getCurrentAnimation(); local speedRate = 8000 / currentAni.getDelaySum(0, 0); createSkillPassive_ATPriest_bykk(obj,obj,PASSIVEOBJ_BYKK_ATPRIEST,0,-1,0,obj.getDirection(),2,SKILL_BYKK_INFERNO,1,speedRate,0,0,0,0,0,0,0); obj.sq_PlaySound("R_PW_INFERNO"); obj.sq_PlaySound("INFERNO_ALTAR"); obj.getVar("InfernoTar").clear_obj_vector(); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, ATPATK_BYKK_INFERNOHOLD)); break; case 1: obj.sq_SetCurrentAnimation(ATPANI_BYKK_INFERNO_ATTACK3_BODY); // obj.sq_SetStaticSpeedInfo(SPEED_TYPE_ATTACK_SPEED, SPEED_TYPE_ATTACK_SPEED, SPEED_VALUE_DEFAULT, SPEED_VALUE_DEFAULT, 1.0, 1.0); // local currentAni = obj.getCurrentAnimation(); // local speedRate = 4000 / currentAni.getDelaySum(0, 0); local aniPath = [ "character/swordman/effect/animation/1_atpriest_bykk/atinferno/2attack/inferno_attack7_ground.ani", // "character/swordman/effect/animation/1_atpriest_bykk/atinferno/2attack/inferno_attack2_rock1.ani", // "character/swordman/effect/animation/1_atpriest_bykk/atinferno/2attack/inferno_attack4_stake1.ani", "character/swordman/effect/animation/1_atpriest_bykk/atinferno/2attack/inferno_attack5_bgfire1.ani", // "character/swordman/effect/animation/1_atpriest_bykk/atinferno/2attack/inferno_attack6_crack.ani" ]; local drawlayer = [ENUM_DRAWLAYER_BOTTOM,ENUM_DRAWLAYER_BOTTOM,ENUM_DRAWLAYER_BOTTOM];//ENUM_DRAWLAYER_NORMAL,ENUM_DRAWLAYER_NORMAL, obj.getVar("InfernoEffect").clear_obj_vector(); for(local i = 0; i < aniPath.len(); i++){ local pooledObj = sq_AddDrawOnlyAniFromParent(obj, aniPath[i], 0, 0, 0); sq_ChangeDrawLayer(pooledObj, drawlayer[i]); // local pAni = pooledObj.getCurrentAnimation(); // pAni.setSpeedRate(speedRate.tofloat()); obj.getVar("InfernoEffect").push_obj_vector(pooledObj); } sq_flashScreen(obj,0,10,0,255, sq_RGB(0,0,0), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM); sq_SetShake(obj, 3, 240); //`clip` 17 0 94 //`makeCrack` local totalDamage = obj.sq_GetBonusRateWithPassive(SKILL_BYKK_INFERNO, -1, 0, 1.0); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, ATPATK_BYKK_INFERNOATK)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local loadSlot = obj.sq_GetSkillLoad(SKILL_BYKK_HOLYFLAME); if(loadSlot){ totalDamage = totalDamage * sq_GetLevelData(obj, SKILL_BYKK_HOLYFLAME, 0, sq_GetSkillLevel(obj, SKILL_BYKK_HOLYFLAME)) / 1000; obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } break; case 2: obj.sq_SetCurrentAnimation(ATPANI_BYKK_INFERNO_FINISH3_BODY); // obj.sq_SetStaticSpeedInfo(SPEED_TYPE_ATTACK_SPEED, SPEED_TYPE_ATTACK_SPEED, SPEED_VALUE_DEFAULT, SPEED_VALUE_DEFAULT, 1.0, 1.0); // local currentAni = obj.getCurrentAnimation(); // local speedRate = 4000 / currentAni.getDelaySum(0, 0); local totalDamage = obj.sq_GetBonusRateWithPassive(SKILL_BYKK_INFERNO, -1, 1, 1.0); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, ATPATK_BYKK_INFERNOFINISH)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local loadSlot = obj.sq_GetSkillLoad(SKILL_BYKK_HOLYFLAME); if(loadSlot){ totalDamage = totalDamage * sq_GetLevelData(obj, SKILL_BYKK_HOLYFLAME, 0, sq_GetSkillLevel(obj, SKILL_BYKK_HOLYFLAME)) / 1000; obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } local size = obj.getVar("InfernoEffect").get_obj_vector_size(); if(size > 0){ for(local i = 0; i < size; i++){ local aObj = obj.getVar("InfernoEffect").get_obj_vector(i); if(aObj) aObj.setValid(false); } } local aniPath = ["character/swordman/effect/animation/1_atpriest_bykk/atinferno/3finish/inferno_finish1_fire1.ani", "character/swordman/effect/animation/1_atpriest_bykk/atinferno/3finish/inferno_finish2_rock1.ani", "character/swordman/effect/animation/1_atpriest_bykk/atinferno/3finish/inferno_finish4_fire1.ani", "character/swordman/effect/animation/1_atpriest_bykk/atinferno/3finish/inferno_finish5_ground.ani", "character/swordman/effect/animation/1_atpriest_bykk/atinferno/3finish/inferno_finish6_bgfire1.ani"]; local drawlayer = [ENUM_DRAWLAYER_NORMAL,ENUM_DRAWLAYER_NORMAL,ENUM_DRAWLAYER_NORMAL,ENUM_DRAWLAYER_BOTTOM,ENUM_DRAWLAYER_BOTTOM]; for(local i = 0; i < aniPath.len(); i++){ local pooledObj = sq_AddDrawOnlyAniFromParent(obj, aniPath[i], 0, 0, 0); sq_ChangeDrawLayer(pooledObj, drawlayer[i]); // local pAni = pooledObj.getCurrentAnimation(); // pAni.setSpeedRate(speedRate.tofloat()); if(i == 0){ pAni.setImageRateFromOriginal(1.25, 1.0); pAni.setAutoLayerWorkAnimationAddSizeRate(1.25); } } break; case 3: obj.sq_SetCurrentAnimation(ATPANI_BYKK_INFERNO_LANDING_BODY); // obj.sq_SetStaticSpeedInfo(SPEED_TYPE_ATTACK_SPEED, SPEED_TYPE_ATTACK_SPEED, SPEED_VALUE_DEFAULT, SPEED_VALUE_DEFAULT, 1.0, 1.0); local size = obj.getVar("InfernoTar").get_obj_vector_size(); if(size > 0){ for(local i = 0; i < size; i++){ local targetObj = obj.getVar("InfernoTar").get_obj_vector(i); if(targetObj) CNSquirrelAppendage.sq_RemoveAppendage(targetObj, "character/demonicswordman/2_inquistor/ap_inferno_hold.nut"); } } break; } } function onEndCurrentAni_Inferno(obj) { if(!obj) return; local subState = obj.getSkillSubState(); switch(subState){ case 0: case 1: case 2: obj.sq_IntVectClear(); obj.sq_IntVectPush(subState + 1); obj.sq_AddSetStatePacket(STATE_BYKK_INFERNO, STATE_PRIORITY_AUTO, true); break; case 3: obj.sq_IntVectClear(); obj.sq_AddSetStatePacket(STATE_STAND, STATE_PRIORITY_AUTO, true); break; } } function onProcCon_Inferno(obj) { if(!obj) return; } function onKeyFrameFlag_Inferno(obj, flagIndex) { if(!obj) return false; switch(flagIndex){ case 104: obj.resetHitObjectList(); break; case 106: sq_SetShake(obj, 3, 240); //`makeCrack` // sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atinferno/groundcrack/inferno_smallcracka_start_crack.ani", 0, 0, 0); break; case 116: sq_SetShake(obj, 2, 960); break; case 120: //`releaseClip` break; case 201: sq_SetShake(obj, 10, 500); break; case 204: sq_flashScreen(obj,0,10,0,255, sq_RGB(255,255,255), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM); break; } return true; } function onTimeEvent_Inferno(obj, timeEventIndex, timeEventCount) { if(!obj) return false; } function onEndState_Inferno(obj, new_state) { if(!obj) return; if(new_state != STATE_BYKK_INFERNO){ local size = obj.getVar("InfernoTar").get_obj_vector_size(); if(size > 0){ for(local i = 0; i < size; i++){ local targetObj = obj.getVar("InfernoTar").get_obj_vector(i); if(targetObj) CNSquirrelAppendage.sq_RemoveAppendage(targetObj, "character/demonicswordman/2_inquistor/ap_inferno_hold.nut"); } } } } function onAttack_Inferno(obj, damager, boundingBox, isStuck) { if(!obj || isStuck) return; if(damager.isObjectType(OBJECTTYPE_ACTIVE)){ local loadSlot = obj.sq_GetSkillLoad(SKILL_BYKK_HOLYFLAME); if(loadSlot) onAttack_EssenceofPhlege_SetFireBomb(obj, damager, boundingBox); } local subState = obj.getSkillSubState(); switch(subState){ case 0: case 1: if(damager.isObjectType(OBJECTTYPE_ACTIVE)){ if(!CNSquirrelAppendage.sq_IsAppendAppendage(damager, "character/demonicswordman/2_inquistor/ap_inferno_hold.nut")){ local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(damager, obj, -1, false, "character/demonicswordman/2_inquistor/ap_inferno_hold.nut", true); sq_HoldAndDelayDie(damager, obj, true, true, true, 200, 200, ENUM_DIRECTION_NEUTRAL , AddAppendage); obj.getVar("InfernoTar").push_obj_vector(damager); // local group = sq_GetGroup(damager); // local uniqueId = sq_GetUniqueId(damager); // createSkillPassive_ATPriest_bykk(obj,damager,PASSIVEOBJ_BYKK_ATPRIEST,0,0,0,obj.getDirection(),2,SKILL_BYKK_INFERNO,2,group,uniqueId,0,0,0,0,0,0); } } break; } } //狂热信仰 function checkExecutableSkill_Fanaticism(obj) { if (!obj) return false; local isUse = obj.sq_IsUseSkill(SKILL_BYKK_FANATICISM); if (isUse){ obj.sq_IntVectClear(); obj.sq_IntVectPush(0); obj.sq_AddSetStatePacket(STATE_BYKK_FANATICISM, STATE_PRIORITY_IGNORE_FORCE, true); return true; } return false; } function checkCommandEnable_Fanaticism(obj) { if (!obj) return false; return true; } function onSetState_Fanaticism(obj, state, datas, isResetTimer) { if(!obj) return; local subState = obj.sq_GetVectorData(datas, 0); obj.setSkillSubState(subState); obj.sq_StopMove(); switch(subState){ case 0: obj.sq_SetCurrentAnimation(ATPANI_BYKK_FANATICISM_BODY); local loadSlot = obj.sq_GetSkillLoad(SKILL_BYKK_HOLYFLAME); if(loadSlot) obj.sq_AddStateLayerAnimation(1,obj.sq_CreateCNRDAnimation("effect/animation/1_atpriest_bykk/holyflameweaponeffect/fanaticism_body.ani"), 0, 0); obj.sq_SetStaticSpeedInfo(SPEED_TYPE_ATTACK_SPEED, SPEED_TYPE_ATTACK_SPEED, SPEED_VALUE_DEFAULT, SPEED_VALUE_DEFAULT, 1.0, 1.0); local currentAni = obj.getCurrentAnimation(); local speedRate = 5000 / currentAni.getDelaySum(0, 0); local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atfanaticism/fanaticismfloor_floor.ani", 0, -1, 0); sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM); local pAni = pooledObj.getCurrentAnimation(); pAni.setSpeedRate(speedRate.tofloat()); obj.sq_PlaySound("R_PW_FANATICISM"); break; } } function onEndCurrentAni_Fanaticism(obj) { if(!obj) return; local subState = obj.getSkillSubState(); switch(subState){ case 0: obj.sq_IntVectClear(); obj.sq_AddSetStatePacket(STATE_STAND, STATE_PRIORITY_AUTO, true); break; } } function onProcCon_Fanaticism(obj) { if(!obj) return; } function onKeyFrameFlag_Fanaticism(obj, flagIndex) { if(!obj) return false; switch(flagIndex){ case 101: local apdPath = "character/demonicswordman/2_inquistor/ap_fanaticism_buff.nut"; if(CNSquirrelAppendage.sq_IsAppendAppendage(obj, apdPath)) CNSquirrelAppendage.sq_RemoveAppendage(obj, apdPath); local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(obj, obj, -1, false, apdPath, true); break; } return true; } function onTimeEvent_Fanaticism(obj, timeEventIndex, timeEventCount) { if(!obj) return false; } function onEndState_Fanaticism(obj, new_state) { if(!obj) return; } function onStart_appendage_fanaticism_buff(appendage) { local parentObj = appendage.getParent(); local obj = sq_GetCNRDObjectToSQRCharacter(parentObj); setSkillBonusRate_2Inquistor_bykk(obj); local skillLevel = sq_GetSkillLevel(obj, SKILL_BYKK_FANATICISM); appendage.setBuffIconImage(130); appendage.setEnableIsBuff(true); appendage.setAppendCauseSkill(BUFF_CAUSE_SKILL, sq_getJob(obj), SKILL_BYKK_FANATICISM, skillLevel); local buffTime = sq_GetLevelData(obj, SKILL_BYKK_FANATICISM, 2, skillLevel); if(buffTime != 0) appendage.sq_SetValidTime(buffTime); local criticalRate = sq_GetLevelData(obj, SKILL_BYKK_FANATICISM, 1, skillLevel); // local criticalDamageRate = sq_GetLevelData(obj, SKILL_BYKK_FANATICISM, 0, skillLevel); // print("criticalRate = "+criticalRate); // print("criticalDamageRate = "+criticalDamageRate); local change_appendage = appendage.sq_getChangeStatus("Fanaticism"); if(!change_appendage) change_appendage = appendage.sq_AddChangeStatus("Fanaticism",obj, obj, 0, CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, true, 1000); if(change_appendage){ change_appendage.clearParameter(); change_appendage.addParameter(CHANGE_STATUS_TYPE_PHYSICAL_CRITICAL_HIT_RATE, false, (criticalRate * 0.1).tofloat()); // change_appendage.addParameter(CHANGE_STATUS_TYPE_PHYSICAL_CRITICAL_DAMAGE_RATE, true, (criticalDamageRate * 0.1 / 0.667).tofloat()); } } function onStart_appendage_atinquistor_weaponmastery(appendage) { if(!appendage) return; local parentObj = appendage.getParent(); local obj = sq_GetCNRDObjectToSQRCharacter(parentObj); if(!obj || obj.getState() == STATE_DIE) return; local weaponType = obj.getWeaponSubType(); // print("weaponType = "+weaponType); if(weaponType == -1) return; if(weaponType == 4){ local skillLevel = sq_GetSkillLevel(obj, SKILL_BYKK_BATTLEAXEMASTERY); local attackSpeed = sq_GetLevelData(obj, SKILL_BYKK_BATTLEAXEMASTERY, 0, skillLevel); local stuckRate = sq_GetLevelData(obj, SKILL_BYKK_BATTLEAXEMASTERY, 1, skillLevel); local damageRate = sq_GetLevelData(obj, SKILL_BYKK_BATTLEAXEMASTERY, 2, skillLevel); // print(attackSpeed); // print(stuckRate); // print(damageRate); local change_appendage = appendage.sq_getChangeStatus("crossmastery"); if(!change_appendage) change_appendage = appendage.sq_AddChangeStatus("crossmastery",obj, obj, 0, CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, true, 1000); if(change_appendage){ change_appendage.clearParameter(); change_appendage.addParameter(CHANGE_STATUS_TYPE_ATTACK_SPEED, false, (attackSpeed).tofloat()); change_appendage.addParameter(CHANGE_STATUS_TYPE_STUCK , false, (stuckRate * -0.1).tofloat()); change_appendage.addParameter(CHANGE_STATUS_TYPE_EQUIPMENT_PHYSICAL_ATTACK, true, (damageRate * 0.1).tofloat()); } } } function onStart_appendage_atinquistor_willofinquisitor(appendage) { if(!appendage) return; local parentObj = appendage.getParent(); local obj = sq_GetCNRDObjectToSQRCharacter(parentObj); if(!obj || obj.getState() == STATE_DIE) return; local moveSpeed = sq_GetIntData(obj, SKILL_BYKK_WILLOFINQUISITOR, 15); local change_appendage = appendage.sq_getChangeStatus("willofinquisitor"); if(!change_appendage) change_appendage = appendage.sq_AddChangeStatus("willofinquisitor",obj, obj, 0, CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, true, 1000); if(change_appendage){ change_appendage.clearParameter(); change_appendage.addParameter(CHANGE_STATUS_TYPE_MOVE_SPEED, false, (moveSpeed).tofloat()); } } function onAttackParent_appendage_atinquistor_weaponmastery(appendage, realAttacker, damager, boundingBox, isStuck) { if(!appendage) return; if(isStuck) return; local parentObj = appendage.getParent(); local obj = sq_GetCNRDObjectToSQRCharacter(parentObj); if(!obj || obj.getState() == STATE_DIE) return; local loadSlot = obj.sq_GetSkillLoad(SKILL_BYKK_HOLYFLAME); if(!loadSlot) return; if(realAttacker.isObjectType(OBJECTTYPE_PASSIVE)){ local colObj = sq_GetCNRDObjectToCollisionObject(realAttacker); if(colObj.getVar("skillIndex").getInt(0) == SKILL_BYKK_ESSENCEOFPHLEGE) return; } local skillLevel = sq_GetSkillLevel(obj, SKILL_BYKK_BRANDOFHERESY); if(skillLevel <= 0) return; local buffTime = sq_GetIntData(obj, SKILL_BYKK_BRANDOFHERESY, 1); if(damager.isObjectType(OBJECTTYPE_ACTIVE)){ local apdPath = "character/demonicswordman/2_inquistor/passiveskill/ap_brandofheresy_debuff.nut"; if(!CNSquirrelAppendage.sq_IsAppendAppendage(damager, apdPath)){ local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(damager, obj, -1, false, apdPath, true); AddAppendage.sq_SetValidTime(buffTime); } } } function drawAppend_appendage_brandofheresy_debuff(appendage, isOver, x, y, isFlip) { if(!appendage) return; local obj = appendage.getParent(); if (!obj || obj.getState() == STATE_DIE) { appendage.setValid(false); return; } local var = appendage.getVar(); local height = sq_GetHeightObject(obj) / 2; if(height > 100) height = 100; local Ani = var.GetAnimationMap("brandofheresy_eff01", "character/swordman/effect/animation/1_atpriest_bykk/atbrandofheresy/brandofheresy_eff01.ani"); sq_AnimationProc(Ani); sq_drawCurrentFrame(Ani, x, y - height, isFlip); } function drawAppend_appendage_holyflame_debuff(appendage, isOver, x, y, isFlip) { if(!appendage) return; local obj = appendage.getParent(); if (!obj || obj.getState() == STATE_DIE) { appendage.setValid(false); return; } local var = appendage.getVar(); local height = sq_GetHeightObject(obj) / 2; if(height > 100) height = 100; local Ani = var.GetAnimationMap("burn", "common/commoneffect/animation/decreaseeffect/burn.ani"); sq_AnimationProc(Ani); sq_drawCurrentFrame(Ani, x, y - height, isFlip); } function onAttackParent_appendage_holyflame_buff(appendage, realAttacker, damager, boundingBox, isStuck) { if(!appendage) return; if(isStuck) return; if(!damager.isObjectType(OBJECTTYPE_ACTIVE)) return; local parentObj = appendage.getParent(); local obj = sq_GetCNRDObjectToSQRCharacter(parentObj); if(!obj || obj.getState() == STATE_DIE) return; local loadSlot = obj.sq_GetSkillLoad(SKILL_BYKK_HOLYFLAME); if(!loadSlot) return; if(realAttacker.isObjectType(OBJECTTYPE_PASSIVE)){ return; } local burnDamage = obj.getVar("holyflameDamageSet").getInt(0); local burnTime = appendage.getVar("custom").getInt(0); if(damager.getVar("holyflameObj").get_obj_vector_size() > 0){ local holyflameObj = damager.getVar("holyflameObj").get_obj_vector(0); if(holyflameObj){ local colObj = sq_GetCNRDObjectToCollisionObject(holyflameObj); print("add = "+burnDamage); local baseDamage = colObj.getVar("damage").getInt(0); colObj.getVar("damage").setInt(0, baseDamage + burnDamage); } } else{ local group = sq_GetGroup(damager); local uniqueId = sq_GetUniqueId(damager); createSkillPassive_ATPriest_bykk(obj,damager,PASSIVEOBJ_BYKK_ATPRIEST,0,0,0,sq_GetDirection(obj),2,255,1,group,uniqueId,burnTime,burnDamage,0,0,0,0); } } function onStartMap_2inquistor_bykk(obj) { if(obj.getVar("isReset").getInt(0) == 0) setSkillBonusRate_2Inquistor_bykk(obj); } function onStartDungeon_AtPriest_2bykk(obj) { if(CNSquirrelAppendage.sq_IsAppendAppendage(obj, "character/demonicswordman/2_inquistor/ap_holyflame_buff.nut")) CNSquirrelAppendage.sq_RemoveAppendage(obj, "character/demonicswordman/2_inquistor/ap_holyflame_buff.nut"); local loadSlot = obj.sq_GetSkillLoad(SKILL_BYKK_HOLYFLAME); if(loadSlot) obj.sq_RemoveSkillLoad(SKILL_BYKK_HOLYFLAME); obj.getVar("isReset").setInt(0, 1); } function procAppend_AtPriest_2bykk(obj) { local loadSlot = obj.sq_GetSkillLoad(SKILL_BYKK_HOLYFLAME); if(loadSlot){ if(loadSlot.getRemainLoadNumber() == 0){obj.sq_RemoveSkillLoad(SKILL_BYKK_HOLYFLAME);} } local state = obj.getState(); if(obj.getVar("HolyFlameEnable").getBool(0) && state < 1 && state > 9){ obj.setSkillCommandEnable(SKILL_BYKK_HOLYFLAME, true); if(obj.sq_IsEnterSkill(SKILL_BYKK_HOLYFLAME) != -1){ obj.getVar("HolyFlameEnable").setBool(0, false); obj.sq_IntVectClear(); obj.sq_IntVectPush(0); obj.sq_AddSetStatePacket(STATE_BYKK_HOLYFLAME, STATE_PRIORITY_IGNORE_FORCE, true); return; } } if(obj.getVar("PurificationEnable").getBool(0) && state < 1 && state > 9){ obj.setSkillCommandEnable(SKILL_BYKK_PURIFICATION, true); if(obj.sq_IsEnterSkill(SKILL_BYKK_PURIFICATION) != -1){ obj.getVar("PurificationEnable").setBool(0, false); obj.sq_IntVectClear(); obj.sq_IntVectPush(0); obj.sq_AddSetStatePacket(STATE_BYKK_PURIFICATION, STATE_PRIORITY_IGNORE_FORCE, true); return; } } } function setSkillBonusRate_2Inquistor_bykk(obj) { local bonusRate = 1000; if(sq_GetSkillLevel(obj, SKILL_BYKK_BRANDOFHERESY) > 0) bonusRate = bonusRate * (1000 + sq_GetLevelData(obj, SKILL_BYKK_BRANDOFHERESY, 1, sq_GetSkillLevel(obj, SKILL_BYKK_BRANDOFHERESY))) / 1000; print("bonusRate1 = "+bonusRate); if(sq_GetSkillLevel(obj, SKILL_BYKK_FIRECONFESSION) > 0) bonusRate = bonusRate * (1000 + sq_GetLevelData(obj, SKILL_BYKK_FIRECONFESSION, 0, sq_GetSkillLevel(obj, SKILL_BYKK_FIRECONFESSION))) / 1000; print("bonusRate2 = "+bonusRate); if(sq_GetSkillLevel(obj, SKILL_BYKK_MALLEUSMALEFICARUM) > 0) bonusRate = bonusRate * (1000 + sq_GetLevelData(obj, SKILL_BYKK_MALLEUSMALEFICARUM, 0, sq_GetSkillLevel(obj, SKILL_BYKK_MALLEUSMALEFICARUM))) / 1000; print("bonusRate3 = "+bonusRate); if(CNSquirrelAppendage.sq_IsAppendAppendage(obj, "character/demonicswordman/2_inquistor/ap_fanaticism_buff.nut")) bonusRate = bonusRate * (1000 + sq_GetLevelData(obj, SKILL_BYKK_FANATICISM, 0, sq_GetSkillLevel(obj, SKILL_BYKK_FANATICISM))) / 1000; print("bonusRate4 = "+bonusRate); // bonusRate = bonusRate.tofloat() / 1000.0; obj.getVar("setSkillBonusRate").setInt(0, bonusRate.tointeger()); //sq_SetSkillAttackBonus(obj, bonusRate); } //////////////////////////////////////////////////////////////// //obj function setCustomData_po_atpriest_bykk(obj, receiveData) { if(!obj) return; local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter()); if(!sqrChr) return; local job = receiveData.readDword(); local skillIndex = receiveData.readDword(); local subtype = receiveData.readDword(); obj.getVar("job").setInt(0, job); obj.getVar("skillIndex").setInt(0, skillIndex); obj.getVar("subtype").setInt(0, subtype); switch(job){ case 0: switch(skillIndex){ case SKILL_BYKK_VIOLENTASSAULT: local totalDamage = receiveData.readDword(); local sizeRate = receiveData.readDword(); local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/atviolentassault/floor_shock_1.ani"); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 4)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local currentAni = obj.getCurrentAnimation(); sizeRate = sizeRate.tofloat() / 100.0; currentAni.setImageRateFromOriginal(sizeRate, sizeRate); currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate); sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM); sq_SetMyShake(obj, 2, 160); break; case SKILL_BYKK_HEAVYSIN: local totalDamage = receiveData.readDword(); local sizeRate = receiveData.readDword(); local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/atheavysin/heavysin_attack_dust.ani"); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 0)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local sub = receiveData.readDword(); if(sub == 1){ local prob = receiveData.readDword()*10; local level = receiveData.readDword(); local time = receiveData.readDword(); local speedRate = receiveData.readDword(); local speedRate2 = receiveData.readDword(); local attackInfo = sq_GetCurrentAttackInfo(obj); sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_SLOW,prob,level,time); } local currentAni = obj.getCurrentAnimation(); currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/atheavysin/heavysin_ground_crack.ani"),true); sizeRate = sizeRate.tofloat() / 100.0; currentAni.setImageRateFromOriginal(sizeRate, sizeRate); currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate); obj.setTimeEvent(0, currentAni.getDelaySum(0, 6), 1, false); break; case SKILL_BYKK_TALISMANOFLIGHTNING: local totalDamage = receiveData.readDword(); local sizeRate = receiveData.readDword(); local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/attalismanoflightning/talismanoflightning_attackeff01.ani"); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 3)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(sizeRate > 100){ local currentAni = obj.getCurrentAnimation(); sizeRate = sizeRate.tofloat() / 100.0; currentAni.setImageRateFromOriginal(sizeRate, sizeRate); currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate); } createOnlyDrawObject_ATPriest_bykk(obj, "passiveobject/atpriest_bykk/animation/attalismanoflightning/talismanoflightning_attackfloor.ani", true, obj.getDirection(), sq_GetXPos(obj), sq_GetYPos(obj), 0, ENUM_DRAWLAYER_BOTTOM); sq_flashScreen(obj,0,0,25,30, sq_RGB(255,255,255), GRAPHICEFFECT_LINEARDODGE, ENUM_DRAWLAYER_BOTTOM); sq_SetMyShake(obj,2,500); break; case SKILL_BYKK_HOLYFLASH: local totalDamage = receiveData.readDword(); local sizeRate = receiveData.readDword(); local moveX = receiveData.readDword(); obj.getVar("custom").setInt(10, totalDamage); obj.getVar("custom").setInt(11, sizeRate); obj.getVar("custom").setInt(12, moveX); obj.getVar("custom").setInt(13, sq_GetXPos(obj)); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; } break; case 1: switch(skillIndex){ case SKILL_BYKK_SPEAROFVICTORY: local power = receiveData.readDword(); local power_exp = receiveData.readDword(); local holdTime = receiveData.readDword(); local isCharge = receiveData.readDword(); obj.getVar("custom").setInt(10, power); obj.getVar("custom").setInt(11, power_exp); obj.getVar("custom").setInt(12, holdTime); obj.getVar("custom").setInt(13, isCharge); obj.getVar("move").setInt(10, sq_GetXPos(obj)); obj.getVar("move").setInt(11, sq_GetZPos(obj)); obj.getVar("tar").clear_obj_vector(); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; case SKILL_BYKK_HOLYLIGHT: local power = receiveData.readDword(); local buffTime = receiveData.readDword(); local group = receiveData.readDword(); local uniqueId = receiveData.readDword(); local targetObj = sq_GetObject(obj, group, uniqueId); if(targetObj){ local sqr = sq_GetCNRDObjectToSQRCharacter(targetObj); if(sqr.getVar("holyLight_eff").get_obj_vector_size() < 1) sqr.getVar("holyLight_eff").clear_obj_vector(); sqr.getVar("holyLight_eff").push_obj_vector(obj); obj.setMapFollowParent(sqrChr); obj.setMapFollowType(1); obj.getVar("tar").clear_obj_vector(); obj.getVar("tar").push_obj_vector(sqr); // sq_moveWithParent(sqr, obj); obj.setTimeEvent(100, 10, -1, true); obj.getVar("custom").setInt(10, power); obj.getVar("custom").setInt(11, buffTime); obj.getVar("custom").setInt(12, sq_GetZPos(obj)); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); } else sq_SendDestroyPacketPassiveObject(obj); break; case SKILL_BYKK_LIGHTOFHAPTISM: local power = receiveData.readDword(); local sizeRate = receiveData.readDword(); local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atlightofhaptism/atlightofhaptism_maggic_01.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 23)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power); local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atlightofhaptism/atlightofhaptism_ready.ani", 0, -1, 0); local pAni = obj.getCurrentAnimation(); obj.setTimeEvent(0, pAni.getDelaySum(0, 0), 1, false); if(sizeRate > 100){ obj.getVar("custom").setInt(10, sizeRate); sizeRate = sizeRate.tofloat() / 100.0; pAni.setImageRateFromOriginal(sizeRate, sizeRate); pAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); sq_SetAttackBoundingBoxSizeRate(pAni, sizeRate, sizeRate, sizeRate); } break; case SKILL_BYKK_SAINTFLASH: local power = receiveData.readDword(); local power_exp = receiveData.readDword(); local sizeRate = receiveData.readDword(); obj.getVar("custom").setInt(10, power); obj.getVar("custom").setInt(11, power_exp); obj.getVar("custom").setInt(13, sizeRate); obj.getVar("move").setInt(10, sq_GetXPos(obj)); obj.getVar("move").setInt(11, sq_GetZPos(obj)); obj.getVar("tar").clear_obj_vector(); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; case SKILL_BYKK_ARIAOFCOURAGE: local sizeRate = receiveData.readDword(); obj.getVar("custom").setInt(10, sizeRate); switch(subtype){ case 4://magiccircle local power = receiveData.readDword(); local hitTime = receiveData.readDword(); local hitMax = receiveData.readDword(); local lifeTime = receiveData.readDword(); local range = receiveData.readDword(); local increaseRate = receiveData.readDword(); local buffTime = receiveData.readDword(); obj.getVar("custom").setInt(11, power); obj.getVar("custom").setInt(12, hitTime); obj.getVar("custom").setInt(13, hitMax); obj.getVar("custom").setInt(14, lifeTime); obj.getVar("custom").setInt(15, range); obj.getVar("custom").setInt(16, increaseRate); obj.getVar("custom").setInt(17, buffTime); case 1://magiccircle if(subtype == 1){ sqrChr.getVar("ARIAOFCOURAGE_FLOOR").clear_obj_vector(); sqrChr.getVar("ARIAOFCOURAGE_FLOOR").push_obj_vector(obj); sq_moveWithParent(sqrChr, obj); } sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM); local skill = sq_GetSkill(sqrChr, SKILL_BYKK_ARIAOFCOURAGE); local isSeal = skill.isSealFunction(); if(!isSeal) obj.getVar("custom").setInt(30, 1); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; case 5://effect local lifeTime = receiveData.readDword(); obj.getVar("custom").setInt(11, lifeTime); case 2://effect if(subtype == 2){ sqrChr.getVar("ARIAOFCOURAGE_EFFECT").clear_obj_vector(); sqrChr.getVar("ARIAOFCOURAGE_EFFECT").push_obj_vector(obj); sq_moveWithParent(sqrChr, obj); } obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; case 6://musicpaper local lifeTime = receiveData.readDword(); obj.setTimeEvent(0, lifeTime, 1, false); case 3://musicpaper if(subtype == 3){ sqrChr.getVar("ARIAOFCOURAGE_MUSIC").clear_obj_vector(); sqrChr.getVar("ARIAOFCOURAGE_MUSIC").push_obj_vector(obj); sq_moveWithParent(sqrChr, obj); } obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; } break; case SKILL_BYKK_ARIAOFREGENERATION: local sizeRate = receiveData.readDword(); obj.getVar("custom").setInt(10, sizeRate); switch(subtype){ case 4://magiccircle lifeTime,HP_healRate,decreaseMax,0,0,0,0); local lifeTime = receiveData.readDword(); local HP_healRate = receiveData.readDword(); local decreaseMax = receiveData.readDword(); local range = receiveData.readDword(); obj.getVar("custom").setInt(11, lifeTime); obj.getVar("custom").setInt(12, HP_healRate); obj.getVar("custom").setInt(13, decreaseMax); obj.getVar("custom").setInt(14, range); case 1://magiccircle if(subtype == 1){ sqrChr.getVar("ARIAOFREGENERATION_FLOOR").clear_obj_vector(); sqrChr.getVar("ARIAOFREGENERATION_FLOOR").push_obj_vector(obj); sq_moveWithParent(sqrChr, obj); } sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; case 5://effect local lifeTime = receiveData.readDword(); obj.getVar("custom").setInt(11, lifeTime); case 2://effect if(subtype == 2){ sqrChr.getVar("ARIAOFREGENERATION_EFFECT").clear_obj_vector(); sqrChr.getVar("ARIAOFREGENERATION_EFFECT").push_obj_vector(obj); sq_moveWithParent(sqrChr, obj); } obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; case 6://musicpaper local lifeTime = receiveData.readDword(); obj.setTimeEvent(0, lifeTime, 1, false); case 3://musicpaper if(subtype == 3){ sqrChr.getVar("ARIAOFREGENERATION_MUSIC").clear_obj_vector(); sqrChr.getVar("ARIAOFREGENERATION_MUSIC").push_obj_vector(obj); sq_moveWithParent(sqrChr, obj); } obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; } break; case SKILL_BYKK_HOLYCIRCLET: local power = receiveData.readDword(); local power_exp = receiveData.readDword(); local hitTime = receiveData.readDword(); local lifeTime = receiveData.readDword(); local subTime = receiveData.readDword(); local sizeRate = receiveData.readDword(); obj.getVar("custom").setInt(10, power); obj.getVar("custom").setInt(11, power_exp); obj.getVar("custom").setInt(12, hitTime); obj.getVar("custom").setInt(13, lifeTime); obj.getVar("custom").setInt(14, subTime); obj.getVar("custom").setInt(15, sizeRate); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; case SKILL_BYKK_THUNDEROFCLEANS: switch(subtype){ case 1: local power = receiveData.readDword(); local power_exp = receiveData.readDword(); local createMax = receiveData.readDword(); local createTime = receiveData.readDword(); local sub = receiveData.readDword(); local minSizeRate = receiveData.readDword(); local speed = receiveData.readDword(); obj.getVar("custom").setInt(10, power); obj.getVar("custom").setInt(11, power_exp); obj.getVar("custom").setInt(12, createMax); obj.getVar("custom").setInt(13, createTime); obj.getVar("custom").setInt(14, sub); obj.getVar("custom").setInt(15, minSizeRate); if(createMax > 0){ local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atthunderofcleans/atthunderofcleans_att2_attackbox_ani.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); local currentAni = obj.getCurrentAnimation(); sq_SetFrameDelayTime(currentAni, 5, 1000); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 31)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power); obj.setTimeEvent(1, createTime, createMax, true); if(minSizeRate > 100){ local currentAni = obj.getCurrentAnimation(); local sizeRate = minSizeRate.tofloat() / 100.0; sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate); } } else{ local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atthunderofcleans/atthunderofcleans_magic_01.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); local currentAni = obj.getCurrentAnimation(); currentAni.setSpeedRate(speed.tofloat()); local pAni = obj.getCurrentAnimation(); obj.setTimeEvent(7, pAni.getDelaySum(false) / 2, 1, false); } break; case 2: local power = receiveData.readDword(); local sizeRate = receiveData.readDword(); obj.getVar("custom").setInt(10, sizeRate); local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atthunderofcleans/atthunderofcleans_last_thunder_att_lightning.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 30)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power); local currentAni = obj.getCurrentAnimation(); obj.setTimeEvent(3, currentAni.getDelaySum(0,0), 1, false); obj.setTimeEvent(4, currentAni.getDelaySum(0,1), 1, false); if(sizeRate > 100){ local currentAni = obj.getCurrentAnimation(); sizeRate = sizeRate.tofloat() / 100.0; currentAni.setImageRateFromOriginal(sizeRate, sizeRate); currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate); } break; case 3: local power = receiveData.readDword(); local sizeRate = receiveData.readDword(); obj.getVar("custom").setInt(10, sizeRate); local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atthunderofcleans/atthunderofcleans_att_lightning.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 29)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power); local currentAni = obj.getCurrentAnimation(); obj.setTimeEvent(5, currentAni.getDelaySum(0,0), 1, false); obj.setTimeEvent(6, currentAni.getDelaySum(0,1), 1, false); if(sizeRate > 100){ local currentAni = obj.getCurrentAnimation(); sizeRate = sizeRate.tofloat() / 100.0; currentAni.setImageRateFromOriginal(sizeRate, sizeRate); currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate); } break; } break; case SKILL_BYKK_GRANDCROSSCRASH: switch(subtype){ case 1: local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atgrandcrosscrash/atgrandcrosscrash_smash_front.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); local power = receiveData.readDword(); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 19)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power); break; case 2: local lifeTime = receiveData.readDword(); local addTime = receiveData.readDword(); obj.getVar("custom").setInt(10, lifeTime); obj.getVar("custom").setInt(11, addTime); sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; } break; case SKILL_BYKK_CRUXOFVICTORIA: switch(subtype){ case 1: local power = receiveData.readDword(); local power_exp = receiveData.readDword(); local hitTime = receiveData.readDword(); obj.getVar("custom").setInt(10, power); obj.getVar("custom").setInt(11, power_exp); obj.getVar("custom").setInt(12, hitTime); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; case 2: obj.getVar("move").setInt(10, sq_GetXPos(obj)); obj.getVar("move").setInt(11, sq_GetYPos(obj)); obj.getVar("move").setInt(12, sq_GetZPos(obj)); local group = receiveData.readDword(); local uniqueId = receiveData.readDword(); local targetObj = sq_GetObject(obj, group, uniqueId); if(targetObj){ obj.getVar("tat").clear_obj_vector(); obj.getVar("tat").push_obj_vector(targetObj); local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/cruxofvictoria/buffeff.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); obj.setTimeEvent(2, 10, 100, true); } else sq_SendDestroyPacketPassiveObject(obj); break; case 3: local skillLevel = receiveData.readDword(); local buffTime = receiveData.readDword(); local phAttack = receiveData.readDword(); local mgAttack = receiveData.readDword(); local attackSpeed = receiveData.readDword(); local moveSpeed = receiveData.readDword(); local phDefense = receiveData.readDword(); local mgDefense = receiveData.readDword(); // print("skillLevel = "+skillLevel); // print("buffTime = "+buffTime); // print("phAttack = "+phAttack); // print("mgAttack = "+mgAttack); // print("attackSpeed = "+attackSpeed); // print("moveSpeed = "+moveSpeed); // print("phDefense = "+phDefense); // print("mgDefense = "+mgDefense); local objectManager = obj.getObjectManager(); local objectNumber = objectManager.getCollisionObjectNumber(); for (local i = 0; i < objectNumber; i++){ local object = objectManager.getCollisionObject(i); if (object && object.isObjectType(OBJECTTYPE_CHARACTER) && !sqrChr.isEnemy(object)) { local sqrChr2 = sq_GetCNRDObjectToSQRCharacter(object); if(sq_getJob(sqrChr2) == ENUM_CHARACTERJOB_PRIEST && sq_getGrowType(sqrChr2) == GROW_TYPE_CRUSADER) continue; local activeObj = sq_GetCNRDObjectToActiveObject(object); if(CNSquirrelAppendage.sq_IsAppendAppendage(activeObj, APDPATH_BLESSOFCOURAGEBOOL)) continue; if(CNSquirrelAppendage.sq_IsAppendAppendage(activeObj, APDPATH_CRUXOFVICTORIA)) CNSquirrelAppendage.sq_RemoveAppendage(activeObj, APDPATH_CRUXOFVICTORIA); local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(activeObj, sqrChr, -1, false, APDPATH_CRUXOFVICTORIA, true); AddAppendage.sq_SetValidTime(buffTime); AddAppendage.setAppendCauseSkill(BUFF_CAUSE_SKILL, sq_getJob(sqrChr), SKILL_BYKK_CRUXOFVICTORIA, skillLevel); CNSquirrelAppendage.sq_Append(AddAppendage, activeObj, sqrChr, true); local tiaozheng = 1; // if(isSameObject(sqrChr, activeObj)){ // tiaozheng = 0; // } AddAppendage.getVar("custom").setInt(11, phAttack * tiaozheng); AddAppendage.getVar("custom").setInt(12, mgAttack * tiaozheng); AddAppendage.getVar("custom").setInt(13, attackSpeed); AddAppendage.getVar("custom").setInt(14, moveSpeed); AddAppendage.getVar("custom").setInt(15, phDefense); AddAppendage.getVar("custom").setInt(16, mgDefense); local change_appendage = AddAppendage.sq_getChangeStatus("AT_Cruxofvictoria"); if(!change_appendage) change_appendage = AddAppendage.sq_AddChangeStatus("AT_Cruxofvictoria", activeObj, sqrChr, 0, CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, true, 1000); if(change_appendage){ change_appendage.clearParameter(); change_appendage.addParameter(CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, false, (phAttack * tiaozheng).tofloat()); change_appendage.addParameter(CHANGE_STATUS_TYPE_MAGICAL_ATTACK, false, (mgAttack * tiaozheng).tofloat()); change_appendage.addParameter(CHANGE_STATUS_TYPE_ATTACK_SPEED, false, (attackSpeed * 0.1).tofloat()); change_appendage.addParameter(CHANGE_STATUS_TYPE_MOVE_SPEED, false, (moveSpeed * 0.1).tofloat()); change_appendage.addParameter(CHANGE_STATUS_TYPE_EQUIPMENT_PHYSICAL_DEFENSE, false, (phDefense).tofloat()); change_appendage.addParameter(CHANGE_STATUS_TYPE_EQUIPMENT_MAGICAL_DEFENSE, false, (mgDefense).tofloat()); } } } obj.setTimeEvent(3, 100, 1, false); break; } break; case SKILL_BYKK_PROTECTIONOFURIEL://power,lifeTime,hitTime,range,attackSpeed,moveSpeed,castSpeed,damageRate local power = receiveData.readDword(); local lifeTime = receiveData.readDword(); local hitTime = receiveData.readDword(); local range = receiveData.readDword(); local sizeRate = range * 100 / 820; local attackSpeed = receiveData.readDword(); local moveSpeed = receiveData.readDword(); local castSpeed = receiveData.readDword(); local damageRate = receiveData.readDword(); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 24)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power); obj.getVar("custom").setInt(10, power); obj.getVar("custom").setInt(11, lifeTime); obj.getVar("custom").setInt(12, hitTime); obj.getVar("custom").setInt(13, sizeRate); obj.getVar("custom").setInt(14, attackSpeed); obj.getVar("custom").setInt(15, moveSpeed); obj.getVar("custom").setInt(16, castSpeed); obj.getVar("custom").setInt(17, damageRate); obj.getVar("custom").setInt(18, range); sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; case SKILL_BYKK_BLESSOFANGEL: switch(subtype){ case 1: local power = receiveData.readDword(); local lifeTime = receiveData.readDword(); obj.getVar("custom").setInt(10, power); obj.getVar("custom").setInt(11, lifeTime); local group = receiveData.readDword(); local uniqueId = receiveData.readDword(); local targetObj = sq_GetObject(obj, group, uniqueId); if(targetObj){ targetObj = sq_GetCNRDObjectToActiveObject(targetObj); // sqrChr.getVar("Blessofangel_eff").clear_obj_vector(); sqrChr.getVar("Blessofangel_eff").push_obj_vector(obj); obj.getVar("tar").clear_obj_vector(); obj.getVar("tar").push_obj_vector(targetObj); // local sqr = sq_GetCNRDObjectToSQRCharacter(targetObj); obj.setMapFollowParent(sqrChr); obj.setMapFollowType(1); // sq_moveWithParent(sqr, obj); obj.setTimeEvent(0, 10, -1, true); // obj.setTimeEvent(2, 20, -1, true); obj.getVar("custom").setInt(12, sq_GetZPos(obj)); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); } break; case 2: local power = receiveData.readDword(); local sizeRate = receiveData.readDword(); local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atblessofangel/blessofangel_phase3_sparkle02.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); local pooledObj = createOnlyDrawObject_ATPriest_bykk(obj,"passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atblessofangel/blessofangel_phase3_shockwave.ani", true, obj.getDirection(),sq_GetXPos(obj),sq_GetYPos(obj),0,ENUM_DRAWLAYER_BOTTOM); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 32)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power); if(sizeRate > 100){ local currentAni = obj.getCurrentAnimation(); local pAni = pooledObj.getCurrentAnimation(); sizeRate = sizeRate.tofloat() / 100.0; currentAni.setImageRateFromOriginal(sizeRate, sizeRate); currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate); pAni.setImageRateFromOriginal(sizeRate, sizeRate); } obj.sq_PlaySound("R_BREAK_SWORDDANCE_LIGHT"); break; } break; case SKILL_BYKK_MIRACLECHINE: switch(subtype){ case 1://targetMax,firstTargetXRange,firstTargetYRange,power,hitTime,hitMax,addRate,HP_healRate local targetMax = receiveData.readDword(); local firstTargetXRange = receiveData.readDword(); local firstTargetYRange = receiveData.readDword(); local power = receiveData.readDword(); local hitTime = receiveData.readDword(); local hitMax = receiveData.readDword(); local addRate = receiveData.readDword(); local HP_healRate = receiveData.readDword(); obj.getVar("custom").setInt(10, hitTime); obj.getVar("custom").setInt(11, hitMax); obj.getVar("custom").setInt(12, HP_healRate); obj.getVar("tar").clear_obj_vector(); local objectManager = obj.getObjectManager(); local objectNumber = objectManager.getCollisionObjectNumber(); for (local i = 0; i < objectNumber; i++){ local object = objectManager.getCollisionObject(i); local size = obj.getVar("tar").get_obj_vector_size(); if(size > 0){ if(object && !isSameObject(object, sqrChr) && object.isObjectType(OBJECTTYPE_ACTIVE) && sq_Abs(sq_GetXPos(object) - sq_GetXPos(obj)) <= 500 && sq_Abs(sq_GetYPos(object) - sq_GetYPos(obj)) <= 300 && size + 1 < targetMax){ obj.getVar("tar").push_obj_vector(object); local activeObj = sq_GetCNRDObjectToActiveObject(object); local group = sq_GetGroup(activeObj); local uniqueId = sq_GetUniqueId(activeObj); createSkillPassive_ATPriest_bykk(sqrChr,activeObj,PASSIVEOBJ_BYKK_ATPRIEST,0,0,sq_GetHeightObject(activeObj) / 2,obj.getDirection(),1,SKILL_BYKK_MIRACLECHINE,2,hitTime * hitMax,group,uniqueId,0,0,0,0,0); } } else if(object && isFrontObject_apt(sqrChr, object) && !isSameObject(object, sqrChr) && object.isObjectType(OBJECTTYPE_ACTIVE) && sq_Abs(sq_GetXPos(object) - sq_GetXPos(obj)) <= firstTargetXRange && sq_Abs(sq_GetYPos(object) - sq_GetYPos(obj)) <= firstTargetYRange){ obj.getVar("tar").push_obj_vector(object); local activeObj = sq_GetCNRDObjectToActiveObject(object); local group = sq_GetGroup(activeObj); local uniqueId = sq_GetUniqueId(activeObj); createSkillPassive_ATPriest_bykk(sqrChr,activeObj,PASSIVEOBJ_BYKK_ATPRIEST,0,0,sq_GetHeightObject(activeObj) / 2 - 25,obj.getDirection(),1,SKILL_BYKK_MIRACLECHINE,2,hitTime * hitMax,group,uniqueId,0,0,0,0,0); } } local size = obj.getVar("tar").get_obj_vector_size(); if(size > 0){ if(obj.getVar("tar").get_obj_vector_size() == 1){ power = power * (100 + addRate) / 100; } sq_AddDrawOnlyAniFromParent(obj, "character/swordman/effect/animation/1_atpriest_bykk/atmiracleshine/castsuccess_05.ani", 0, 0, 0); sq_SetCurrentAttackInfo(sqrChr, sq_GetCustomAttackInfo(sqrChr, 32)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(sqrChr), power); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); } else{ local aniPath = "character/swordman/effect/animation/1_atpriest_bykk/atmiracleshine/castfail_01.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); obj.getVar().setBool(0, true); } break; case 2: local lifeTime = receiveData.readDword(); obj.getVar("custom").setInt(10, lifeTime); local group = receiveData.readDword(); local uniqueId = receiveData.readDword(); local targetObj = sq_GetObject(obj, group, uniqueId); if(targetObj){ obj.getVar("tar").clear_obj_vector(); obj.getVar("tar").push_obj_vector(targetObj); obj.setTimeEvent(1, lifeTime, 1, false); obj.setTimeEvent(3, 500, -1, false); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); } else sq_SendDestroyPacketPassiveObject(obj); break; case 3: local lifeTime = receiveData.readDword(); //print("lifeTime = "+lifeTime); local aniPath = ["character/swordman/effect/animation/1_atpriest_bykk/atmiracleshine/line01_userenemyloop01.ani", "character/swordman/effect/animation/1_atpriest_bykk/atmiracleshine/line02_userenemyloop02.ani", "character/swordman/effect/animation/1_atpriest_bykk/atmiracleshine/line03_userenemyloop02.ani", "character/swordman/effect/animation/1_atpriest_bykk/atmiracleshine/line04_userenemyloop02.ani"]; local ani = sq_CreateAnimation("", aniPath[sq_getRandom(0, 3)]); obj.setCurrentAnimation(ani); local group = receiveData.readDword(); local uniqueId = receiveData.readDword(); local targetObj = sq_GetObject(obj, group, uniqueId); if(targetObj){ obj.getVar("tar").clear_obj_vector(); obj.getVar("tar").push_obj_vector(targetObj); local hitMax = receiveData.readDword(); obj.setTimeEvent(4, lifeTime * hitMax, 1, false); obj.setTimeEvent(5, lifeTime, -1, true); } else sq_SendDestroyPacketPassiveObject(obj); break; case 4: local lifeTime = receiveData.readDword(); //print("lifeTime = "+lifeTime); local aniPath = ["character/swordman/effect/animation/1_atpriest_bykk/atmiracleshine/line01_userenemyloop01.ani", "character/swordman/effect/animation/1_atpriest_bykk/atmiracleshine/line02_userenemyloop02.ani", "character/swordman/effect/animation/1_atpriest_bykk/atmiracleshine/line03_userenemyloop02.ani", "character/swordman/effect/animation/1_atpriest_bykk/atmiracleshine/line04_userenemyloop02.ani"]; local ani = sq_CreateAnimation("", aniPath[sq_getRandom(0, 3)]); obj.setCurrentAnimation(ani); local group = receiveData.readDword(); local uniqueId = receiveData.readDword(); local targetObj = sq_GetObject(obj, group, uniqueId); if(targetObj){ obj.getVar("tar").clear_obj_vector(); obj.getVar("tar").push_obj_vector(targetObj); local hitMax = receiveData.readDword(); local group2 = receiveData.readDword(); local uniqueId2 = receiveData.readDword(); local targetObj2 = sq_GetObject(obj, group2, uniqueId2); if(targetObj2){ local activeObj = sq_GetCNRDObjectToActiveObject(targetObj2); sq_moveWithParent(activeObj, obj); } obj.setTimeEvent(4, lifeTime * hitMax, 1, false); obj.setTimeEvent(5, lifeTime, -1, true); } else sq_SendDestroyPacketPassiveObject(obj); break; case 10: local power = receiveData.readDword(); local hitTime = receiveData.readDword(); local hitMax = receiveData.readDword(); local HP_healRate = receiveData.readDword(); print(HP_healRate); obj.getVar("custom").setInt(10, hitTime); obj.getVar("custom").setInt(11, hitMax); obj.getVar("custom").setInt(12, HP_healRate / 10); obj.getVar("custom").setInt(13, power); // obj.sq_SetMaxHitCounterPerObject(hitMax); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; case 11: local hitTime = receiveData.readDword(); local power = receiveData.readDword(); local lifeTime = receiveData.readDword(); local aniPath = "character/swordman/effect/animation/1_atpriest_bykk/atmiracleshine/enemysingle01_loop19_atk.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 39)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power); obj.setTimeEvent(11, hitTime, -1, true); obj.setTimeEvent(4, lifeTime, 1, false); break; } break; case SKILL_BYKK_BRIONAC: switch(subtype){ case 1: local power = receiveData.readDword(); local power_exp = receiveData.readDword(); local speedRate = receiveData.readDword(); local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atbrionac/brionaclanceeff_eff27c.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 16)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power); local pAni = obj.getCurrentAnimation(); pAni.setSpeedRate(speedRate.tofloat()); local currentAni = obj.getCurrentAnimation(); local delaySum = currentAni.getDelaySum(false); obj.getVar("move").setInt(10, sq_GetXPos(obj)); obj.getVar("move").setInt(12, sq_GetZPos(obj)); obj.getVar("custom").setInt(10, power_exp); obj.setTimeEvent(1, delaySum / 50, 50, true); sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atbrionac/brionaclanceeff_eff20.ani", 0, 0, 0); break; case 2: local power = receiveData.readDword(); local aniPath = "passiveobject/atpriest_bykk/animation/1_atcrusader/animation/atbrionac/explosion/brionaclanceeff_eff01.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 17)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), power); obj.sq_PlaySound("BRUNAQ_EXP"); break; } break; case SKILL_BYKK_CRUXOFSHAPIEL: sqrChr.getVar("cruxofshapiel_obj").push_obj_vector(obj); switch(subtype){ case 1: local power_fall = receiveData.readDword(); local power = receiveData.readDword(); local power_exp = receiveData.readDword(); local hitTime = receiveData.readDword(); obj.getVar("custom").setInt(10, power_fall); obj.getVar("custom").setInt(11, power); obj.getVar("custom").setInt(12, power_exp); obj.getVar("custom").setInt(13, hitTime); obj.getVar("custom").setInt(14, hitTime * 21); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; case 2: local power_fall = receiveData.readDword(); local power = receiveData.readDword(); local power_exp = receiveData.readDword(); local hitTime = receiveData.readDword(); obj.getVar("custom").setInt(10, power_fall); obj.getVar("custom").setInt(11, power); obj.getVar("custom").setInt(12, power_exp); obj.getVar("custom").setInt(13, hitTime); obj.getVar("custom").setInt(14, hitTime * 21); // sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM); sqrChr.getVar("cruxofshapiel_bool").setBool(0, true); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; } break; case SKILL_BYKK_BLESSOFCOURAGE: local skillLevel = receiveData.readDword(); local range = receiveData.readDword(); local buffTime = receiveData.readDword(); local phAttack = receiveData.readDword(); local mgAttack = receiveData.readDword(); local adtAttack = receiveData.readDword(); local phlAttack = receiveData.readDword(); local mglAttack = receiveData.readDword(); local stuckRate = receiveData.readDword(); print("skillLevel = "+skillLevel); print("range = "+range); print("buffTime = "+buffTime); print("phAttack = "+phAttack); print("mgAttack = "+mgAttack); print("adtAttack = "+adtAttack); print("phlAttack = "+phlAttack); print("mglAttack = "+mglAttack); print("stuckRate = "+stuckRate); //aaaa local objectManager = obj.getObjectManager(); local objectNumber = objectManager.getCollisionObjectNumber(); for (local i = 0; i < objectNumber; i++){ local object = objectManager.getCollisionObject(i); if (object && object.isObjectType(OBJECTTYPE_CHARACTER) && !sqrChr.isEnemy(object) && sq_Abs(sq_GetXPos(object) - sq_GetXPos(sqrChr)) <= range && sq_Abs(sq_GetYPos(object) - sq_GetYPos(sqrChr)) <= range / 2) { local activeObj = sq_GetCNRDObjectToActiveObject(object); if(CNSquirrelAppendage.sq_IsAppendAppendage(activeObj, "character/priest/1crusader_bykk/ap_gloriousbless.nut")) CNSquirrelAppendage.sq_RemoveAppendage(activeObj, "character/priest/1crusader_bykk/ap_gloriousbless.nut"); if(CNSquirrelAppendage.sq_IsAppendAppendage(activeObj, APDPATH_BLESSOFCOURAGE)) CNSquirrelAppendage.sq_RemoveAppendage(activeObj, APDPATH_BLESSOFCOURAGE); local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(activeObj, sqrChr, -1, false, APDPATH_BLESSOFCOURAGE, true); if(buffTime > 0) AddAppendage.sq_SetValidTime(buffTime); AddAppendage.setBuffIconImage(126); AddAppendage.setEnableIsBuff(true); AddAppendage.setAppendCauseSkill(BUFF_CAUSE_SKILL, sq_getJob(sqrChr), SKILL_BYKK_BLESSOFCOURAGE, skillLevel); CNSquirrelAppendage.sq_Append(AddAppendage, activeObj, sqrChr, true); local tiaozheng = 1; if(isSameObject(sqrChr, activeObj)){ if(skillLevel > 20) tiaozheng = 0; else setSkillBonusBate_Crusader_bykk(sqrChr); } AddAppendage.getVar("custom").setInt(10, (phAttack * tiaozheng).tointeger()); AddAppendage.getVar("custom").setInt(11, (mgAttack * tiaozheng).tointeger()); AddAppendage.getVar("custom").setInt(12, (adtAttack * tiaozheng).tointeger()); AddAppendage.getVar("custom").setInt(13, (phlAttack * tiaozheng).tointeger()); AddAppendage.getVar("custom").setInt(14, (mglAttack * tiaozheng).tointeger()); AddAppendage.getVar("custom").setInt(15, (stuckRate).tointeger()); local change_appendage = AddAppendage.sq_getChangeStatus("AT_Blessofcourage"); if(!change_appendage) change_appendage = AddAppendage.sq_AddChangeStatus("AT_Blessofcourage",activeObj, sqrChr, 0, CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, true, 1000); if(change_appendage){ change_appendage.clearParameter(); change_appendage.addParameter(CHANGE_STATUS_TYPE_EQUIPMENT_PHYSICAL_ATTACK, false, (phAttack * tiaozheng).tofloat()); change_appendage.addParameter(CHANGE_STATUS_TYPE_EQUIPMENT_MAGICAL_ATTACK, false, (mgAttack * tiaozheng).tofloat()); change_appendage.addParameter(CHANGE_STATUS_TYPE_ADDITIONAL_PHYSICAL_GENUINE_ATTACK, false, (adtAttack * tiaozheng).tofloat()); change_appendage.addParameter(CHANGE_STATUS_TYPE_ADDITIONAL_MAGICAL_GENUINE_ATTACK, false, (adtAttack * tiaozheng).tofloat()); change_appendage.addParameter(CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, false, (phlAttack * tiaozheng).tofloat()); change_appendage.addParameter(CHANGE_STATUS_TYPE_MAGICAL_ATTACK, false, (mglAttack * tiaozheng).tofloat()); change_appendage.addParameter(CHANGE_STATUS_TYPE_STUCK, false, (stuckRate * -0.1).tofloat()); } } obj.setTimeEvent(1, 100, 1, false); } break; case SKILL_BYKK_BLESSOFPROTECTION: local skillLevel = receiveData.readDword(); local range = receiveData.readDword(); local buffTime = receiveData.readDword(); local hpMax = receiveData.readDword(); local mpMax = receiveData.readDword(); local phDefense = receiveData.readDword(); local mgDefense = receiveData.readDword(); local phlDefense = receiveData.readDword(); local mglDefense = receiveData.readDword(); local damageRate = receiveData.readDword(); // print("skillLevel = "+skillLevel); // print("range = "+range); // print("buffTime = "+buffTime); // print("hpMax = "+hpMax); // print("mpMax = "+mpMax); // print("phDefense = "+phDefense); // print("mgDefense = "+mgDefense); // print("phlDefense = "+phlDefense); // print("mglDefense = "+mglDefense); // print("damageRate = "+damageRate); local objectManager = obj.getObjectManager(); local objectNumber = objectManager.getCollisionObjectNumber(); for (local i = 0; i < objectNumber; i++){ local object = objectManager.getCollisionObject(i); if (object && object.isObjectType(OBJECTTYPE_CHARACTER) && !sqrChr.isEnemy(object) && sq_Abs(sq_GetXPos(object) - sq_GetXPos(obj)) <= range && sq_Abs(sq_GetYPos(object) - sq_GetYPos(obj)) <= range / 2) { local activeObj = sq_GetCNRDObjectToActiveObject(object); local sqrChr2 = sq_GetCNRDObjectToSQRCharacter(object); if(sq_getJob(sqrChr2) == ENUM_CHARACTERJOB_PRIEST && sq_getGrowType(sqrChr2) == GROW_TYPE_CRUSADER) continue; if(CNSquirrelAppendage.sq_IsAppendAppendage(activeObj, APDPATH_BLESSOFPROTECTION)) CNSquirrelAppendage.sq_RemoveAppendage(activeObj, APDPATH_BLESSOFPROTECTION); local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(activeObj, sqrChr, -1, false, APDPATH_BLESSOFPROTECTION, true); if(buffTime > 0) AddAppendage.sq_SetValidTime(buffTime); AddAppendage.setBuffIconImage(127); AddAppendage.setEnableIsBuff(true); AddAppendage.setAppendCauseSkill(BUFF_CAUSE_SKILL, sq_getJob(sqrChr), SKILL_BYKK_BLESSOFPROTECTION, skillLevel); CNSquirrelAppendage.sq_Append(AddAppendage, activeObj, sqrChr, true); AddAppendage.getVar("custom").setInt(10, damageRate); AddAppendage.getVar("source").clear_obj_vector(); AddAppendage.getVar("source").push_obj_vector(sqrChr); AddAppendage.getVar("custom").setInt(11, hpMax.tointeger()); AddAppendage.getVar("custom").setInt(12, mpMax.tointeger()); AddAppendage.getVar("custom").setInt(13, phDefense.tointeger()); AddAppendage.getVar("custom").setInt(14, mgDefense.tointeger()); AddAppendage.getVar("custom").setInt(15, phlDefense.tointeger()); AddAppendage.getVar("custom").setInt(16, mglDefense.tointeger()); local pooledObj = sq_AddDrawOnlyAniFromParent(activeObj, "character/swordman/effect/animation/1_atpriest_bykk/atblessofprotection/guard/guard_start.ani", 0, 0, sq_GetHeightObject(activeObj) / 2); sq_moveWithParent(activeObj, pooledObj); local change_appendage = AddAppendage.sq_getChangeStatus("AT_Blessofprotection"); if(!change_appendage) change_appendage = AddAppendage.sq_AddChangeStatus("AT_Blessofprotection",activeObj, sqrChr, 0, CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, true, 1000); if(change_appendage){ change_appendage.clearParameter(); change_appendage.addParameter(CHANGE_STATUS_TYPE_HP_MAX, false, (hpMax).tofloat()); change_appendage.addParameter(CHANGE_STATUS_TYPE_MP_MAX, false, (mpMax).tofloat()); change_appendage.addParameter(CHANGE_STATUS_TYPE_EQUIPMENT_PHYSICAL_DEFENSE, false, (phDefense).tofloat()); change_appendage.addParameter(CHANGE_STATUS_TYPE_EQUIPMENT_MAGICAL_DEFENSE, false, (mgDefense).tofloat()); change_appendage.addParameter(CHANGE_STATUS_TYPE_MAGICAL_DEFENSE, false, (phlDefense).tofloat()); change_appendage.addParameter(CHANGE_STATUS_TYPE_PHYSICAL_DEFENSE, false, (mglDefense).tofloat()); } } } break; } break; case 2: local skillLevel = sq_GetSkillLevel(sqrChr, SKILL_BYKK_HOLYFLAME); if(skillLevel > 0){ local burnTime = sq_GetIntData(sqrChr, SKILL_BYKK_HOLYFLAME, 1); local bonusRate = sq_GetLevelData(sqrChr, SKILL_BYKK_HOLYFLAME, 0, skillLevel); obj.getVar("holyFlameInfoSet").setInt(0, burnTime); obj.getVar("holyFlameInfoSet").setInt(1, bonusRate); } switch(skillIndex){ case SKILL_BYKK_PATROLBOMB: switch(subtype){ case 1: local totalDamage = receiveData.readDword(); local sizeRate = receiveData.readDword(); local isFire = receiveData.readDword(); obj.getVar("custom").setInt(0, totalDamage); obj.getVar("custom").setInt(1, sizeRate); obj.getVar("custom").setInt(2, isFire); local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atpatrolbomb/atpetrolbomb_throwbottle_bottlenormal.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 53)); local speed = 600.0; if(sq_GetDirection(obj) == ENUM_DIRECTION_RIGHT) sq_SetVelocity(obj, 0, speed); else sq_SetVelocity(obj, 0, -speed); sq_SetVelocity(obj, 2, -speed / 2); break; case 2: case 3: local totalDamage = receiveData.readDword(); local sizeRate = receiveData.readDword(); local isFire = receiveData.readDword(); obj.getVar("custom").setInt(2, isFire); local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atpatrolbomb/atpetrolbomb_airexplosion_normal.ani"; if(subtype == 3) aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atpatrolbomb/atpetrolbomb_explosionfloor_explosion_floor.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 54)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(isFire > 0){ totalDamage = totalDamage * obj.getVar("holyFlameInfoSet").getInt(1) / 1000; obj.getVar("holyFlameBool").setBool(0, true); obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } if(subtype == 2 && sqrChr && sqrChr.getState() != STATE_DIE){ local epObj = sqrChr.getVar("EssenceofPhlegeObj").get_obj_vector(0); if(epObj){ local colObj = sq_GetCNRDObjectToCollisionObject(epObj); if(sq_Abs(sq_GetXPos(colObj) - sq_GetXPos(obj)) <= 75 && sq_Abs(sq_GetYPos(colObj) - sq_GetYPos(obj)) <= 40){ local totalDamage = sqrChr.sq_GetBonusRateWithPassive(SKILL_BYKK_ESSENCEOFPHLEGE, -1, 1, 1.0); local sizeRate = sq_GetIntData(sqrChr, SKILL_BYKK_ESSENCEOFPHLEGE, 13); createSkillPassive_ATPriest_bykk(obj,colObj,PASSIVEOBJ_BYKK_ATPRIEST,0,0,-sq_GetZPos(obj) + 100,obj.getDirection(),2,SKILL_BYKK_ESSENCEOFPHLEGE,5,totalDamage,sizeRate,0,0,0,0,0,0); sq_SetMyShake(obj, 2, 100); colObj.setTimeEvent(1, 1000, 1, true); // sq_SendDestroyPacketPassiveObject(obj); return; } } } break; case 4: local totalDamage = receiveData.readDword(); local isFire = receiveData.readDword(); obj.getVar("custom").setInt(2, isFire); local ani = sq_CreateAnimation("", "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atmalleusmaleficarum/2ndeff_eff01.ani"); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 52)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(isFire > 0){ totalDamage = totalDamage * obj.getVar("holyFlameInfoSet").getInt(1) / 1000; obj.getVar("holyFlameBool").setBool(0, true); obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } break; } break; case SKILL_BYKK_ESSENCEOFPHLEGE: switch(subtype){ case 1: local totalDamage = receiveData.readDword(); local lifeTimeForTarget = receiveData.readDword(); local lifeTimeForBurning = receiveData.readDword(); local lifeTimeForLanding = receiveData.readDword(); local sizeRate = receiveData.readDword(); obj.getVar("custom").setInt(0, totalDamage); obj.getVar("custom").setInt(1, lifeTimeForTarget); obj.getVar("custom").setInt(2, lifeTimeForBurning); obj.getVar("custom").setInt(3, lifeTimeForLanding); obj.getVar("custom").setInt(4, sizeRate); local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atessenceofphlege/phlegemove_03.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 46)); local speed = 600.0; if(sq_GetDirection(obj) == ENUM_DIRECTION_RIGHT) sq_SetVelocity(obj, 0, speed); else sq_SetVelocity(obj, 0, -speed); sq_SetVelocity(obj, 2, -speed / 2); break; case 2: local totalDamage = receiveData.readDword(); local lifeTimeForTarget = receiveData.readDword(); local lifeTimeForBurning = receiveData.readDword(); local sizeRate = receiveData.readDword(); obj.getVar("custom").setInt(0, totalDamage); obj.getVar("custom").setInt(1, lifeTimeForTarget); obj.getVar("custom").setInt(2, lifeTimeForBurning); obj.getVar("custom").setInt(3, 0); obj.getVar("custom").setInt(4, sizeRate); local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atpouressence/scatter_02.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 55)); break; case 3: local totalDamage = receiveData.readDword(); local lifeTimeForTarget = receiveData.readDword(); local lifeTimeForBurning = receiveData.readDword(); local sizeRate = receiveData.readDword(); local group = receiveData.readDword(); local uniqueId = receiveData.readDword(); local targetObj = sq_GetObject(obj, group, uniqueId); if(targetObj && targetObj.getState() != STATE_DIE){ obj.getVar("tar").clear_obj_vector(); obj.getVar("tar").push_obj_vector(targetObj); local activeObj = sq_GetCNRDObjectToActiveObject(targetObj); activeObj.getVar("EssenceofPhlege").push_obj_vector(obj); sq_moveWithParent(activeObj, obj); obj.getVar("custom").setInt(0, lifeTimeForBurning); local aniPath = "character/swordman/effect/animation/1_atpriest_bykk/atessenceofphlege/teardebuff_02.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 48)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); totalDamage = totalDamage * obj.getVar("holyFlameInfoSet").getInt(1) / 1000; obj.getVar("holyFlameBool").setBool(0, true); obj.getVar("holyflameDamageSet").setInt(0, totalDamage); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); obj.setTimeEvent(1, lifeTimeForTarget, 1, false); } break; case 4: sqrChr.getVar("EssenceofPhlegeObj").push_obj_vector(obj); local totalDamage = receiveData.readDword(); local lifeTimeForTarget = receiveData.readDword(); local lifeTimeForBurning = receiveData.readDword(); local lifeTimeForLanding = receiveData.readDword(); local sizeRate = receiveData.readDword(); obj.getVar("custom").setInt(0, totalDamage); obj.getVar("custom").setInt(1, lifeTimeForTarget); obj.getVar("custom").setInt(2, lifeTimeForBurning); obj.getVar("custom").setInt(3, 0); obj.getVar("custom").setInt(4, sizeRate); local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atessenceofphlege/bottom/essencebottom_03.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 47)); obj.setTimeEvent(1, lifeTimeForLanding, 1, false); sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM); break; case 5: local totalDamage = receiveData.readDword(); local sizeRate = receiveData.readDword(); local lifeTimeForBurning = receiveData.readDword(); local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atessenceofphlege/largeexp/largeboom_07.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 45)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); totalDamage = totalDamage * obj.getVar("holyFlameInfoSet").getInt(1) / 1000; obj.getVar("holyFlameBool").setBool(0, true); obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atessenceofphlege/largeexp/largeboom2bottom_06.ani"; createOnlyDrawObjectEX_ATPriest_bykk(obj,aniPath,true,sq_GetDirection(obj),sq_GetXPos(obj),sq_GetYPos(obj),0,ENUM_DRAWLAYER_BOTTOM,sizeRate,sizeRate); if(sizeRate > 100){ local currentAni = obj.getCurrentAnimation(); sizeRate = sizeRate.tofloat() / 100.0; currentAni.setImageRateFromOriginal(sizeRate, sizeRate); currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate); } break; } break; case SKILL_BYKK_HOLYFLAME: switch(subtype){ case 1: local totalDamage = receiveData.readDword(); local sizeRate = receiveData.readDword(); local speedRate = receiveData.readDword(); local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atholyflame/holyflame_aeffect_anormal1.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 68)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); totalDamage = totalDamage * obj.getVar("holyFlameInfoSet").getInt(1) / 1000; obj.getVar("holyFlameBool").setBool(0, true); obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); local currentAni = obj.getCurrentAnimation(); currentAni.setSpeedRate(speedRate.tofloat()); break; } break; case SKILL_BYKK_JUDGMENTBLOW: switch(subtype){ case 1: local totalDamage = receiveData.readDword(); local sizeRate = receiveData.readDword(); local isFire = receiveData.readDword(); obj.getVar("custom").setInt(1, isFire); local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atjudgmentblow/atjudgmentblow_att1_12.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 69)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(isFire > 0){ totalDamage = totalDamage * obj.getVar("holyFlameInfoSet").getInt(1) / 1000; obj.getVar("holyFlameBool").setBool(0, true); obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM); if(sizeRate > 100){ local currentAni = obj.getCurrentAnimation(); sizeRate = sizeRate.tofloat() / 100.0; currentAni.setImageRateFromOriginal(sizeRate, sizeRate); currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate); } break; case 2: local totalDamage = receiveData.readDword(); local sizeRate = receiveData.readDword(); local isFire = receiveData.readDword(); local hitMax = receiveData.readDword(); local addTime = receiveData.readDword(); obj.getVar("custom").setInt(0, sizeRate); obj.getVar("custom").setInt(1, isFire); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 51)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(isFire > 0){ totalDamage = totalDamage * obj.getVar("holyFlameInfoSet").getInt(1) / 1000; obj.getVar("holyFlameBool").setBool(0, true); obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM); obj.setTimeEvent(1, 2000 + addTime, 1, false); obj.setTimeEvent(2, 100, 20 + hitMax, true); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; case 3: local sizeRate = receiveData.readDword(); obj.getVar("custom").setInt(0, sizeRate); obj.setTimeEvent(1, 2000, 1, false); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; } break; case SKILL_BYKK_FLAMEOFBAPTISM: switch(subtype){ case 1: local totalDamage = receiveData.readDword(); local sizeRate = receiveData.readDword(); local speedRate = receiveData.readDword(); local sub = receiveData.readDword(); local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atflameofbaptism/flameofbaptismfront_03.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 50)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(sub > 0){ totalDamage = totalDamage * obj.getVar("holyFlameInfoSet").getInt(1) / 1000; obj.getVar("holyFlameBool").setBool(0, true); obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } local currentAni = obj.getCurrentAnimation(); currentAni.setSpeedRate(speedRate.tofloat()); if(sizeRate > 100){ sizeRate = sizeRate.tofloat() / 100.0; currentAni.setImageRateFromOriginal(sizeRate, sizeRate); currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate); } break; } break; case SKILL_BYKK_VORTEXOFHELLFIRE: switch(subtype){ case 1: local totalDamage = receiveData.readDword(); local sizeRate = receiveData.readDword(); local speedRate = receiveData.readDword(); local sub = receiveData.readDword(); obj.getVar("custom").setInt(0, sub); local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atvortexofhellfire/atvortexofhellfireloop_holyframe.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 57)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(sub > 0){ totalDamage = totalDamage * obj.getVar("holyFlameInfoSet").getInt(1) / 1000; obj.getVar("holyFlameBool").setBool(0, true); obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } sq_moveWithParent(sqrChr, obj); local currentAni = obj.getCurrentAnimation(); if(sqrChr.getRapidInputFrequency() > 0) speedRate = speedRate.tofloat() * 1.5; else speedRate = speedRate.tofloat(); currentAni.setSpeedRate(speedRate); if(sizeRate > 100){ sizeRate = sizeRate.tofloat() / 100.0; currentAni.setImageRateFromOriginal(sizeRate, sizeRate); currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate); } break; case 2: local totalDamage = receiveData.readDword(); local sizeRate = receiveData.readDword(); local speedRate = receiveData.readDword(); local sub = receiveData.readDword(); obj.getVar("custom").setInt(0, sub); local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atvortexofhellfire/atvortexofhellfireend_holyframe.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 56)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(sub > 0){ totalDamage = totalDamage * obj.getVar("holyFlameInfoSet").getInt(1) / 1000; obj.getVar("holyFlameBool").setBool(0, true); obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } local currentAni = obj.getCurrentAnimation(); currentAni.setSpeedRate(speedRate.tofloat()); if(sizeRate > 100){ sizeRate = sizeRate.tofloat() / 100.0; currentAni.setImageRateFromOriginal(sizeRate, sizeRate); currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate); } break; } break; case SKILL_BYKK_WHEELOFPUNISHMENT: switch(subtype){ case 1: local totalDamage = receiveData.readDword(); local totalDamage_Exp = receiveData.readDword(); local sizeRate = receiveData.readDword(); local hitMax = receiveData.readDword(); local sub = receiveData.readDword(); obj.getVar("custom").setInt(0, totalDamage_Exp); obj.getVar("custom").setInt(1, sizeRate); obj.getVar("custom").setInt(2, hitMax); obj.getVar("custom").setInt(3, sub); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 59)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(sub > 0){ totalDamage = totalDamage * obj.getVar("holyFlameInfoSet").getInt(1) / 1000; obj.getVar("holyFlameBool").setBool(0, true); obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break; } break; case SKILL_BYKK_ERADICATECROSS: switch(subtype){ case 1: sqrChr.getVar("EradicateCrossObj").push_obj_vector(obj); local totalDamage = receiveData.readDword(); local hitMax = receiveData.readDword(); local lifeTime = receiveData.readDword(); local sub = receiveData.readDword(); obj.getVar("custom").setInt(1, hitMax); obj.getVar("custom").setInt(2, lifeTime); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 44)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); sq_SetAttackInfoForceHitStunTime(sq_GetCurrentAttackInfo(obj), 150); if(sub > 0){ totalDamage = totalDamage * obj.getVar("holyFlameInfoSet").getInt(1) / 1000; obj.getVar("holyFlameBool").setBool(0, true); obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/2_inquistor/animation/ateradicatecross/loopattackbox.ani"); obj.setCurrentAnimation(ani); obj.getVar("effect").clear_obj_vector(); local aniPath = ["passiveobject/atpriest_bykk/animation/2_inquistor/animation/ateradicatecross/crossloop_1_00.ani","passiveobject/atpriest_bykk/animation/2_inquistor/animation/ateradicatecross/crossloop_2_00.ani","passiveobject/atpriest_bykk/animation/2_inquistor/animation/ateradicatecross/crossloop_bottom_00.ani","passiveobject/atpriest_bykk/animation/2_inquistor/animation/ateradicatecross/crossloop_essence_1_00.ani","passiveobject/atpriest_bykk/animation/2_inquistor/animation/ateradicatecross/crossloop_essence_2_00.ani","passiveobject/atpriest_bykk/animation/2_inquistor/animation/ateradicatecross/crossloop_front_00.ani"]; local drawlayer = [ENUM_DRAWLAYER_NORMAL,ENUM_DRAWLAYER_NORMAL,ENUM_DRAWLAYER_BOTTOM,ENUM_DRAWLAYER_NORMAL,ENUM_DRAWLAYER_NORMAL,ENUM_DRAWLAYER_NORMAL]; local direction = sq_GetDirection(obj), xPos = sq_GetDistancePos(sq_GetXPos(obj),direction, 150), yPos = sq_GetYPos(obj); for(local i = 0; i < aniPath.len(); i++){ local pooledObj = createOnlyDrawObject_ATPriest_bykk(obj,aniPath[i],false,direction,xPos,yPos,0,drawlayer[i]); obj.getVar("effect").push_obj_vector(pooledObj); } obj.setTimeEvent(1, lifeTime / hitMax, -1, false); break; } break; case SKILL_BYKK_BURNATTHESTAKE: switch(subtype){ case 1: local totalDamage = receiveData.readDword(); local hitTime = receiveData.readDword(); local sub = receiveData.readDword(); local speedRate = receiveData.readDword(); obj.getVar("custom").setInt(0, hitTime); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 43)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); sq_SetCurrentAttacknUpForce(attackInfo, 10); sq_SetCurrentAttackeDamageAct(attackInfo, 2); if(sub > 0){ totalDamage = totalDamage * obj.getVar("holyFlameInfoSet").getInt(1) / 1000; obj.getVar("holyFlameBool").setBool(0, true); obj.getVar("holyflameDamageSet").setInt(0, totalDamage); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/2_inquistor/animation/atburnatthestake/finishattackbox.ani"); obj.setCurrentAnimation(ani); local currentAni = obj.getCurrentAnimation(); currentAni.setSpeedRate(speedRate.tofloat()); currentAni = obj.getCurrentAnimation(); obj.setTimeEvent(1, currentAni.getDelaySum(0, 4), 1, false); break; } break; case SKILL_BYKK_INFERNO: switch(subtype){ case 1: local speedRate = receiveData.readDword(); local ani = sq_CreateAnimation("","character/swordman/effect/animation/1_atpriest_bykk/atinferno/1start/inferno_start2_ground.ani"); obj.setCurrentAnimation(ani); local currentAni = obj.getCurrentAnimation(); currentAni.setSpeedRate(speedRate.tofloat()); sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM); break; case 2: local group = receiveData.readDword(); local uniqueId = receiveData.readDword(); local targetObj = sq_GetObject(obj, group, uniqueId); if(targetObj && targetObj.getState() != STATE_DIE){ obj.getVar("tar").clear_obj_vector(); obj.getVar("tar").push_obj_vector(targetObj); local sub = 0, randomNum = sq_getRandom(1, 100); if(randomNum > 67) sub = 2; else if(randomNum > 33) sub = 1; obj.getVar("custom").setInt(0, sub); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); } break; } break; case SKILL_BYKK_PURIFICATION: switch(subtype){ case 1: local totalDamage = receiveData.readDword(); local sizeRate = receiveData.readDword(); local sub = receiveData.readDword(); local aniPath = "passiveobject/atpriest_bykk/animation/2_inquistor/animation/atpurification/atpurification_step2_explosion_smoke2.ani"; local ani = sq_CreateAnimation("", aniPath); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 70)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(sub > 0){ totalDamage = totalDamage * obj.getVar("holyFlameInfoSet").getInt(1) / 1000; obj.getVar("holyFlameBool").setBool(0, true); obj.getVar("holyflameDamageSet").setInt(0, totalDamage); local attackInfo = sq_GetCurrentAttackInfo(obj); attackInfo.setElement(ENUM_ELEMENT_FIRE); attackInfo.setElement(ENUM_ELEMENT_LIGHT); } local currentAni = obj.getCurrentAnimation(); if(sizeRate > 100){ sizeRate = sizeRate.tofloat() / 100.0; currentAni.setImageRateFromOriginal(sizeRate, sizeRate); currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate); } break; } break; case 255: switch(subtype){ case 1: local group = receiveData.readDword(); local uniqueId = receiveData.readDword(); local time = receiveData.readDword(); local damage = receiveData.readDword(); local targetObj = sq_GetObject(obj, group, uniqueId); if(targetObj && targetObj.getState() != STATE_DIE){ local activeObj = sq_GetCNRDObjectToActiveObject(targetObj); activeObj.getVar("holyflameObj").clear_obj_vector(); activeObj.getVar("holyflameObj").push_obj_vector(obj); obj.getVar("tar").clear_obj_vector(); obj.getVar("tar").push_obj_vector(activeObj); sq_moveWithParent(activeObj, obj); obj.getVar("custom").setInt(0, group); obj.getVar("custom").setInt(1, uniqueId); local count = time / 500; obj.getVar("custom").setInt(2, count); obj.getVar("time").setInt(0, time); obj.getVar("damage").setInt(0, damage); obj.getVar("damage").setInt(1, damage); if(damage > 0){ obj.setTimeEvent(1, 500, count, false); } } break; case 2: local group = receiveData.readDword(); local uniqueId = receiveData.readDword(); local totalDamage = receiveData.readDword(); local targetObj = sq_GetObject(obj, group, uniqueId); if(targetObj && targetObj.getState() != STATE_DIE){ obj.getVar("tar").clear_obj_vector(); obj.getVar("tar").push_obj_vector(targetObj); sq_moveWithParent(targetObj, obj); local ani = sq_CreateAnimation("","common/commoneffect/animation/decreaseeffect/reactionburn_00.ani"); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 71)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); obj.setTimeEvent(2, 250, 1, false); } break;// } break; } break; case 3: break; case 4: switch(skillIndex){ case SKILL_BYKK_PRIDEACCEL: local totalDamage = receiveData.readDword(); local sizeRate = receiveData.readDword(); local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atprideaccel/attack_back.ani"); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 10)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM); local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atpriest_bykk/animation/4_temptress/animation/atprideaccel/attack_front.ani", 0, 0, 0); if(sizeRate > 100){ local currentAni = obj.getCurrentAnimation(); sizeRate = sizeRate.tofloat() / 100.0; currentAni.setImageRateFromOriginal(sizeRate, sizeRate); currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate); local pAni = pooledObj.getCurrentAnimation(); pAni.setImageRateFromOriginal(sizeRate, sizeRate); pAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); } break; case SKILL_BYKK_LUSTHAND: local totalDamage = receiveData.readDword(); local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atlusthand/lusthandatk01_c_01.ani"); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 9)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); break; case SKILL_BYKK_HANDAWAKENTOSIN: local totalDamage = receiveData.readDword(); local group = receiveData.readDword(); local uniqueId = receiveData.readDword(); local targetObj = sq_GetObject(obj, group, uniqueId); if(targetObj && targetObj.getState() != STATE_DIE){ sq_moveWithParent(targetObj, obj); obj.getVar("tar").clear_obj_vector(); obj.getVar("tar").push_obj_vector(targetObj); sqrChr.getVar("Handawakentosin_EXP").push_obj_vector(obj); } else { sq_SendDestroyPacketPassiveObject(obj); break; } obj.getVar("custom").setInt(10, totalDamage); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; case SKILL_BYKK_GREEDTHELURKER: local totalDamage = receiveData.readDword(); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 7)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local sizeRate = receiveData.readDword(); local hitMax = receiveData.readDword(); local hitTime = receiveData.readDword(); local sub = receiveData.readDword(); obj.getVar("custom").setInt(10, totalDamage); obj.getVar("custom").setInt(11, sizeRate); obj.getVar("custom").setInt(12, hitMax); obj.getVar("custom").setInt(13, hitTime); obj.getVar("custom").setInt(14, sub); if(sub > 0){ local maxHit = receiveData.readDword(); obj.getVar("custom").setInt(15, maxHit); //print("maxHit - "+maxHit); } sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM); obj.getVar("tar").clear_obj_vector(); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; case SKILL_BYKK_FLOWEROFPURIFICATION: switch(subtype){ case 0: sqrChr.getVar("Flowerofpurification_river").clear_obj_vector(); sqrChr.getVar("Flowerofpurification_river").push_obj_vector(obj); sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; case 1: local totalDamage = receiveData.readDword(); local size = receiveData.readDword(); local speedRate = receiveData.readDword(); local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atdepravitysevensins/flower/delightflower_flower_explosion05.ani"); obj.setCurrentAnimation(ani); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 5)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local currentAni = obj.getCurrentAnimation(); if(size > 0){ currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atdepravitysevensins/delightflower_flower_body_a01.ani"),true); currentAni.addLayerAnimation(2,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atdepravitysevensins/delightflower_flower_body_a02.ani"),true); currentAni.addLayerAnimation(3,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atdepravitysevensins/delightflower_flower_body_a03.ani"),true); currentAni.addLayerAnimation(4,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atdepravitysevensins/delightflower_flower_body_a04.ani"),true); } else{ currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atdepravitysevensins/delightflower_flower_body_b01.ani"),true); currentAni.addLayerAnimation(2,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atdepravitysevensins/delightflower_flower_body_b02.ani"),true); currentAni.addLayerAnimation(3,sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atdepravitysevensins/delightflower_flower_body_b03.ani"),true); } currentAni.setSpeedRate(speedRate.tofloat()); break; case 2: local totalDamage = receiveData.readDword(); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 5)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local hitMax = receiveData.readDword(); local time = receiveData.readDword(); obj.getVar("custom").setInt(10, hitMax); local hitTime = time / (hitMax + 1); obj.setTimeEvent(1, hitTime, hitMax, true); break; } break; case SKILL_BYKK_ENVIOUSKISS: switch(subtype){ case 0: local stunTime = receiveData.readDword(); local lifeTime = receiveData.readDword(); local ishold = receiveData.readDword(); obj.getVar("custom").setInt(10, stunTime); obj.getVar("custom").setInt(11, lifeTime); obj.getVar("custom").setInt(12, ishold); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); break; case 1: local lifeTime = receiveData.readDword(); obj.setTimeEvent(0, lifeTime, 1, false); local group = receiveData.readDword(); local uniqueId = receiveData.readDword(); local targetObj = sq_GetObject(obj, group, uniqueId); if(targetObj){ sq_sendSetActiveStatusPacket(targetObj, obj, ACTIVESTATUS_CONFUSE, 100.0, 100, true, lifeTime); sq_moveWithParent(targetObj, obj); obj.getVar("tar").clear_obj_vector(); obj.getVar("tar").push_obj_vector(targetObj); obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, ""); } else sq_SendDestroyPacketPassiveObject(obj); break; } break; case SKILL_BYKK_SECONDSOUL: local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atsecondsoul/boom_18.ani"); obj.setCurrentAnimation(ani); local totalDamage = receiveData.readDword(); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 11)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); createOnlyDrawObject_ATPriest_bykk(obj,"character/swordman/effect/animation/1_atpriest_bykk/atsecondsoul/boombottom_06.ani",true,obj.getDirection(),sq_GetXPos(obj),sq_GetYPos(obj),0,ENUM_DRAWLAYER_BOTTOM); break; case SKILL_BYKK_GLUTTONYVOMIT: local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atgluttonyvomit/atgluttonyvomit_att_beam_normal.ani"); obj.setCurrentAnimation(ani); local totalDamage = receiveData.readDword(); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 6)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); break; case SKILL_BYKK_SLOTHBODY: local ani = sq_CreateAnimation("","passiveobject/atpriest_bykk/animation/4_temptress/animation/atslothbody/lv95atoriginalsin/atslothbodylv95atoriginalsinattackfront_16.ani"); obj.setCurrentAnimation(ani); local totalDamage = receiveData.readDword(); local sizeRate = receiveData.readDword(); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 14)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); if(sizeRate > 100){ local currentAni = obj.getCurrentAnimation(); sizeRate = sizeRate.tofloat() / 100.0; currentAni.setImageRateFromOriginal(sizeRate, sizeRate); currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate); } break; case SKILL_BYKK_FIRSTPRANA: local ani = sq_CreateAnimation("","character/swordman/effect/animation/1_atpriest_bykk/atfirstprana/firstprana_floor.ani"); obj.setCurrentAnimation(ani); local totalDamage = receiveData.readDword(); local sizeRate = receiveData.readDword(); sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 15)); sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage); local pAni = obj.getCurrentAnimation(); sq_AddAttackBox(pAni, -300, -150, -10, 600, 300, 60); if(sizeRate > 100){ local currentAni = obj.getCurrentAnimation(); sizeRate = sizeRate.tofloat() / 100.0; currentAni.setImageRateFromOriginal(sizeRate, sizeRate); currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate); sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate); } sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM); break; } break; } }