Page 1 of 2
A few random Questions
PostPosted: Tue Jun 09, 2009 12:59 am
by Elycian
I've slowly been making some progress in understanding the world of DOL, mostly just using other people's scripts and ideas and searching stuff in the forums.
But there have been a few things that have been bothering me.
1.Why is it that normal npc's that are supposed to stay put just kind of walk through walls? O.o Is it because of the server properties where all mobs are allowed to roam?
2. Why is it that npc's that I create with /mob have whatever color name the monster will con to me. While other npc's that were originally put into the game have a light blue name? Is there any way I can make my npc's that I create have light blue names? I know, it's small but it seems to bother me.
Also, I'm trying to learn how to give speech to different npc's. Like if I wanted to create an npc's that gave a random tid-bit of information, like - "Camelot is located to the west" in a small chat box that pops up. How would I do that? Do I need to create a different custom npc script for every mob I want to talk?
thanks :]
Re: A few random Questions
PostPosted: Tue Jun 09, 2009 1:38 am
by Tolakram
Howdy. My responses in blue.
1.Why is it that normal npc's that are supposed to stay put just kind of walk through walls? O.o Is it because of the server properties where all mobs are allowed to roam?
Yep. You can set Roaming Range to 0 to fix this, though it's possibly a bug, I'll explain below.
2. Why is it that npc's that I create with /mob have whatever color name the monster will con to me. While other npc's that were originally put into the game have a light blue name? Is there any way I can make my npc's that I create have light blue names? I know, it's small but it seems to bother me.
It's a realm issue. Realm 0 is what npc's are created as, this is the 'mob' realm. Realm 1 is Albion, 2 is Midgard, and 3 is Hibernia. /mob realm # to change it. Depending on your server rules if the npc is your realm the name will display in light blue.
Also, I'm trying to learn how to give speech to different npc's. Like if I wanted to create an npc's that gave a random tid-bit of information, like - "Camelot is located to the west" in a small chat box that pops up. How would I do that? Do I need to create a different custom npc script for every mob I want to talk?
It will most certainly require scripting, do you know how to code?
As far as Roaming Range; it used to be that random walk would only happen to realm 0 npc's, but this code changed a while ago. I think the reasoning for the change is that if you ever wanted an NPC to wander it had to be realm 0, which is not always desirable. The bottom line here is that any npc created that's not supposed to wander needs a roaming range set to 0. /mob roaming #
Re: A few random Questions
PostPosted: Tue Jun 09, 2009 4:52 am
by Elycian
Thanks Tolakram! I seem to remember you helping me out on some of my way older posts from last yearish, so thanks again for your help and the help with others posts and development!
1.Why is it that normal npc's that are supposed to stay put just kind of walk through walls? O.o Is it because of the server properties where all mobs are allowed to roam?
Looks like there's no easy way to make it so npc's can't keep walking away huh? I have to change them all myself while in-game?
2. Why is it that npc's that I create with /mob have whatever color name the monster will con to me. While other npc's that were originally put into the game have a light blue name? Is there any way I can make my npc's that I create have light blue names? I know, it's small but it seems to bother me.
Weird! I remember thinking about this a few weeks ago, but I completely forgot about it!
3. Also, I'm trying to learn how to give speech to different npc's. Like if I wanted to create an npc's that gave a random tid-bit of information, like - "Camelot is located to the west" in a small chat box that pops up. How would I do that? Do I need to create a different custom npc script for every mob I want to talk?
Not in the slightest! The only coding I've ever done was html, and that was very basic. Right now I'm just learning from observations from other scripts and examples. If you have any recommendations on how I could become better at code that would be nice :]
I imagine it's not very difficult to add simple text to the npc, I'll study other npc scripts.
Re: A few random Questions
PostPosted: Tue Jun 09, 2009 4:55 am
by DOLBot
For the roaming part, just go into server properties and set ALLOW_MOBS_TO_ROAM to false.
Re: A few random Questions
PostPosted: Tue Jun 09, 2009 5:58 am
by Elycian
For the roaming part, just go into server properties and set ALLOW_MOBS_TO_ROAM to false.
Yeah, but then all the monsters on the server that I want to move around won't be able to move? Correct?
What I was trying to achieve was to make npc's such as trainers, healers, smiths, merchants, teleporters etc.. stay in one place and not move while monsters around the game still moved.
Re: A few random Questions
PostPosted: Tue Jun 09, 2009 6:06 am
by DOLBot
Make a macro for /mob roam 0. Fixes the problem, because by default, all mobs have a roaming range of -1.
Re: A few random Questions
PostPosted: Tue Jun 09, 2009 8:06 am
by Graveen
When you are working on the datas, the best is to use SQL via a dedicated tool (mysql query browser, or heidisql).
So you can change the properties of the mobs, for long.
Ingame is quick, but is not suitable for large changes.
Considering the C#, the scripts in 'scripts' folder are examples scripts, well commented and you can rely on.
Re: A few random Questions
PostPosted: Tue Jun 09, 2009 9:24 am
by Dinberg
I imagine it's not very difficult to add simple text to the npc, I'll study other npc scripts.
Study Study Study! Check the examples folder in scripts, its pretty self-explanatory alot of the time

Re: A few random Questions
PostPosted: Tue Jun 09, 2009 9:40 am
by Roozzz
For the roaming part, just go into server properties and set ALLOW_MOBS_TO_ROAM to false.
Yeah, but then all the monsters on the server that I want to move around won't be able to move? Correct?
What I was trying to achieve was to make npc's such as trainers, healers, smiths, merchants, teleporters etc.. stay in one place and not move while monsters around the game still moved.
The easiest fix for this is opening up your database, see how your mob table is set up and run a couple of queries to set roamingrange = 0 for these npc (what would make them effectively stop roaming).
Fi, selecting all the npc's which aren't a basic game mob and have a guild name specified (which merchants, trainers etc all do afaik) would look something like this:
- Code: Select all
SELECT * FROM `mob` WHERE `ClassType` NOT LIKE '%DOL.GS.GameNPC%' AND `Guild` <> '';
I think you catch them all with this, but please check if there arent any npc in there that should be roaming. From here you can probably figure out how to set roamingrange = 0 something along the lines of:
- Code: Select all
UPDATE `mob` SET `RoamingRange`='0' WHERE `ClassType` NOT LIKE '%DOL.GS.GameNPC%' AND `Guild` <> '';
But once more,
please check before you run this last one, else it could mess up things a bit. You might have to change the requirements a little bit.
Make a macro for /mob roam 0. Fixes the problem, because by default, all mobs have a roaming range of -1.
Would work for single mobs, but have fun doing approx 3000 of them.
Re: A few random Questions
PostPosted: Tue Jun 09, 2009 9:49 am
by DOLBot
npc template ftw

Re: A few random Questions
PostPosted: Tue Jun 09, 2009 1:57 pm
by Tolakram
Alternatively
UPDATE mob SET RoamingRange=0 WHERE Realm <> 0
this will freeze all non mobs.
Do you have the MYSql GUI tools?
http://dev.mysql.com/downloads/gui-tools/5.0.html
Re: A few random Questions
PostPosted: Tue Jun 09, 2009 9:29 pm
by bluraven
For the light blue mob names, setting them to the realm of the player is not enough, you also need to set the peace flag to true. /mob peace
Re: A few random Questions
PostPosted: Tue Jun 09, 2009 10:04 pm
by DOLBot
I've never had to change the /mob peace. O.o
Re: A few random Questions
PostPosted: Wed Jun 10, 2009 5:12 am
by Elycian
Thanks for all the replies guys.
For the roaming part, just go into server properties and set ALLOW_MOBS_TO_ROAM to false.
Yeah, but then all the monsters on the server that I want to move around won't be able to move? Correct?
What I was trying to achieve was to make npc's such as trainers, healers, smiths, merchants, teleporters etc.. stay in one place and not move while monsters around the game still moved.
The easiest fix for this is opening up your database, see how your mob table is set up and run a couple of queries to set roamingrange = 0 for these npc (what would make them effectively stop roaming).
Fi, selecting all the npc's which aren't a basic game mob and have a guild name specified (which merchants, trainers etc all do afaik) would look something like this:
- Code: Select all
SELECT * FROM `mob` WHERE `ClassType` NOT LIKE '%DOL.GS.GameNPC%' AND `Guild` <> '';
I think you catch them all with this, but please check if there arent any npc in there that should be roaming. From here you can probably figure out how to set roamingrange = 0 something along the lines of:
- Code: Select all
UPDATE `mob` SET `RoamingRange`='0' WHERE `ClassType` NOT LIKE '%DOL.GS.GameNPC%' AND `Guild` <> '';
But once more,
please check before you run this last one, else it could mess up things a bit. You might have to change the requirements a little bit.
Make a macro for /mob roam 0. Fixes the problem, because by default, all mobs have a roaming range of -1.
Would work for single mobs, but have fun doing approx 3000 of them.
Thanks, this is actually what I was thinking about doing, but I didn't know how to do it. I knew there had to be a better option than making a macro and running around using it on every npc I saw ahahaha!
I was using Navicat, so I downloaded MySQL tools and it seemed more confusing at first but it also seems like you can do a lot more with MySQL tool's query browser.
I imagine it's not very difficult to add simple text to the npc, I'll study other npc scripts.
Study Study Study! Check the examples folder in scripts, its pretty self-explanatory alot of the time

Thanks, I'll keep working on it!
Re: A few random Questions
PostPosted: Wed Jun 10, 2009 5:47 am
by Elycian
Update! - I tried this and it worked like a charm
Alternatively
UPDATE mob SET RoamingRange=0 WHERE Realm <> 0