Create a combat NPC

Oct 10, 2017
220
12
18
#1
Hello. I'm new posting and i hope you can help my curiosity.

I'm trying to create a new combat aggro NPC.



I made its Lua (bad_luke.lua):


Code:
  bad_luke = Creature:new {
objectName = "@mob/creature_names:norulac_raider_captain",
randomNameType = NAME_GENERIC,
randomNameTag = true,
socialGroup = "dark_jedi",
faction = "",
level = 260,
chanceHit = 9.11,
damageMin = 770,
damageMax = 1750,
baseXp = 12081,
baseHAM = 88000,
baseHAMmax = 106000,
armor = 2,
resists = {185,75,66,55,75,85,75,65,-1},
meatType = "",
meatAmount = 0,
hideType = "",
hideAmount = 0,
boneType = "",
boneAmount = 0,
milk = 0,
tamingChance = 0,
ferocity = 0,
pvpBitmask = AGGRESSIVE + ATTACKABLE + ENEMY,
creatureBitmask = KILLER + PACK,
optionsBitmask = AIENABLED,
diet = HERBIVORE,

templates = {
--"object/mobile/dressed_squad_leader_trainer_01.iff",
--"object/mobile/dressed_squad_leader_trainer_02.iff",
 --"object/mobile/dressed_squad_leader_trainer_03.iff",
 "object/mobile/devaronian_male.iff"

},

lootGroups = {
{
groups = {
{group = "junk", chance = 6500000},
{group = "power_crystals", chance = 500000},
{group = "color_crystals", chance = 500000},
{group = "pistols", chance = 750000},
{group = "rifles", chance = 750000},
{group = "melee_weapons", chance = 750000},
{group = "armor_attachments", chance = 350000},
{group = "clothing_attachments", chance = 350000},
}
}
},

weapons = {"dark_trooper_weapons", "dark_jedi_weapons_gen2"
},
conversationTemplate = "",
attacks = merge(lightsabermaster,forcewielder,bountyhuntermaster,marksmanmaster,pistoleermaster)
}

CreatureTemplates:addCreatureTemplate(bad_luke, "bad_luke")
And registered on serverobjects.lua
Code:
includefile ...blablabla...


But didn't work. Am i missing anything?