Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

NPC-Positon and MobRoam-Creater

Initiate Mage
Joined
Jul 29, 2018
Messages
3
Reaction score
5
Hi @all

i created a small Lua Script which can be used to get the Perfect Positon and Rotation for an NPC. it also can be used to safe locations for a MobRoam-Script.

To use the Script on your Server u are Adding an NPC with the Index "LocationNPC" and add the .lua file in your .../LuaScript/AIScript - Folder.

Before u can use the NPC u need to mobbreed it on the Map if want to set an NPC or create a MobRoam. The Script itself gets triggerd by Chatcommands.

To set the Position of an NPC u are going to the Position where the NPC should stand finally and type the Index of your NPC with a ";" at the end. After that u should walk a few steps away of the positon. Otherwise the Script wont Spwan the NPC at the correct place.

To find the perfect rotation for your NPC just type Numbers between -360 and 360 into the chat. The NPC will get despawned and Spwaned with the rotation u choosed.

To make sure that all Informations got safed u can use "test" to despawn the NPC and Spawn a New One with the safe location and rotation.

With the command "Assert" ur adding a special line into the AssertLog of the Zone you are on.
Which will look like:
AssertClass::ac_AssertFail : [#recordin|ShineNPC|BuffNPC|Rou|5418|9297|0|1|QuestNpc|-]
The part between "[" and "]" can now be coppied into the NPC.txt to add the NPC.
Remeber that you need to change "|" to tab.

For a MobRoaming script you just can type "here" into the Chat to safe your current location.
If you save more than one point the script will Spawn Healer Julia for all Points you are safeing, to show which positions got safed till now.
You can delete all "Julias" and all Safed Information with "Reset".

To get your Informations into the AssertLog just type "AssertRoam"
The result will look like:

AssertClass::ac_AssertFail : [#record|0|10942|5195|-$#record|1|10982|6470|-$#record|2|10916|7849|-$#record|3|11029|9183|-$#record|4|10458|10249|-$#record|5|9617|10730|-$#record|6|8677|11123|-$#record|7|7985|11346|-$#record|8|7238|11105|-$#record|9|6359|10997|-$#record|10|5352|11037|-$#record|11|4285|10880|-$#record|12|3128|10289|-$#record|13|2334|9409|-$#record|14|2186|8293|-$#record|15|2067|7208|-$#record|16|2100|6084|-$#record|17|2244|4614|-$#record|18|2757|3758|-$#record|19|3613|3184|-$#record|20|4545|2658|-$#record|21|5694|2253|-$#record|22|7085|2350|-$#record|23|8070|2421|-$#record|24|9131|2674|-$#record|25|9796|3372|-$#record|26|10170|4010|-$#record|27|0|0|return]

Now you can replace "|" with tab and "$" with Enter to get the Important part of the MobRaomscript finished.
If you have some Questions about the Script just let me know.
 

Attachments

You must be registered for see attachments list
Experienced Elementalist
Joined
Aug 12, 2012
Messages
201
Reaction score
35
You can always consider ur map as a 360 degree rotation. Starting from the bottom center is ur 0 degree, 90 degree will be left center, and continue adding 90's until u go back to 0. Thats how i'd used to get the rotation of the NPC, and its never wrong. But goodjob
 
Initiate Mage
Joined
Jul 29, 2018
Messages
3
Reaction score
5
Nice work
Thanks :)
You can always consider ur map as a 360 degree rotation. Starting from the bottom center is ur 0 degree, 90 degree will be left center, and continue adding 90's until u go back to 0. Thats how i'd used to get the rotation of the NPC, and its never wrong. But goodjob

Jeah i knew that. But i was annoyed by allways restarting the Zones to find the perfect Rotation for an NPC, so i tryed to find a way to set them without restarting Zones everytime to check the Rotation. And there are even way more possible options to use the script than these two which are shown here :D
 
Back
Top