Rindro-Sqr/user/114.66.51.249/25_priest_1.c

2945 lines
143 KiB
C

function setCustomData_po_priest_bykk(obj, receiveData)
{
if(!obj) 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);
print("job = "+job+" , skillIndex = "+skillIndex+" , subtype = "+subtype);
switch(job){
case 0:
break;
case 1:
switch(skillIndex){
case 1:
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
local skillLevel = 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("buffTime = "+buffTime);
// print("phAttack = "+phAttack);
// print("mgAttack = "+mgAttack);
// print("adtAttack = "+adtAttack);
// print("phlAttack = "+phlAttack);
// print("mglAttack = "+mglAttack);
// print("stuckRate = "+stuckRate);
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);
local apdPath = "character/priest/1crusader_bykk/ap_gloriousbless.nut";
if(CNSquirrelAppendage.sq_IsAppendAppendage(sqrChr2, APDPATH_BLESSOFCOURAGE)) CNSquirrelAppendage.sq_RemoveAppendage(sqrChr2, APDPATH_BLESSOFCOURAGE);
if(CNSquirrelAppendage.sq_IsAppendAppendage(sqrChr2, apdPath)) CNSquirrelAppendage.sq_RemoveAppendage(sqrChr2, apdPath);
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(sqrChr2, sqrChr, -1, false, apdPath, true);
if(buffTime > 0) AddAppendage.sq_SetValidTime(buffTime);
AddAppendage.setBuffIconImage(125);
AddAppendage.setEnableIsBuff(true);
AddAppendage.setAppendCauseSkill(BUFF_CAUSE_SKILL, sq_getJob(sqrChr), 260, skillLevel);
CNSquirrelAppendage.sq_Append(AddAppendage, sqrChr2, sqrChr, true);
local tiaozheng = 1;
if(isSameObject(sqrChr, sqrChr2) && skillLevel >= 20){
tiaozheng = 0;
// print("set myself")
}
local change_appendage = AddAppendage.sq_getChangeStatus("gloriousbless");
if(!change_appendage) change_appendage = AddAppendage.sq_AddChangeStatus("gloriousbless",sqrChr2, sqrChr, 0, CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, true, 1000);
if(change_appendage){
change_appendage.clearParameter();
if(tiaozheng > 0){
change_appendage.addParameter(CHANGE_STATUS_TYPE_EQUIPMENT_PHYSICAL_ATTACK, false, (phAttack).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_EQUIPMENT_MAGICAL_ATTACK, false, (mgAttack).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_ADDITIONAL_PHYSICAL_GENUINE_ATTACK, false, (adtAttack).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_ADDITIONAL_MAGICAL_GENUINE_ATTACK, false, (adtAttack).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, false, (phlAttack).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_MAGICAL_ATTACK, false, (mglAttack).tofloat());
}
change_appendage.addParameter(CHANGE_STATUS_TYPE_STUCK, false, (stuckRate * -0.1).tofloat());
}
}
}
obj.setTimeEvent(1, 100, 1, false);
break;
case SKILL_BYKK_ASTRAFE:
local totalDamage = receiveData.readDword();
local totalDamageExp = receiveData.readDword();
obj.getVar("custom").setInt(0, totalDamageExp);
local aniPath = "passiveobject/4_priest_bykk/1crusader_bykk/animation/astrafe/boomfront_15.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 52));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
sq_SetAddWeaponDamage(sq_GetCurrentAttackInfo(obj), true);
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "character/priest/effect/animation/1crusader_bykk/astrafe/boombottom_01.ani", 0, 80, 0);
sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
break;
case 28:
switch(subtype){
case 1:
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
if(!sqrChr || sqrChr.getState() == STATE_DIE) sq_SendDestroyPacketPassiveObject(obj);
local totalDamage = receiveData.readDword();
local totalDamageExp = receiveData.readDword();
local skillLevel = sq_GetSkillLevel(sqrChr, 28);
local lifeTime = sq_GetLevelData(sqrChr, 28, 2, skillLevel);
local hitTime = sq_GetIntData(sqrChr, 28, 1);
local range = sq_GetIntData(sqrChr, 28, 2);
local time = sq_GetLevelData(sqrChr, 28, 4, skillLevel);
local level = sq_GetLevelData(sqrChr, 28, 3, skillLevel);
local speedRate = sq_GetLevelData(sqrChr, 28, 8, skillLevel);
local sizeRate = sq_GetLevelData(sqrChr, 28, 9, skillLevel);
obj.setTimeEvent(10, lifeTime, 1, false);
obj.setTimeEvent(11, hitTime, -1, false);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 55));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
obj.getVar("custom").setInt(0, totalDamage);
obj.getVar("custom").setInt(1, totalDamageExp);
obj.getVar("custom").setInt(2, range);
obj.getVar("custom").setInt(3, time);
obj.getVar("custom").setInt(4, level);
obj.getVar("custom").setInt(5, speedRate);
obj.getVar("custom").setInt(6, sizeRate);
obj.getVar("Tar_boss").clear_obj_vector();
obj.getVar("Tar_named").clear_obj_vector();
obj.getVar("Tar_normal").clear_obj_vector();
obj.getVar("tar").clear_obj_vector();
local objectManager = obj.getObjectManager();//得到對象管理器
for (local i = 0; i < objectManager.getCollisionObjectNumber(); i++){
local object = objectManager.getCollisionObject(i);//得到控制類對象
if (object && object.isObjectType(OBJECTTYPE_ACTIVE) && obj.isEnemy(object)){
local activeObj = sq_GetCNRDObjectToActiveObject(object);
if(sq_IsBoss(activeObj)){
obj.getVar("Tar_boss").push_obj_vector(activeObj);
continue;
}
else if(sq_IsNamed(activeObj)){
obj.getVar("Tar_named").push_obj_vector(activeObj);
continue;
}
else{
obj.getVar("Tar_normal").push_obj_vector(activeObj);
continue;
}
}
}
local bossSize = obj.getVar("Tar_boss").get_obj_vector_size();
local namedSize = obj.getVar("Tar_named").get_obj_vector_size();
local normalSize = obj.getVar("Tar_normal").get_obj_vector_size();
if(bossSize > 0){
for(local i = 0; i < bossSize; i++){
local targetObj = obj.getVar("Tar_boss").get_obj_vector(i);
if(targetObj) obj.getVar("tar").push_obj_vector(targetObj);
}
}
if(namedSize > 0){
for(local i = 0; i < namedSize; i++){
local targetObj = obj.getVar("Tar_named").get_obj_vector(i);
if(targetObj) obj.getVar("tar").push_obj_vector(targetObj);
}
}
if(normalSize > 0){
for(local i = 0; i < normalSize; i++){
local targetObj = obj.getVar("Tar_normal").get_obj_vector(i);
if(targetObj) obj.getVar("tar").push_obj_vector(targetObj);
}
}
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
break;
case 2:
local totalDamage = receiveData.readDword();
local range = receiveData.readDword();
local time = receiveData.readDword();
local level = receiveData.readDword();
local sizeRate = receiveData.readDword();
local aniPath = "passiveobject/4_priest_bykk/1crusader_bykk/animation/flashglobe/afterdodge.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/4_priest_bykk/1crusader_bykk/animation/flashglobe/afternormal.ani"),true);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 56));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
if(sizeRate > 100){
currentAni = obj.getCurrentAnimation();
sizeRate = sizeRate.tofloat() / 100.0;
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
}
break;
}
break;
}
break;
case 2:
switch(skillIndex){
case SKILL_BYKK_AGGRESSIVEJUDGEMENT:
switch(subtype){
case 1:
local totalDamage = receiveData.readDword();
local aniPath = "passiveobject/4_priest_bykk/2infighter_bykk/animation/aggressivejudgement/afront_00.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 54));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
break;
case 2:
local totalDamage = receiveData.readDword();
local hitMax = receiveData.readDword();
local hitTime = receiveData.readDword();
obj.getVar("custom").setInt(0, hitMax);
local aniPath = "passiveobject/4_priest_bykk/2infighter_bykk/animation/aggressivejudgement/aggressivejudgementmultihit.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 53));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
obj.setTimeEvent(1, hitTime, hitMax, true);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
local range = 400;
local appendage = CNSquirrelAppendage.sq_AppendAppendage(sqrChr, obj, -1, false, "character/priest/2infighter_bykk/ap_aggressivejudgement_suck.nut", false);
if(appendage){
CNSquirrelAppendage.sq_Append(appendage, sqrChr, obj);
local auraAppendage = appendage.sq_getAuraMaster("auraMaster");
if(!auraAppendage) auraAppendage = appendage.sq_AddAuraMaster("auraMaster", sqrChr, obj, 1200, 18, 5, 0);
if(auraAppendage) auraAppendage.setAttractionInfo(600, 600, range, 100);
}
break;
case 3:
local speedRate = receiveData.readDword();
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
local ani = sq_GetCustomAni(sqrChr, 380);
sq_Rewind(ani);
obj.setCurrentAnimation(ani);
sq_SetCurrentDirection(obj, sq_GetOppositeDirection(sq_GetDirection(obj)));
local currentAni = obj.getCurrentAnimation();
currentAni.setSpeedRate(speedRate.tofloat());
break;
}
break;
}
break;
case 3:
switch(skillIndex){
case SKILL_BYKK_CHAKRAOFGOD:
switch(subtype){
case 1:
local totalDamage = receiveData.readDword();
local subtype = receiveData.readDword();
local isThrow = receiveData.readDword();
local isShake = receiveData.readDword();
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/chakraofgod/hitfire_hit.ani";
if(subtype > 0) aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/chakraofgod/hitlight_hit.ani";
if(isThrow > 0){
if(subtype > 0) aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/chakraofgod/hit_throwhitlight.ani";
else aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/chakraofgod/hit_throwhit.ani";
}
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 8));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
local attackInfo = sq_GetCurrentAttackInfo(obj);
if(!attackInfo) return;
if(subtype > 0) attackInfo.setElement(ENUM_ELEMENT_LIGHT);
else attackInfo.setElement(ENUM_ELEMENT_FIRE);
if(isThrow == 0){
if(isShake <= 0) sq_SetMyShake(obj, 3, 200);
local currentAni = obj.getCurrentAnimation();
local sizeRate = 1.8;
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
}
break;
}
break;
case SKILL_BYKK_ENTERINGNIRVANA:
local hitMax = receiveData.readDword();
local totalDamage = receiveData.readDword();
local sizeRate = receiveData.readDword();
local prob = receiveData.readDword();
local time = receiveData.readDword();
local moveSpeed = receiveData.readDword();
local attackSpeed = receiveData.readDword();
local subtype2 = receiveData.readDword();
obj.getVar().setInt(0, hitMax);
obj.getVar().setInt(1, totalDamage);
obj.getVar().setInt(2, sizeRate);
obj.getVar().setInt(3, prob);
obj.getVar().setInt(4, time);
obj.getVar().setInt(5, moveSpeed);
obj.getVar().setInt(6, attackSpeed);
obj.getVar().setInt(7, subtype2);
if(subtype2 > 2) obj.setTimeEvent(3, 300, 1, false);
else obj.setTimeEvent(3, 100, 1, true);
break;
case SKILL_BYKK_VERMILIONBIRDTALISMAN:
switch(subtype){
case 1:
local totalDamage = receiveData.readDword();
local lifeTime = receiveData.readDword();
local hitTime = receiveData.readDword();
local sizeRate = receiveData.readDword();
obj.getVar("custom").setInt(1, totalDamage);
obj.getVar("custom").setInt(2, lifeTime);
obj.getVar("custom").setInt(3, hitTime);
obj.getVar("custom").setInt(4, sizeRate);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 40));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
break;
case 2:
local sub = receiveData.readDword();
local totalDamage = receiveData.readDword();
local lifeTime = receiveData.readDword();
local hitTime = receiveData.readDword();
local sizeRate = receiveData.readDword();
obj.getVar("custom").setInt(0, sub);
obj.getVar("custom").setInt(1, totalDamage);
obj.getVar("custom").setInt(2, lifeTime);
obj.getVar("custom").setInt(3, hitTime);
obj.getVar("custom").setInt(4, sizeRate);
// print("sub = "+sub);
// print("totalDamage = "+totalDamage);
// print("lifeTime = "+lifeTime);
// print("hitTime = "+hitTime);
if(sub == 1){
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
sqrChr.getVar("VermilionbirdtalismanObj").push_obj_vector(obj);
}
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
break;
case 3:
local totalDamage = receiveData.readDword();
local sizeRate = receiveData.readDword();
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/vermilionbirdtalisman/godofexorcism/godofexorcism_vermilionbirdtalisman_18.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 40));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
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_BAEKHO:
switch(subtype){
case 1:
local totalDamage = receiveData.readDword();
local totalDamageExp = receiveData.readDword();
local hitTime = receiveData.readDword();
local hitMax = receiveData.readDword();
local sizeRate = receiveData.readDword();
local apdSet = receiveData.readDword();
obj.getVar("custom").setInt(1, totalDamage);
obj.getVar("custom").setInt(2, totalDamageExp);
obj.getVar("custom").setInt(3, hitTime);
obj.getVar("custom").setInt(4, hitMax);
obj.getVar("custom").setInt(5, sizeRate);
obj.getVar("custom").setInt(6, apdSet);
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
break;
case 2:
local totalDamage = receiveData.readDword();
local sub = receiveData.readDword();
local sizeRate = receiveData.readDword();
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/baekho/thunder_hitspark.ani";
if(sub > 1) aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/baekho/thunderfront.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 6));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
switch(sub){
case 1:
local aniPath = ["passiveobject/4_priest_bykk/3exorcist_bykk/animation/baekho/thunder_black.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/baekho/thunder_writea.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/baekho/thunder_writeb.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/baekho/thunder_writec.ani"];
for(local i = 0; i < aniPath.len(); i++){
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, aniPath[i], 0, 0, 0);
local angle = sq_getRandom(-30,30);
sq_SetCustomRotate(pooledObj, sq_ToRadian(angle.tofloat()));
}
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/2nd_skill/gunner/animation/supernova/end/explosionend_shockwave04.ani", 0, 0, 0);
sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
local pAni = pooledObj.getCurrentAnimation();
sizeRate = 0.55 * sizeRate.tofloat() / 100.0;
pAni.setImageRateFromOriginal(sizeRate, sizeRate);
sq_flashScreen(obj,0,0,30,150, sq_RGB(255,255,255), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM);
sq_SetMyShake(obj, 3, 100);
obj.sq_PlaySound("R_BEAKHO_LIGHTNING");
break;
case 2:
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalisman/talisman/thunder_nova.ani", 0, 0, 0);
sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
local pAni = pooledObj.getCurrentAnimation();
sizeRate = 0.7 * sizeRate.tofloat() / 100.0;
pAni.setImageRateFromOriginal(sizeRate, sizeRate);
pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalisman/talisman/lastthunder_floor.ani", 0, 0, 0);
sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
sq_flashScreen(obj,0,0,150,150, sq_RGB(255,255,255), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM);
sq_SetMyShake(obj, 6, 100);
obj.sq_PlaySound("BEAKHO_EXP_TALISMAN");
obj.sq_PlaySound("BEAKHO_LIGHTNING_FIN_TALISMAN");
break;
}
if(sizeRate > 100){
local currentAni = obj.getCurrentAnimation();
sizeRate = sizeRate.tofloat() / 100.0;
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
}
break;
}
break;
case SKILL_BYKK_THUNDERBOLTTALISMAN:
switch(subtype){
case 1:
local hitTime = receiveData.readDword();
local totalDamage = receiveData.readDword();
local lifeTime = receiveData.readDword();
local prob = receiveData.readDword();
local time = receiveData.readDword();
local level = receiveData.readDword();
local sizeRate = receiveData.readDword();
local isTalisman = receiveData.readDword();
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
local skillLevel = sq_GetSkillLevel(sqrChr, SKILL_BYKK_CHAKRAOFGOD);
obj.getVar("custom").setInt(1, totalDamage);
obj.getVar("custom").setInt(2, lifeTime);
obj.getVar("custom").setInt(3, hitTime);
obj.getVar("custom").setInt(4, sizeRate);
obj.getVar("custom").setInt(5, skillLevel);
obj.getVar("custom").setInt(6, isTalisman);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 28));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local attackInfo = sq_GetCurrentAttackInfo(obj);
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_LIGHTNING,prob,level,time);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
break;
}
break;
case SKILL_BYKK_HYUNMOO:
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
obj.setMapFollowParent(sqrChr);
obj.setMapFollowType(1);
//sizeRate,holdTime,lifeTime,mpRestore,attackSpeed,moveSpeed,changeRate
local sub = receiveData.readDword();
if(sub == 1){
local group = receiveData.readDword();
local uniqueId = receiveData.readDword();
local targetObj = sq_GetObject(obj, group, uniqueId);
if(targetObj){
// sq_moveWithParent(targetObj, obj);
obj.getVar("tar").clear_obj_vector();
obj.getVar("tar").push_obj_vector(targetObj);
local sizeRate = receiveData.readDword();
local mpRestore = receiveData.readDword();
local attackSpeed = receiveData.readDword();
local moveSpeed = receiveData.readDword();
obj.getVar("custom").setInt(0, sub);
obj.getVar("custom").setInt(1, mpRestore);
obj.getVar("custom").setInt(2, attackSpeed);
obj.getVar("custom").setInt(3, moveSpeed);
obj.getVar("custom").setInt(4, sizeRate);
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/hyunmoofloor1.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
// currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/hyunmoofloor2.ani"),true);
sizeRate = sizeRate.tofloat() / 315.0;
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
// currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
obj.setTimeEvent(1, 1000, -1, false);
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
}
else sq_SendDestroyPacketPassiveObject(obj);
return;
}
local sizeRate = receiveData.readDword();
local holdTime = receiveData.readDword();
local lifeTime = receiveData.readDword();
local mpRestore = receiveData.readDword();
local attackSpeed = receiveData.readDword();
local moveSpeed = receiveData.readDword();
local changeRate = receiveData.readDword();
obj.getVar("custom").setInt(0, sub);
obj.getVar("custom").setInt(1, sizeRate);
obj.getVar("custom").setInt(2, holdTime);
obj.getVar("custom").setInt(3, lifeTime);
obj.getVar("custom").setInt(4, mpRestore);
obj.getVar("custom").setInt(5, attackSpeed);
obj.getVar("custom").setInt(6, moveSpeed);
obj.getVar("custom").setInt(7, changeRate);
local group = sq_GetGroup(obj);
local uniqueId = sq_GetUniqueId(obj);
createSkillPassive_Priest_3exorcist_bykk(obj,obj,643011,0,0,0,sq_GetDirection(obj),1,group, uniqueId, sizeRate,mpRestore,attackSpeed,moveSpeed,0);
sqrChr.getVar("hyunmooObj").push_obj_vector(obj);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 21));
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
break;
case SKILL_BYKK_SHIKIGAMI:
local sub = receiveData.readDword();
obj.getVar("custom").setInt(0, sub);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
sqrChr.getVar("shikigamiObj").push_obj_vector(obj);
if(sqrChr.getVar("shikigamiBool").getBool(0)) sq_SendDestroyPacketPassiveObject(obj);
switch(sub){
case 1:
local totalDamage = receiveData.readDword();
local totalDamageExp = receiveData.readDword();
local hitTime = receiveData.readDword();
local lifeTime = receiveData.readDword();
local sizeRate = receiveData.readDword();
local sizeRateExp = receiveData.readDword();
obj.getVar("custom").setInt(1, totalDamage);
obj.getVar("custom").setInt(2, totalDamageExp);
obj.getVar("custom").setInt(3, hitTime);
obj.getVar("custom").setInt(4, lifeTime);
obj.getVar("custom").setInt(5, sizeRate);
obj.getVar("custom").setInt(6, sizeRateExp);
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/square1.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/square2.ani"),true);
currentAni.addLayerAnimation(2,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/square3.ani"),true);
currentAni.addLayerAnimation(3,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/square4.ani"),true);
currentAni.addLayerAnimation(4,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/square5.ani"),true);
currentAni.addLayerAnimation(5,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/square6.ani"),true);
currentAni.addLayerAnimation(6,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/square7.ani"),true);
break;
case 2:
local totalDamage = receiveData.readDword();
local hitTime = receiveData.readDword();
local lifeTime = receiveData.readDword();
local sizeRate = receiveData.readDword();
obj.getVar("custom").setInt(1, lifeTime);
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/hitfront.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 26));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
setAttackType_2Exorcist(sqrChr, obj);
obj.setTimeEvent(1, hitTime, -1, false);
obj.setTimeEvent(2, 50, -1, true);
obj.setTimeEvent(3, 75, -1, true);
local currentAni = obj.getCurrentAnimation();
sq_SetFrameDelayTime(currentAni, 0, 10);
sizeRate = sizeRate.tofloat() / 100.0;
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
obj.sq_PlaySound("SHIKIGAMI_BIRD_ATK");
break;
case 3:
local totalDamage = receiveData.readDword();
local sizeRate = receiveData.readDword();
obj.getVar("custom").setInt(1, totalDamage);
obj.getVar("custom").setInt(2, sizeRate);
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/expbird1.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/expbird2.ani"),true);
currentAni.addLayerAnimation(2,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/expbird3.ani"),true);
currentAni.addLayerAnimation(3,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/expbird4.ani"),true);
sizeRate = sizeRate.tofloat() / 100.0;
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
sq_CreateParticle("passiveobject/4_priest_bykk/3exorcist_bykk/particle/shikigamiexppiece.ptl", obj, -250, 0, 200, true, 30, 0, 1);
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/expsquare1.ani", -250, 0, 200);
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/character/priest/animation/shikigami/expsquare2.ani", -250, 1, 201);
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/character/priest/animation/shikigami/expsquare2.ani", -250, 1, 201);
local pAni = pooledObj.getCurrentAnimation();
pAni.setImageRateFromOriginal(-1.0, 1.0);
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/character/priest/animation/shikigami/expsquare3.ani", -250, 20, 202);
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/character/priest/animation/shikigami/expsquare3.ani", -250, 20, 202);
local pAni = pooledObj.getCurrentAnimation();
pAni.setImageRateFromOriginal(-1.0, 1.0);
break;
case 4:
local totalDamage = receiveData.readDword();
local sizeRate = receiveData.readDword();
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/exphit.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 27));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/exp1.ani"),true);
currentAni.addLayerAnimation(2,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/exp2.ani"),true);
currentAni.addLayerAnimation(3,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/exp3.ani"),true);
currentAni.addLayerAnimation(4,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/exp4.ani"),true);
currentAni.addLayerAnimation(5,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/exp5.ani"),true);
currentAni.addLayerAnimation(6,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/exp6.ani"),true);
currentAni.addLayerAnimation(7,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/exp7.ani"),true);
currentAni.addLayerAnimation(8,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/exp8.ani"),true);
currentAni.addLayerAnimation(9,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/exp9.ani"),true);
currentAni.addLayerAnimation(10,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/exp10.ani"),true);
currentAni.addLayerAnimation(11,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/exp11.ani"),true);
currentAni.addLayerAnimation(12,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/exp12.ani"),true);
sizeRate = sizeRate.tofloat() / 100.0;
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
local aniPath = ["passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/expfloor1.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/expfloor2.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/expfloor3.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/expfloor4.ani"];
for(local i = 0; i < aniPath.len(); i++){
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, aniPath[i], 0, 0, 0);
sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
local pAni = pooledObj.getCurrentAnimation();
pAni.setImageRateFromOriginal(sizeRate, sizeRate);
}
sq_SetMyShake(obj, 8, 300);
sq_flashScreen(obj,80,200,240,255, sq_RGB(255,255,255), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM);
break;
case 5:
local randomNum = sq_getRandom(1, 100);
local randomNum2 = sq_getRandom(1, 10);
local randomTime = sq_getRandom(50, 400);
obj.getVar("custom").setInt(1, randomNum);
obj.getVar("custom").setInt(2, randomTime);
obj.getVar("custom").setInt(3, sq_GetZPos(obj));
obj.getVar("custom").setInt(4, randomNum2);
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/birdb1.ani";
if(randomNum > 50) aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/birdw.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
if(randomNum <= 50){
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/birdb2.ani"),true);
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/birdappearb1.ani", 0, 0, 30);
sq_SetCustomRotate(pooledObj, sq_ToRadian(-125.0));
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/birdappearb2.ani", 0, 1, 31);
sq_SetCustomRotate(pooledObj, sq_ToRadian(-125.0));
}
else{
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/4_priest_bykk/3exorcist_bykk/animation/shikigami/birdappearw.ani", 0, 0, 30);
sq_SetCustomRotate(pooledObj, sq_ToRadian(-125.0));
}
local speed = 600.0 + sq_getRandom(-100, 300).tofloat();
if(sq_GetDirection(obj, ENUM_DIRECTION_RIGHT)) sq_SetVelocity(obj, 0, speed);
else sq_SetVelocity(obj, 0, -speed);
break;
}
break;
case SKILL_BYKK_DESTROYSPIRITTALISMAN:
switch(subtype){
case 1:
local sub = receiveData.readDword();
local totalDamage = receiveData.readDword();
local lifeTime = receiveData.readDword();
local hitTime = receiveData.readDword();
local sizeRate = receiveData.readDword();
obj.getVar("custom").setInt(0, sub);
obj.getVar("custom").setInt(1, totalDamage);
obj.getVar("custom").setInt(2, lifeTime);
obj.getVar("custom").setInt(3, hitTime);
obj.getVar("custom").setInt(4, sizeRate);
switch(sub){
case 0:
obj.setTimeEvent(1, 10, 40, true);
break;
case 1:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/destroyspirittalisman/fluttering.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 13));
obj.sq_SetMoveParticle("particle/baekho.ptl", 0.0, sq_getRandom(-10, 10).tofloat());
break;
}
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);
sq_moveWithParent(targetObj, obj);
local totalDamage = receiveData.readDword();
local lifeTime = receiveData.readDword();
local hitTime = receiveData.readDword();
local sizeRate = receiveData.readDword();
print("totalDamage = "+totalDamage);
print("lifeTime = "+lifeTime);
print("hitTime = "+hitTime);
print("sizeRate = "+sizeRate);
obj.getVar("custom").setInt(1, totalDamage);
obj.getVar("custom").setInt(2, sizeRate);
local count = lifeTime / hitTime;
print("count = "+count);
obj.setTimeEvent(1, hitTime, count, true);
}
else sq_SendDestroyPacketPassiveObject(obj);
break;
case 3:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/destroyspirittalisman/explosion_explosion_circle_normal.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local totalDamage = receiveData.readDword();
local sizeRate = receiveData.readDword();
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 14));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
sq_SetCurrentDirection(obj, ENUM_DIRECTION_RIGHT);
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_ANTIAIRUPPER:
switch(subtype){
case 1:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/antiairupperblade.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local totalDamage = receiveData.readDword();
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 3));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
obj.sq_PlaySound("AUPPER_SWING_2");
break;
case 2:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/antiairupperquake.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local totalDamage = receiveData.readDword();
local sizeRate = receiveData.readDword();
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 4));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
local currentAni = obj.getCurrentAnimation();
sizeRate = sizeRate.tofloat() / 300.0;
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
obj.sq_PlaySound("QA_CRASH");
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
break;
}
break;
case SKILL_BYKK_GROUNDCRASH:
local totalDamage = receiveData.readDword();
local sizeRate = receiveData.readDword();
local isSuck = receiveData.readDword();
obj.getVar("custom").setInt(0, isSuck);
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/groundcrash/oxcrash.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 20));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
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;
case SKILL_BYKK_CUTTINGDARKNESS:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/cuttingdarkness/cutting_darkness_dodge.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local totalDamage = receiveData.readDword();
print("totalDamage = "+totalDamage);
local sizeRate = receiveData.readDword();
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/cuttingdarkness/cutting_darkness_normal.ani"),true);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 11));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
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_THROWWEAPON:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/throwweapon/weapon.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local totalDamage = receiveData.readDword();
local lifeTime = receiveData.readDword();
local hitTime = receiveData.readDword();
local sizeRate = receiveData.readDword();
local sub = receiveData.readDword();
if(sub > 0){
local currentAni = obj.getCurrentAnimation();
switch(sub){
case 1: currentAni.addLayerAnimation(6,sq_CreateAnimation("","character/priest/effect/animation/3exorcist_bykk/chakraofgod/light/throwweapon_weaponh3.ani"),true); break;
case 2: currentAni.addLayerAnimation(6,sq_CreateAnimation("","character/priest/effect/animation/3exorcist_bykk/chakraofgod/fire/throwweapon_weaponh3.ani"),true); break;
}
}
obj.setTimeEvent(1, 600, 1, false);
obj.sq_SetMoveParticle("particle/particle/throwweapon.ptl", 0.0, 0.0);
sq_SetSpeedToMoveParticle(obj,0,400);
obj.setTimeEvent(2, hitTime, -1, false);
obj.getVar("custom").setInt(0, sizeRate);
obj.getVar("custom").setInt(1, lifeTime);
obj.getVar("custom").setInt(2, totalDamage);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 37));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
local attackInfo = sq_GetCurrentAttackInfo(obj);
if(sub == 1) attackInfo.setElement(ENUM_ELEMENT_LIGHT);
else if(sub == 2) attackInfo.setElement(ENUM_ELEMENT_FIRE);
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);
}
obj.sq_PlaySound("WIND_MOVE_LOOP", 1233);
break;
case SKILL_BYKK_REPEATEDSMASH:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/repeatedsmashsub1.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local totalDamage = receiveData.readDword();
local prob = receiveData.readDword();
local level = receiveData.readDword();
local time = receiveData.readDword();
local size = receiveData.readDword();
local sizeRate = receiveData.readDword();
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(2,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/repeatedsmashsub2.ani"),true);
currentAni.addLayerAnimation(3,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/repeatedsmashsub3.ani"),true);
currentAni.addLayerAnimation(4,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/repeatedsmashsub4.ani"),true);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 25));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
local attackInfo = sq_GetCurrentAttackInfo(obj);
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_STUN ,prob, level, time);
if(size / 2 > 156) sizeRate = sizeRate * size / 2 / 156;
createOnlyDrawObjectEX_Priest_bykk(obj,"passiveobject/4_priest_bykk/3exorcist_bykk/animation/repeatedsmashsub5.ani",true,sq_GetDirection(obj),sq_GetXPos(obj),sq_GetYPos(obj),0,ENUM_DRAWLAYER_BOTTOM,sizeRate / 2,sizeRate / 2);
createOnlyDrawObjectEX_Priest_bykk(obj,"passiveobject/4_priest_bykk/3exorcist_bykk/animation/repeatedsmashsub6.ani",true,sq_GetDirection(obj),sq_GetXPos(obj),sq_GetYPos(obj),0,ENUM_DRAWLAYER_BOTTOM,sizeRate / 2,sizeRate / 2);
createOnlyDrawObjectEX_Priest_bykk(obj,"passiveobject/4_priest_bykk/3exorcist_bykk/animation/repeatedsmashsub7.ani",true,sq_GetDirection(obj),sq_GetXPos(obj),sq_GetYPos(obj),0,ENUM_DRAWLAYER_BOTTOM,sizeRate / 2,sizeRate / 2);
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/4_priest_bykk/3exorcist_bykk/animation/repeatedsmashsub8.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);
}
sq_SetMyShake(obj, 5, 300);
sq_flashScreen(obj,0,200,100,150, sq_RGB(255,255,255), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM);
break;
case SKILL_BYKK_ATOMICSMASH:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/atomicsmashfinish.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local totalDamage = receiveData.readDword();
local sizeRate = receiveData.readDword();
local speedRate = receiveData.readDword();
local currentAni = obj.getCurrentAnimation();
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 5));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
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;
case SKILL_BYKK_DANGEROUSSCALE:
local sub = receiveData.readDword();
obj.getVar("custom").setInt(0, sub);
switch(sub){
case 1:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/dangerousscale/dangerousscaleattackexplosion_00.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local totalDamage = receiveData.readDword();
print("totalDamage = "+totalDamage);
local sizeRate = receiveData.readDword();
local isTalisman = receiveData.readDword();
obj.getVar("custom").setInt(1, isTalisman);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 12));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
local direction = sq_GetDirection(obj), x = sq_GetXPos(obj), y = sq_GetYPos(obj);
createOnlyDrawObjectEX_Priest_bykk(obj,"character/priest/effect/animation/3exorcist_bykk/dangerousscale/dangerousscaleattackstonefront_00.ani",true,direction,x,y + 1,1,ENUM_DRAWLAYER_NORMAL,sizeRate,sizeRate);
createOnlyDrawObjectEX_Priest_bykk(obj,"character/priest/effect/animation/3exorcist_bykk/dangerousscale/dangerousscaleattackstoneback_00.ani",true,direction,x,y - 1,-1,ENUM_DRAWLAYER_NORMAL,sizeRate,sizeRate);
createOnlyDrawObjectEX_Priest_bykk(obj,"character/priest/effect/animation/3exorcist_bykk/dangerousscale/dangerousscaleattackdust_00.ani",true,direction,x,y + 2,2,ENUM_DRAWLAYER_NORMAL,sizeRate,sizeRate);
createOnlyDrawObjectEX_Priest_bykk(obj, "character/priest/effect/animation/3exorcist_bykk/dangerousscale/dangerousscaleattackbottom_00.ani",true,direction,x,y,0,ENUM_DRAWLAYER_BOTTOM,sizeRate,sizeRate);
if(isTalisman > 0) createOnlyDrawObjectEX_Priest_bykk(obj, "passiveobject/4_priest_bykk/3exorcist_bykk/animation/dangerousscale/talisman/start_dangerousscalestoneb2.ani",true,direction,x,y + 1,0,ENUM_DRAWLAYER_NORMAL,sizeRate,sizeRate);
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);
}
sq_SetShake(obj, 10, 600);
break;
case 2:
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.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
}
else sq_SendDestroyPacketPassiveObject(obj);
break;
}
break;
case SKILL_BYKK_THEBEST7HIT:
switch(subtype){
case 1:
local totalDamage = receiveData.readDword();
local sizeRate = receiveData.readDword();
local atkIndex = receiveData.readDword();
local speedRate = receiveData.readDword();
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thebest7hit/normal/atk1body.ani";
switch(atkIndex){
case 2: aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thebest7hit/normal/atk2body_01.ani"; break;
case 3: aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thebest7hit/normal/atk3body_01.ani"; break;
case 4: aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thebest7hit/normal/atk4body.ani"; break;
case 5: aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thebest7hit/normal/atk5body.ani"; break;
case 6: aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thebest7hit/normal/atk6body.ani"; break;
case 7: aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thebest7hit/normal/atk7body_body.ani"; break;
}
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, atkIndex + 28));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
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;
case 2:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thebest7hit/thebest1hit_eff_e.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local totalDamage = receiveData.readDword();
local sizeRate = receiveData.readDword();
local speedRate = receiveData.readDword();
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 36));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
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_PENTAGON:
switch(subtype){
case 1:
local totalDamage = receiveData.readDword();
local totalDamageExp = receiveData.readDword();
local sizeRate = receiveData.readDword();
local lifeTime = receiveData.readDword();
local hitTime = receiveData.readDword();
obj.getVar("custom").setInt(0, totalDamage);
obj.getVar("custom").setInt(1, totalDamageExp);
obj.getVar("custom").setInt(2, sizeRate);
obj.getVar("custom").setInt(3, lifeTime);
obj.getVar("custom").setInt(4, hitTime);
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
break;
case 2:
local sub = receiveData.readDword();
local sizeRate = receiveData.readDword();
sizeRate = sizeRate * 100 / 348;
obj.getVar("custom").setInt(0, sub);
obj.getVar("custom").setInt(1, sizeRate);
switch(sub){
case 1:
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/barrier/castbarrierfront_01.ani");
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/barrier/castbarrierback_01.ani"),true);
local speedRate = 192000 / 300;
currentAni.setSpeedRate(speedRate.tofloat());
break;
case 2:
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/barrier/gatherbarrierfront_01.ani");
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/barrier/gatherbarrierback_01.ani"),true);
currentAni.setSpeedRate(600.0);
break;
case 3:
local lifeTime = receiveData.readDword();
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/barrier/gatherbarrierfront_01.ani");
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/barrier/gatherbarrierback_01.ani"),true);
if(lifeTime > 1920){
local speedRate = 192000 / lifeTime;
currentAni.setSpeedRate(speedRate.tofloat());
}
local sizeRate = 0.5 * sizeRate.tofloat() / 100.0;
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
break;
case 4:
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/barrier/endbarrierfront_01.ani");
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/barrier/endbarrierback_01.ani"),true);
local sizeRate = 0.5 * sizeRate.tofloat() / 100.0;
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
break;
}
break;
case 3:
local sub = receiveData.readDword();
local group = receiveData.readDword();
local uniqueId = receiveData.readDword();
local targetObj = sq_GetObject(obj, group, uniqueId);
if(targetObj){
obj.getVar("custom").setInt(0, sub);
local colObj = sq_GetCNRDObjectToCollisionObject(targetObj);
colObj.getVar("effObj").push_obj_vector(obj);
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
}
else sq_SendDestroyPacketPassiveObject(obj);
break;
case 4:
break;
case 5:
break;
case 6:
break;
case 7:
break;
case 8:
break;
case 9:
break;
}
break;
case SKILL_BYKK_FOURGODPOWER:
switch(subtype){
case 1:
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/fourgodpower/3rdattack_hit_00.ani");
obj.setCurrentAnimation(ani);
local totalDamage = receiveData.readDword();
local hitMax = receiveData.readDword();
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 16));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
local currentAni = obj.getCurrentAnimation();
local delay = currentAni.getDelaySum(0, 12);
obj.setTimeEvent(1, delay / (hitMax + 1), hitMax, false);
break;
case 2:
local totalDamage = receiveData.readDword();
local totalDamageExp = receiveData.readDword();
local hitTime = receiveData.readDword();
local hitMax = receiveData.readDword();
local isStrong = receiveData.readDword();
obj.getVar("custom").setInt(0, totalDamage);
obj.getVar("custom").setInt(1, totalDamageExp);
obj.getVar("custom").setInt(2, hitTime);
obj.getVar("custom").setInt(3, hitMax);
obj.getVar("custom").setInt(4, isStrong);
local lifeTime = hitTime * hitMax;
obj.getVar("custom").setInt(5, lifeTime);
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
break;
case 3:
local totalDamage = receiveData.readDword();
local totalDamageExp = receiveData.readDword();
local hitTime = receiveData.readDword();
local hitMax = receiveData.readDword();
local isStrong = receiveData.readDword();
obj.getVar("custom").setInt(0, totalDamage);
obj.getVar("custom").setInt(1, totalDamageExp);
obj.getVar("custom").setInt(2, hitTime);
obj.getVar("custom").setInt(3, hitMax);
obj.getVar("custom").setInt(4, isStrong);
local lifeTime = hitTime * hitMax;
obj.getVar("custom").setInt(5, lifeTime);
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
break;
case 4:
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/fourgodpower/2ndattack_hitbottom_00.ani");
obj.setCurrentAnimation(ani);
local totalDamage = receiveData.readDword();
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 19));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
break;
}
break;
case SKILL_BYKK_BLUEDRAGON:
local sub = receiveData.readDword();
obj.getVar("custom").setInt(0, sub);
switch(sub){
case 1:
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/bluedragontotem/bluedragon_creattotem.ani");
obj.setCurrentAnimation(ani);
local totalDamage = receiveData.readDword();
local sizeRate = receiveData.readDword();
local speedRate = receiveData.readDword();
obj.getVar("custom").setInt(1, totalDamage);
obj.getVar("custom").setInt(2, sizeRate);
obj.getVar("custom").setInt(3, -60);
obj.getVar("custom").setInt(4, speedRate);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
sqrChr.getVar("bluedragonTotem").push_obj_vector(obj);
sq_SetCustomRotate(obj, sq_ToRadian(-60.0));
local currentAni = obj.getCurrentAnimation();
currentAni.setSpeedRate(speedRate.tofloat());
sq_SetMyShake(obj, 8, 300);
break;
case 2:
local totalDamage = receiveData.readDword();
local sizeRate = receiveData.readDword();
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/bluedragontotem/exphit.ani");
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 7));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local currentAni = obj.getCurrentAnimation();
sizeRate = sizeRate.tofloat() / 1000.0;
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
sq_SetMyShake(obj, 15, 600);
break;
}
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
break;
case SKILL_BYKK_ADVANCEDDRAGON:
local sub = receiveData.readDword();
obj.getVar("custom").setInt(0, sub);
switch(sub){
case 1:
//totalDamage,totalDamageExp,range,hitTime,lifeTime,speedRate
local totalDamage = receiveData.readDword();
local totalDamageExp = receiveData.readDword();
local range = receiveData.readDword();
local hitTime = receiveData.readDword();
local lifeTime = receiveData.readDword();
local speedRate = receiveData.readDword();
obj.getVar("custom").setInt(1, totalDamage);
obj.getVar("custom").setInt(2, totalDamageExp);
obj.getVar("custom").setInt(3, range);
hitTime = hitTime * 100 / speedRate;
lifeTime = lifeTime * 100 / speedRate;
obj.getVar("custom").setInt(4, hitTime);
obj.getVar("custom").setInt(5, lifeTime);
obj.getVar("custom").setInt(6, speedRate);
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/advanceddragon/advanceddragon_bright/startmagiccircle_1.ani");
obj.setCurrentAnimation(ani);
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
local currentAni = obj.getCurrentAnimation();
currentAni.setSpeedRate(speedRate.tofloat());
local sizeRate = range.tofloat() / 310.0;
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
createSkillPassive_Priest_3exorcist_bykk(obj,obj,643040,0,0,0,sq_GetDirection(obj),3,totalDamage,totalDamageExp,range,hitTime,lifeTime,speedRate,0);
break;
case 3:
local totalDamage = receiveData.readDword();
local totalDamageExp = receiveData.readDword();
local range = receiveData.readDword();
local hitTime = receiveData.readDword();
local lifeTime = receiveData.readDword();
local speedRate = receiveData.readDword();
obj.getVar("custom").setInt(1, range);
obj.getVar("custom").setInt(2, lifeTime);
obj.getVar("custom").setInt(3, speedRate);
obj.getVar("custom").setInt(4, totalDamageExp);
obj.getVar("custom").setInt(5, hitTime);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 0));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
break;
case 4:
local totalDamage = receiveData.readDword();
local range = receiveData.readDword();
local speedRate = receiveData.readDword();
local sizeRate = range.tofloat() / 310.0;
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/advanceddragon/advanceddragon_bright/finish/finishdragon_11.ani");
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.setSpeedRate(speedRate.tofloat());
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 1));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local aniPath = ["passiveobject/4_priest_bykk/3exorcist_bykk/animation/advanceddragon/advanceddragon_bright/finish/finishdragonhead_6.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/advanceddragon/advanceddragon_bright/finish/finishdragonbottom_5.ani"];
for(local i = 0; i < aniPath.len(); i++){
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, aniPath[i], 0, 0, 0);
local pAni = pooledObj.getCurrentAnimation();
pAni.setSpeedRate(speedRate.tofloat());
pAni.setImageRateFromOriginal(sizeRate, sizeRate);
pAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
if(i == 1) sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
}
local delay = 50000 / speedRate;
sq_SetMyShake(obj, 20, delay);
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
break;
case 5:
local sub2 = receiveData.readDword();
local lifeTime = receiveData.readDword();
obj.getVar("custom").setInt(1, sub2);
obj.getVar("custom").setInt(2, lifeTime);
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
break;
case 2:
local totalDamage = receiveData.readDword();
local speedRate = receiveData.readDword();
obj.getVar("custom").setInt(1, speedRate);
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/advanceddragon/advanceddragon_passion/attack_smallfrag.ani");
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 2));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local currentAni = obj.getCurrentAnimation();
currentAni.setSpeedRate(speedRate.tofloat());
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "character/priest/effect/animation/3exorcist_bykk/advanceddragon_passion/magiccircle/magiccircle_light1.ani", 0, 0, 0);
sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
local pAni = pooledObj.getCurrentAnimation();
pAni.setSpeedRate(speedRate.tofloat());
break;
}
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
break;
}
break;
case 4:
switch(skillIndex){
case SKILL_DireStream:
local Id = receiveData.readDword();
obj.getVar("avenger_ID").clear_vector();
obj.getVar("avenger_ID").push_vector(Id);
local pChrOBJ = obj.getTopCharacter();
pChrOBJ = sq_GetCNRDObjectToSQRCharacter(pChrOBJ);
if(Id == AVG_OBJ_Ear_Attack){
local Pani = obj.getCustomAnimation(0);
obj.setCurrentAnimation(Pani);
local PhshTime = receiveData.readWord();
sq_SetPause(obj, PAUSETYPE_OBJECT, PhshTime);
local skillLevel = pChrOBJ.sq_GetSkillLevel(SKILL_EARTH_QUAKE);
local BonusRate = pChrOBJ.sq_GetLevelData(SKILL_EARTH_QUAKE, 0, skillLevel);
local attackInfo = sq_GetCustomAttackInfo(obj, 0);
sq_SetCurrentAttackInfo(obj, attackInfo);
attackInfo = sq_GetCurrentAttackInfo(obj);
sq_SetCurrentAttackBonusRate(attackInfo, BonusRate);
}
else if(Id == AVG_OBJ_Ear_Explosion){
local Pani = obj.getCustomAnimation(1);
obj.setCurrentAnimation(Pani);
local skillLevel = pChrOBJ.sq_GetSkillLevel(SKILL_EARTH_QUAKE);
local BonusRate = pChrOBJ.sq_GetLevelData(SKILL_EARTH_QUAKE, 0, skillLevel);
local attackInfo = sq_GetCustomAttackInfo(obj, 1);
sq_SetCurrentAttackInfo(obj, attackInfo);
attackInfo = sq_GetCurrentAttackInfo(obj);
sq_SetCurrentAttackBonusRate(attackInfo, BonusRate);
}
else if(Id == AVG_OBJ_SpinCutter_Attack){
local Pani = obj.getCustomAnimation(2);
obj.setCurrentAnimation(Pani);
local skillLevel = pChrOBJ.sq_GetSkillLevel(SKILL_SPINCUTTER);
local BonusRate = pChrOBJ.sq_GetLevelData(SKILL_SPINCUTTER, 0, skillLevel);
local attackInfo = sq_GetCustomAttackInfo(obj, 2);
sq_SetCurrentAttackInfo(obj, attackInfo);
attackInfo = sq_GetCurrentAttackInfo(obj);
sq_SetCurrentAttackBonusRate(attackInfo, BonusRate);
local x = sq_GetXPos(obj);
local y = sq_GetYPos(obj);
local z = sq_GetZPos(obj);
obj.getVar("SpinCutter_Attack").clear_vector();
obj.getVar("SpinCutter_Attack").push_vector(x);
obj.getVar("SpinCutter_Attack").push_vector(y);
obj.getVar("SpinCutter_Attack").push_vector(z);
obj.setTimeEvent(OBJ_SpinCutter_push_Attack,150,3,false);
}
else if(Id == AVG_OBJ_DireStream_Lase){
local pChr = obj.getTopCharacter();
local Pani = obj.getCustomAnimation(3);
local attackInfo = sq_GetCustomAttackInfo(obj, 44);
local skillLevel = pChrOBJ.sq_GetSkillLevel(SKILL_DireStream);
local BonusRate = pChrOBJ.sq_GetLevelData(SKILL_DireStream, 0, skillLevel);
local Type = receiveData.readDword();
obj.getVar("DireStream_Lase").clear_vector();
obj.getVar("DireStream_Lase").push_vector(Type);
if(Type == 0)
{
Pani = obj.getCustomAnimation(3);
attackInfo = sq_GetCustomAttackInfo(obj, 44);
BonusRate = pChrOBJ.sq_GetLevelData(SKILL_DireStream, 0, skillLevel);
}
else if(Type == 1)
{
Pani = obj.getCustomAnimation(4);
attackInfo = sq_GetCustomAttackInfo(obj, 45);
BonusRate = pChrOBJ.sq_GetLevelData(SKILL_DireStream, 0, skillLevel);
BonusRate = BonusRate + (BonusRate * 0.3);
}
obj.setCurrentAnimation(Pani);
local currentAni = obj.getCurrentAnimation();
local delay = currentAni.getDelaySum(0, 9);
obj.setTimeEvent(10, delay, 1, false);
sq_SetCurrentAttackInfo(obj, attackInfo);
attackInfo = sq_GetCurrentAttackInfo(obj);
sq_SetCurrentAttackBonusRate(attackInfo, BonusRate.tointeger());
}
else if(Id == AVG_OBJ_DireStream_LaseEnd){
local Type = receiveData.readDword();
local Pani = obj.getCustomAnimation(5);
obj.setCurrentAnimation(Pani);
local skillLevel = pChrOBJ.sq_GetSkillLevel(SKILL_DireStream);
local BonusRate = pChrOBJ.sq_GetLevelData(SKILL_DireStream, 1, skillLevel);
if(Type == 0)
{
BonusRate = pChrOBJ.sq_GetLevelData(SKILL_DireStream, 1, skillLevel);
}
else if(Type == 1)
{
BonusRate = pChrOBJ.sq_GetLevelData(SKILL_DireStream, 1, skillLevel);
BonusRate = BonusRate + (BonusRate * 0.3);
}
local attackInfo = sq_GetCustomAttackInfo(obj, 6);
sq_SetCurrentAttackInfo(obj, attackInfo);
attackInfo = sq_GetCurrentAttackInfo(obj);
sq_SetCurrentAttackBonusRate(attackInfo, BonusRate.tointeger());
}
else if(Id == AVG_OBJ_MortalGospel_AttackBox01){
local Type = receiveData.readDword();
local Pani = obj.getCustomAnimation(6);
obj.setCurrentAnimation(Pani);
local skillLevel = pChrOBJ.sq_GetSkillLevel(SKILL_MortalGospel);
local BonusRate = pChrOBJ.sq_GetLevelData(SKILL_MortalGospel, 0, skillLevel);
if(Type == 0)
{
BonusRate = pChrOBJ.sq_GetLevelData(SKILL_MortalGospel, 0, skillLevel);
}
else if(Type == 1)
{
BonusRate = pChrOBJ.sq_GetLevelData(SKILL_MortalGospel, 0, skillLevel);
BonusRate = BonusRate + (BonusRate * 0.4);
}
local attackInfo = sq_GetCustomAttackInfo(obj, 7);
sq_SetCurrentAttackInfo(obj, attackInfo);
attackInfo = sq_GetCurrentAttackInfo(obj);
sq_SetCurrentAttackBonusRate(attackInfo, BonusRate.tointeger());
}
else if(Id == AVG_OBJ_MortalGospel_AttackBox02){
local Type = receiveData.readDword();
local Pani = obj.getCustomAnimation(6);
obj.setCurrentAnimation(Pani);
local skillLevel = pChrOBJ.sq_GetSkillLevel(SKILL_MortalGospel);
local BonusRate = pChrOBJ.sq_GetLevelData(SKILL_MortalGospel, 1, skillLevel);
if(Type == 0)
{
BonusRate = pChrOBJ.sq_GetLevelData(SKILL_MortalGospel, 1, skillLevel);
}
else if(Type == 1)
{
BonusRate = pChrOBJ.sq_GetLevelData(SKILL_MortalGospel, 1, skillLevel);
BonusRate = BonusRate + (BonusRate * 0.4);
}
local attackInfo = sq_GetCustomAttackInfo(obj, 8);
sq_SetCurrentAttackInfo(obj, attackInfo);
attackInfo = sq_GetCurrentAttackInfo(obj);
sq_SetCurrentAttackBonusRate(attackInfo, BonusRate.tointeger());
}
else if(Id == AVG_OBJ_MortalGospel_AttackBox03){
local Type = receiveData.readDword();
local Pani = obj.getCustomAnimation(6);
obj.setCurrentAnimation(Pani);
local skillLevel = pChrOBJ.sq_GetSkillLevel(SKILL_MortalGospel);
local BonusRate = pChrOBJ.sq_GetLevelData(SKILL_MortalGospel, 2, skillLevel);
if(Type == 0)
{
BonusRate = pChrOBJ.sq_GetLevelData(SKILL_MortalGospel, 2, skillLevel);
}
else if(Type == 1)
{
BonusRate = pChrOBJ.sq_GetLevelData(SKILL_MortalGospel, 2, skillLevel);
BonusRate = BonusRate + (BonusRate * 0.4);
}
local attackInfo = sq_GetCustomAttackInfo(obj, 9);
sq_SetCurrentAttackInfo(obj, attackInfo);
attackInfo = sq_GetCurrentAttackInfo(obj);
sq_SetCurrentAttackBonusRate(attackInfo, BonusRate.tointeger());
}
else if(Id == AVG_OBJ_MortalGospel_AttackBox04){
local Type = receiveData.readDword();
local Pani = obj.getCustomAnimation(6);
obj.setCurrentAnimation(Pani);
local skillLevel = pChrOBJ.sq_GetSkillLevel(SKILL_MortalGospel);
local BonusRate = pChrOBJ.sq_GetLevelData(SKILL_MortalGospel, 3, skillLevel);
if(Type == 0)
{
BonusRate = pChrOBJ.sq_GetLevelData(SKILL_MortalGospel, 3, skillLevel);
}
else if(Type == 1)
{
BonusRate = pChrOBJ.sq_GetLevelData(SKILL_MortalGospel, 3, skillLevel);
BonusRate = BonusRate + (BonusRate * 0.4);
}
local attackInfo = sq_GetCustomAttackInfo(obj, 10);
sq_SetCurrentAttackInfo(obj, attackInfo);
attackInfo = sq_GetCurrentAttackInfo(obj);
sq_SetCurrentAttackBonusRate(attackInfo, BonusRate.tointeger());
}
break;
case SKILL_PRIEST_RIGHTEOUSDEVILIZE:
switch(subtype){
case 1:
local totalDamage = receiveData.readDword();
local hitMax = receiveData.readDword();
local hitMaxback = receiveData.readDword();
local disX = receiveData.readDword();
local time = receiveData.readDword();
local speedRate = receiveData.readDword();
obj.getVar("custom").setInt(0, hitMaxback);
obj.getVar("custom").setInt(1, disX);
obj.getVar("custom").setInt(2, sq_GetXPos(obj));
obj.getVar("custom").setInt(3, sq_GetXPos(obj));
obj.getVar("custom").setInt(4, totalDamage);
local aniPath = "passiveobject/4_priest_bykk/4avenger/animation/spincutter/righteousdevilize/righteousdevilize_devilspincutter_projectile_spin_loop_base.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 49));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local currentAni = obj.getCurrentAnimation();
currentAni.setSpeedRate(speedRate.tofloat());
currentAni = obj.getCurrentAnimation();
local delay = currentAni.getDelaySum(0, 13);
obj.setTimeEvent(1, delay / (hitMax + 1), hitMax, true);
local group = sq_GetGroup(obj);
local uniqueId = sq_GetUniqueId(obj);
sq_BinaryStartWrite();
sq_BinaryWriteDword(4);
sq_BinaryWriteDword(SKILL_PRIEST_RIGHTEOUSDEVILIZE);
sq_BinaryWriteDword(2);
sq_BinaryWriteDword(group);
sq_BinaryWriteDword(uniqueId);
sq_SendCreatePassiveObjectPacket(obj, PASSIVEOBJECT_PRIESTBYKK, 0, 0, 0, 0, sq_GetDirection(obj));
break;
case 2:
local group = receiveData.readDword();//组
local uniqueId = receiveData.readDword();//唯一ID
local targetObj = sq_GetObject(obj, group, uniqueId);//得到对象
if(targetObj) sq_moveWithParent(targetObj, obj);
local aniPath = "passiveobject/4_priest_bykk/4avenger/animation/spincutter/righteousdevilize/righteousdevilize_devilspincutter_projectile_ground_dodge.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
break;
case 3:
local totalDamage = receiveData.readDword();
local createMax = receiveData.readDword();
local expMax = receiveData.readDword();
obj.getVar("custom").setInt(0, totalDamage);
obj.getVar("custom").setInt(1, createMax);
obj.getVar("custom").setInt(2, expMax);
obj.setTimeEvent(2, 10, createMax + 1, true);
break;
case 4:
local totalDamage = receiveData.readDword();
local expMax = receiveData.readDword();
obj.getVar("custom").setInt(0, totalDamage);
obj.getVar("custom").setInt(1, expMax);
local aniPath = "passiveobject/4_priest_bykk/4avenger/animation/earthquakerock/devilearthquake/righteousdevilize/earthquake_projectile_rock.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
obj.setTimeEvent(4, 200, 1, false);
obj.setTimeEvent(5, 500, 1, false);
break;
case 5:
local totalDamage = receiveData.readDword();
local expMax = receiveData.readDword();
obj.getVar("custom").setInt(0, totalDamage);
obj.getVar("custom").setInt(1, expMax);
local aniPath = "passiveobject/4_priest_bykk/4avenger/animation/earthquakerock/devilearthquake/righteousdevilize/boom_02.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
local delay = currentAni.getDelaySum(false);
obj.setTimeEvent(3, delay / expMax, expMax, true);
break;
case 6:
local totalDamage = receiveData.readDword();
local atkIndex = receiveData.readDword();
obj.getVar("custom").setInt(0, totalDamage);
local aniPath = "passiveobject/4_priest_bykk/4avenger/animation/earthquakerock/devilearthquake/righteousdevilize/attackbox.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, atkIndex));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
break;
}
break;
}
break;
}
}
function setState_po_priest_bykk(obj, state, datas)
{
if(!obj) return;
local job = obj.getVar("job").getInt(0);
local skillIndex = obj.getVar("skillIndex").getInt(0);
local subtype = obj.getVar("subtype").getInt(0);
obj.getVar("state").setInt(0,state);
switch(job){
case 0:
break;
case 1:
switch(skillIndex){
case 28:
switch(subtype){
case 1:
switch(state){
case 20:
local aniPath = "passiveobject/4_priest_bykk/1crusader_bykk/animation/flashglobe/beforedodge.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/4_priest_bykk/1crusader_bykk/animation/flashglobe/beforenormal.ani"),true);
currentAni.addLayerAnimation(-2,sq_CreateAnimation("","passiveobject/4_priest_bykk/1crusader_bykk/animation/flashglobe/floor.ani"),true);
local sizeRate = obj.getVar("custom").getInt(6);
if(sizeRate > 100){
currentAni = obj.getCurrentAnimation();
sizeRate = sizeRate.tofloat() / 100.0;
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
}
break;
}
break;
}
break;
}
break;
case 2:
break;
case 3:
switch(skillIndex){
case SKILL_BYKK_VERMILIONBIRDTALISMAN:
switch(subtype){
case 1:
switch(state){
case 20:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/vermilionbirdtalisman/vermilionbirdtalismanstart_05.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
case 21:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/vermilionbirdtalisman/vermilionbirdtalismanloop_12.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
obj.setTimeEvent(1, obj.getVar("custom").getInt(3), -1, true);
break;
case 22:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/vermilionbirdtalisman/vermilionbirdtalismanend_01.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
}
break;
case 2:
local sub = obj.getVar("custom").getInt(0);
switch(sub){
case 1:
switch(state){
case 20:
local aniPath = "character/priest/effect/animation/3exorcist_bykk/godofexorcism/godofexorcism_vermilionbirdtalisman_stay_loop_body.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
case 21:
local aniPath = "character/priest/effect/animation/3exorcist_bykk/godofexorcism/godofexoricism_vermilionbirdtalisman_end_body.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
}
break;
case 2:
switch(state){
case 20:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/vermilionbirdtalisman/godofexorcism/godofexorcism_fire_talisman_loop.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local totalDamage = obj.getVar("custom").getInt(1);
local hitTime = obj.getVar("custom").getInt(3);
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
obj.setTimeEvent(1, hitTime, -1, false);
break;
case 21:
obj.stopTimeEvent(1);
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/vermilionbirdtalisman/godofexorcism/godofexorcism_fire_talisman_end.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
break;
}
local sizeRate = obj.getVar("custom").getInt(4);
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;
}
break;
case SKILL_BYKK_BAEKHO:
switch(subtype){
case 1:
switch(state){
case 20:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/baekho/baekho_appear.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
obj.sq_PlaySound("BEAKHO_APPEAR");
obj.sq_PlaySound("BEAKHO_IDOL_APPEAR");
break;
case 21:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/baekho/baekho_loop.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
obj.setTimeEvent(1, obj.getVar("custom").getInt(3), obj.getVar("custom").getInt(4), false);
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/4_priest_bykk/3exorcist_bykk/animation/baekho/baekhofloor3.ani", 250, 0, 0);
sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
local pAni = pooledObj.getCurrentAnimation();
local sizeRate = obj.getVar("custom").getInt(5).tofloat() / 100.0;
pAni.setImageRateFromOriginal(sizeRate, sizeRate);
pAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
obj.getVar().clear_obj_vector();
obj.getVar().push_obj_vector(pooledObj);
break;
case 22:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/baekho/baekho_disappear.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local size = obj.getVar().get_obj_vector_size();
if(size > 0){
for(local i = 0; i < size; i++){
local pooledObj = obj.getVar().get_obj_vector(i);
if(pooledObj) pooledObj.setValid(false);
}
}
obj.sq_PlaySound("BEAKHO_DISAPPEAR");
obj.sq_PlaySound("BEAKHO_IDOL_DISAPPEAR");
break;
}
break;
}
break;
case SKILL_BYKK_THUNDERBOLTTALISMAN:
switch(subtype){
case 1:
switch(state){
case 20:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalismankiriflynone.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalismankiriflydodge.ani"),true);
local speed = 1200.0;
if(sq_GetDirection(obj) == ENUM_DIRECTION_RIGHT) sq_SetVelocity(obj, 0, speed);
else sq_SetVelocity(obj, 0, -speed);
break;
case 21:
sq_SetVelocity(obj, 0, 0.0);
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalisman1.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalisman2.ani"),true);
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalismancircle.ani", 0, 0, 60);
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalismanspark.ani", 0, 0, 60);
obj.getVar("bool").setBool(1, true);
local hitTime = obj.getVar("custom").getInt(3), hitMax = -1;
// if(obj.getVar("custom").getInt(6) > 0){
// hitTime = 160;
// hitMax = 5;
// }
obj.setTimeEvent(1, hitTime, hitMax, true);
obj.getVar().clear_ct_vector();
obj.getVar().push_ct_vector();
local timer = obj.getVar().get_ct_vector(0);
timer.Reset();
timer.Start(10000,0);
local sizeRate = obj.getVar("custom").getInt(4);
sizeRate = sizeRate.tofloat() / 600.0;
local effsizeRate = sizeRate * 1.5 * 1.07;
obj.getVar("eff").clear_obj_vector();
local aniPath = ["passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalismanfloor1.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalismanfloor2.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalismanfloor3.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalismanfloor4.ani"];//"passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalismanfloor.ani",
for(local i = 0; i < aniPath.len(); i++){
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, aniPath[i], 0, 0, 0);
sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
local pAni = pooledObj.getCurrentAnimation();
pAni.setSpeedRate(200.0);
pAni.setImageRateFromOriginal(effsizeRate, effsizeRate);
obj.getVar("eff").push_obj_vector(pooledObj);
}
local currentAni = obj.getCurrentAnimation();
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
break;
case 22:
obj.stopTimeEvent(1);
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalismankiri1.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalismankiri2.ani"),true);
break;
}
break;
}
break;
case SKILL_BYKK_HYUNMOO:
local sub = obj.getVar("custom").getInt(0);
switch(sub){
case 0:
switch(state){
case 20:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/hyunmooappear1.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/hyunmooappear2.ani"),true);
obj.sq_PlaySound("HYUN_IN");
break;
case 21:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/hyunmoostay1.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/hyunmoostay2.ani"),true);
if(!obj.isExistTimeEvent(10)) obj.setTimeEvent(10, 15, -1, true);
break;
case 22:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/hyunmoomove1.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/hyunmoomove2.ani"),true);
if(!obj.isExistTimeEvent(11)) obj.setTimeEvent(11, 300, -1, true);
break;
case 23:
if(obj.isExistTimeEvent(10)) obj.stopTimeEvent(10);
if(obj.isExistTimeEvent(11)) obj.stopTimeEvent(11);
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/hyunmooattack1.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/hyunmooattack2.ani"),true);
local delaySum = currentAni.getDelaySum(0, 2);
obj.getVar("move").setInt(0, sq_GetXPos(obj));
obj.getVar("move").setInt(1, sq_GetYPos(obj));
obj.resetHitObjectList();
obj.getVar("atkBool").setBool(0, true);
obj.setTimeEvent(2, 10, 48, true);
obj.sq_PlaySound("HYUN_JUMP");
break;
case 24:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/hyunmoohold1.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/hyunmoohold2.ani"),true);
currentAni.addLayerAnimation(-2,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/hyunmoohold3.ani"),true);
// currentAni.addLayerAnimation(3,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/hyunmoohold4.ani"),true);
obj.sq_PlaySound("HYUN_LOCK");
break;
case 25:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/hyunmooholdend1.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/hyunmooholdend2.ani"),true);
currentAni.addLayerAnimation(-2,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/hyunmooholdend3.ani"),true);
obj.stopSound(2333);
obj.sq_PlaySound("HYUN_UNLOCK");
break;
case 26:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/hyunmoodisappear1.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/hyunmoodisappear2.ani"),true);
obj.sq_PlaySound("HYUN_OUT");
break;
}
break;
}
break;
case SKILL_BYKK_DANGEROUSSCALE:
switch(state){
case 20:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/dangerousscale/talisman/start_dangerousscale_hold_front.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/4_priest_bykk/3exorcist_bykk/animation/dangerousscale/talisman/start_dangerousscale_hold_back.ani", 0, -2, -2);
break;
case 21:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/dangerousscale/talisman/loop_dangerousscale_hold_front.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/4_priest_bykk/3exorcist_bykk/animation/dangerousscale/talisman/loop_dangerousscale_hold_back.ani", 0, -2, -2);
obj.getVar("eff").clear_obj_vector();
obj.getVar("eff").push_obj_vector(pooledObj);
break;
case 22:
local aniPath = "passiveobject/4_priest_bykk/3exorcist_bykk/animation/dangerousscale/talisman/boom_dangerousscale_hold_boomcloud.ani";
local ani = sq_CreateAnimation("", aniPath);
obj.setCurrentAnimation(ani);
local pooledObj = obj.getVar("eff").get_obj_vector(0);
if(pooledObj) pooledObj.setValid(false);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/dangerousscale/talisman/loop_dangerousscale_hold_front.ani"),true);
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/dangerousscale/talisman/loop_dangerousscale_hold_back.ani"),true);
break;
}
break;
case SKILL_BYKK_PENTAGON:
switch(subtype){
case 1:
switch(state){
case 20:
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/pentagon/startpentagon_01.ani");
obj.setCurrentAnimation(ani);
obj.getVar("effObj").clear_obj_vector();
local group = sq_GetGroup(obj);
local uniqueId = sq_GetUniqueId(obj);
createSkillPassive_Priest_3exorcist_bykk(obj,obj,643028,255,-25,0,sq_GetDirection(obj),0,group,uniqueId,0,0,0,0,0);
createSkillPassive_Priest_3exorcist_bykk(obj,obj,643028,155,50,0,sq_GetDirection(obj),1,group,uniqueId,0,0,0,0,0);
createSkillPassive_Priest_3exorcist_bykk(obj,obj,643028,0,-60,0,sq_GetDirection(obj),2,group,uniqueId,0,0,0,0,0);
createSkillPassive_Priest_3exorcist_bykk(obj,obj,643028,-155,50,0,sq_GetDirection(obj),3,group,uniqueId,0,0,0,0,0);
obj.sq_PlaySound("PENTAGON_START");
break;
case 21:
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/pentagon/notworkpentagon_01.ani");
obj.setCurrentAnimation(ani);
obj.setTimeEvent(1, 300, 1, false);
break;
case 22:
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/pentagon/workpentagon_01.ani");
obj.setCurrentAnimation(ani);
local lifeTime = obj.getVar("custom").getInt(3);
local sizeRate = obj.getVar("custom").getInt(2);
createSkillPassive_Priest_3exorcist_bykk(obj,obj,643027,0,0,0,sq_GetDirection(obj),3,sizeRate,lifeTime,0,0,0,0,0);
local hitTime = obj.getVar("custom").getInt(4);
local totalDamage = obj.getVar("custom").getInt(0);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 23));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
obj.setTimeEvent(2, hitTime, -1, false);
obj.getVar().clear_ct_vector();//清除
obj.getVar().push_ct_vector();//加入
local timer = obj.getVar().get_ct_vector(0);//得到
timer.Reset();//初始化
timer.Start(10000,0);//计时开始
break;
case 23:
obj.stopTimeEvent(2);
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/pentagon/endpentagon_03.ani");
obj.setCurrentAnimation(ani);
local sizeRate = obj.getVar("custom").getInt(2);
createSkillPassive_Priest_3exorcist_bykk(obj,obj,643027,0,0,0,sq_GetDirection(obj),4,sizeRate,0,0,0,0,0,0);
obj.setTimeEvent(3, 2000, 1, false);
break;
case 24:
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/pentagon/disappearpentagon_07.ani");
obj.setCurrentAnimation(ani);
break;
}
if(state > 20){
local size = obj.getVar("effObj").get_obj_vector_size();
if(size > 0){
for(local i = 0; i < size; i++){
local effObj = obj.getVar("effObj").get_obj_vector(i);
if(effObj){
local colObj = sq_GetCNRDObjectToCollisionObject(effObj);
colObj.addSetStatePacket(state, null, STATE_PRIORITY_AUTO, false, "");
}
}
}
}
local sizeRate = obj.getVar("custom").getInt(2);
if(sizeRate > 300){
local currentAni = obj.getCurrentAnimation();
sizeRate = sizeRate.tofloat() / 300.0;
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
}
break;
case 2:
break;
case 3:
local sub = obj.getVar("custom").getInt(0);
switch(state){
case 20:
local aniPath = ["passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/bluedragon/startbluedragon_02.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/redphoenix/startphoenix_03.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/turtle/starthyunmu_02.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/whitetiger/startwhitetiger_02.ani"];
local ani = sq_CreateAnimation("", aniPath[sub]);
obj.setCurrentAnimation(ani);
obj.sq_PlaySound("PENTAGON_BARRIER");
break;
case 21:
local aniPath = ["passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/bluedragon/notworkbluedragon_02.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/redphoenix/notworkphoenix_02.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/turtle/notworkhyunmu_02.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/whitetiger/notworkwhitetiger_02.ani"];
local ani = sq_CreateAnimation("", aniPath[sub]);
obj.setCurrentAnimation(ani);
break;
case 22:
local aniPath = ["passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/bluedragon/workbluedragon_02.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/redphoenix/workphoenix_02.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/turtle/workhyunmu_02.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/whitetiger/workwhitetiger_02.ani"];
local ani = sq_CreateAnimation("", aniPath[sub]);
obj.setCurrentAnimation(ani);
break;
case 23:
local aniPath = ["passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/bluedragon/endbluedragon_02.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/redphoenix/endphoenix_02.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/turtle/endhyunmu_02.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/whitetiger/endwhitetiger_02.ani"];
local ani = sq_CreateAnimation("", aniPath[sub]);
obj.setCurrentAnimation(ani);
break;
case 24:
local aniPath = ["passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/bluedragon/disappearbluedragon_02.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/redphoenix/disappearphoenix_02.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/turtle/disappearhyunmu_02.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/pentagonobject/whitetiger/disappearwhitetiger_02.ani"];
local ani = sq_CreateAnimation("", aniPath[sub]);
obj.setCurrentAnimation(ani);
break;
}
break;
case 4:
break;
case 5:
break;
case 6:
break;
case 7:
break;
case 8:
break;
case 9:
break;
}
break;
case SKILL_BYKK_FOURGODPOWER:
switch(subtype){
case 1:
break;
case 2:
switch(state){
case 20:
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/fourgodpower/storm/start_front_00.ani");
obj.setCurrentAnimation(ani);
break;
case 21:
local aniPath = ["passiveobject/4_priest_bykk/3exorcist_bykk/animation/fourgodpower/storm/loopbasic_front_00.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/fourgodpower/storm/loopstrong_front_00.ani"];
local isStrong = obj.getVar("custom").getInt(4);
local ani = sq_CreateAnimation("", aniPath[isStrong]);
obj.setCurrentAnimation(ani);
local totalDamage = obj.getVar("custom").getInt(0);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 17));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
local hitTime = obj.getVar("custom").getInt(2);
if(isStrong > 0) hitTime = hitTime / 2;
obj.setTimeEvent(1, hitTime, -1, false);
obj.getVar().clear_ct_vector();//清除
obj.getVar().push_ct_vector();//加入
local timer = obj.getVar().get_ct_vector(0);//得到
timer.Reset();//初始化
timer.Start(10000,0);//计时开始
break;
case 22:
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/fourgodpower/storm/end_front_00.ani");
obj.setCurrentAnimation(ani);
local totalDamage = obj.getVar("custom").getInt(1);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 18));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
break;
}
break;
case 3:
switch(state){
case 20:
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/fourgodpower/storm/start_front_remote_00.ani");
obj.setCurrentAnimation(ani);
break;
case 21:
local aniPath = ["passiveobject/4_priest_bykk/3exorcist_bykk/animation/fourgodpower/storm/loopbasic_front_remote_00.ani", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/fourgodpower/storm/loopstrong_front_remote_00.ani"];
local isStrong = obj.getVar("custom").getInt(4);
local ani = sq_CreateAnimation("", aniPath[isStrong]);
obj.setCurrentAnimation(ani);
local totalDamage = obj.getVar("custom").getInt(0);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 17));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
local hitTime = obj.getVar("custom").getInt(2);
if(isStrong > 0) hitTime = hitTime / 2;
obj.setTimeEvent(1, hitTime, -1, false);
obj.getVar().clear_ct_vector();//清除
obj.getVar().push_ct_vector();//加入
local timer = obj.getVar().get_ct_vector(0);//得到
timer.Reset();//初始化
timer.Start(10000,0);//计时开始
if(sq_GetDirection(obj) == ENUM_DIRECTION_RIGHT) sq_SetVelocity(obj, 0, 100.0);
else sq_SetVelocity(obj, 0, -100.0);
break;
case 22:
sq_SetVelocity(obj, 0, 0.0);
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/fourgodpower/storm/end_front_remote_00.ani");
obj.setCurrentAnimation(ani);
local totalDamage = obj.getVar("custom").getInt(1);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 18));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
break;
}
break;
case 4:
break;
}
break;
case SKILL_BYKK_ADVANCEDDRAGON:
local sub = obj.getVar("custom").getInt(0);
switch(sub){
case 3:
switch(state){
case 20:
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/advanceddragon/advanceddragon_bright/startdragon_circle_aura_front.ani");
obj.setCurrentAnimation(ani);
break;
case 21:
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/advanceddragon/advanceddragon_bright/workdragon_dragon_normal.ani");
obj.setCurrentAnimation(ani);
obj.setTimeEvent(1, obj.getVar("custom").getInt(5), -1, false);
obj.getVar().clear_ct_vector();
obj.getVar().push_ct_vector();
local timer = obj.getVar().get_ct_vector(0);
timer.Reset();
timer.Start(10000,0);
break;
case 22:
obj.stopTimeEvent(1);
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/advanceddragon/advanceddragon_bright/enddragon_dragon_normal.ani");
obj.setCurrentAnimation(ani);
break;
}
local currentAni = obj.getCurrentAnimation();
local speedRate = obj.getVar("custom").getInt(3);
local range = obj.getVar("custom").getInt(1);
currentAni.setSpeedRate(speedRate.tofloat());
local sizeRate = range.tofloat() / 310.0;
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
local currentAni = obj.getCurrentAnimation();
if(state == 22) obj.setTimeEvent(2, currentAni.getDelaySum(false) / 2, 1, false);
break;
case 5:
switch(state){
case 20:
local aniPath = ["passiveobject/4_priest_bykk/3exorcist_bykk/animation/advanceddragon/advanceddragon_bright/startbluedragon_1.ani",
"passiveobject/4_priest_bykk/3exorcist_bykk/animation/advanceddragon/advanceddragon_bright/startwhitetiger_1.ani",
"passiveobject/4_priest_bykk/3exorcist_bykk/animation/advanceddragon/advanceddragon_bright/starthyunmu_1.ani",
"passiveobject/4_priest_bykk/3exorcist_bykk/animation/advanceddragon/advanceddragon_bright/startlphoenix_1.ani"];
local sub2 = obj.getVar("custom").getInt(1);
local ani = sq_CreateAnimation("", aniPath[sub2 - 1]);
obj.setCurrentAnimation(ani);
break;
case 21:
local aniPath = ["passiveobject/4_priest_bykk/3exorcist_bykk/animation/advanceddragon/advanceddragon_bright/workbluedragon_1.ani",
"passiveobject/4_priest_bykk/3exorcist_bykk/animation/advanceddragon/advanceddragon_bright/workwhitetiger_1.ani",
"passiveobject/4_priest_bykk/3exorcist_bykk/animation/advanceddragon/advanceddragon_bright/workhyunmu_1.ani",
"passiveobject/4_priest_bykk/3exorcist_bykk/animation/advanceddragon/advanceddragon_bright/workphoenix_1.ani"];
local sub2 = obj.getVar("custom").getInt(1);
local lifeTime = obj.getVar("custom").getInt(2);
local ani = sq_CreateAnimation("", aniPath[sub2 - 1]);
obj.setCurrentAnimation(ani);
obj.setTimeEvent(3, lifeTime, 1, false);
break;
case 22:
local aniPath = ["passiveobject/4_priest_bykk/3exorcist_bykk/animation/advanceddragon/advanceddragon_bright/endbluedragon_1.ani",
"passiveobject/4_priest_bykk/3exorcist_bykk/animation/advanceddragon/advanceddragon_bright/endwhitetiger_1.ani",
"passiveobject/4_priest_bykk/3exorcist_bykk/animation/advanceddragon/advanceddragon_bright/endhyunmu_1.ani",
"passiveobject/4_priest_bykk/3exorcist_bykk/animation/advanceddragon/advanceddragon_bright/endphoenix_1.ani"];
local sub2 = obj.getVar("custom").getInt(1);
local ani = sq_CreateAnimation("", aniPath[sub2 - 1]);
obj.setCurrentAnimation(ani);
break;
}
break;
}
break;
case SKILL_BYKK_BLUEDRAGON:
local sub = obj.getVar("custom").getInt(0);
switch(sub){
case 1:
switch(state){
case 20:
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/bluedragontotem/totem1.ani");
obj.setCurrentAnimation(ani);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/bluedragontotem/totem2.ani"),true);
currentAni.addLayerAnimation(2,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/bluedragontotem/totem3.ani"),true);
currentAni.addLayerAnimation(3,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/bluedragontotem/totem4.ani"),true);
currentAni.addLayerAnimation(4,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/bluedragontotem/totem5.ani"),true);
break;
}
break;
}
break;
}
break;
case 4:
break;
}
}
function onEndCurrentAni_po_priest_bykk(obj)
{
if(!obj) return;
local job = obj.getVar("job").getInt(0);
local skillIndex = obj.getVar("skillIndex").getInt(0);
local subtype = obj.getVar("subtype").getInt(0);
local state = obj.getVar("state").getInt(0);
switch(job){
case 0:
break;
case 1:
switch(skillIndex){
case 28:
switch(subtype){
case 1:
switch(state){
case 20:
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
return;
break;
}
break;
}
break;
}
sq_SendDestroyPacketPassiveObject(obj);
break;
case 2:
switch(skillIndex){
case SKILL_BYKK_AGGRESSIVEJUDGEMENT:
switch(subtype){
case 1: sq_SendDestroyPacketPassiveObject(obj); break;
case 3: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
}
break;
case 3:
switch(skillIndex){
case SKILL_BYKK_CHAKRAOFGOD:
switch(subtype){
case 1: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case SKILL_BYKK_ENTERINGNIRVANA: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_VERMILIONBIRDTALISMAN:
switch(subtype){
case 1:
local state = obj.getVar("state").getInt(0);
if(state == 20) obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
else if(state == 22) sq_SendDestroyPacketPassiveObject(obj);
break;
case 2:
if(state == 21) sq_SendDestroyPacketPassiveObject(obj);
break;
case 3: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case SKILL_BYKK_BAEKHO:
switch(subtype){
case 1:
if(state == 20) obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
else if(state == 22){
local size = obj.getVar().get_obj_vector_size();
if(size > 0){
for(local i = 0; i < size; i++){
local pooledObj = obj.getVar().get_obj_vector(i);
if(pooledObj) pooledObj.setValid(false);
}
}
sq_SendDestroyPacketPassiveObject(obj);
}
break;
case 2: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case SKILL_BYKK_THUNDERBOLTTALISMAN:
switch(subtype){
case 1:
if(state == 20) obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
else if(state == 21) obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, "");
else if(state == 22) sq_SendDestroyPacketPassiveObject(obj);
break;
}
break;
case SKILL_BYKK_HYUNMOO:
local sub = obj.getVar("custom").getInt(0);
switch(sub){
case 0:
switch(state){
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
case 23: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
case 25:
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
if(sq_GetXPos(obj) > sq_GetXPos(sqrChr) && sq_GetDirection(obj) == ENUM_DIRECTION_RIGHT) sq_SetCurrentDirection(obj, ENUM_DIRECTION_LEFT);
else if(sq_GetXPos(obj) < sq_GetXPos(sqrChr) && sq_GetDirection(obj) == ENUM_DIRECTION_LEFT) sq_SetCurrentDirection(obj, ENUM_DIRECTION_RIGHT);
obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, "");
break;
case 26: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
}
break;
case SKILL_BYKK_SHIKIGAMI:
local sub = obj.getVar("custom").getInt(0);
switch(sub){
case 1:
local totalDamage = obj.getVar("custom").getInt(1);
local hitTime = obj.getVar("custom").getInt(3);
local lifeTime = obj.getVar("custom").getInt(4);
local sizeRate = obj.getVar("custom").getInt(5);
createSkillPassive_Priest_3exorcist_bykk(obj,obj,643012,250,0,-sq_GetZPos(obj),sq_GetDirection(obj),2,totalDamage,hitTime,lifeTime,sizeRate,0,0,0);
break;
case 3:
local totalDamage = obj.getVar("custom").getInt(1);
local sizeRate = obj.getVar("custom").getInt(2);
createSkillPassive_Priest_3exorcist_bykk(obj,obj,643012,0,0,-sq_GetZPos(obj),sq_GetDirection(obj),4,totalDamage,sizeRate,0,0,0,0,0);
sq_SendDestroyPacketPassiveObject(obj);
break;
case 4: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case SKILL_BYKK_DESTROYSPIRITTALISMAN:
switch(subtype){
case 1: sq_SendDestroyPacketPassiveObject(obj); break;
case 2:
local targetObj = obj.getVar("tar").get_obj_vector(0);
local activeObj = sq_GetCNRDObjectToActiveObject(targetObj);
activeObj.getVar("dsTalisman").setBool(0, false);
sq_SendDestroyPacketPassiveObject(obj);
break;
case 3: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case SKILL_BYKK_ANTIAIRUPPER: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_GROUNDCRASH: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_CUTTINGDARKNESS: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_THROWWEAPON: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_REPEATEDSMASH: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_ATOMICSMASH: sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_DANGEROUSSCALE:
local sub = obj.getVar("custom").getInt(0);
if(sub == 0) sq_SendDestroyPacketPassiveObject(obj);
else{
local state = obj.getVar("state").getInt(0);
if(state == 20) obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
else if(state == 22) sq_SendDestroyPacketPassiveObject(obj);
}
break;
case SKILL_BYKK_THEBEST7HIT:sq_SendDestroyPacketPassiveObject(obj); break;
case SKILL_BYKK_PENTAGON:
switch(subtype){
case 1:
local state = obj.getVar("state").getInt(0);
switch(state){
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
case 23: sq_SendDestroyPacketPassiveObject(obj); break;//obj.addSetStatePacket(24, null, STATE_PRIORITY_AUTO, false, ""); break;
case 24: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case 2: sq_SendDestroyPacketPassiveObject(obj); break;
case 3:
switch(state){
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
case 23: sq_SendDestroyPacketPassiveObject(obj); break;
case 24: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case 4:
break;
case 5:
break;
case 6:
break;
case 7:
break;
case 8:
break;
case 9:
break;
}
break;
case SKILL_BYKK_FOURGODPOWER:
switch(subtype){
case 1: sq_SendDestroyPacketPassiveObject(obj); break;
case 2:
switch(state){
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case 3:
switch(state){
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case 4: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case SKILL_BYKK_BLUEDRAGON:
local sub = obj.getVar("custom").getInt(0);
if(sub == 1){
if(state != 20) return;
else sq_SendDestroyPacketPassiveObject(obj);
}
if(sub > 1) sq_SendDestroyPacketPassiveObject(obj);
break;
case SKILL_BYKK_ADVANCEDDRAGON:
local sub = obj.getVar("custom").getInt(0);
switch(sub){
case 1:
break;
case 2:
case 4:
sq_SendDestroyPacketPassiveObject(obj);
break;
case 3:
case 5:
switch(state){
case 20: obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, ""); break;
case 22: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
}
break;
}
break;
case 4:
switch(skillIndex){
case SKILL_DireStream:
local Id = obj.getVar("avenger_ID").get_vector(0);
if(Id == AVG_OBJ_Ear_Attack){
if(obj.isMyControlObject()){
sq_SendDestroyPacketPassiveObject(obj);
}
}
else sq_SendDestroyPacketPassiveObject(obj);
break;
case SKILL_PRIEST_RIGHTEOUSDEVILIZE:
switch(subtype){
case 1: sq_SendDestroyPacketPassiveObject(obj); break;
case 2: sq_SendDestroyPacketPassiveObject(obj); break;
case 4: sq_SendDestroyPacketPassiveObject(obj); break;
case 5: sq_SendDestroyPacketPassiveObject(obj); break;
case 6: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
}
break;
}
}
function onTimeEvent_po_priest_bykk(obj, timeEventIndex, timeEventCount)
{
if(!obj) return true;
local job = obj.getVar("job").getInt(0);
local skillIndex = obj.getVar("skillIndex").getInt(0);
local subtype = obj.getVar("subtype").getInt(0);
local state = obj.getVar("state").getInt(0);
switch(job){
case 0:
break;
case 1:
switch(timeEventIndex){
case 1: sq_SendDestroyPacketPassiveObject(obj); break;
case 10:
local totalDamage = obj.getVar("custom").getInt(1);
local range = obj.getVar("custom").getInt(2);
local time = obj.getVar("custom").getInt(3);
local level = obj.getVar("custom").getInt(4);
local sizeRate = obj.getVar("custom").getInt(6);
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/character/priest/animation/flashglobe/delay.ani", 0, 0, 0);
local pAni = pooledObj.getCurrentAnimation();
local pSize = sizeRate.tofloat() / 100.0;
pAni.setImageRateFromOriginal(pSize, pSize);
createSkillPassive_Priest_bykk(obj,obj,PASSIVEOBJECT_PRIESTBYKK,0,0,0,sq_GetDirection(obj),1,28,2,totalDamage,range,time,level,sizeRate,0,0,0);
sq_SendDestroyPacketPassiveObject(obj);
break;
case 11:
obj.resetHitObjectList();
break;
}
break;
case 2:
switch(skillIndex){
case SKILL_BYKK_AGGRESSIVEJUDGEMENT:
switch(timeEventIndex){
case 1:
obj.resetHitObjectList();
if(timeEventCount >= obj.getVar("custom").getInt(0)){
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
if(sqrChr && sqrChr.getState() != STATE_DIE) CNSquirrelAppendage.sq_RemoveAppendage(sqrChr, "character/priest/2infighter_bykk/ap_aggressivejudgement_suck.nut");
sq_SendDestroyPacketPassiveObject(obj);
}
break;
}
break;
}
break;
case 3:
switch(skillIndex){
case SKILL_BYKK_ENTERINGNIRVANA:
switch(timeEventIndex){
case 1:
local currentAni = obj.getCurrentAnimation();
local delaySum = currentAni.getDelaySum(3, 10);
local hitMax = obj.getVar().getInt(0);
obj.setTimeEvent(2, delaySum / (hitMax + 1), hitMax, true);
break;
case 2: obj.resetHitObjectList(); break;
case 3:
local totalDamage = obj.getVar().getInt(1);
local sizeRate = obj.getVar().getInt(2);
local prob = obj.getVar().getInt(3);
local time = obj.getVar().getInt(4);
local moveSpeed = obj.getVar().getInt(5);
local attackSpeed = obj.getVar().getInt(6);
local subtype2 = obj.getVar().getInt(7);
local ani = sq_CreateAnimation("", "passiveobject/4_priest_bykk/3exorcist_bykk/animation/enteringnirvana/exp1.ani");
obj.setCurrentAnimation(ani);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 15));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
local currentAni = obj.getCurrentAnimation();
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/enteringnirvana/exp2.ani"),true);
currentAni.addLayerAnimation(2,sq_CreateAnimation("","passiveobject/4_priest_bykk/3exorcist_bykk/animation/enteringnirvana/exp3.ani"),true);
obj.setTimeEvent(1, currentAni.getDelaySum(0, 2), 1, false);
if(sizeRate > 100){
sizeRate = sizeRate.tofloat() / 100.0;
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
}
local attackInfo = sq_GetCurrentAttackInfo(obj);
if(!attackInfo) return;
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_SLOW, prob, 100, time, moveSpeed);
if(subtype2 % 3 == 1) attackInfo.setElement(ENUM_ELEMENT_LIGHT);
else if(subtype2 % 3 == 2) attackInfo.setElement(ENUM_ELEMENT_FIRE);
break;
}
break;
case SKILL_BYKK_VERMILIONBIRDTALISMAN:
switch(subtype){
case 1:
switch(timeEventIndex){
case 1:
obj.resetHitObjectList();
if(timeEventCount * obj.getVar("custom").getInt(3) >= obj.getVar("custom").getInt(2)){
obj.stopTimeEvent(1);
obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, "");
}
break;
}
break;
case 2:
switch(timeEventIndex){
case 1: obj.resetHitObjectList(); break;
}
break;
}
break;
case SKILL_BYKK_BAEKHO:
switch(subtype){
case 1:
switch(timeEventIndex){
case 1:
local totalDamage = obj.getVar("custom").getInt(1), sub = 1, sizeRate = obj.getVar("custom").getInt(5), apdSet = obj.getVar("custom").getInt(6);
if(timeEventCount >= obj.getVar("custom").getInt(4)){
totalDamage = obj.getVar("custom").getInt(2);
sub = 2;
}
createSkillPassive_Priest_3exorcist_bykk(obj,obj,643008,250,0,0,sq_GetDirection(obj),totalDamage,sub,sizeRate,apdSet,0,0,0,0);
if(timeEventCount >= obj.getVar("custom").getInt(4)){
obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, "");
}
break;
}
break;
}
break;
case SKILL_BYKK_THUNDERBOLTTALISMAN:
switch(subtype){
case 1:
switch(timeEventIndex){
case 1:
if(obj.getVar("custom").getInt(6) > 0){
// if(timeEventCount == 5){
// obj.setTimeEvent(3, 130, 1, false);
// }
// else{
local aniPath = ["passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalisman/thunderbolt1.ani","passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalisman/thunderbolt2.ani","passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalisman/thunderbolt3.ani"];
for(local i = 0; i < 3; i++){
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, aniPath[i], 0, 0, 0);
sq_SetCustomRotate(pooledObj, sq_ToRadian(sq_getRandom(-10,10).tofloat()));
}
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalisman/talisman/thunder_nova.ani", 0, 0, 0);
sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
obj.resetHitObjectList();
sq_SetMyShake(obj, 3, 50);
obj.sq_PlaySound("THUNDER_STRIKE");
// }
return;
}
obj.resetHitObjectList();
obj.getVar("bool").setBool(1, true);
break;
case 2:
local size = obj.getVar("eff").get_obj_vector_size();
if(size > 0){
for(local i = 0; i < size; i++){
local pooledObj = obj.getVar("eff").get_obj_vector(i);
if(pooledObj) pooledObj.setValid(false);
}
}
obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, "");
break;
case 3:
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 28));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), obj.getVar("custom").getInt(1));
obj.resetHitObjectList();
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalisman/talisman/lastthunder_lightning01.ani", 0, 0, 0);
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/4_priest_bykk/3exorcist_bykk/animation/thunderbolttalisman/talisman/thunder_nova.ani", 0, 0, 0);
sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
sq_SetMyShake(obj, 8, 100);
obj.setTimeEvent(2, 150, 1, false);
sq_flashScreen(obj,0,50,150,150, sq_RGB(255,255,255), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM);
obj.sq_PlaySound("THUNDER_STRIKE");
break;
}
break;
}
break;
case SKILL_BYKK_HYUNMOO:
switch(timeEventIndex){
case 1:
local distance = obj.getVar("custom").getInt(4);
local xPos = sq_GetXPos(obj), yPos = sq_GetYPos(obj);
local apdPath = "character/priest/3exorcist_bykk/ap_hyunmoobuff.nut";
local mpRestore = obj.getVar("custom").getInt(1);
local attackSpeed = obj.getVar("custom").getInt(2);
local moveSpeed = obj.getVar("custom").getInt(3);
local objectManager = obj.getObjectManager();
for (local i = 0; i < objectManager.getCollisionObjectNumber(); i++){
local object = objectManager.getCollisionObject(i);
if (object && object.isObjectType(OBJECTTYPE_CHARACTER) && !obj.isEnemy(object) && sq_GetDistance(xPos, yPos, object.getXPos(), object.getYPos(), true) <= distance / 2){
local activeObj = sq_GetCNRDObjectToActiveObject(object);
if(!CNSquirrelAppendage.sq_IsAppendAppendage(activeObj, apdPath)){
print("test");
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(activeObj, obj, -1, false, apdPath, true);
AddAppendage.getVar("custom").setInt(0, distance);
local change_appendage = AddAppendage.sq_getChangeStatus("hyunmoobuff");
if(!change_appendage) change_appendage = AddAppendage.sq_AddChangeStatus("hyunmoobuff",activeObj, 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_MOVE_SPEED , false, (moveSpeed).tofloat());
change_appendage.addParameter(CHANGE_STATUS_TYPE_MP_REGEN_RATE , false, (mpRestore).tofloat());
}
}
}
}
break;
case 2:
local atkTarget = obj.getVar("atkTarget").get_obj_vector(0);
if(atkTarget && atkTarget.getState() != STATE_DIE){
local vx = sq_GetUniformVelocity(obj.getVar("move").getInt(0), sq_GetXPos(atkTarget), timeEventCount, 40);
local vy = sq_GetUniformVelocity(obj.getVar("move").getInt(1), sq_GetYPos(atkTarget) + 1, timeEventCount, 40);
sq_setCurrentAxisPos(obj, 0, vx);
sq_setCurrentAxisPos(obj, 1, vy);
}
break;
case 3: obj.addSetStatePacket(25, null, STATE_PRIORITY_AUTO, false, ""); break;
case 10://判斷距離
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
local disX = sq_Abs(sq_GetXPos(obj) - sq_GetDistancePos(sq_GetXPos(sqrChr),sqrChr.getDirection(),-50));
local disY = sq_Abs(sq_GetYPos(obj) - (sq_GetYPos(sqrChr) + 10));
local direction = sqrChr.getDirection();
if(disX > 10){
local baseM = 30;
local moveX = disX / baseM + 2;
if(sq_GetXPos(obj) > sq_GetDistancePos(sq_GetXPos(sqrChr),sqrChr.getDirection(),-50)) sq_setCurrentAxisPos(obj, 0, sq_GetXPos(obj) - moveX);
else sq_setCurrentAxisPos(obj, 0, sq_GetXPos(obj) + moveX);
}
if(disY > 10){
local baseM = 30;
local moveY = disY / baseM + 1;
if(sq_GetYPos(obj) > sq_GetYPos(sqrChr)) sq_setCurrentAxisPos(obj, 1, sq_GetYPos(obj) - moveY);
else sq_setCurrentAxisPos(obj, 1, sq_GetYPos(obj) + moveY);
}
if(disX <= 10 && disY <= 10){
if(sq_GetXPos(obj) > sq_GetXPos(sqrChr) && sq_GetDirection(obj) == ENUM_DIRECTION_RIGHT) sq_SetCurrentDirection(obj, ENUM_DIRECTION_LEFT);
else if(sq_GetXPos(obj) < sq_GetXPos(sqrChr) && sq_GetDirection(obj) == ENUM_DIRECTION_LEFT) sq_SetCurrentDirection(obj, ENUM_DIRECTION_RIGHT);
// if(obj.getDirection() != direction) obj.setDirection(direction);
obj.stopTimeEvent(10);
obj.setTimeEvent(11,300,-1,false);
local state = obj.getVar("state").getInt(0);
if(state != 21) obj.addSetStatePacket(21, null, STATE_PRIORITY_AUTO, false, "");
}
break;
case 11://移動
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
local disX = sq_Abs(sq_GetXPos(obj) - sq_GetDistancePos(sq_GetXPos(sqrChr),sqrChr.getDirection(),-50));
local disY = sq_Abs(sq_GetYPos(obj) - (sq_GetYPos(sqrChr) + 10));
if(disX > 10 || disY > 10){
if(sq_GetXPos(obj) > sq_GetXPos(sqrChr) && sq_GetDirection(obj) == ENUM_DIRECTION_RIGHT) sq_SetCurrentDirection(obj, ENUM_DIRECTION_LEFT);
else if(sq_GetXPos(obj) < sq_GetXPos(sqrChr) && sq_GetDirection(obj) == ENUM_DIRECTION_LEFT) sq_SetCurrentDirection(obj, ENUM_DIRECTION_RIGHT);
obj.stopTimeEvent(11);
obj.setTimeEvent(10,15,-1,false);
local state = obj.getVar("state").getInt(0);
if(state != 22) obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, "");
}
break;
}
break;
case SKILL_BYKK_SHIKIGAMI:
switch(timeEventIndex){
case 1:
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
if(sqrChr.getVar("shikigamiBool").getBool(0)){
sq_SendDestroyPacketPassiveObject(obj);
break;
}
obj.resetHitObjectList(obj);
break;//print("timeEventCount = "+timeEventCount);
case 2: createSkillPassive_Priest_3exorcist_bykk(obj,obj,643012,-230,0,200+sq_getRandom(-50,50),sq_GetDirection(obj),5,0,0,0,0,0,0,0); break;
case 3: createSkillPassive_Priest_3exorcist_bykk(obj,obj,643012,-230,0,200+sq_getRandom(-50,50),sq_GetDirection(obj),5,0,0,0,0,0,0,0); break;
case 4: sq_SendDestroyPacketPassiveObject(obj); break;
}
break;
case SKILL_BYKK_DESTROYSPIRITTALISMAN:
switch(subtype){
case 1:
switch(timeEventIndex){
case 1:
local totalDamage = obj.getVar("custom").getInt(1);
local lifeTime = obj.getVar("custom").getInt(2);
local hitTime = obj.getVar("custom").getInt(3);
local sizeRate = obj.getVar("custom").getInt(4);
createSkillPassive_Priest_3exorcist_bykk(obj,obj,643013,0,0,0,sq_GetDirection(obj),1,totalDamage,lifeTime,hitTime,sizeRate,0,0,0);
if(timeEventCount >= 40) sq_SendDestroyPacketPassiveObject(obj);
break;
}
break;
case 2:
switch(timeEventIndex){
case 1:
local totalDamage = obj.getVar("custom").getInt(1);
local sizeRate = obj.getVar("custom").getInt(2);
createSkillPassive_Priest_3exorcist_bykk(obj,obj,643015,0,-1,0,sq_GetDirection(obj),totalDamage,sizeRate,0,0,0,0,0,0);
break;
}
break;
}
break;
case SKILL_BYKK_THROWWEAPON:
switch(timeEventIndex){
case 1:
obj.stopSound(1233);
obj.sq_RemoveMoveParticle();
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 38));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), obj.getVar("custom").getInt(2));
break;
case 2: obj.resetHitObjectList(); break;
}
break;
case SKILL_BYKK_PENTAGON:
switch(subtype){
case 1:
switch(timeEventIndex){
case 1:
local size = 0;
obj.getVar("tar").clear_obj_vector();
local sizeRate = obj.getVar("custom").getInt(2);//695
local xPos = sq_GetXPos(obj), yPos = sq_GetYPos(obj), apdPath = "character/priest/3exorcist_bykk/ap_pentagon_hold.nut";
local objectManager = obj.getObjectManager();
for(local i = 0; i < objectManager.getCollisionObjectNumber(); i++){
local object = objectManager.getCollisionObject(i);
if (object && object.isObjectType(OBJECTTYPE_ACTIVE) && obj.isEnemy(object) && object.isInDamagableState(obj) && sq_GetDistance(xPos, yPos, object.getXPos(), object.getYPos(), true) <= sizeRate){
local activeObj = sq_GetCNRDObjectToActiveObject(object);
if(!obj.getVar("tar").is_obj_vector(activeObj)) obj.getVar("tar").push_obj_vector(activeObj);
if(!CNSquirrelAppendage.sq_IsAppendAppendage(activeObj, apdPath)){
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(activeObj, obj, -1, false, apdPath, true);
sq_HoldAndDelayDie(activeObj, obj, true, true, true, 200, 200, ENUM_DIRECTION_NEUTRAL , AddAppendage);
if(!sq_IsFixture(activeObj)) sq_MoveToAppendageForce(activeObj, obj, obj, 0, 0, activeObj.getZPos(), 600, true, AddAppendage);
}
}
}
if(obj.getVar("tar").get_obj_vector_size() > 0){
local sizeRate = obj.getVar("custom").getInt(2);
createSkillPassive_Priest_3exorcist_bykk(obj,obj,643027,0,0,0,sq_GetDirection(obj),1,sizeRate,0,0,0,0,0,0);
obj.setTimeEvent(4, 300, 1, false);
obj.sq_PlaySound("PENTAGON_BARRIER_GATHER");
}
else obj.addSetStatePacket(24, null, STATE_PRIORITY_AUTO, false, "");
break;
case 2: obj.resetHitObjectList(); break;
case 3:
local size = obj.getVar("tar").get_obj_vector_size();
if(size > 0){
for(local i = 0; i < size; i++){
local targetObj = obj.getVar("tar").get_obj_vector(i);
if(targetObj) CNSquirrelAppendage.sq_RemoveAppendage(targetObj, "character/priest/3exorcist_bykk/ap_pentagon_hold.nut");
}
}
local totalDamage = obj.getVar("custom").getInt(1);
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 23));
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
setAttackType_2Exorcist(sqrChr, obj);
sq_CreateParticle("passiveobject/4_priest_bykk/3exorcist_bykk/particle/particle/pentagonglassbrockenleft.ptl", obj, -100, 5, 250, true, 30, 0, 8);
sq_CreateParticle("passiveobject/4_priest_bykk/3exorcist_bykk/particle/particle/pentagonglassbrockenright.ptl", obj, 100, 5, 250, true, 30, 0, 8);
obj.sq_PlaySound("PENTAGON_BARRIER_EXP");
break;
case 4:
local sizeRate = obj.getVar("custom").getInt(2);
createSkillPassive_Priest_3exorcist_bykk(obj,obj,643027,0,0,0,sq_GetDirection(obj),2,sizeRate,0,0,0,0,0,0);
obj.setTimeEvent(5, 250, 1, false);
break;
case 5: obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); break;
}
break;
case 2:
break;
case 3:
break;
case 4:
break;
case 5:
break;
case 6:
break;
case 7:
break;
case 8:
break;
case 9:
break;
}
break;
case SKILL_BYKK_FOURGODPOWER:
switch(timeEventIndex){
case 1: obj.resetHitObjectList(); break;
}
break;
case SKILL_BYKK_BLUEDRAGON:
switch(timeEventIndex){
case 1:
local angle = obj.getVar("custom").getInt(3);
local speedRate = obj.getVar("custom").getInt(4);
local speed = 1300 * speedRate / 100;
// sq_SetCustomRotate(obj, sq_ToRadian(angle.tofloat()));
obj.sq_SetMoveParticle("particle/bluedragontotemdown.ptl", 0.0, -60.0);
sq_SetSpeedToMoveParticle(obj,0,speed);
sq_SetSpeedToMoveParticle(obj,2,0);
break;
}
break;
case SKILL_BYKK_ADVANCEDDRAGON:
switch(timeEventIndex){
case 1: obj.resetHitObjectList(); break;
case 2:
local totalDamage = obj.getVar("custom").getInt(4);
local range = obj.getVar("custom").getInt(1);
local speedRate = obj.getVar("custom").getInt(3);
createSkillPassive_Priest_3exorcist_bykk(obj,obj,643040,0,0,0,sq_GetDirection(obj),4,totalDamage,range,speedRate,0,0,0,0);
break;
case 3: obj.addSetStatePacket(22, null, STATE_PRIORITY_AUTO, false, ""); break;
}
break;
}
break;
case 4:
switch(skillIndex){
case SKILL_DireStream:
if(timeEventIndex == 10){
local currentAni = obj.getCurrentAnimation();
local delay = currentAni.getDelaySum(10, 15);
obj.setTimeEvent(OBJ_SpinCutter_push_Attack, delay / 10, 10, true);
return;
}
local Id = obj.getVar("avenger_ID").get_vector(0);
local pChrOBJ = obj.getTopCharacter();
pChrOBJ = sq_GetCNRDObjectToSQRCharacter(pChrOBJ);
if(timeEventIndex == OBJ_SpinCutter_push_Attack){
obj.resetHitObjectList();
}
if(timeEventIndex == OBJ_SpinCutter_get_Attack){
obj.resetHitObjectList();
}
if(timeEventIndex == OBJ_DireStream_Lase_Time){
obj.resetHitObjectList();
}
break;
case SKILL_PRIEST_RIGHTEOUSDEVILIZE:
switch(timeEventIndex){
case 1: obj.resetHitObjectList();print("test:"+timeEventCount); break;
case 2:
local totalDamage = obj.getVar("custom").getInt(0);
local createMax = obj.getVar("custom").getInt(1);
local expMax = obj.getVar("custom").getInt(2);
print("timeEventCount = "+timeEventCount);
sq_BinaryStartWrite();
sq_BinaryWriteDword(4);
sq_BinaryWriteDword(SKILL_PRIEST_RIGHTEOUSDEVILIZE);
sq_BinaryWriteDword(4);
sq_BinaryWriteDword(totalDamage);
sq_BinaryWriteDword(expMax);
sq_SendCreatePassiveObjectPacket(obj, PASSIVEOBJECT_PRIESTBYKK, 0, 135 * timeEventCount, -sq_getRandom(20,50), 0, sq_GetDirection(obj));
if(timeEventCount != 1) sq_SendCreatePassiveObjectPacket(obj, PASSIVEOBJECT_PRIESTBYKK, 0, 135 * timeEventCount, 0, 0, sq_GetDirection(obj));
sq_SendCreatePassiveObjectPacket(obj, PASSIVEOBJECT_PRIESTBYKK, 0, 135 * timeEventCount, sq_getRandom(20,50), 0, sq_GetDirection(obj));
if(timeEventCount >= createMax + 1){
sq_SendDestroyPacketPassiveObject(obj);
}
break;
case 3:
local totalDamage = obj.getVar("custom").getInt(0);
sq_BinaryStartWrite();
sq_BinaryWriteDword(4);
sq_BinaryWriteDword(SKILL_PRIEST_RIGHTEOUSDEVILIZE);
sq_BinaryWriteDword(6);
sq_BinaryWriteDword(totalDamage);
sq_BinaryWriteDword(48);
sq_SendCreatePassiveObjectPacket(obj, PASSIVEOBJECT_PRIESTBYKK, 0, 0, 0, 0, sq_GetDirection(obj));
break;
case 4:
local totalDamage = obj.getVar("custom").getInt(0);
sq_BinaryStartWrite();
sq_BinaryWriteDword(4);
sq_BinaryWriteDword(SKILL_PRIEST_RIGHTEOUSDEVILIZE);
sq_BinaryWriteDword(6);
sq_BinaryWriteDword(totalDamage);
sq_BinaryWriteDword(47);
sq_SendCreatePassiveObjectPacket(obj, PASSIVEOBJECT_PRIESTBYKK, 0, 0, 0, 0, sq_GetDirection(obj));
break;
case 5:
local totalDamage = obj.getVar("custom").getInt(0);
local expMax = obj.getVar("custom").getInt(1);
sq_BinaryStartWrite();
sq_BinaryWriteDword(4);
sq_BinaryWriteDword(SKILL_PRIEST_RIGHTEOUSDEVILIZE);
sq_BinaryWriteDword(5);
sq_BinaryWriteDword(totalDamage);
sq_BinaryWriteDword(expMax);
sq_SendCreatePassiveObjectPacket(obj, PASSIVEOBJECT_PRIESTBYKK, 0, 0, 0, 0, sq_GetDirection(obj));
break;
}
break;
}
break;
}
}