PDA

View Full Version : [Guide] Making a Npc Talk [Scripting]


Killuallnow1
10-05-2007, 09:02 AM
First if u dont wont to do this i could do some for you

Ok Most of u migth woudl liek to know this What i mean is like Your just running aroudn and u have a Custom Mob / Boss and then when u Attack it then NPC will say like "Why do u try and kill me" Etc buy it's self w/o using the command .npc say / .npc yell

Ok weill this is done with C++ Scripting and well this is how

Step : 1 > Open a Note Pad

Step : 2 > Put this in There

global MobName_Event = function(mob)
{
.SendChatMessage("What you wont your NPC to say");
.DeregisterTimer();
};
.RegisterUnitEvent(NpcID, 0, MobName_Event);

Ok everythign in red must be Changed

First > MobName = The first name of your mob so if i was doing Illidan Stormrage i would put "global Illidan_Event" (Must be Corrected Spelling ,Caps on names Etc)

Next > Event = The event when you wont your npc to say it so like if u wont him to say it on enter Comback it would look like this "global Illidan_Enter_Combat
Heree is the Command u must put for them

On Enter Combat = MobName_Enter_Combat = function(mob)
On Leave Combat = MobName_Leave_Combat = function(mob)
On Killed Target = MobName_Killed_Target = function(mob)
On Died = MobName_Died = function(mob)
On Spawn = MobName_Spawn = function(mob)
On Player Enters Range = MobName_Player_Enters_Range = function(mob)

There is more but i dotn know how to do them ones

Ok next is > What you wont your NPC to say = Well Put what you wont your Npc to say :wave:

Next > .RegisterUnitEvent(NpcID, 0, MobName_Event); = the Spawn if of your mob so if i was using Illidan his Spawn id is 22917 so i would put .RegisterUnitEvent(22917, 0, MobName_Event);

Next is > .RegisterUnitEvent(NpcID, 0, MobName_Event); = Put on of theses \/
1 = On Enter Combat
2 = On Leave Combat
3 = On Killed Target
4 = On Died
6 = On Spawn
10 = On Player Enters Range
What every one your doing it for

Next > 1 = .RegisterUnitEvent(NpcID, 0, MobName_Event); = You should know that if you Read up a bit

Ok now Go to File > Save As> For File Name: MobName.gm (MUST have the .gm) For Save As Type : All Files
And save it to your Desktop for know
Then > Go into your Server Im using AC Repack so it would be C:\AC Web Ultimate Repack
And then go into your Ascent or Antrixx Folder and make a Folder called Scripts (If u have it already open it)
C:\AC Web Ultimate Repack\Ascent\scripts
C:\AC Web Ultimate Repack\Antrix\scripts
and then Put your MobName.gm from your Desktop into it and then Close and in your Ascent / Antrix Cmd
type: reloadscripts / OR in game : .reloadscripts/
Or Restart your Server and then your Done Good luck
if u need any Help Or for me to Script 1 for you PM me

amanzer1
10-05-2007, 09:19 AM
Yay for using colors to highlight to important stuff! My respect for you is growing ever so slightly ;)

lol anyways, good little guide. :)

Killuallnow1
10-05-2007, 09:54 AM
Yay for using colors to highlight to important stuff! My respect for you is growing ever so slightly ;)

lol anyways, good little guide. :)


Haha lol ty Ande'thoras-ethil.

lilnate22
10-05-2007, 10:47 AM
you didnt make this guide......


you just fancied it up,


should give original script credit.....



ill give u credit for all the fancy stuff....


P.S this is not C++ scripting... this is GM Scripting

Golepa
10-05-2007, 11:32 AM
Well, he's from mmowned so this sh1et is understandable.

lilnate22
10-05-2007, 01:17 PM
no o..ill give him credit for the fancying upness.....thats about it

ilian53
04-26-2008, 06:00 PM
hey mine dont work

wartick
04-26-2008, 06:02 PM
Dont use it, thats just so fucked up. Use LUA

ilian53
04-26-2008, 06:03 PM
i did


global Illidan_Player_Enters_Range = function(mob)
{
.SendChatMessage("You are not prepared");
.DeregisterTimer();
};
.RegisterUnitEvent(22917, 10, Illidan_Enter_Combat);

it dont work ideas?

Yerney
04-26-2008, 06:03 PM
Don't bump old posts, GM scripting isn't supported anymore...

wartick
04-26-2008, 06:04 PM
ilian, ill PM you how to do it in lua,

DO NOT REPLY HERE ANYMORE

ilian53
04-26-2008, 06:05 PM
do you have ideas why it dont worked

Yerney
04-26-2008, 06:06 PM
omfg...

IT ISN't SUPPORTED

AND NOW DON't BUMP THIS ANyMORE

ilian53
04-26-2008, 06:07 PM
do you have ideas? why it dont worked?

omfg...

IT ISN't SUPPORTED

AND NOW DON't BUMP THIS ANyMORE



what?

ok

nob66
04-27-2008, 10:05 AM
It ISnt damn !!!!