Idea Motion Group
လူၾကီးမင္းတြင္ Idea Motion Group မွမွတ္ပံုတင္ျပီးေသာ Member Account ရွိပါက Log In မွ တဆင့္ဝင္ေရာက္ပါ။
New Guest ျဖစ္ပါက Register ျပဳလုပ္၍ဝင္ေရာက္ေပးပို႔ႏိုင္ပါသည္။။
*********Idea Motion Group*********
Log in

I forgot my password

Latest topics
Country Codes

Timer

Total
  • >

/>

Test

How to Create an NPC on a Trinity Server2

View previous topic View next topic Go down

default How to Create an NPC on a Trinity Server2

Post   on Thu Jul 05, 2012 12:23 pm

Its created by me and it can be found in here wow-v.

But anyways, it is an SQL code that has all the needed NPC fields for creating a basic NPC.

All you yourself have to do before executing it to your database, is to change the numbers / values at the start of the code:
SET
@ENTRY = 100000;
SET
@MODELID1 = 13,
@MODELID2 = 0,
@MODELID3 = 0,
@MODELID4 = 0,
@NAME = 'Name',
@SUBNAME = 'Subname',
@ICONNAME = '',
@GOSSIP_MENU_ID = 0,
@MINLEVEL = 1,
@MAXLEVEL = 1,
@EXP = 0,
@FACTION_A = 35,
@FACTION_H = 35,
@NPCFLAG = 1,
@SPEED_WALK = 1.0,
@SPEED_RUN = 1.14286,
@SCALE = 1,
@RANK = 0,
@MINDMG = 1.0,
@MAXDMG = 1.0,
@DMGSCHOOL = 0,
@ATTACKPOWER = 1,
@DMG_MULTIPLIER = 1.0,
@BASEATTACKTIME = 1000,
@RANGEDATTACKTIME = 1000,
@UNIT_CLASS = 1,
@UNIT_FLAGS = 0,
@DYNAMICFLAGS = 0,
@FAMILY = 0,
@TRAINER_TYPE = 0,
@TRAINER_SPELL = 0,
@TRAINER_CLASS = 0,
@TRAINER_RACE = 0,
@MINRANGEDMG = 0.0,
@MAXRANGEDMG = 0.0,
@RANGEDATTACKPOWER = 0,
@TYPE = 1,
@TYPE_FLAGS = 0,
@LOOTID = @ENTRY,
@PICKPOCKETLOOT = @ENTRY,
@SKINLOOT = @ENTRY,
@RESISTANCE1 = 0, -- Holy
@RESISTANCE2 = 0, -- Fire
@RESISTANCE3 = 0, -- Nature
@RESISTANCE4 = 0, -- Frost
@RESISTANCE5 = 0, -- Shadow
@RESISTANCE6 = 0, -- Arcane
@SPELL1 = 0, -- Spells available to the mindcontroller
@SPELL2 = 0,
@SPELL3 = 0,
@SPELL4 = 0,
@SPELL5 = 0,
@SPELL6 = 0,
@SPELL7 = 0,
@SPELL8 = 0,
@PETSPELLDATAID = 0,
@VEHICLEID = 0,
@MINGOLD = 0, -- in copper
@MAXGOLD = 0, -- in copper
@AINAME = '',
@MOVEMENTTYPE = 0,
@INHABITTYPE = 3,
@HEALTH_MOD = 1.0,
@MANA_MOD = 1.0,
@ARMOR_MOD = 1.0,
@RACIALLEADER = 0,
@QUESTITEM1 = 0,
@QUESTITEM2 = 0,
@QUESTITEM3 = 0,
@QUESTITEM4 = 0,
@QUESTITEM5 = 0,
@QUESTITEM6 = 0,
@MOVEMENTID = 0,
@REGENHEALTH = 1,
@EQUIPMENT_ID = 0,
@MECHANIC_IMMUNE_MASK = 0,
@FLAGS_EXTRA = 0,
@SCRIPTNAME = ''
;
The
numbers / values are currently just set to default and executing the
SQL should create a basic NPC with level 1 and such, but if you want to
alter the stats of the NPC, just change the values in the list.

For example if you want the NPC to be level 3 change:
@MINLEVEL = 1, to @MINLEVEL = 3,
and
@MAXLEVEL = 1, to @MAXLEVEL = 3,

About the spellcasting.. it is done with creature_ai scripts or smart scripts in the database or with C++.
There is information about how they work in here:
creature_ai:
[Only admins are allowed to see this link]
[Only admins are allowed to see this link]

Smart:
[Only admins are allowed to see this link]

C++:
[Only admins are allowed to see this link]
On how to apply C++ code to your core, try searching the Trinitycore forums [Only admins are allowed to see this link]











Project Code
Codes for WoW private servers.


Join date : 1970-01-01

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum