2797 lines
144 KiB
C
2797 lines
144 KiB
C
|
|
//obj
|
|
|
|
function setCustomData_po_atgunner_bykk(obj, receiveData)
|
|
{
|
|
if(!obj) return;
|
|
local sqrChr = sq_GetCNRDObjectToSQRCharacter(obj.getTopCharacter());
|
|
if(!sqrChr) return;
|
|
local job = receiveData.readDword();
|
|
local skillIndex = receiveData.readDword();
|
|
local subtype = receiveData.readDword();
|
|
|
|
obj.getVar("job").setInt(0, job);
|
|
obj.getVar("skillIndex").setInt(0, skillIndex);
|
|
obj.getVar("subtype").setInt(0, subtype);
|
|
|
|
switch(job){
|
|
case 0:
|
|
break;
|
|
case 1:
|
|
switch(skillIndex){
|
|
case SKILL_BYKK_AIRRAID:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local isSilver = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/1_ranger/animation/atairraid/atchainenlighten/chainenlighten_attack2_11.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 60));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
if(isSilver > 0){
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
attackInfo.setElement(ENUM_ELEMENT_LIGHT);
|
|
local totalDamage = sqrChr.sq_GetBonusRateWithPassive(30, -1, 1, 1.0) + 100;
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_TWINGUNBLADE:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local subWeaponType = receiveData.readDword();
|
|
local aniPath = "passiveobject/character/gunner/animation/twingunblade/bulletjumpattack.ani";
|
|
local ani = sq_CreateAnimation("", aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 86));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_HEADSHOT:
|
|
switch(subtype){
|
|
case 1:
|
|
case 2:
|
|
case 10:
|
|
case 11:
|
|
case 12:
|
|
case 13:
|
|
case 14:
|
|
case 20:
|
|
case 21:
|
|
case 22:
|
|
case 23:
|
|
case 24:
|
|
case 30:
|
|
case 31:
|
|
case 32:
|
|
case 33:
|
|
case 34:
|
|
case 40:
|
|
case 41:
|
|
case 42:
|
|
case 43:
|
|
case 44:
|
|
local passRate = 30;
|
|
local skillLevel = sq_GetSkillLevel(sqrChr, SKILL_BYKK_REDUCEREVOLVERDELAY);
|
|
if(skillLevel > 0) passRate = passRate + sq_GetLevelData(sqrChr, SKILL_BYKK_REDUCEREVOLVERDELAY, 7, skillLevel);
|
|
else if(subtype >= 30 && subtype <= 34) passRate = passRate + sq_GetIntData(sqrChr, SKILL_BYKK_BULLETPENETRATE, 0);
|
|
local addSpeedRate = 0;
|
|
if(subtype >= 30 && subtype <= 34) addSpeedRate = sq_GetIntData(sqrChr, SKILL_BYKK_BULLETPENETRATE, 2);
|
|
local totalDamage = receiveData.readDword();
|
|
local subWeaponType = receiveData.readDword();
|
|
local isDown = receiveData.readDword();
|
|
local isSub = receiveData.readDword();
|
|
local isAir = receiveData.readDword();
|
|
local activestatusSet = receiveData.readDword();
|
|
local statusTime = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, isDown);
|
|
obj.getVar("custom").setInt(1, subWeaponType);
|
|
obj.getVar("custom").setInt(2, passRate);
|
|
obj.getVar("custom").setInt(3, isSub);
|
|
obj.getVar("custom").setInt(5, activestatusSet);
|
|
obj.getVar("custom").setInt(6, statusTime);
|
|
obj.getVar("custom").setInt(7, isAir);
|
|
local aniPath = ["passiveobject/atgunner_bykk/1_ranger/animation/bulletpistol.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/bulletpistol.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/bulletmusket.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/upbullethandcannon.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/bulletbowgun.ani"];
|
|
if(subtype == 2 || subtype == 13 || subtype == 23 || subtype == 33 || subtype == 43) aniPath = ["passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/silverpistol.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/silverpistol.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/silvermusket.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/upbullethandcannon.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/silverbowgun.ani"];
|
|
else if(subtype == 10 || subtype == 20 || subtype == 30 || subtype == 40) aniPath = ["passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/flamepistol.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/flamepistol.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/flamemusket.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/upbullethandcannon.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/flamebowgun.ani"];
|
|
else if(subtype == 11 || subtype == 21 || subtype == 31 || subtype == 41) aniPath = ["passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/freezepistol.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/freezepistol.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/freezemusket.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/upbullethandcannon.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/freezebowgun.ani"];
|
|
local attackIndex = [85,74,84,83,78];
|
|
local ptlPath = [["particle/1_ranger/upattackrevolver.ptl","particle/1_ranger/upattackautomatic.ptl",
|
|
"particle/1_ranger/upattackmusket.ptl","","particle/1_ranger/upattackbowgun.ptl"],
|
|
["particle/1_ranger/downattackrevolver.ptl","particle/1_ranger/downattackautomatic.ptl",
|
|
"particle/1_ranger/downattackmusket.ptl","","particle/1_ranger/downattackbowgun.ptl"]];
|
|
local ani = sq_CreateAnimation("", aniPath[subWeaponType]);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, attackIndex[subWeaponType]));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
switch(subtype){
|
|
case 2:
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
attackInfo.setElement(ENUM_ELEMENT_LIGHT);
|
|
local totalDamage = sqrChr.sq_GetBonusRateWithPassive(30, -1, 1, 1.0) + 100;
|
|
obj.getVar("custom").setInt(4, totalDamage);
|
|
break;
|
|
case 10:
|
|
case 11:
|
|
case 12:
|
|
case 13:
|
|
case 20:
|
|
case 21:
|
|
case 22:
|
|
case 23:
|
|
case 30:
|
|
case 31:
|
|
case 32:
|
|
case 33:
|
|
case 40:
|
|
case 41:
|
|
case 42:
|
|
case 43:
|
|
if(subtype >= 30 && subtype <= 33){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
local aniPathSet = ["passiveobject/atgunner_bykk/4_spitfire/animation/bulletpenetrate/fire/bulletpenetrate_frontbulletfire_00.ani","passiveobject/atgunner_bykk/4_spitfire/animation/bulletpenetrate/ice/bulletpenetrate_frontbulletice_01.ani","passiveobject/atgunner_bykk/4_spitfire/animation/bulletpenetrate/dark/bulletpenetrate_frontbulletdark_01.ani","passiveobject/atgunner_bykk/4_spitfire/animation/bulletpenetrate/light/bulletpenetrate_frontbulletlight_01.ani"];
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("",aniPathSet[subtype - 30]),true);
|
|
}
|
|
else if(subtype >= 40 && subtype <= 43){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
local aniPathSet = ["character/gunner/effect/animation/4_spitfire/bullet/bulletexplosive/bulletexplosive_bulletfire_00.ani","character/gunner/effect/animation/4_spitfire/bullet/bulletexplosive/bulletexplosive_bulletice_00.ani","character/gunner/effect/animation/4_spitfire/bullet/bulletexplosive/bulletexplosive_bulletdark_00.ani","character/gunner/effect/animation/4_spitfire/bullet/bulletexplosive/bulletexplosive_bulletlight_00.ani"];
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("",aniPathSet[subtype - 40]),true);
|
|
obj.getVar("Bool").setBool(0, false);
|
|
}
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
attackInfo.setElement(subtype % 10);
|
|
// attackInfo.setAttackType(ATTACKTYPE_MAGICAL);
|
|
if(subtype % 10 == 2){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setRGBA(0, 0, 0, 255);
|
|
}
|
|
break;
|
|
case 34:
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/bulletpenetrate/nomal/bulletpenetrate_frontbulletnomal_01.ani"),true);
|
|
break;
|
|
case 44:
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("", "character/gunner/effect/animation/4_spitfire/bullet/bulletexplosive/bulletexplosive_bulletnormal_00.ani"),true);
|
|
break;
|
|
}
|
|
local randomAngle = sq_getRandom(-500,500);
|
|
randomAngle = randomAngle.tofloat() / 100.0;
|
|
if(isDown > 0) randomAngle = randomAngle - 30.0;
|
|
if(isAir > 0) randomAngle = randomAngle - 15.0;
|
|
if(subWeaponType != 3){
|
|
if(isDown == 0 && addSpeedRate > 0){
|
|
ptlPath[isDown] = ["particle/1_ranger/long_upattackrevolver.ptl","particle/1_ranger/long_upattackautomatic.ptl",
|
|
"particle/1_ranger/long_upattackmusket.ptl","","particle/1_ranger/long_upattackbowgun.ptl"];
|
|
local delay = [500, 400, 550, 0, 450];
|
|
local addRate = sq_GetIntData(sqrChr, SKILL_BYKK_BULLETPENETRATE, 1);
|
|
obj.sq_SetMoveParticle(ptlPath[isDown][subWeaponType], 0.0, randomAngle);
|
|
obj.setTimeEvent(1, delay[subWeaponType] * (100 + addRate) / 100, 1 false);
|
|
}
|
|
else obj.sq_SetMoveParticle(ptlPath[isDown][subWeaponType], 0.0, randomAngle);
|
|
local speedRate = [800,700,800,0,750];
|
|
if(addSpeedRate > 0) sq_SetSpeedToMoveParticle(obj,0,speedRate[subWeaponType] + addSpeedRate);
|
|
}
|
|
sq_SetCustomRotate(obj, sq_ToRadian(randomAngle.tofloat()));
|
|
break;
|
|
case 3:
|
|
local totalDamage = receiveData.readDword();
|
|
local group = receiveData.readDword();
|
|
local uniqueId = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/silverbullet.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local targetObj = sq_GetObject(obj, group, uniqueId);
|
|
if(targetObj && targetObj.getState() != STATE_DIE){
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 90));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
sq_SendHitObjectPacket(obj,targetObj,0,0,sq_GetZPos(obj));
|
|
}
|
|
break;
|
|
case 4:
|
|
local totalDamage = receiveData.readDword();
|
|
local subtype = receiveData.readDword();
|
|
local isDown = receiveData.readDword();
|
|
local isAir = receiveData.readDword();
|
|
local isGround = receiveData.readDword();
|
|
local aniPath = [["passiveobject/atgunner_bykk/4_spitfire/animation/explosivebullet/explosivebullet_expl_fire.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/explosivebullet/explosivebullet_expl_ice.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/explosivebullet/explosivebullet_expl.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/explosivebullet/explosivebullet_expl_light.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/explosivebullet/explosivebullet_expl.ani"],
|
|
["passiveobject/atgunner_bykk/4_spitfire/animation/explosivebullet/fire/explosivebullet_fire_ground_expl3.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/explosivebullet/ice/explosivebullet_ice_ground_expl3.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/explosivebullet/explosivebullet_ground_expl3.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/explosivebullet/light/explosivebullet_light_ground_expl3.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/explosivebullet/explosivebullet_ground_expl3.ani"]];
|
|
local ani = sq_CreateAnimation("", aniPath[isGround][subtype]);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 98));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
if(subtype < 4){
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
attackInfo.setElement(subtype);
|
|
}
|
|
if(isDown > 0 || isAir > 0){
|
|
if(isGround < 1) sq_SetCustomRotate(obj, sq_ToRadian(-30.0));
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_RANDOMSHOOT:
|
|
switch(subtype){
|
|
case 1:
|
|
case 2:
|
|
local speedRate = receiveData.readDword();
|
|
local subState = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local aniPath = ["passiveobject/atgunner_bykk/1_ranger/animation/atrandomshoot/randomshoot_1.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/atrandomshoot/randomshoot_2.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/atrandomshoot/randomshoot_3.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/atrandomshoot/randomshoot_4.ani"
|
|
];
|
|
if(subtype == 2) aniPath = ["character/gunner/effect/animation/1_ranger/atrandomshoot/chainpowderrandomshoot_01_blueeffect1.ani",
|
|
"character/gunner/effect/animation/1_ranger/atrandomshoot/chainpowderrandomshoot_02_blueeffect1.ani",
|
|
"character/gunner/effect/animation/1_ranger/atrandomshoot/chainpowderrandomshoot_03_blueeffect1.ani",
|
|
"character/gunner/effect/animation/1_ranger/atrandomshoot/chainpowderrandomshoot_04_blueeffect1.ani"
|
|
];
|
|
local ani = sq_CreateAnimation("", aniPath[subState]);
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setSpeedRate(speedRate.tofloat());
|
|
if(sizeRate > 100){
|
|
local offsetZ = -sizeRate / 3;
|
|
if(sizeRate > 150) offsetZ = -sizeRate / 2;
|
|
sq_setCurrentAxisPos(obj, 2, offsetZ);
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
}
|
|
break;
|
|
case 3:
|
|
case 4:
|
|
sqrChr.getVar("randomShootObj").push_obj_vector(obj);
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local hitTime = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, hitMax);
|
|
obj.getVar("custom").setInt(1, 0);
|
|
obj.getVar("custom").setInt(2, totalDamage);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/1_ranger/animation/atrandomshoot/atrandomshoot.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 66));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(0, hitTime, -1, true);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
if(sizeRate > 100){
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_CHAINSNATCH:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local isSilver = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/1_ranger/animation/atchainsnatch/chainsnatch_enlighten_attack3_14.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 63));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
if(isSilver > 0){
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
attackInfo.setElement(ENUM_ELEMENT_LIGHT);
|
|
local totalDamage = sqrChr.sq_GetBonusRateWithPassive(30, -1, 1, 1.0) + 100;
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_WALKSHOOT:
|
|
switch(subtype){
|
|
case 1:
|
|
case 10:
|
|
local passRate = 30;
|
|
local skillLevel = sq_GetSkillLevel(sqrChr, SKILL_BYKK_REDUCEREVOLVERDELAY);
|
|
if(skillLevel > 0) passRate = passRate + sq_GetLevelData(sqrChr, SKILL_BYKK_REDUCEREVOLVERDELAY, 7, skillLevel);
|
|
local totalDamage = receiveData.readDword();
|
|
local subWeaponType = receiveData.readDword();
|
|
local isDown = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, isDown);
|
|
obj.getVar("custom").setInt(1, subWeaponType);
|
|
obj.getVar("custom").setInt(2, passRate);
|
|
local aniPath = ["passiveobject/atgunner_bykk/1_ranger/animation/bulletpistol.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/bulletpistol.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/bulletmusket.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/upbullethandcannon.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/bulletbowgun.ani"
|
|
];
|
|
if(subtype == 10) aniPath = ["passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/silverpistol.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/silverpistol.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/silvermusket.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/upbullethandcannon.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/silverbowgun.ani"];
|
|
local attackIndex = [85,74,84,83,78];
|
|
local ptlPath = [["particle/1_ranger/upattackrevolver.ptl","particle/1_ranger/upattackautomatic.ptl","particle/1_ranger/upattackmusket.ptl","","particle/1_ranger/upattackbowgun.ptl"],
|
|
["particle/1_ranger/downattackrevolver.ptl","particle/1_ranger/downattackautomatic.ptl","particle/1_ranger/downattackmusket.ptl","","particle/1_ranger/downattackbowgun.ptl"]
|
|
];
|
|
local ani = sq_CreateAnimation("", aniPath[subWeaponType]);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, attackIndex[subWeaponType]));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
if(subtype == 10){
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
attackInfo.setElement(ENUM_ELEMENT_LIGHT);
|
|
local totalDamage = sqrChr.sq_GetBonusRateWithPassive(30, -1, 1, 1.0) + 100;
|
|
obj.getVar("custom").setInt(4, totalDamage);
|
|
}
|
|
local randomAngle = sq_getRandom(-500,500);
|
|
randomAngle = randomAngle.tofloat() / 100.0;
|
|
if(isDown > 0) randomAngle = randomAngle - 30.0;
|
|
if(subWeaponType != 3) obj.sq_SetMoveParticle(ptlPath[isDown][subWeaponType], 0.0, randomAngle);
|
|
sq_SetCustomRotate(obj, sq_ToRadian(randomAngle.tofloat()));
|
|
break;
|
|
case 2:
|
|
sq_moveWithParent(sqrChr, obj);
|
|
local totalDamage = receiveData.readDword();
|
|
local subWeaponType = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local isSilver = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, isSilver);
|
|
local aniPath = "passiveobject/atgunner_bykk/1_ranger/animation/atchainpowder/walkshoot/walkshootattack.ani";
|
|
if(sub > 0) aniPath = "passiveobject/atgunner_bykk/1_ranger/animation/walkshoot/110lvequipmenteffect/110lvepicweaponaworkshot_00.ani";
|
|
local ani = sq_CreateAnimation("", aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local attackIndex = [85,74,84,83,78];
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, attackIndex[subWeaponType]));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
if(isSilver > 0){
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
attackInfo.setElement(ENUM_ELEMENT_LIGHT);
|
|
local totalDamage = sqrChr.sq_GetBonusRateWithPassive(30, -1, 1, 1.0) + 100;
|
|
obj.getVar("custom").setInt(4, totalDamage);
|
|
}
|
|
if(sizeRate > 100){
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
case 3:
|
|
sq_moveWithParent(sqrChr, obj);
|
|
sqrChr.getVar("walkShootEffect").push_obj_vector(obj);
|
|
obj.setTimeEvent(10, 100, -1, false);
|
|
obj.addSetStatePacket(30, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_MULTIHEADSHOT:
|
|
switch(subtype){
|
|
case 1:
|
|
local subState = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
sizeRate = sizeRate.tofloat() / 260.0;
|
|
local aniPath = "character/gunner/effect/animation/multiheadshot/range.ani";
|
|
local ani = sq_CreateAnimation("", aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
local pAni = obj.getCurrentAnimation();
|
|
switch(subState){
|
|
case 1: sq_AddfRotateAngle(pAni, sq_ToRadian(-90.0)); break;
|
|
case 2: sq_AddfRotateAngle(pAni, sq_ToRadian(90.0)); break;
|
|
case 4: sq_AddfRotateAngle(pAni, sq_ToRadian(-180.0)); break;
|
|
}
|
|
pAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_DOUBLEGUNHAWK:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local isSaw = receiveData.readDword();
|
|
local phase = receiveData.readDword();
|
|
local count = receiveData.readDword();
|
|
|
|
local shootTime = 400;
|
|
local standTime = sq_GetIntData(sqrChr, SKILL_BYKK_DOUBLEGUNHAWK, 13 + phase);
|
|
local hitTime = sq_GetIntData(sqrChr, SKILL_BYKK_DOUBLEGUNHAWK, 10 + phase);
|
|
|
|
obj.getVar("custom").setInt(0, phase);
|
|
obj.getVar("custom").setInt(1, count);
|
|
obj.getVar("custom").setInt(2, sub);
|
|
obj.getVar("custom").setInt(3, shootTime);
|
|
obj.getVar("custom").setInt(4, standTime);
|
|
obj.getVar("custom").setInt(5, sizeRate);
|
|
|
|
local aniPath = ["","passiveobject/atgunner_bykk/1_ranger/animation/doublegunhawk/spin2-1.ani", "passiveobject/atgunner_bykk/1_ranger/animation/doublegunhawk/spin2-2.ani", "passiveobject/atgunner_bykk/1_ranger/animation/doublegunhawk/spin2-3.ani"];
|
|
local sawAniPath = "passiveobject/atgunner_bykk/1_ranger/animation/atchainpowder/doublegunhawk/chainpowderdoublegunhawk_gunhawk_spin_normal.ani";
|
|
local ani = sq_CreateAnimation("", aniPath[phase]);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 64));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(6,sq_CreateAnimation("","passiveobject/atgunner_bykk/1_ranger/animation/doublegunhawk/gun2.ani"),true);
|
|
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/atgunner_bykk/1_ranger/animation/doublegunhawk/dodge.ani"),true);
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
if(isSaw > 0){
|
|
local sawAni = sq_CreateAnimation("",sawAniPath);
|
|
local sizeRate_Saw = sizeRate * 0.5;
|
|
if(phase == 2) sizeRate_Saw = sizeRate * 0.6;
|
|
else if(phase == 3) sizeRate_Saw = sizeRate * 0.8;
|
|
sawAni.setImageRateFromOriginal(sizeRate_Saw, sizeRate_Saw);
|
|
sawAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate_Saw);
|
|
currentAni.addLayerAnimation(1,sawAni,true);
|
|
}
|
|
if(sizeRate > 100){
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
|
|
obj.getVar("move").setInt(0, sq_GetXPos(obj));
|
|
obj.getVar("move").setInt(1, sq_GetYPos(obj));
|
|
obj.setTimeEvent(0, hitTime, -1, false);
|
|
obj.setTimeEvent(1, shootTime / 20, 20, true);
|
|
obj.setTimeEvent(5, 60, -1, true);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_SUPPRESSINGFIRE:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
//print("totalDamageSet = "+totalDamage);
|
|
local sizeRate = receiveData.readDword();
|
|
local hitTime_min = receiveData.readDword();
|
|
local hitTime_max = receiveData.readDword();
|
|
local speedRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(1, hitTime_min);
|
|
obj.getVar("custom").setInt(2, hitTime_max);
|
|
obj.getVar("custom").setInt(3, sizeRate);
|
|
obj.getVar("custom").setInt(4, totalDamage);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/1_ranger/animation/atsuppressingfire/atsuppressingfire_loop_body.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 88));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
sq_SetCurrentAttackeDamageAct(attackInfo, 0);
|
|
obj.setTimeEvent(1, hitTime_min, 1, false);
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.setSpeedRate(speedRate.tofloat());
|
|
if(sizeRate > 100){
|
|
local zPos = 150 - sizeRate * 120 / 100;
|
|
sq_setCurrentAxisPos(obj, 2, zPos);
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/1_ranger/animation/atsuppressingfire/atsuppressingfinishfire.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 89));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local loadSlot = sqrChr.sq_GetSkillLoad(30);
|
|
if(loadSlot && loadSlot.getRemainLoadNumber() > 0){
|
|
loadSlot.decreaseLoadCount(1);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
attackInfo.setElement(ENUM_ELEMENT_LIGHT);
|
|
local totalDamage = sqrChr.sq_GetBonusRateWithPassive(30, -1, 1, 1.0) + 100;
|
|
local pAni = obj.getCurrentAnimation();
|
|
local delay = pAni.getDelaySum(false);
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,obj.getDirection(),1,SKILL_BYKK_SUPPRESSINGFIRE,4,totalDamage,sizeRate,delay,0,0,0,0,0);
|
|
}
|
|
if(sizeRate > 100){
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
case 3:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local hitTime_min = receiveData.readDword();
|
|
local hitTime_max = receiveData.readDword();
|
|
local speedRate = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
obj.getVar("custom").setInt(1, hitTime_min);
|
|
obj.getVar("custom").setInt(2, hitTime_max);
|
|
local ani = sq_CreateAnimation("", "character/gunner/effect/animation/1_ranger/atsuppressingfire/talisman/atsuppressingfire_blade1.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 88));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(1, hitTime_min, 1, false);
|
|
obj.sq_SetMaxHitCounterPerObject(hitMax);
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.setSpeedRate(speedRate.tofloat());
|
|
if(sizeRate > 100){
|
|
local zPos = 150 - sizeRate * 120 / 100;
|
|
sq_setCurrentAxisPos(obj, 2, zPos);
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
case 4:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local delay = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/atsuppressingfire_silverbullet.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 90));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local pAni = obj.getCurrentAnimation();
|
|
sq_SetFrameDelayTime(pAni, 0, delay);
|
|
if(sizeRate > 100){
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_KILLPOINT:
|
|
switch(subtype){
|
|
case 1:
|
|
local group = receiveData.readDword();
|
|
local uniqueId = receiveData.readDword();
|
|
local holdTime = 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.getVar("custom").setInt(0, holdTime);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_BLOODNCHAIN:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/1_ranger/animation/atbloodnchain/endhit_30.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 62));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local loadSlot = sqrChr.sq_GetSkillLoad(30);
|
|
if(loadSlot && loadSlot.getRemainLoadNumber() > 0){
|
|
loadSlot.decreaseLoadCount(1);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
attackInfo.setElement(ENUM_ELEMENT_LIGHT);
|
|
local totalDamage = sqrChr.sq_GetBonusRateWithPassive(30, -1, 1, 1.0) + 100;
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,obj.getDirection(),1,SKILL_BYKK_BLOODNCHAIN,2,totalDamage,0,0,0,0,0,0,0);
|
|
}
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/atbloodnchain_silverbullet.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 90));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_RUINATIONAREA:
|
|
switch(subtype){
|
|
case 1:
|
|
case 2:
|
|
case 3:
|
|
case 4:
|
|
case 5:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local speedRate = receiveData.readDword();
|
|
local aniPath = ["","passiveobject/atgunner_bykk/1_ranger/animation/atruinationarea/st2/ruinationareast2front_00.ani","passiveobject/atgunner_bykk/1_ranger/animation/atruinationarea/st3/ruinationareast3front_00.ani","passiveobject/atgunner_bykk/1_ranger/animation/atruinationarea/st1/ruinationareast1front_00.ani","passiveobject/atgunner_bykk/1_ranger/animation/atruinationarea/st2/ruinationareast2front_00.ani","passiveobject/atgunner_bykk/1_ranger/animation/atruinationarea/st3/ruinationareast3front_00.ani"];
|
|
local backAniPath = ["","passiveobject/atgunner_bykk/1_ranger/animation/atruinationarea/st2/ruinationareast2back_00.ani","passiveobject/atgunner_bykk/1_ranger/animation/atruinationarea/st3/ruinationareast3back_00.ani","passiveobject/atgunner_bykk/1_ranger/animation/atruinationarea/st1/ruinationareast1back_00.ani","passiveobject/atgunner_bykk/1_ranger/animation/atruinationarea/st2/ruinationareast2back_00.ani","passiveobject/atgunner_bykk/1_ranger/animation/atruinationarea/st3/ruinationareast3back_00.ani"];
|
|
local attackIndex = [0, 68, 69, 67, 68, 69];
|
|
local ani = sq_CreateAnimation("", aniPath[subtype]);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, attackIndex[subtype]));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.addLayerAnimation(-1,sq_CreateAnimation("",backAniPath[subtype]),true);
|
|
pAni.setSpeedRate(speedRate.tofloat());
|
|
local currentAni = obj.getCurrentAnimation();
|
|
local delay = currentAni.getDelaySum(false);
|
|
obj.setTimeEvent(0, delay / (hitMax + 1), hitMax, true);
|
|
break;
|
|
case 6:
|
|
local totalDamage = receiveData.readDword();
|
|
local speedRate = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/1_ranger/animation/atruinationarea/finishshot/ruinationareast4front_09.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 71));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local loadSlot = sqrChr.sq_GetSkillLoad(30);
|
|
if(loadSlot && loadSlot.getRemainLoadNumber() > 0){
|
|
loadSlot.decreaseLoadCount(1);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
attackInfo.setElement(ENUM_ELEMENT_LIGHT);
|
|
local totalDamage = sqrChr.sq_GetBonusRateWithPassive(30, -1, 1, 1.0) + 100;
|
|
createSkillPassive_ATGunner_bykk(obj,obj,PASSIVEOBJ_BYKK_ATGUNNER,0,0,0,obj.getDirection(),1,SKILL_BYKK_RUINATIONAREA,10,totalDamage,speedRate,0,0,0,0,0,0);
|
|
}
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.setSpeedRate(speedRate.tofloat());
|
|
break;
|
|
case 7:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local speedRate = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/1_ranger/animation/atruinationarea/st4/ruinationareast4front_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 70));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atgunner_bykk/1_ranger/animation/atruinationarea/st4/ruinationareast4back_00.ani"),true);
|
|
pAni.setSpeedRate(speedRate.tofloat());
|
|
local currentAni = obj.getCurrentAnimation();
|
|
local delay = currentAni.getDelaySum(0, 4);
|
|
obj.setTimeEvent(0, delay / (hitMax + 1), hitMax, true);
|
|
break;
|
|
case 10:
|
|
local totalDamage = receiveData.readDword();
|
|
local speedRate = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/ruinationareast_silverbullet.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 90));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case 2:
|
|
switch(skillIndex){
|
|
case SKILL_BYKK_FLAMETHROWER:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitTime = receiveData.readDword();
|
|
local hitDelayRate = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, sub);
|
|
obj.getVar("custom").setInt(11, sizeRate);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 49));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
sq_SetAttackInfoHitDelayRateDamager(attackInfo, (hitDelayRate * 0.01).tofloat());
|
|
obj.setTimeEvent(1, hitTime, -1, false);
|
|
obj.setTimeEvent(2, 10, -1, false);
|
|
sqrChr.getVar("flamethrower_att").clear_obj_vector();
|
|
sqrChr.getVar("flamethrower_att").push_obj_vector(obj);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/atflamethrower/compressedflameprojectilefront_01.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atgunner_bykk/2_blaster/animation/atflamethrower/compressedflameprojectileback_00.ani"),true);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 49));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
if(sizeRate > 100){
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_FLAMETHROWERBOOST:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitTime = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local holdTime = sq_GetIntData(sqrChr, SKILL_BYKK_FLAMETHROWERBOOST, 6);
|
|
obj.getVar("custom").setInt(10, sub);
|
|
obj.getVar("custom").setInt(11, sizeRate);
|
|
obj.getVar("custom").setInt(12, holdTime);
|
|
if(holdTime > 0) obj.getVar("tar").clear_obj_vector();
|
|
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 50));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(1, hitTime, -1, false);
|
|
obj.setTimeEvent(2, 10, -1, false);
|
|
sqrChr.getVar("flamethrowerboost_att").clear_obj_vector();
|
|
sqrChr.getVar("flamethrowerboost_att").push_obj_vector(obj);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/atflamethrowerboost/compressedstrongprojectilefront_16.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 50));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
if(sizeRate > 100){
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_CANNONBALL:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local sub2 = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, sub);
|
|
obj.getVar("custom").setInt(12, sub2);
|
|
local aniPath = "passiveobject/atgunner_bykk/2_blaster/animation/cannonball/normal.ani", attackIndex = 30;
|
|
if(sub2 > 0){
|
|
aniPath = "passiveobject/atgunner_bykk/2_blaster/animation/cannonball/fullcharge.ani";
|
|
attackIndex = 29;
|
|
obj.getVar().setBool(0, true);
|
|
}
|
|
local ani = sq_CreateAnimation("", aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, attackIndex));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
switch(sub){
|
|
case 0: obj.sq_SetMoveParticle("particle/2_blaster/cannonball.ptl", 0.0, 0.0); break;
|
|
case 1: obj.sq_SetMoveParticle("particle/2_blaster/cannonball.ptl", 0.0, -30.0); break;
|
|
}
|
|
sq_SetSpeedToMoveParticle(obj,0,600);
|
|
obj.setTimeEvent(1, 600, 1, false);
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/common/animation/noneexplosion.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 28));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, 2.0, 2.0, 2.0);
|
|
obj.setTimeEvent(11, 200, 2, true);
|
|
obj.setTimeEvent(12, 50, 4, true);
|
|
obj.setTimeEvent(13, 15, 16, true);
|
|
obj.setTimeEvent(14, 100, 2, true);
|
|
obj.sq_PlaySound("B_FIRE_EXPLOSION");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_STEYRHEAVYRIFLE:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local totalDamage2 = receiveData.readDword();
|
|
local expCount = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage2);
|
|
obj.getVar("custom").setInt(11, expCount);
|
|
obj.getVar("custom").setInt(12, sizeRate);
|
|
obj.getVar("custom").setInt(13, sub);
|
|
local ani = sq_CreateAnimation("", "passiveobject/character/gunner/animation/subweaponbulletsteyr.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 20));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.sq_SetMoveParticle("particle/2_blaster/subweapon/steyr.ptl", 0.0, 0.0);
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, sizeRate);
|
|
obj.getVar("custom").setInt(13, sub);
|
|
sizeRate = sizeRate / 100.0;
|
|
local aniPath = "passiveobject/common/animation/fireexplosion.ani", attackIndex = 20;
|
|
if(sub > 0){aniPath = "passiveobject/atgunner_bykk/2_blaster/animation/pandora/pandorasteyrexplosion.ani"; attackIndex = 59;}
|
|
local ani = sq_CreateAnimation("", aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, attackIndex));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
if(sub <= 0){
|
|
obj.setTimeEvent(11, 200, 2, true);
|
|
obj.setTimeEvent(12, 50, 4, true);
|
|
obj.setTimeEvent(13, 15, 16, true);
|
|
obj.setTimeEvent(14, 100, 2, true);
|
|
obj.sq_PlaySound("B_FIRE_EXPLOSION");
|
|
}
|
|
else{
|
|
sq_SetShake(obj, 1, 500);
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/2_blaster/animation/pandora/pandorasteyr_01.ani", sq_getRandom(-50, 50), sq_getRandom(-10, 10), 0);
|
|
local pAni = pooledObj.getCurrentAnimation();
|
|
pAni.setImageRateFromOriginal(1.5 * sizeRate, 1.5 * sizeRate);
|
|
pAni.setAutoLayerWorkAnimationAddSizeRate(1.5 * sizeRate);
|
|
}
|
|
break;
|
|
case 3:
|
|
break;
|
|
}
|
|
break;
|
|
case 71:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local range = receiveData.readDword();
|
|
local power = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, sizeRate);
|
|
local appendage = CNSquirrelAppendage.sq_AppendAppendage(sqrChr, obj, SKILL_BYKK_SUMMONSPIRITWATERHIGHER, false, "appendage/character/ap_common_suck.nut", false);
|
|
if(appendage){
|
|
appendage.sq_SetValidTime(3000);
|
|
CNSquirrelAppendage.sq_Append(appendage, sqrChr, obj);
|
|
local auraAppendage = appendage.sq_getAuraMaster("wtornadoAura");
|
|
if(!auraAppendage) auraAppendage = appendage.sq_AddAuraMaster("wtornadoAura",sqrChr, obj, 1200, 18, 5, 0);
|
|
if(auraAppendage) auraAppendage.setAttractionInfo(300, 300, range, power);
|
|
}
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_FM31:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, sizeRate);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/fm-31bullet/02_bullet_normal1.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local pAni = obj.getCurrentAnimation();
|
|
pAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/atgunner_bykk/2_blaster/animation/fm-31bullet/03_bullet_dodge.ani"), true);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 51));
|
|
obj.setTimeEvent(1, 50, -1, false);
|
|
obj.sq_SetMoveParticle("particle/2_blaster/subweapon/atfm-31.ptl", 0.0, 0.0);
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(11, sizeRate);
|
|
local ani = sq_CreateAnimation("", "passiveobject/common/animation/fireexplosion.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 28));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
obj.setTimeEvent(11, 200, 1, true);
|
|
obj.setTimeEvent(12, 50, 2, true);
|
|
obj.setTimeEvent(13, 15, 6, true);
|
|
obj.setTimeEvent(14, 100, 1, true);
|
|
obj.sq_PlaySound("B_FIRE_EXPLOSION");
|
|
sq_SetMyShake(obj, 2, 100);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_STINGER:
|
|
switch(subtype){
|
|
case 1:
|
|
sqrChr.getVar("stinger_att").push_obj_vector(obj);
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local createMax = receiveData.readDword();
|
|
local maxTime = receiveData.readDword();
|
|
local minTime = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, sizeRate);
|
|
obj.getVar("custom").setInt(12, createMax);
|
|
obj.getVar("custom").setInt(13, maxTime);
|
|
obj.getVar("custom").setInt(14, minTime);
|
|
obj.sq_SetMoveParticle("particle/2_blaster/stingerdisjoint.ptl", 0.0, 0.0);
|
|
sq_SetSpeedToMoveParticle(obj,2,500);
|
|
// obj.setTimeEvent(1, maxTime, 1, false);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local angle = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, sizeRate);
|
|
obj.sq_SetMoveParticle("particle/2_blaster/stingersub.ptl", angle.tofloat(), angle.tofloat());
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 3:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, sizeRate);
|
|
obj.getVar("custom").setInt(12, sub);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 4:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local createMax = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, sizeRate);
|
|
obj.getVar("custom").setInt(12, createMax);
|
|
local boss_number = 0;
|
|
local nameed_number = 0;
|
|
local targetObj;
|
|
local objectManager = obj.getObjectManager();
|
|
local objectNumber = objectManager.getCollisionObjectNumber();
|
|
for (local i = 0; i < objectNumber; i++){
|
|
local object = objectManager.getCollisionObject(i);
|
|
if(object.isObjectType(OBJECTTYPE_ACTIVE) && obj.isEnemy(object)){
|
|
local activeObj = sq_GetCNRDObjectToActiveObject(object);
|
|
if(sq_IsBoss(activeObj)){
|
|
boss_number = boss_number + 1;
|
|
targetObj = activeObj;
|
|
break;
|
|
}
|
|
else if(sq_IsNamed(activeObj)){
|
|
nameed_number = nameed_number + 1;
|
|
targetObj = activeObj;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
if(boss_number <= 0 || nameed_number <= 0){
|
|
targetObj = sq_FindTarget(sqrChr, -600, 1500, 400, 400);
|
|
}
|
|
if(!targetObj){
|
|
sq_SendDestroyPacketPassiveObject(obj);
|
|
return;
|
|
}
|
|
else{
|
|
obj.getVar("tar").clear_obj_vector();
|
|
obj.getVar("tar").push_obj_vector(targetObj);
|
|
obj.setTimeEvent(10, 100, createMax, false);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_URANIUMBOMB:
|
|
switch(subtype){
|
|
case 1://totalDamage,totalDamage2,sizeRate,prob,time,damage,level,0);
|
|
local totalDamage = receiveData.readDword();
|
|
local totalDamage2 = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local prob = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
local damage = receiveData.readDword();
|
|
local level = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, totalDamage2);
|
|
obj.getVar("custom").setInt(12, sizeRate);
|
|
obj.getVar("custom").setInt(13, prob);
|
|
obj.getVar("custom").setInt(14, time);
|
|
obj.getVar("custom").setInt(15, damage);
|
|
obj.getVar("custom").setInt(16, level);
|
|
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/uraniumbomb/biguraniumbomb/attackbox.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sq_SetFrameDelayTime(currentAni, 0, 200000);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, 0.25, 0.25, 1.0);
|
|
currentAni.addLayerAnimation(6,sq_CreateAnimation("","passiveobject/atgunner_bykk/2_blaster/animation/uraniumbomb/biguraniumbomb/missile.ani"),true);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 57));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.sq_SetMoveParticle("particle/2_blaster/uraniumbomb.ptl", 0.0, 0.0);
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local prob = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
local damage = receiveData.readDword();
|
|
local level = receiveData.readDword();
|
|
obj.getVar("custom").setInt(11, totalDamage);
|
|
obj.getVar("custom").setInt(12, sizeRate);
|
|
obj.getVar("custom").setInt(13, prob);
|
|
obj.getVar("custom").setInt(14, time);
|
|
obj.getVar("custom").setInt(15, damage);
|
|
obj.getVar("custom").setInt(16, level);
|
|
obj.setTimeEvent(20, 225, 1, false);
|
|
break;
|
|
case 3:
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 4:
|
|
local totalDamage = sqrChr.sq_GetBonusRateWithPassive(SKILL_BYKK_URANIUMBOMB, -1, 8, 1.0) + 100;
|
|
local sizeRate = (sqrChr.sq_GetBonusRateWithPassive(SKILL_BYKK_URANIUMBOMB, -1, 5, 0.5) + 100) * 65 / 100;
|
|
local skillLevel = sq_GetSkillLevel(sqrChr, SKILL_BYKK_URANIUMBOMB);
|
|
local prob = sq_GetLevelData(sqrChr, SKILL_BYKK_URANIUMBOMB, 1, skillLevel);
|
|
local time = sq_GetLevelData(sqrChr, SKILL_BYKK_URANIUMBOMB, 3, skillLevel);
|
|
local damage = sq_GetLevelData(sqrChr, SKILL_BYKK_URANIUMBOMB, 4, skillLevel);
|
|
local level = sq_GetSkillLevel(sqrChr, 174) + 10;
|
|
local hitMax = sq_GetIntData(sqrChr, SKILL_BYKK_URANIUMBOMB, 7) + 1;
|
|
obj.getVar("custom").setInt(11, totalDamage);
|
|
obj.getVar("custom").setInt(12, sizeRate);
|
|
obj.getVar("custom").setInt(13, prob);
|
|
obj.getVar("custom").setInt(14, time);
|
|
obj.getVar("custom").setInt(15, damage);
|
|
obj.getVar("custom").setInt(16, level);
|
|
obj.getVar("custom").setInt(17, hitMax);
|
|
|
|
obj.setTimeEvent(10, 100, 1, false);
|
|
obj.setTimeEvent(11, 800, 1, false);
|
|
break;
|
|
case 5:
|
|
local sizeRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(12, sizeRate);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/uraniumbomb/minibomb/missile.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(0.35, 0.35);
|
|
obj.sq_SetMoveParticle("particle/2_blaster/uraniumbomb.ptl", 0.0, 0.0);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_SOLARSYSTEM:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local damage = receiveData.readDword();
|
|
obj.getVar("custom").setInt(11, totalDamage);
|
|
obj.getVar("custom").setInt(12, damage);
|
|
obj.sq_SetMoveParticle("particle/2_blaster/extruder.ptl", 0.0, 0.0);
|
|
sq_SetSpeedToMoveParticle(obj,0,500);
|
|
obj.setTimeEvent(1, 500, 1, false);
|
|
local appendage = CNSquirrelAppendage.sq_AppendAppendage(sqrChr, obj, -1, false, "appendage/character/ap_common_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(500, 500, 400, 800);
|
|
}
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 3:
|
|
local totalDamage = receiveData.readDword();
|
|
local totalDamage2 = receiveData.readDword();
|
|
local damage = receiveData.readDword();
|
|
obj.getVar("custom").setInt(11, totalDamage);
|
|
obj.getVar("custom").setInt(12, damage);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/atsolasystem/solasystemreinforceshootfront_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 47));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_BURN ,100, sq_GetSkillLevel(sqrChr, 174) + 10,1000, damage);
|
|
obj.setTimeEvent(10, 50, 1, false);
|
|
local aniPath = "passiveobject/atgunner_bykk/2_blaster/animation/atsolasystem/solasystemreinforceshootbottom_00.ani";
|
|
createOnlyDrawObject_ATGunner_bykk(obj,aniPath,true,obj.getDirection(),sq_GetXPos(obj),sq_GetYPos(obj),0,ENUM_DRAWLAYER_BOTTOM);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_ANCIENTTRIGGER:
|
|
switch(subtype){
|
|
case 1:
|
|
sqrChr.getVar("AncientTrigger_obj").push_obj_vector(obj);
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local lifeTime = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, hitMax);
|
|
obj.getVar("custom").setInt(12, lifeTime);
|
|
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 2));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(0, 300, 1, false);
|
|
break;
|
|
case 2:
|
|
sqrChr.getVar("AncientTrigger_obj").push_obj_vector(obj);
|
|
local sub = receiveData.readDword();
|
|
local aniPath = "passiveobject/atgunner_bykk/2_blaster/animation/ancienttrigger/fullextendelectric1.ani";
|
|
switch(sub){
|
|
case 1: aniPath = "passiveobject/atgunner_bykk/2_blaster/animation/ancienttrigger/fullextendelectric2.ani"; break;
|
|
case 2: aniPath = "passiveobject/atgunner_bykk/2_blaster/animation/ancienttrigger/fullextendelectric3.ani"; break;
|
|
case 3: aniPath = "passiveobject/atgunner_bykk/2_blaster/animation/ancienttrigger/fullextendelectric4.ani"; break;
|
|
}
|
|
local ani = sq_CreateAnimation("", aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(5.0, 2.0);
|
|
break;
|
|
case 3:
|
|
sqrChr.getVar("AncientTrigger_obj").push_obj_vector(obj);
|
|
local sub = receiveData.readDword();
|
|
local aniPath = "passiveobject/atgunner_bykk/2_blaster/animation/ancienttrigger/fulllasertile2.ani";
|
|
local ani = sq_CreateAnimation("", aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
if(sub > 0) currentAni.setImageRateFromOriginal(5.0, -1.0);
|
|
else currentAni.setImageRateFromOriginal(5.0, 1.0);
|
|
break;
|
|
case 4:
|
|
sqrChr.getVar("AncientTrigger_obj").push_obj_vector(obj);
|
|
local aniPath = "passiveobject/character/gunner/animation/ancienttrigger/fullcircle.ani";
|
|
local ani = sq_CreateAnimation("", aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_COVER);
|
|
break;
|
|
case 5:
|
|
sqrChr.getVar("AncientTrigger_obj").push_obj_vector(obj);
|
|
local sub = receiveData.readDword();
|
|
local aniPath = "passiveobject/character/gunner/animation/ancienttrigger/fulllasertile1.ani";
|
|
local ani = sq_CreateAnimation("", aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
if(sub > 0) currentAni.setImageRateFromOriginal(5.0, -1.0);
|
|
else currentAni.setImageRateFromOriginal(5.0, 1.0);
|
|
break;
|
|
case 6:
|
|
sqrChr.getVar("AncientTrigger_obj").push_obj_vector(obj);
|
|
local aniPath = "passiveobject/character/gunner/animation/ancienttrigger/fulldust1.ani";
|
|
local ani = sq_CreateAnimation("", aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_COVER);
|
|
break;
|
|
case 7:
|
|
sqrChr.getVar("AncientTrigger_obj").push_obj_vector(obj);
|
|
local aniPath = "passiveobject/character/gunner/animation/ancienttrigger/fullelectric1.ani";
|
|
local ani = sq_CreateAnimation("", aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(5.0, 3.0);
|
|
break;
|
|
case 8:
|
|
case 9:
|
|
sqrChr.getVar("AncientTrigger_obj").push_obj_vector(obj);
|
|
if(subtype == 9) sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_COVER);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_PLASMABOOST:
|
|
switch(subtype){
|
|
case 1:
|
|
sqrChr.getVar("plasmaboost_att").push_obj_vector(obj);
|
|
local totalDamage = receiveData.readDword();
|
|
local hitTime = receiveData.readDword();
|
|
local holdTime = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, holdTime);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 38));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(1, hitTime, -1, false);
|
|
obj.setTimeEvent(2, 10, -1, false);
|
|
obj.getVar("tar").clear_obj_vector();
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_FSC_7:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local totalDamage2 = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage2);
|
|
obj.getVar("custom").setInt(11, hitMax);
|
|
obj.getVar("custom").setInt(12, sizeRate);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 34));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(11, hitMax);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/atfsc7/fscfinish_25.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 35));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
local delaySum = currentAni.getDelaySum(0, 9);
|
|
obj.setTimeEvent(2, delaySum, 1, false);
|
|
if(sizeRate > 100){
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_STINGEREX:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, hitMax);
|
|
obj.getVar("custom").setInt(12, sizeRate);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/stingerex/atstinger/boostermissile_02.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
obj.sq_SetMoveParticle("particle/2_blaster/subweapon/stingerex.ptl", 0.0, 0.0);
|
|
obj.setTimeEvent(1, 800, 1, false);
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, hitMax);
|
|
obj.getVar("custom").setInt(12, sizeRate);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_PT_15:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/pt15/pt-15_wind_eff_1_powered.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 42));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
if(sizeRate > 100){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/pt15/pt-15_att_eff3.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 44));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
if(sizeRate > 100){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
case 3:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/pt15/pt-15_explosion_glow.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 41));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
if(sizeRate > 100){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
case 4:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/pt15/equipedtype/pt-15talisman_40.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 40));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
if(sizeRate > 100){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_OPERATIONRAZE:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/atoperationraze/workoperationattack2_01.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 15));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(1, 80, -1 ,false);
|
|
obj.sq_PlaySound("OPERATION_RAZE_02");
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/atoperationraze/workoperationattack3_01.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 16));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(1, 240, 3 ,false);
|
|
obj.sq_PlaySound("OPERATION_RAZE_03");
|
|
break;
|
|
case 3:
|
|
local totalDamage = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/atoperationraze/02_bullet_normal1.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/atgunner_bykk/2_blaster/animation/atoperationraze/03_bullet_dodge.ani"),true);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 18));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.sq_PlaySound("OPERATION_RAZE_01");
|
|
obj.sq_SetMoveParticle("particle/2_blaster/atoperationrazeattack5.ptl", 0.0, 0.0);
|
|
break;
|
|
case 4:
|
|
local totalDamage = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/atoperationraze/missile01in_02.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCustomRotate(obj, sq_ToRadian(-45.0));
|
|
obj.sq_SetMoveParticle("particle/2_blaster/subweapon/stingerex.ptl", 0.0, 0.0);
|
|
obj.setTimeEvent(2, 1500, 1, false);
|
|
obj.setTimeEvent(3, 150, 3, false);
|
|
break;
|
|
case 5:
|
|
local totalDamage = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 6:
|
|
local totalDamage = receiveData.readDword();
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_PHLEGETHON:
|
|
switch(subtype){
|
|
case 1:
|
|
sqrChr.getVar("phlegethon_att").push_obj_vector(obj);
|
|
local totalDamage = receiveData.readDword();
|
|
local totalDamage2 = receiveData.readDword();
|
|
local totalDamage3 = receiveData.readDword();
|
|
local hitTime = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
switch(sub){
|
|
case 1: totalDamage = totalDamage + totalDamage2; break;
|
|
case 2: totalDamage = totalDamage + totalDamage3; break;
|
|
case 3: totalDamage = totalDamage + totalDamage2 + totalDamage3; break;
|
|
}
|
|
obj.getVar("custom").setInt(10, totalDamage);
|
|
obj.getVar("custom").setInt(11, totalDamage2);
|
|
obj.getVar("custom").setInt(12, totalDamage3);
|
|
obj.getVar("custom").setInt(13, sub);
|
|
obj.getVar("custom").setInt(14, hitTime);
|
|
//print("totalDamage = "+totalDamage);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 37));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(1, hitTime, -1, false);
|
|
// obj.setTimeEvent(2, 10, -1, false);
|
|
sq_moveWithParent(sqrChr, obj);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2:
|
|
obj.setTimeEvent(3, 500, 1, false);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_LASERRIFLE:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/2_blaster/animation/laserrifle/laserfirealteration.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 55));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case 3:
|
|
switch(skillIndex){
|
|
case SKILL_BYKK_HYPERFLARE:
|
|
switch(subtype){
|
|
case 0:
|
|
case 1:
|
|
sqrChr.getVar("hyperFlareObj").push_obj_vector(obj);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local hitTime = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, hitMax);
|
|
obj.getVar("custom").setInt(1, hitTime);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/3_mechanic/animation/athyperflare/hyperflare1attackfront_dummy.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 133));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(1, 400, 1, false);
|
|
break;
|
|
case 3:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local hitTime = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, hitMax);
|
|
obj.getVar("custom").setInt(1, hitTime);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/3_mechanic/animation/athyperflare/hyperflare2attackfront_dummy.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 134));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
local delay = currentAni.getDelaySum(false);
|
|
obj.setTimeEvent(1, delay / (hitTime + 1), hitMax, false);
|
|
break;
|
|
case 4:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/3_mechanic/animation/athyperflare/hyperflare2attackfront_34.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
obj.setTimeEvent(1, currentAni.getDelaySum(0, 10), 1, false);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case 4:
|
|
switch(skillIndex){
|
|
case SKILL_BYKK_OVERCHARGE:
|
|
switch(subtype){
|
|
case 1:
|
|
case 2:
|
|
case 10:
|
|
case 11:
|
|
case 12:
|
|
case 13:
|
|
case 14:
|
|
case 20:
|
|
case 21:
|
|
case 22:
|
|
case 23:
|
|
case 24:
|
|
case 30:
|
|
case 31:
|
|
case 32:
|
|
case 33:
|
|
case 34:
|
|
case 40:
|
|
case 41:
|
|
case 42:
|
|
case 43:
|
|
case 44:
|
|
local passRate = 30;
|
|
local skillLevel = sq_GetSkillLevel(sqrChr, SKILL_BYKK_REDUCEREVOLVERDELAY);
|
|
if(skillLevel > 0) passRate = passRate + sq_GetLevelData(sqrChr, SKILL_BYKK_REDUCEREVOLVERDELAY, 7, skillLevel);
|
|
else if(subtype >= 30 && subtype <= 34) passRate = passRate + sq_GetIntData(sqrChr, SKILL_BYKK_BULLETPENETRATE, 0);
|
|
local addSpeedRate = 0;
|
|
if(subtype >= 30 && subtype <= 34) addSpeedRate = sq_GetIntData(sqrChr, SKILL_BYKK_BULLETPENETRATE, 2);
|
|
local totalDamage = receiveData.readDword();
|
|
local subWeaponType = receiveData.readDword();
|
|
local isDown = receiveData.readDword();
|
|
local isSub = receiveData.readDword();
|
|
local isAir = receiveData.readDword();
|
|
local activestatusSet = receiveData.readDword();
|
|
local statusTime = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, isDown);
|
|
obj.getVar("custom").setInt(1, subWeaponType);
|
|
obj.getVar("custom").setInt(2, passRate);
|
|
obj.getVar("custom").setInt(3, isSub);
|
|
obj.getVar("custom").setInt(5, activestatusSet);
|
|
obj.getVar("custom").setInt(6, statusTime);
|
|
obj.getVar("custom").setInt(7, isAir);
|
|
local aniPath = ["passiveobject/atgunner_bykk/1_ranger/animation/bulletpistol.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/bulletpistol.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/bulletmusket.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/upbullethandcannon.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/bulletbowgun.ani"];
|
|
if(subtype == 2 || subtype == 13 || subtype == 23 || subtype == 33 || subtype == 43) aniPath = ["passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/silverpistol.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/silverpistol.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/silvermusket.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/upbullethandcannon.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/silverbowgun.ani"];
|
|
else if(subtype == 10 || subtype == 20 || subtype == 30 || subtype == 40) aniPath = ["passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/flamepistol.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/flamepistol.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/flamemusket.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/upbullethandcannon.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/flamebowgun.ani"];
|
|
else if(subtype == 11 || subtype == 21 || subtype == 31 || subtype == 41) aniPath = ["passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/freezepistol.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/freezepistol.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/freezemusket.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/upbullethandcannon.ani",
|
|
"passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/freezebowgun.ani"];
|
|
local attackIndex = [85,74,84,83,78];
|
|
local ptlPath = [["particle/1_ranger/upattackrevolver.ptl","particle/1_ranger/upattackautomatic.ptl",
|
|
"particle/1_ranger/upattackmusket.ptl","","particle/1_ranger/upattackbowgun.ptl"],
|
|
["particle/1_ranger/downattackrevolver.ptl","particle/1_ranger/downattackautomatic.ptl",
|
|
"particle/1_ranger/downattackmusket.ptl","","particle/1_ranger/downattackbowgun.ptl"]];
|
|
local ani = sq_CreateAnimation("", aniPath[subWeaponType]);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, attackIndex[subWeaponType]));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
switch(subtype){
|
|
case 2:
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
attackInfo.setElement(ENUM_ELEMENT_LIGHT);
|
|
local totalDamage = sqrChr.sq_GetBonusRateWithPassive(30, -1, 1, 1.0) + 100;
|
|
obj.getVar("custom").setInt(4, totalDamage);
|
|
break;
|
|
case 10:
|
|
case 11:
|
|
case 12:
|
|
case 13:
|
|
case 20:
|
|
case 21:
|
|
case 22:
|
|
case 23:
|
|
case 30:
|
|
case 31:
|
|
case 32:
|
|
case 33:
|
|
case 40:
|
|
case 41:
|
|
case 42:
|
|
case 43:
|
|
if(subtype >= 30 && subtype <= 33){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
local aniPathSet = ["passiveobject/atgunner_bykk/4_spitfire/animation/bulletpenetrate/fire/bulletpenetrate_frontbulletfire_00.ani","passiveobject/atgunner_bykk/4_spitfire/animation/bulletpenetrate/ice/bulletpenetrate_frontbulletice_01.ani","passiveobject/atgunner_bykk/4_spitfire/animation/bulletpenetrate/dark/bulletpenetrate_frontbulletdark_01.ani","passiveobject/atgunner_bykk/4_spitfire/animation/bulletpenetrate/light/bulletpenetrate_frontbulletlight_01.ani"];
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("",aniPathSet[subtype - 30]),true);
|
|
}
|
|
else if(subtype >= 40 && subtype <= 43){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
local aniPathSet = ["character/gunner/effect/animation/4_spitfire/bullet/bulletexplosive/bulletexplosive_bulletfire_00.ani","character/gunner/effect/animation/4_spitfire/bullet/bulletexplosive/bulletexplosive_bulletice_00.ani","character/gunner/effect/animation/4_spitfire/bullet/bulletexplosive/bulletexplosive_bulletdark_00.ani","character/gunner/effect/animation/4_spitfire/bullet/bulletexplosive/bulletexplosive_bulletlight_00.ani"];
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("",aniPathSet[subtype - 40]),true);
|
|
obj.getVar("Bool").setBool(0, false);
|
|
}
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
attackInfo.setElement(subtype % 10);
|
|
// attackInfo.setAttackType(ATTACKTYPE_MAGICAL);
|
|
if(subtype % 10 == 2){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setRGBA(0, 0, 0, 255);
|
|
}
|
|
break;
|
|
case 34:
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/bulletpenetrate/nomal/bulletpenetrate_frontbulletnomal_01.ani"),true);
|
|
break;
|
|
case 44:
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("", "character/gunner/effect/animation/4_spitfire/bullet/bulletexplosive/bulletexplosive_bulletnormal_00.ani"),true);
|
|
break;
|
|
}
|
|
local randomAngle = sq_getRandom(-500,500);
|
|
randomAngle = randomAngle.tofloat() / 100.0;
|
|
if(isDown > 0) randomAngle = randomAngle - 30.0;
|
|
if(isAir > 0) randomAngle = randomAngle - 15.0;
|
|
if(subWeaponType != 3){
|
|
if(isDown == 0 && addSpeedRate > 0){
|
|
ptlPath[isDown] = ["particle/1_ranger/long_upattackrevolver.ptl","particle/1_ranger/long_upattackautomatic.ptl",
|
|
"particle/1_ranger/long_upattackmusket.ptl","","particle/1_ranger/long_upattackbowgun.ptl"];
|
|
local delay = [500, 400, 550, 0, 450];
|
|
local addRate = sq_GetIntData(sqrChr, SKILL_BYKK_BULLETPENETRATE, 1);
|
|
obj.sq_SetMoveParticle(ptlPath[isDown][subWeaponType], 0.0, randomAngle);
|
|
obj.setTimeEvent(1, delay[subWeaponType] * (100 + addRate) / 100, 1 false);
|
|
}
|
|
else obj.sq_SetMoveParticle(ptlPath[isDown][subWeaponType], 0.0, randomAngle);
|
|
local speedRate = [800,700,800,0,750];
|
|
if(addSpeedRate > 0) sq_SetSpeedToMoveParticle(obj,0,speedRate[subWeaponType] + addSpeedRate);
|
|
}
|
|
sq_SetCustomRotate(obj, sq_ToRadian(randomAngle.tofloat()));
|
|
break;
|
|
case 3:
|
|
local totalDamage = receiveData.readDword();
|
|
local group = receiveData.readDword();
|
|
local uniqueId = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/1_ranger/animation/silverbullet/silverbullet.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local targetObj = sq_GetObject(obj, group, uniqueId);
|
|
if(targetObj && targetObj.getState() != STATE_DIE){
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 90));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
sq_SendHitObjectPacket(obj,targetObj,0,0,sq_GetZPos(obj));
|
|
}
|
|
break;
|
|
case 4:
|
|
local totalDamage = receiveData.readDword();
|
|
local subtype = receiveData.readDword();
|
|
local isDown = receiveData.readDword();
|
|
local isAir = receiveData.readDword();
|
|
local isGround = receiveData.readDword();
|
|
local aniPath = [["passiveobject/atgunner_bykk/4_spitfire/animation/explosivebullet/explosivebullet_expl_fire.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/explosivebullet/explosivebullet_expl_ice.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/explosivebullet/explosivebullet_expl.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/explosivebullet/explosivebullet_expl_light.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/explosivebullet/explosivebullet_expl.ani"],
|
|
["passiveobject/atgunner_bykk/4_spitfire/animation/explosivebullet/fire/explosivebullet_fire_ground_expl3.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/explosivebullet/ice/explosivebullet_ice_ground_expl3.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/explosivebullet/explosivebullet_ground_expl3.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/explosivebullet/light/explosivebullet_light_ground_expl3.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/explosivebullet/explosivebullet_ground_expl3.ani"]];
|
|
local ani = sq_CreateAnimation("", aniPath[isGround][subtype]);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 98));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
if(subtype < 4){
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
attackInfo.setElement(subtype);
|
|
}
|
|
if(isDown > 0 || isAir > 0){
|
|
if(isGround < 1) sq_SetCustomRotate(obj, sq_ToRadian(-30.0));
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_CROSSSHOOT:
|
|
switch(subtype){
|
|
case 1:
|
|
local elementSelect = receiveData.readDword();
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local hitStunRate = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local isAir = receiveData.readDword();
|
|
local aniPath = [["passiveobject/atgunner_bykk/4_spitfire/animation/crossshootrenewal/fireshoot01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/crossshootrenewal/iceshoot01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/crossshootrenewal/mushoot01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/crossshootrenewal/lightshoot01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/crossshootrenewal/mushoot01.ani"],
|
|
["passiveobject/atgunner_bykk/4_spitfire/animation/crossshootrenewal/air_fireshoot01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/crossshootrenewal/air_iceshoot01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/crossshootrenewal/air_mushoot01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/crossshootrenewal/air_lightshoot01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/crossshootrenewal/air_mushoot01.ani"]];
|
|
local ani = sq_CreateAnimation("", aniPath[isAir][elementSelect]);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 101));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
if(elementSelect < 4) attackInfo.setElement(elementSelect);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(6,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/crossshoot/bullet1.ani"),true);
|
|
if(elementSelect == 2){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setRGBA(0, 0, 0, 255);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_CHARGEBUSTER:
|
|
switch(subtype){
|
|
case 1:
|
|
local elementSelect = receiveData.readDword();
|
|
local totalDamage = receiveData.readDword();
|
|
local isAir = receiveData.readDword();
|
|
local isDown = receiveData.readDword();
|
|
local aniPath = [["passiveobject/atgunner_bykk/4_spitfire/animation/bustershoot/01_foward/02_fire/chargebuster_shot_fire.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/bustershoot/01_foward/03_ice/chargebuster_shot_ice.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/bustershoot/01_foward/01_normal/chargebuster_shot_normal.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/bustershoot/01_foward/04_light/chargebuster_shot_light.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/bustershoot/01_foward/01_normal/chargebuster_shot_normal.ani"],
|
|
["passiveobject/atgunner_bykk/4_spitfire/animation/bustershoot/03_flying/02_fire/chargebuster_flying_shot_fire.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/bustershoot/03_flying/03_ice/chargebuster_flying_shot_ice.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/bustershoot/03_flying/01_normal/chargebuster_flying_shot_normal.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/bustershoot/03_flying/04_light/chargebuster_flying_shot_light.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/bustershoot/03_flying/01_normal/chargebuster_flying_shot_normal.ani"]];
|
|
if(isDown > 0) aniPath[0] = ["passiveobject/atgunner_bykk/4_spitfire/animation/bustershoot/02_ground/02_fire/chargebuster_ground_shot_fire.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/bustershoot/02_ground/03_ice/chargebuster_ground_shot_ice.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/bustershoot/02_ground/01_normal/chargebuster_ground_shot_normal.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/bustershoot/02_ground/04_light/chargebuster_ground_shot_light.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/bustershoot/02_ground/01_normal/chargebuster_ground_shot_normal.ani"];
|
|
local ani = sq_CreateAnimation("", aniPath[isAir][elementSelect]);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 101));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
if(elementSelect < 4) attackInfo.setElement(elementSelect);
|
|
if(elementSelect == 2){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.setRGBA(0, 0, 0, 255);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_NAPALMBOMB:
|
|
switch(subtype){
|
|
case 1:
|
|
//elementSelect,totalDamage,lifeTime,hitTime,totalDamageGround,sizeRate
|
|
local elementSelect = receiveData.readDword();
|
|
local totalDamage = receiveData.readDword();
|
|
local lifeTime = receiveData.readDword();
|
|
local hitTime = receiveData.readDword();
|
|
local totalDamageGround = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, elementSelect);
|
|
obj.getVar("custom").setInt(1, totalDamage);
|
|
obj.getVar("custom").setInt(2, lifeTime);
|
|
obj.getVar("custom").setInt(3, hitTime);
|
|
obj.getVar("custom").setInt(4, totalDamageGround);
|
|
obj.getVar("custom").setInt(5, sizeRate);
|
|
local aniPath = ["passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_bullet_fire01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_bullet_ice01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_bullet_normal01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_bullet_light01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_bullet_normal01.ani"];
|
|
local ani = sq_CreateAnimation("", aniPath[elementSelect]);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 115));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
if(elementSelect < 4) attackInfo.setElement(elementSelect);
|
|
obj.sq_SetMoveParticle("particle/4_spitfire/downnapalmbomb.ptl", 0.0, 0.0);
|
|
if(sq_GetZPos(obj) < 150){
|
|
if(sq_GetDirection(obj) == ENUM_DIRECTION_RIGHT) sq_SetVelocity(obj, 0, 400.0);
|
|
else sq_SetVelocity(obj, 0, -400.0);
|
|
sq_SetVelocity(obj, 2, -400.0);
|
|
}
|
|
else{
|
|
if(sq_GetDirection(obj) == ENUM_DIRECTION_RIGHT) sq_SetVelocity(obj, 0, 900.0);
|
|
else sq_SetVelocity(obj, 0, -900.0);
|
|
sq_SetVelocity(obj, 2, -900.0);
|
|
}
|
|
break;
|
|
case 2:
|
|
local elementSelect = receiveData.readDword();
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local aniPath = ["passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_explosion_fire01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_explosion_ice01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_explosion_normal01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_explosion_light01.ani",
|
|
"passiveobject/atgunner_bykk/4_spitfire/animation/napalmbombrenewal/napalm_explosion_normal01.ani"];
|
|
local ani = sq_CreateAnimation("", aniPath[elementSelect]);
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 114));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
if(elementSelect < 4) attackInfo.setElement(elementSelect);
|
|
if(sizeRate > 100){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
case 3:
|
|
local elementSelect = receiveData.readDword();
|
|
local totalDamage = receiveData.readDword();
|
|
local lifeTime = receiveData.readDword();
|
|
local hitTime = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, elementSelect);
|
|
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_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_C4:
|
|
switch(subtype){
|
|
case 1:
|
|
//totalDamage,createMax,lifeTime,speedRate
|
|
local totalDamage = receiveData.readDword();
|
|
local targetNum = receiveData.readDword();
|
|
local lifeTime = receiveData.readDword();
|
|
local speedRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, targetNum);
|
|
obj.getVar("custom").setInt(2, lifeTime);
|
|
obj.getVar("custom").setInt(3, speedRate);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/c4ex/disk.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 99));
|
|
obj.getVar("move").setInt(0, sq_GetXPos(obj));
|
|
obj.getVar("move").setInt(1, sq_GetYPos(obj));
|
|
obj.getVar("move").setInt(2, sq_GetZPos(obj));
|
|
obj.getVar("move").setInt(3, 0);
|
|
obj.setTimeEvent(1, 2, 50, true);
|
|
return;
|
|
break;
|
|
case 2:
|
|
//totalDamage,lifeTime,speedRate,group,uniqueId
|
|
sqrChr.getVar("C4AtkObj").push_obj_vector(obj);
|
|
local totalDamage = receiveData.readDword();
|
|
local lifeTime = receiveData.readDword();
|
|
local speedRate = receiveData.readDword();
|
|
local group = receiveData.readDword();
|
|
local uniqueId = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
local targetObj = sq_GetObject(obj, group, uniqueId);
|
|
if(targetObj){
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/c4remote/new_c4_bomb.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(6,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/c4remote/attacheffect.ani"),true);
|
|
sq_moveWithParent(targetObj, obj);
|
|
obj.getVar("tar").clear_obj_vector();
|
|
obj.getVar("tar").push_obj_vector(targetObj);
|
|
if(!CNSquirrelAppendage.sq_IsAppendAppendage(targetObj, "appendage/character/ap_common_debuff.nut")) {
|
|
local AddAppendage = CNSquirrelAppendage.sq_AppendAppendage(targetObj, obj, -1, false, "appendage/character/ap_common_debuff.nut", true);
|
|
AddAppendage.sq_SetValidTime(lifeTime);
|
|
local change_appendage = AddAppendage.sq_getChangeStatus("common_debuff");
|
|
if(!change_appendage) change_appendage = AddAppendage.sq_AddChangeStatus("common_debuff",targetObj, obj, 0, CHANGE_STATUS_TYPE_PHYSICAL_ATTACK, true, 100);
|
|
if(change_appendage){
|
|
change_appendage.clearParameter();
|
|
change_appendage.addParameter(CHANGE_STATUS_TYPE_ATTACK_SPEED, true, -speedRate.tofloat());
|
|
change_appendage.addParameter(CHANGE_STATUS_TYPE_MOVE_SPEED, true, -speedRate.tofloat());
|
|
}
|
|
}
|
|
obj.setTimeEvent(2, lifeTime, 1, false);
|
|
}
|
|
break;
|
|
case 3:
|
|
local totalDamage = receiveData.readDword();
|
|
local group = receiveData.readDword();
|
|
local uniqueId = receiveData.readDword();
|
|
local targetObj = sq_GetObject(obj, group, uniqueId);
|
|
if(targetObj){
|
|
obj.getVar("tar").clear_obj_vector();
|
|
obj.getVar("tar").push_obj_vector(targetObj);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/c4remote/exp1.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(6,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/c4remote/exp2.ani"),true);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 100));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(4, 50, 1, false);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_GRENADENONE:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
obj.getVar("flytochelli").setBool(0, false);
|
|
local size = sqrChr.getVar("chelliObj").get_obj_vector_size();
|
|
if(size > 0){
|
|
for(local i = 0; i < size; i++){
|
|
local chelliObj = sqrChr.getVar("chelliObj").get_obj_vector(i);
|
|
if(chelliObj){
|
|
local colObj = sq_GetCNRDObjectToCollisionObject(chelliObj);
|
|
local grenadeSave = colObj.getVar("custom").getInt(7);
|
|
local grenadeMax = colObj.getVar("custom").getInt(5);
|
|
if(grenadeSave >= grenadeMax && !CNSquirrelAppendage.sq_IsAppendAppendage(sqrChr, "character/atgunner/4_spitfire_bykk/ap_standbyready.nut")) break;
|
|
if(colObj.getVar("subtype").getInt(0) == 2 && colObj.getVar("state").getInt(0) < 22){
|
|
obj.getVar("flytarget").clear_obj_vector();
|
|
obj.getVar("flytarget").push_obj_vector(colObj);
|
|
obj.getVar("move").setInt(0, sq_GetXPos(obj));
|
|
obj.getVar("move").setInt(1, sq_GetYPos(obj));
|
|
obj.getVar("move").setInt(2, sq_GetZPos(obj));
|
|
obj.getVar("move").setInt(3, totalDamage);
|
|
obj.getVar("flytochelli").setBool(0, true);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
local sizeRate = receiveData.readDword();
|
|
sizeRate = sizeRate * 100 / 300;
|
|
local isEx = receiveData.readDword();
|
|
local ptlSelect = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, sizeRate);
|
|
obj.getVar("custom").setInt(2, isEx);
|
|
obj.getVar("custom").setInt(3, sq_GetZPos(obj));
|
|
local aniPath = "passiveobject/atgunner_bykk/4_spitfire/animation/grenadenone.ani", atkIndex = 99;
|
|
if(isEx > 0){
|
|
aniPath = "passiveobject/atgunner_bykk/4_spitfire/animation/atstandby-ready/grenadeweaponthrow_00.ani";
|
|
// ptlSelect = 0;
|
|
atkIndex = 116;
|
|
}
|
|
local ani = sq_CreateAnimation("", aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
if(obj.getVar("flytochelli").getBool(0) == false) sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, atkIndex));
|
|
else{
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sq_ClearAttackBox(currentAni);
|
|
}
|
|
local ptlPath = ["particle/4_spitfire/grenadecenter.ptl","particle/4_spitfire/grenadeup.ptl","particle/4_spitfire/grenadedown.ptl","particle/4_spitfire/grenadejump.ptl"];
|
|
if(obj.getVar("flytochelli").getBool(0) == false) obj.sq_SetMoveParticle(ptlPath[ptlSelect], 0.0, 0.0);
|
|
return;
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local aniPath = "passiveobject/atgunner_bykk/4_spitfire/animation/atgrenadenone/atgrenadenonegroundfront_00.ani";
|
|
if(sub > 0) aniPath = "passiveobject/atgunner_bykk/4_spitfire/animation/atgrenadenone/atgrenadenoneairfront_00.ani";
|
|
local ani = sq_CreateAnimation("", aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
if(sub > 0) currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/atgrenadenone/atgrenadenoneairback_00.ani"),true);
|
|
else{
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/atgrenadenone/atgrenadenonegroundback_00.ani"),true);
|
|
createOnlyDrawObjectEX_ATGunner_bykk(obj,"passiveobject/atgunner_bykk/4_spitfire/animation/atgrenadenone/atgrenadenonegroundbottom_00.ani",true,sq_GetDirection(obj),sq_GetXPos(obj),sq_GetYPos(obj),sq_GetZPos(obj),ENUM_DRAWLAYER_BOTTOM,sizeRate,sizeRate);
|
|
}
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 106));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
if(sizeRate > 100){
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
case 3:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atstandby-ready/grenadefront_02.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/atstandby-ready/grenadeback_01.ani"),true);
|
|
createOnlyDrawObjectEX_ATGunner_bykk(obj,"passiveobject/atgunner_bykk/4_spitfire/animation/atstandby-ready/grenadebottom_00.ani",true,sq_GetDirection(obj),sq_GetXPos(obj),sq_GetYPos(obj),sq_GetZPos(obj),ENUM_DRAWLAYER_BOTTOM,sizeRate,sizeRate);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 118));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
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_GRENADELIGHT:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
obj.getVar("flytochelli").setBool(0, false);
|
|
local size = sqrChr.getVar("chelliObj").get_obj_vector_size();
|
|
if(size > 0){
|
|
for(local i = 0; i < size; i++){
|
|
local chelliObj = sqrChr.getVar("chelliObj").get_obj_vector(i);
|
|
if(chelliObj){
|
|
local colObj = sq_GetCNRDObjectToCollisionObject(chelliObj);
|
|
local grenadeSave = colObj.getVar("custom").getInt(7);
|
|
local grenadeMax = colObj.getVar("custom").getInt(5);
|
|
if(grenadeSave >= grenadeMax && !CNSquirrelAppendage.sq_IsAppendAppendage(sqrChr, "character/atgunner/4_spitfire_bykk/ap_standbyready.nut")) break;
|
|
if(colObj.getVar("subtype").getInt(0) == 2 && colObj.getVar("state").getInt(0) < 22){
|
|
obj.getVar("flytarget").clear_obj_vector();
|
|
obj.getVar("flytarget").push_obj_vector(colObj);
|
|
obj.getVar("move").setInt(0, sq_GetXPos(obj));
|
|
obj.getVar("move").setInt(1, sq_GetYPos(obj));
|
|
obj.getVar("move").setInt(2, sq_GetZPos(obj));
|
|
obj.getVar("move").setInt(3, totalDamage);
|
|
obj.getVar("flytochelli").setBool(0, true);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
local sizeRate = receiveData.readDword();
|
|
sizeRate = sizeRate * 100 / 300;
|
|
local isEx = receiveData.readDword();
|
|
local ptlSelect = receiveData.readDword();
|
|
local aniPath = "passiveobject/atgunner_bykk/4_spitfire/animation/grenadelight.ani", atkIndex = 99;
|
|
if(isEx > 0){
|
|
aniPath = "passiveobject/atgunner_bykk/4_spitfire/animation/atstandby-ready/flashweaponthrow_00.ani";
|
|
// ptlSelect = 0;
|
|
totalDamage = totalDamage / 10;
|
|
atkIndex = 116;
|
|
}
|
|
local prob = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
local level = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, sizeRate);
|
|
obj.getVar("custom").setInt(2, isEx);
|
|
obj.getVar("custom").setInt(3, sq_GetZPos(obj));
|
|
obj.getVar("custom").setInt(4, prob);
|
|
obj.getVar("custom").setInt(5, time);
|
|
obj.getVar("custom").setInt(6, level);
|
|
local ani = sq_CreateAnimation("", aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
if(obj.getVar("flytochelli").getBool(0) == false) sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, atkIndex));
|
|
else{
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sq_ClearAttackBox(currentAni);
|
|
}
|
|
local ptlPath = ["particle/4_spitfire/grenadecenter.ptl","particle/4_spitfire/grenadeup.ptl","particle/4_spitfire/grenadedown.ptl","particle/4_spitfire/grenadejump.ptl"];
|
|
if(obj.getVar("flytochelli").getBool(0) == false) obj.sq_SetMoveParticle(ptlPath[ptlSelect], 0.0, 0.0);
|
|
return;
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local prob = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
local level = receiveData.readDword();
|
|
local aniPath = "passiveobject/atgunner_bykk/4_spitfire/animation/atgrenadelight/atgrenadelightgroundfront_00.ani";
|
|
if(sub > 0) aniPath = "passiveobject/atgunner_bykk/4_spitfire/animation/atgrenadelight/atgrenadelightairfront_00.ani";
|
|
local ani = sq_CreateAnimation("", aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
if(sub == 0){
|
|
createOnlyDrawObjectEX_ATGunner_bykk(obj,"passiveobject/atgunner_bykk/4_spitfire/animation/atgrenadelight/atgrenadelightgroundbottom_00.ani",true,sq_GetDirection(obj),sq_GetXPos(obj),sq_GetYPos(obj),sq_GetZPos(obj),ENUM_DRAWLAYER_BOTTOM,sizeRate,sizeRate);
|
|
}
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 105));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_LIGHTNING,prob,level,time);
|
|
if(sizeRate > 100){
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
case 3:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local prob = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
local level = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, sizeRate);
|
|
obj.getVar("custom").setInt(4, prob);
|
|
obj.getVar("custom").setInt(5, time);
|
|
obj.getVar("custom").setInt(6, level);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 4:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, sizeRate);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_GRENADEWATER:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
obj.getVar("flytochelli").setBool(0, false);
|
|
local size = sqrChr.getVar("chelliObj").get_obj_vector_size();
|
|
if(size > 0){
|
|
for(local i = 0; i < size; i++){
|
|
local chelliObj = sqrChr.getVar("chelliObj").get_obj_vector(i);
|
|
if(chelliObj){
|
|
local colObj = sq_GetCNRDObjectToCollisionObject(chelliObj);
|
|
local grenadeSave = colObj.getVar("custom").getInt(7);
|
|
local grenadeMax = colObj.getVar("custom").getInt(5);
|
|
if(grenadeSave >= grenadeMax && !CNSquirrelAppendage.sq_IsAppendAppendage(sqrChr, "character/atgunner/4_spitfire_bykk/ap_standbyready.nut")) break;
|
|
if(colObj.getVar("subtype").getInt(0) == 2 && colObj.getVar("state").getInt(0) < 22){
|
|
obj.getVar("flytarget").clear_obj_vector();
|
|
obj.getVar("flytarget").push_obj_vector(colObj);
|
|
obj.getVar("move").setInt(0, sq_GetXPos(obj));
|
|
obj.getVar("move").setInt(1, sq_GetYPos(obj));
|
|
obj.getVar("move").setInt(2, sq_GetZPos(obj));
|
|
obj.getVar("move").setInt(3, totalDamage);
|
|
obj.getVar("flytochelli").setBool(0, true);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
local sizeRate = receiveData.readDword();
|
|
sizeRate = sizeRate * 100 / 300;
|
|
local isEx = receiveData.readDword();
|
|
local ptlSelect = receiveData.readDword();
|
|
// print("ptlSelect = "+ptlSelect);
|
|
local prob = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
local level = receiveData.readDword();
|
|
local aniPath = "passiveobject/atgunner_bykk/4_spitfire/animation/grenadewater.ani", atkIndex = 99;
|
|
if(isEx > 0){
|
|
aniPath = "passiveobject/atgunner_bykk/4_spitfire/animation/atstandby-ready/frozenweaponthrow_00.ani";
|
|
// ptlSelect = 0;
|
|
totalDamage = totalDamage / 10;
|
|
atkIndex = 116;
|
|
}
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, sizeRate);
|
|
obj.getVar("custom").setInt(2, isEx);
|
|
obj.getVar("custom").setInt(3, sq_GetZPos(obj));
|
|
obj.getVar("custom").setInt(4, prob);
|
|
obj.getVar("custom").setInt(5, time);
|
|
obj.getVar("custom").setInt(6, level);
|
|
local ani = sq_CreateAnimation("", aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
if(obj.getVar("flytochelli").getBool(0) == false) sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, atkIndex));
|
|
else{
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sq_ClearAttackBox(currentAni);
|
|
}
|
|
local ptlPath = ["particle/4_spitfire/grenadecenter.ptl","particle/4_spitfire/grenadeup.ptl","particle/4_spitfire/grenadedown.ptl","particle/4_spitfire/grenadejump.ptl"];
|
|
if(obj.getVar("flytochelli").getBool(0) == false) obj.sq_SetMoveParticle(ptlPath[ptlSelect], 0.0, 0.0);
|
|
return;
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local prob = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
local level = receiveData.readDword();
|
|
local aniPath = "passiveobject/atgunner_bykk/4_spitfire/animation/atgrenadeice/atgrenadeicebombgroundfront_00.ani";
|
|
if(sub > 0) aniPath = "passiveobject/atgunner_bykk/4_spitfire/animation/atgrenadeice/atgrenadeicebombairfront_00.ani";
|
|
local ani = sq_CreateAnimation("", aniPath);
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
if(sub == 0){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/atgrenadeice/atgrenadeicebombgroundback_00.ani"),true);
|
|
createOnlyDrawObjectEX_ATGunner_bykk(obj,"passiveobject/atgunner_bykk/4_spitfire/animation/atgrenadeice/atgrenadeicebombgroundbottom_00.ani",true,sq_GetDirection(obj),sq_GetXPos(obj),sq_GetYPos(obj),sq_GetZPos(obj),ENUM_DRAWLAYER_BOTTOM,sizeRate,sizeRate);
|
|
}
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 107));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_FREEZE,prob,level,time);
|
|
if(sizeRate > 100){
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
case 3:
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local sub = receiveData.readDword();
|
|
local prob = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
local level = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, sizeRate);
|
|
obj.getVar("custom").setInt(4, prob);
|
|
obj.getVar("custom").setInt(5, time);
|
|
obj.getVar("custom").setInt(6, level);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_M18CLAYMORE:
|
|
switch(subtype){
|
|
case 1:
|
|
case 3:
|
|
//totalDamage,hitMax,lifeTime,sizeRate,prob,time
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local lifeTime = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local prob = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
local flagIndex = receiveData.readDword();
|
|
local ptlSelect = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, hitMax);
|
|
obj.getVar("custom").setInt(2, lifeTime);
|
|
obj.getVar("custom").setInt(3, sizeRate);
|
|
obj.getVar("custom").setInt(4, prob);
|
|
obj.getVar("custom").setInt(5, time);
|
|
obj.getVar("custom").setInt(6, flagIndex);
|
|
obj.getVar("custom").setInt(7, ptlSelect);
|
|
if(subtype == 3){
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
}
|
|
if(sq_GetZPos(obj) > 0) obj.addSetStatePacket(23, null, STATE_PRIORITY_AUTO, false, "");
|
|
else obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
return;
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local prob = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/m18claymore/m18claymore_expl_dusta.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 110));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_STUN,prob,120,time,0);
|
|
obj.setTimeEvent(2, 560 / (hitMax + 1), hitMax - 1, false);
|
|
if(sizeRate > 100){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
case 4:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local prob = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/m18claymore/lv95atn-02x/boom_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 112));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_STUN,prob,120,time,0);
|
|
obj.setTimeEvent(2, 400 / (hitMax + 1), hitMax - 1, false);
|
|
if(sizeRate > 100){
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sizeRate = sizeRate.tofloat() / 100.0;
|
|
currentAni.setImageRateFromOriginal(sizeRate, sizeRate);
|
|
currentAni.setAutoLayerWorkAnimationAddSizeRate(sizeRate);
|
|
sq_SetAttackBoundingBoxSizeRate(currentAni, sizeRate, sizeRate, sizeRate);
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_LOCKONSUPPORT:
|
|
switch(subtype){
|
|
case 1://totalDamage,sizeRate,hitMax,ptlSelect,prob,time
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local ptlSelect = receiveData.readDword();
|
|
local prob = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, sizeRate);
|
|
obj.getVar("custom").setInt(2, hitMax);
|
|
obj.getVar("custom").setInt(3, prob);
|
|
obj.getVar("custom").setInt(4, time);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/lockonsupport/lockonsupport_grenade_lockonrolling01.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local ptlPath = ["particle/4_spitfire/grenadecenter.ptl","particle/4_spitfire/grenadeup.ptl","particle/4_spitfire/grenadedown.ptl","particle/4_spitfire/grenadejump.ptl"];
|
|
obj.sq_SetMoveParticle(ptlPath[ptlSelect], 0.0, 0.0);
|
|
return;
|
|
break;
|
|
case 2:
|
|
//totalDamage,sizeRate,hitMax,prob,time
|
|
local totalDamage = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local prob = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, sizeRate);
|
|
obj.getVar("custom").setInt(2, hitMax);
|
|
obj.getVar("custom").setInt(3, prob);
|
|
obj.getVar("custom").setInt(4, time);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 3:
|
|
local totalDamage = receiveData.readDword();
|
|
local prob = receiveData.readDword();
|
|
local time = receiveData.readDword();
|
|
local group = receiveData.readDword();
|
|
local uniqueId = receiveData.readDword();
|
|
local targetObj = sq_GetObject(obj, group, uniqueId);
|
|
if(targetObj && targetObj.getState() != STATE_DIE){
|
|
if(sq_getRandom(1, 100) > 50) sq_SetCurrentDirection(obj, sq_GetOppositeDirection(sq_GetDirection(obj)));
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/lockonsupport/lockonsupport_hit0"+sq_getRandom(1,5).tostring()+"_eff01.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 108));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
sq_SetChangeStatusIntoAttackInfo(attackInfo, 0, ACTIVESTATUS_STUN,prob,120,time,0);
|
|
sq_SendHitObjectPacket(obj,targetObj,0,0,sq_GetObjectHeight(targetObj) / 2);
|
|
}
|
|
break;
|
|
case 4:
|
|
local group = receiveData.readDword();
|
|
local uniqueId = receiveData.readDword();
|
|
local targetObj = sq_GetObject(obj, group, uniqueId);
|
|
if(targetObj && targetObj.getState() != STATE_DIE){
|
|
local activeObj = sq_GetCNRDObjectToActiveObject(targetObj);
|
|
if(activeObj.getVar("biaoji").get_obj_vector_size() > 0){
|
|
activeObj.getVar("biaoji").push_obj_vector(obj);
|
|
}
|
|
else{
|
|
activeObj.getVar("biaoji").clear_obj_vector();
|
|
activeObj.getVar("biaoji").push_obj_vector(obj);
|
|
}
|
|
sq_moveWithParent(activeObj, obj);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_GRAVITYGRENADE:
|
|
switch(subtype){
|
|
case 1:
|
|
//totalDamage,totalDamageExp,lifeTime,hitTime,ptlSelect,sizeRate
|
|
local totalDamage = receiveData.readDword();
|
|
local totalDamageExp = receiveData.readDword();
|
|
local lifeTime = receiveData.readDword();
|
|
local hitTime = receiveData.readDword();
|
|
local ptlSelect = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, totalDamageExp);
|
|
obj.getVar("custom").setInt(2, lifeTime);
|
|
obj.getVar("custom").setInt(3, hitTime);
|
|
obj.getVar("custom").setInt(4, sizeRate);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/grenadegravity/grenadegravity_grenade_normal.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/grenadegravity/grenadegravity_grenade_dodge.ani"),true);
|
|
local ptlPath = ["particle/4_spitfire/grenadecenter.ptl","particle/4_spitfire/grenadeup.ptl","particle/4_spitfire/grenadedown.ptl","particle/4_spitfire/grenadejump.ptl"];
|
|
obj.sq_SetMoveParticle(ptlPath[ptlSelect], 0.0, 0.0);
|
|
return;
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local totalDamageExp = receiveData.readDword();
|
|
local lifeTime = receiveData.readDword();
|
|
local hitTime = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, totalDamageExp);
|
|
obj.getVar("custom").setInt(2, lifeTime);
|
|
obj.getVar("custom").setInt(3, hitTime);
|
|
obj.getVar("custom").setInt(4, sizeRate);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 3:
|
|
local totalDamageExp = receiveData.readDword();
|
|
local sizeRate = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/grenadegravity/03_finish/grenadegravity_finish_front.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 104));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamageExp);
|
|
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_OPENFIRE:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, hitMax);
|
|
obj.setTimeEvent(1, 400, 1, false);
|
|
break;
|
|
case 2:
|
|
case 3:
|
|
case 4:
|
|
local aniPath = ["character/gunner/effect/animation/4_spitfire/atopenfire/grenadenone.ani","character/gunner/effect/animation/4_spitfire/atopenfire/grenadelight.ani","character/gunner/effect/animation/4_spitfire/atopenfire/grenadewater.ani"];
|
|
local ani = sq_CreateAnimation("", aniPath[subtype - 2]);
|
|
obj.setCurrentAnimation(ani);
|
|
local randomNum = sq_getRandom(-80,80);
|
|
local randomTime = sq_getRandom(500,800);
|
|
obj.getVar("custom").setInt(0, randomTime);
|
|
obj.sq_SetMoveParticle("particle/4_spitfire/grenadejump.ptl", randomNum.tofloat(), randomNum.tofloat() * 0.4);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_PHOTOBILIZER:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, hitMax);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atphotobilizer/atphotobilizerbullet_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCustomRotate(obj, sq_ToRadian(-45.0));
|
|
obj.sq_SetMoveParticle("particle/4_spitfire/grenadejump.ptl", 0.0, 0.0);
|
|
sq_SetSpeedToMoveParticle(obj,0,600);
|
|
break;
|
|
case 2:
|
|
local size = sqrChr.getVar("pBilizerObj").get_obj_vector_size();
|
|
if(size > 0){
|
|
for(local i = 0; i < size; i++){
|
|
local aObj = sqrChr.getVar("pBilizerObj").get_obj_vector(i);
|
|
if(aObj){
|
|
local colObj = sq_GetCNRDObjectToCollisionObject(aObj);
|
|
colObj.setTimeEvent(5, 1000, 1, true);
|
|
}
|
|
}
|
|
}
|
|
sqrChr.getVar("pBilizerObj").clear_obj_vector();
|
|
sqrChr.getVar("pBilizerObj").push_obj_vector(obj);
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, hitMax);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
sq_SetFrameDelayTime(currentAni, 1, 10000);
|
|
//obj.setTimeEvent(1, 550, 1, false);
|
|
break;
|
|
case 3:
|
|
local ani = sq_CreateAnimation("", "character/gunner/effect/animation/4_spitfire/atphotobilizer/explosion/atphotobilizerexplosionfront_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","character/gunner/effect/animation/4_spitfire/atphotobilizer/explosion/atphotobilizerexplosionback_05.ani"),true);
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "character/gunner/effect/animation/4_spitfire/atphotobilizer/explosion/atphotobilizerexplosionbottom_00.ani", 0, 0, 0);
|
|
sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
|
|
obj.sq_PlaySound("PHOTOBILIZER_EXP");
|
|
sq_SetMyShake(obj, 3, 100);
|
|
break;
|
|
case 4:
|
|
local xPos = receiveData.readDword();
|
|
local yPos = receiveData.readDword();
|
|
local tarxPos = receiveData.readDword();
|
|
local taryPos = receiveData.readDword();
|
|
tarxPos = tarxPos + sq_getRandom(-75,75);
|
|
taryPos = taryPos + sq_getRandom(-20,20);
|
|
obj.getVar("custom").setInt(0, xPos);
|
|
obj.getVar("custom").setInt(1, yPos);
|
|
obj.getVar("custom").setInt(5, tarxPos);
|
|
obj.getVar("custom").setInt(6, taryPos);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atphotobilizer/photogranade_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
obj.getVar("custom").setInt(2, sq_GetXPos(obj));
|
|
obj.getVar("custom").setInt(3, sq_GetYPos(obj));
|
|
obj.getVar("custom").setInt(4, sq_GetZPos(obj));
|
|
obj.setTimeEvent(3, 5, 40, true);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_CHELLI:
|
|
switch(subtype){
|
|
case 1:
|
|
sqrChr.getVar("chelliObj").push_obj_vector(obj);
|
|
//totalDamage_phase1,hitMax_phase1,totalDamage_phase2,hitMax_phase2,totalDamageExp,grenadeMax,grenadeAddRate
|
|
local totalDamage_phase1 = receiveData.readDword();
|
|
local hitMax_phase1 = receiveData.readDword();
|
|
local totalDamage_phase2 = receiveData.readDword();
|
|
local hitMax_phase2 = receiveData.readDword();
|
|
local totalDamageExp = receiveData.readDword();
|
|
local grenadeMax = receiveData.readDword();
|
|
local grenadeAddRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage_phase1);
|
|
obj.getVar("custom").setInt(1, hitMax_phase1);
|
|
obj.getVar("custom").setInt(2, totalDamage_phase2);
|
|
obj.getVar("custom").setInt(3, hitMax_phase2);
|
|
obj.getVar("custom").setInt(4, totalDamageExp);
|
|
obj.getVar("custom").setInt(5, grenadeMax);
|
|
obj.getVar("custom").setInt(6, grenadeAddRate);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atchelli/bullet/atchellibullet_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 121));
|
|
if(sq_GetZPos(obj) == 75) sq_SetCustomRotate(obj, sq_ToRadian(-35.0));
|
|
else sq_SetCustomRotate(obj, sq_ToRadian(-45.0));
|
|
obj.sq_SetMoveParticle("particle/4_spitfire/grenadejump.ptl", 0.0, 0.0);
|
|
sq_SetSpeedToMoveParticle(obj,0,600);
|
|
return;
|
|
break;
|
|
case 2:
|
|
sqrChr.getVar("chelliObj").push_obj_vector(obj);
|
|
local targetObj = sqrChr.getVar("chelliTarget").get_obj_vector(0);
|
|
if(targetObj){
|
|
sq_setCurrentAxisPos(obj, 0, sq_GetXPos(targetObj));
|
|
sq_setCurrentAxisPos(obj, 1, sq_GetYPos(targetObj));
|
|
sq_moveWithParent(targetObj, obj);
|
|
}
|
|
local totalDamage_phase1 = receiveData.readDword();
|
|
local hitMax_phase1 = receiveData.readDword();
|
|
local totalDamage_phase2 = receiveData.readDword();
|
|
local hitMax_phase2 = receiveData.readDword();
|
|
local totalDamageExp = receiveData.readDword();
|
|
local grenadeMax = receiveData.readDword();
|
|
local grenadeAddRate = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage_phase1);
|
|
obj.getVar("custom").setInt(1, hitMax_phase1);
|
|
obj.getVar("custom").setInt(2, totalDamage_phase2);
|
|
obj.getVar("custom").setInt(3, hitMax_phase2);
|
|
obj.getVar("custom").setInt(4, totalDamageExp);
|
|
obj.getVar("custom").setInt(5, grenadeMax);
|
|
obj.getVar("custom").setInt(6, grenadeAddRate);
|
|
obj.getVar("custom").setInt(7, 0);
|
|
obj.getVar("custom").setInt(8, 0);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 3:
|
|
local size = sqrChr.getVar("chelliObj").get_obj_vector_size();
|
|
if(size > 0){
|
|
for(local i = 0; i < size; i++){
|
|
local chelliObj = sqrChr.getVar("chelliObj").get_obj_vector(i);
|
|
if(chelliObj){
|
|
local colObj = sq_GetCNRDObjectToCollisionObject(chelliObj);
|
|
if(colObj.getVar("subtype").getInt(0) == 2){
|
|
sq_moveWithParent(colObj, obj);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
sqrChr.getVar("chelliObj").push_obj_vector(obj);
|
|
local hitMax_phase1 = receiveData.readDword();
|
|
local hitMax_phase2 = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, hitMax_phase1);
|
|
obj.getVar("custom").setInt(1, hitMax_phase2);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 4:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atchelli/end/atchelliexplosionnonefront_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/atchelli/end/atchelliexplosionnoneback_00.ani"),true);
|
|
break;
|
|
case 5:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atchelli/end/atchelliexplosionlightfront_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/atchelli/end/atchelliexplosionlightback_00.ani"),true);
|
|
break;
|
|
case 6:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atchelli/end/atchelliexplosionicefront_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/atchelli/end/atchelliexplosioniceback_00.ani"),true);
|
|
break;
|
|
case 7:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atchelli/end/atchelliexplosionfirefront_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/atchelli/end/atchelliexplosionfireback_00.ani"),true);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_STANDBYREADY:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atstandby-ready/overheatweaponthrow_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCustomRotate(obj, sq_ToRadian(-45.0));
|
|
obj.sq_SetMoveParticle("particle/4_spitfire/grenadejump.ptl", 0.0, 0.0);
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atstandby-ready/overheatfront_00.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(-1001,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/atstandby-ready/overheatback_00.ani"),true);
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/atstandby-ready/overheatbottom_01.ani", 0, 0, 0);
|
|
sq_ChangeDrawLayer(pooledObj, ENUM_DRAWLAYER_BOTTOM);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 120));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
break;
|
|
}
|
|
break;
|
|
case SKILL_BYKK_EMPSTORM:
|
|
sqrChr.getVar("empStromObj").push_obj_vector(obj);
|
|
obj.setDirection(ENUM_DIRECTION_RIGHT);
|
|
switch(subtype){
|
|
case 1://主体下部
|
|
local totalDamage_drop = receiveData.readDword();
|
|
local totalDamage_phase1 = receiveData.readDword();
|
|
local totalDamage_phase2 = receiveData.readDword();
|
|
local hitMax_phase2 = receiveData.readDword();
|
|
local totalDamageExp = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, totalDamage_drop);
|
|
obj.getVar("custom").setInt(1, totalDamage_phase1);
|
|
obj.getVar("custom").setInt(2, totalDamage_phase2);
|
|
obj.getVar("custom").setInt(3, hitMax_phase2);
|
|
obj.getVar("custom").setInt(4, totalDamageExp);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/emp_bomb_bottom2.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
obj.sq_SetMoveParticle("particle/4_spitfire/grenadedown.ptl", 0.0, 0.0);
|
|
sq_SetSpeedToMoveParticle(obj,0,0);
|
|
break;
|
|
case 2://主体底部
|
|
local totalDamage = receiveData.readDword();
|
|
local totalDamage_phase1 = receiveData.readDword();
|
|
local totalDamage_phase2 = receiveData.readDword();
|
|
local hitMax_phase2 = receiveData.readDword();
|
|
local totalDamageExp = receiveData.readDword();
|
|
obj.getVar("custom").setInt(1, totalDamage_phase1);
|
|
obj.getVar("custom").setInt(2, totalDamage_phase2);
|
|
obj.getVar("custom").setInt(3, hitMax_phase2);
|
|
print("totalDamage_phase1 = "+totalDamage_phase1);
|
|
print("totalDamage_phase2 = "+totalDamage_phase2);
|
|
print("hitMax_phase2 = "+hitMax_phase2);
|
|
print("totalDamageExp = "+totalDamageExp);
|
|
obj.getVar("custom").setInt(4, totalDamageExp);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/emp_bomb_sub.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(1001,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/emp_bomb_sub_dodge.ani"),true);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 128));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(20, 1300, 1, false);
|
|
break;
|
|
case 3://主体顶部
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/emp_bomb_up.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
obj.sq_SetMoveParticle("particle/4_spitfire/grenadedown.ptl", 0.0, 0.0);
|
|
sq_SetSpeedToMoveParticle(obj,0,0);
|
|
break;
|
|
case 4://主体背部
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/emp_bomb_bottom1.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
obj.sq_SetMoveParticle("particle/4_spitfire/grenadedown.ptl", 0.0, 0.0);
|
|
sq_SetSpeedToMoveParticle(obj,0,0);
|
|
break;
|
|
case 5://小黑洞
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/core_dodge_1.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/core_dodge_2.ani"),true);
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/core_normal_1.ani"),true);
|
|
currentAni.addLayerAnimation(2,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/red_spark.ani"),true);
|
|
break;
|
|
case 6://石头
|
|
local currentAni = obj.getCurrentAnimation();
|
|
for(local i = 1; i < 11; i++){
|
|
currentAni.addLayerAnimation(1001,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/stone"+i.tostring()+".ani"),true);
|
|
currentAni.addLayerAnimation(1002,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/stone"+i.tostring()+"dodge.ani"),true);
|
|
}
|
|
break;
|
|
case 7://黑洞边缘
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/pillar_dodge.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
break;
|
|
case 8:
|
|
local totalDamage = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/exp_dodge1.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 131));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
local currentAni = obj.getCurrentAnimation();
|
|
currentAni.addLayerAnimation(-1,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/exp_dodge2.ani"),true);
|
|
currentAni.addLayerAnimation(1,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/exp_motionblur_dodge.ani"),true);
|
|
currentAni.addLayerAnimation(2,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/exp_dodge_particle1.ani"),true);
|
|
currentAni.addLayerAnimation(3,sq_CreateAnimation("","passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/exp_dodge_particle2.ani"),true);
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/exp_normal1.ani", 0, 1, 0);
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/exp_normal2.ani", 0, 1, 0);
|
|
sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/exp_normal3.ani", 0, 1, 0);
|
|
obj.setTimeEvent(30,200, 3, false);
|
|
sq_SetShake(obj, 8, 100);
|
|
sq_flashScreen(obj,80,100,240,45, sq_RGB(205,0,0), GRAPHICEFFECT_NONE, ENUM_DRAWLAYER_BOTTOM);
|
|
obj.sq_PlaySound("BOMB_04");
|
|
break;
|
|
case 9:
|
|
local totalDamage = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/empstorm/emp_bomb_first_exp.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 129));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
break;
|
|
|
|
}
|
|
break;
|
|
case SKILL_BYKK_DDAY:
|
|
switch(subtype){
|
|
case 1:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local ptlSelect = receiveData.readDword();
|
|
// print("totalDamage = "+totalDamage);
|
|
// print("hitMax = "+hitMax);
|
|
obj.getVar("custom").setInt(0, totalDamage);
|
|
obj.getVar("custom").setInt(1, hitMax);
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atdday/flare/handgrenadea_normal.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local ptlPath = ["particle/4_spitfire/grenadecenter.ptl","particle/4_spitfire/grenadeup.ptl","particle/4_spitfire/grenadedown.ptl","particle/4_spitfire/grenadejump.ptl"];
|
|
obj.sq_SetMoveParticle(ptlPath[ptlSelect], 0.0, 0.0);
|
|
break;
|
|
case 2:
|
|
local totalDamage = receiveData.readDword();
|
|
local hitMax = receiveData.readDword();
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atdday/ddayattackbox.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
sq_SetCurrentAttackInfo(obj, sq_GetCustomAttackInfo(obj, 102));
|
|
sq_SetCurrentAttackBonusRate(sq_GetCurrentAttackInfo(obj), totalDamage);
|
|
obj.setTimeEvent(6, 55 * hitMax, 1, false);
|
|
obj.setTimeEvent(7, 55 ,hitMax, true);
|
|
break;
|
|
case 3:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atdday/bombbard/ddayatka_eff_a.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
local pooledObj = sq_AddDrawOnlyAniFromParent(obj, "passiveobject/atgunner_bykk/4_spitfire/animation/atdday/bombbard/ddayatkafloor_floordodge_a.ani", 0, 0, 0);
|
|
sq_ChangeDrawLayer(obj, ENUM_DRAWLAYER_BOTTOM);
|
|
break;
|
|
case 4:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/dangerclose/dangershell.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
obj.setTimeEvent(22, 500, 1, false);
|
|
break;
|
|
case 5:
|
|
local sub = receiveData.readDword();
|
|
obj.getVar("custom").setInt(0, sub);
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 6:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atdday/bullet/botbullet1.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
obj.sq_SetMoveParticle("particle/4_spitfire/ddaygunbullet.ptl", 0.0, 0.0);
|
|
break;
|
|
case 7:
|
|
case 8:
|
|
obj.addSetStatePacket(20, null, STATE_PRIORITY_AUTO, false, "");
|
|
break;
|
|
case 9:
|
|
local ani = sq_CreateAnimation("", "passiveobject/atgunner_bykk/4_spitfire/animation/atdday/bullet/handgrenadec_normal.ani");
|
|
obj.setCurrentAnimation(ani);
|
|
obj.sq_SetMoveParticle("particle/4_spitfire/ddaygrenade.ptl", 0.0, 0.0);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
if(attackInfo) sq_SetAddWeaponDamage(attackInfo, true);
|
|
if(sqrChr && sqrChr.getState() != STATE_DIE){
|
|
local skill = sq_GetSkill(sqrChr, 69);
|
|
if(skill.isSealFunction()){
|
|
sq_setAttackInfoType(obj,ATTACKTYPE_MAGICAL);
|
|
obj.getVar("atkType").setInt(0, 1);
|
|
}
|
|
else{
|
|
sq_setAttackInfoType(obj,ATTACKTYPE_PHYSICAL);
|
|
obj.getVar("atkType").setInt(0, 0);
|
|
}
|
|
local element_kk_fire = sqrChr.getVar("element_kk").getInt(0);
|
|
local element_kk_water = sqrChr.getVar("element_kk").getInt(1);
|
|
local element_kk_dark = sqrChr.getVar("element_kk").getInt(2);
|
|
local element_kk_light = sqrChr.getVar("element_kk").getInt(3);
|
|
if(!attackInfo.isValidElement(ENUM_ELEMENT_FIRE) && element_kk_fire > 0) attackInfo.setElement(ENUM_ELEMENT_FIRE);
|
|
if(!attackInfo.isValidElement(ENUM_ELEMENT_WATER) && element_kk_water > 0) attackInfo.setElement(ENUM_ELEMENT_WATER);
|
|
if(!attackInfo.isValidElement(ENUM_ELEMENT_DARK) && element_kk_dark > 0) attackInfo.setElement(ENUM_ELEMENT_DARK);
|
|
if(!attackInfo.isValidElement(ENUM_ELEMENT_LIGHT) && element_kk_light > 0) attackInfo.setElement(ENUM_ELEMENT_LIGHT);
|
|
}
|
|
break;
|
|
}
|
|
|
|
local attackInfo = sq_GetCurrentAttackInfo(obj);
|
|
if(attackInfo){
|
|
local element_kk_fire = sqrChr.getVar("element_kk").getInt(0);
|
|
local element_kk_water = sqrChr.getVar("element_kk").getInt(1);
|
|
local element_kk_dark = sqrChr.getVar("element_kk").getInt(2);
|
|
local element_kk_light = sqrChr.getVar("element_kk").getInt(3);
|
|
if(!attackInfo.isValidElement(ENUM_ELEMENT_FIRE) && element_kk_fire > 0) attackInfo.setElement(ENUM_ELEMENT_FIRE);
|
|
if(!attackInfo.isValidElement(ENUM_ELEMENT_WATER) && element_kk_water > 0) attackInfo.setElement(ENUM_ELEMENT_WATER);
|
|
if(!attackInfo.isValidElement(ENUM_ELEMENT_DARK) && element_kk_dark > 0) attackInfo.setElement(ENUM_ELEMENT_DARK);
|
|
if(!attackInfo.isValidElement(ENUM_ELEMENT_LIGHT) && element_kk_light > 0) attackInfo.setElement(ENUM_ELEMENT_LIGHT);
|
|
}
|
|
}
|