Npc script

Join Discord

stonecold316

Dedicated Member
Dedicated Member
Nov 2, 2009
657
55
115
Hey Guys ,

I am messing about making a server , but my question is this please ,

Everytime i put more than 1 npc on a map ( lets say bw for instance ) the script that i put on 1 npc seems to appear on all of them , and then if i try changing 1 script on 1 of them , it automatically appears on all of them , any idea why this is happening ? or is there an easy way to fix this issue , all the npcs have different coords and all have different names , but its frying my head lol any help would be appreciated :)

thanks
 

Valhalla

Nexus Mir Developer
Veteran
Sep 7, 2012
1,952
3
452
150
127.0.0.1
Sounds like you have the same NPC script on all of them, possibly got NPC name and File name mixed up?

can u post a screenshot of your NPC database form?
 

stonecold316

Dedicated Member
Dedicated Member
Nov 2, 2009
657
55
115
Ahh damn lol , when i created each npc i put the same script on every single one , so they would at least be clickable in game , so i could then go back and redo the scripts on each of them , reason being if i had just left the npc empty then a error would appear on the Npc Database , should i just delete the npcs and restart them ?

This is the script i put on all the npcs
[@MAIN]
#SAY
Hello <$USERNAME>.
<Transport to Bichon/@bichon>

[@BICHON]
#ACT
MOVE 0 300 300
TAKEGOLD 500

Then i could just go back and alter them as i do each cave

Also whjen i go to 1 npc on the map and delete the script it also deletes all other npc scripts :(
 

Hurricane

LOM2
Loyal Member
Oct 25, 2018
245
1
93
40
make sure you not have same name on Npc filename, should be different names on there.
 

Valhalla

Nexus Mir Developer
Veteran
Sep 7, 2012
1,952
3
452
150
127.0.0.1
Ahh damn lol , when i created each npc i put the same script on every single one , so they would at least be clickable in game , so i could then go back and redo the scripts on each of them , reason being if i had just left the npc empty then a error would appear on the Npc Database , should i just delete the npcs and restart them ?

This is the script i put on all the npcs
[@MAIN]
#SAY
Hello <$USERNAME>.
<Transport to Bichon/@bichon>

[@BICHON]
#ACT
MOVE 0 300 300
TAKEGOLD 500

Then i could just go back and alter them as i do each cave

Also whjen i go to 1 npc on the map and delete the script it also deletes all other npc scripts :(

Thats why every NPC is showing the same dialog... they are all reading from the same script file.

Every NPC needs its own script text file, other wise they'll read the same one. (Unless you want 2 NPC's to be the same, potion shops for example)
 

stonecold316

Dedicated Member
Dedicated Member
Nov 2, 2009
657
55
115
Oh ok , will delete all the npc's that have the same script on then and recreate them 1 at a time :) ty
Post automatically merged:

make sure you not have same name on Npc filename, should be different names on there.
in the npc filename section is where i put the names of the map they are on , how do i put different names in ofr lets say if i have 5 npcs on 1 map ? :)
 

Hurricane

LOM2
Loyal Member
Oct 25, 2018
245
1
93
40
Oh ok , will delete all the npc's that have the same script on then and recreate them 1 at a time :) ty
Post automatically merged:


in the npc filename section is where i put the names of the map they are on , how do i put different names in ofr lets say if i have 5 npcs on 1 map ? :)
in npc filename if you put "BichonWall" for all npc that means they all will read one NPC script on BW script, so you need different name such as "BWpots" "BWweapon" on NPC filename section not the map name to have separate npc scripts.
 
  • Like
Reactions: stonecold316

stonecold316

Dedicated Member
Dedicated Member
Nov 2, 2009
657
55
115
in npc filename if you put "BichonWall" for all npc that means they all will read one NPC script on BW script, so you need different name such as "BWpots" "BWweapon" on NPC filename section not the map name to have separate npc scripts.
Awesome ty , will go do that :)