Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Set these from the data you use in the insert of creature
- SET
- @NPC_CLASS := `unit_class`,
- @NPC_LEVEL := ROUND((minlevel+maxlevel)/2, 0),
- @EXP := `exp`;
- -- Gets the base hp according to level, class and exp
- SET
- @GET_HP_COL :=
- (SELECT CASE @EXP
- WHEN 0 THEN (SELECT basehp0 FROM creature_classlevelstats WHERE `level` = @NPC_LEVEL AND `class` = @NPC_CLASS)
- WHEN 1 THEN (SELECT basehp1 FROM creature_classlevelstats WHERE `level` = @NPC_LEVEL AND `class` = @NPC_CLASS)
- WHEN 2 THEN (SELECT basehp2 FROM creature_classlevelstats WHERE `level` = @NPC_LEVEL AND `class` = @NPC_CLASS)
- END);
- -- The generated NPC sql
- 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 (50000, 0, 0, 0, 0, 0, 169, 11686, 0, 0, 'Orb Rotation Focus (3)', '', '', 0, 80, 80, 0, 14, 0, 2.2, 0.785714, 1, 0, 0, 2000, 2000, 1, 1, 1, 33554688, 2048, 0, 0, 0, 0, 0, 0, 10, 1048576, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, (@NPC_HEALTH/@GET_HP_COL), 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 118, 1, 0, 128, '', 12340);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement