• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] Npc faction bug?

Status
Not open for further replies.

pinkyflip

Banned
Ok so i don't know if this is the right section but here goes my question:


i made 2 npcs into vehicles and i want 1 to be for horde and one for ally
when i set the factions to horde and ally the npcs start attacking eachother
and since they are flying vehicles this is annoying because they suck both players into eachother
untill 1 vehicle dies. BUT i want horde to be able to attack ally and ally to attack horde but not be able to damage same faction
mounts.

when i set their faction to 1080 the npcs fly and work when an ally gets in them.
but when a horde gets in them they fly untill the horde exits. then they become non-flyable and break.

here is the sql I made to make these type of mounts.
ally jet and horde jet



/* Ally Fighter jet */
Code:
INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `dmgschool`, `BaseAttackTime`, `RangeAttackTime`, `BaseVariance`, `RangeVariance`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `HealthModifier`, `ManaModifier`, `ArmorModifier`, `DamageModifier`, `ExperienceModifier`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES (600009, 0, 0, 0, 0, 0, 26557, 0, 0, 0, 'Ally Fighter jet', 'BattleBotz', 'vehichleCursor', 0, 80, 80, 2, 1732, 16777216, 1, 1, 5, 1, 0, 2000, 2000, 1, 1, 1, 16777216, 2048, 8, 0, 0, 0, 0, 0, 2, 262144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55987, 30383, 71786, 33357, 0, 0, 0, 0, 0, 99, 0, 0, '', 0, 4, 1, 3.5, 25, 250, 7.5, 1, 0, 0, 0, 0, 0, 0, 0, 164, 1, 0, 2, '', 12340);
INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES (600009, 0, 0, 50331648, 0, 0, '50345');
INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES (600009, 68503, 1, 0);


/* DELETE NPC */
Code:
DELETE FROM `creature_template` WHERE `entryorguid`=600009 AND `source_type`=0;
DELETE FROM `npc_spellclick_spells` WHERE `entryorguid`=600009 AND `source_type`=0;
DELETE FROM `creature_template_addon` WHERE `entryorguid`=600009 AND `source_type`=0;


/* Horde Fighter jet */

Code:
INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `dmgschool`, `BaseAttackTime`, `RangeAttackTime`, `BaseVariance`, `RangeVariance`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `HealthModifier`, `ManaModifier`, `ArmorModifier`, `DamageModifier`, `ExperienceModifier`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES (600010, 0, 0, 0, 0, 0, 26557, 0, 0, 0, 'Horde Fighter jet', 'BattleBotz', 'vehichleCursor', 0, 80, 80, 2, 1735, 16777216, 1, 1, 5, 1, 0, 2000, 2000, 1, 1, 1, 16777216, 2048, 8, 0, 0, 0, 0, 0, 2, 262144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55987, 30383, 71786, 33357, 0, 0, 0, 0, 0, 99, 0, 0, '', 0, 4, 1, 3.5, 25, 250, 7.5, 1, 0, 0, 0, 0, 0, 0, 0, 164, 1, 0, 2, '', 12340);
INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES (600010, 0, 0, 50331648, 0, 0, '50345');
INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES (600010, 68503, 1, 0);

/* DELETE NPC */

Code:
DELETE FROM `creature_template` WHERE `entryorguid`=600010 AND `source_type`=0;
DELETE FROM `npc_spellclick_spells` WHERE `entryorguid`=600010 AND `source_type`=0;
DELETE FROM `creature_template_addon` WHERE `entryorguid`=600010 AND `source_type`=0;
 
Last edited:

Rochet2

Moderator / Eluna Dev
I dont know what I did, but this works fine

Code:
INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `dmgschool`, `BaseAttackTime`, `RangeAttackTime`, `BaseVariance`, `RangeVariance`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `HealthModifier`, `ManaModifier`, `ArmorModifier`, `DamageModifier`, `ExperienceModifier`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES (600011, 0, 0, 0, 0, 0, 26557, 0, 0, 0, 'Ally Fighter jet', 'BattleBotz', 'vehichleCursor', 0, 80, 80, 2, 35, 16777216, 1, 1, 5, 1, 0, 2000, 2000, 1, 1, 1, 0, 2048, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55987, 30383, 71786, 33357, 0, 0, 0, 0, 0, 99, 0, 0, '', 0, 4, 1, 3.5, 25, 250, 7.5, 1, 0, 0, 0, 0, 0, 0, 0, 164, 1, 0, 2, '', 12340);

INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES (600011, 0, 0, 50331648, 0, 0, '50345');

INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES (600011, 50343, 1, 0);

I removed some of the flags and changed the spellclick spell mainly .. hmm.
Problem was not NPC faction at least so the 35 doesnt actually have an effect.
 
Last edited:

pinkyflip

Banned
thankyou :D now they are working great! but i found another issue. you can hit tab and it will select the player and not the npc LOL back to the drawing board
 
Status
Not open for further replies.
Top