Jump to content

creature_movement_script - confused


Guest the-nightm4r3_
 Share

Recommended Posts

Hey Guys,

im very confuseeeeed about this...

I've got an npc with 4 Waypoints

[spawnpoint] - > [WP 1] -> [WP 2 (wait with random movment for 10 sec)] - > [WP 3] -> [WP 4 (wait with random movment for 10 sec)]

He should stay on WP 2 & 4 for 10 seconds with random movement (radius 10).

Creature Guid is 395

So i create a entry in the creature_movement_script table

id=1 delay=0 command=20 datalong=1 datalong2=0 buddy_entry=0 search_radius=10

In creature_movement i set @ creature id 395 WP 2 & 4 the script_id to 1

The npc's walks now from spawnpoint to wp 1 & 2 but then it is dont waiting there... it walks back to the spawpoint instantly and walks there with random movement forever....

i hope you can help me o;

Another little question is why there are a creature_movement & creature_movement_template table?

Link to comment
Share on other sites

So here is the sql stuff.

On Waypoint 1 NPC should start to run but it doesnt work...

it just walks to waypoint 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 and then it walks strait to the spawnpoint of this npcs and there it walks with random movement and will never stops

creature.sql

replace into `creature`(`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) 
values 
(40000,50000,0,1,1,0,0,x,x,x,x,25,5,0,42,0,0,2);

creature_movement.sql

replace into `creature_movement`(`id`,`point`,`position_x`,`position_y`,`position_z`,`waittime`,`script_id`,`textid1`,`textid2`,`textid3`,`textid4`,`textid5`,`emote`,`spell`,`wpguid`,`orientation`,`model1`,`model2`) 
values 
(40000,1,x,x,x,0,1,0,0,0,0,0,0,0,0,x,0,0),
(40000,2,x,x,x,0,0,0,0,0,0,0,0,0,0,x,0,0),
(40000,3,x,x,x,0,0,0,0,0,0,0,0,0,0,x,0,0),
(40000,4,x,x,x,0,0,0,0,0,0,0,0,0,0,x,0,0),
(40000,5,x,x,x,0,0,0,0,0,0,0,0,0,0,x,0,0),
(40000,6,x,x,x,0,0,0,0,0,0,0,0,0,0,x,0,0),
(40000,7,x,x,x,0,0,0,0,0,0,0,0,0,0,x,0,0),
(40000,8,x,x,x,0,0,0,0,0,0,0,0,0,0,x,0,0),
(40000,9,x,x,x,0,0,0,0,0,0,0,0,0,0,x,0,0),
(40000,10,x,x,x,60000,2,0,0,0,0,0,0,0,0,x,0,0),
(40000,11,x,x,x,0,0,0,0,0,0,0,0,0,0,x,0,0),
(40000,12,x,x,x,0,0,0,0,0,0,0,0,0,0,x,0,0),
(40000,13,x,x,x,0,0,0,0,0,0,0,0,0,0,x,0,0),
(40000,14,x,x,x,0,0,0,0,0,0,0,0,0,0,x,0,0),
(40000,15,x,x,x,0,0,0,0,0,0,0,0,0,0,x,0,0),
(40000,16,x,x,x,0,0,0,0,0,0,0,0,0,0,x,0,0),
(40000,17,x,x,x,0,0,0,0,0,0,0,0,0,0,x,0,0),
(40000,18,x,x,x,0,0,0,0,0,0,0,0,0,0,x,0,0),
(40000,19,x,x,x,0,0,0,0,0,0,0,0,0,0,x,0,0),
(40000,20,x,x,x,60000,2,0,0,0,0,0,0,0,0,x,0,0);

creature_movement_script.sql

replace into `creature_movement_scripts`(`id`,`delay`,`command`,`datalong`,`datalong2`,`buddy_entry`,`search_radius`,`data_flags`,`dataint`,`dataint2`,`dataint3`,`dataint4`,`x`,`y`,`z`,`o`,`comments`) 
values 
(2,60,20,2,0,50000,5,0,0,0,0,0,0,0,0,0,'Waypoint Movement'),
(1,0,25,1,0,50000,5,0,0,0,0,0,0,0,0,0,'Run'),
(2,0,20,1,0,50000,5,0,0,0,0,0,0,0,0,0,'Random Movement');

just replaced the x,y,z,o stuff with x its not importand

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use