Can some check this npc plz

Play Now

lizen

Dedicated Member
Dedicated Member
Feb 5, 2010
11
0
27
ok decided to try and start a old 1.4server but I suck at this kinda stuff, so I've tryed to make my first NPC and guess wht... it doesn't work :p

the error i'm getting is Merchant Initalize fail... (m.PEnvir=nil) Petguy

would be greatful if any1 can let me know where i've gone wrong

[@main]
Hey\
Welcome to EvilEra Server\
To save you wizzy's so time\
I will grant you your pets\
however you tao's and warr's can\
get the **** out!\

<Yes I'm a wizard/@next> <Crazy man/@exit>

[@next]
#IF
checkjob wizard
#ACT
goto @pet
#SAY
I see you have the magic touch just like ya ma
#ELSEACT
goto @exit


[@pet]
#SAY
What pet would you like?\
<Oma/@p1> <Omafighter/@p2>\
<OmaWarrior/@p3> <BlackMaggot/p4>\
<Tongs/@p5> <WedgeMoth/@p6>\
<VenomSpider/@p7>\<EvilTongs/@p8>\

[@p1]
#SAY
These arn't to good but its a start\
Are you sure you want these?\
<Ok/@ok1> <Hmm, No ty/@exit>

[@ok1]
#IF
checklevel > 5
#ACT
recallmob Oma 5 1
#SAY
Have fun
#ELSESAY
I dont think your quite strong enough to handle these\\

[@p2]
#SAY
Wow think your ready for a new pet already?\
These monsters are real fighter and alot\
Stronger
<Dam right!/@ok2> <Think I just soiled myself nvm/@exit>

[@ok2]
#IF
checklevel > 14
#ACT
recallmob Omafighter 5 1
#SAY
Have fun
#ELSESAY
I dont think your quite strong enough to handle these\\

[@p3]
#SAY
Im starting to trust you but do I think your ready\
for the next step.\
<Trust me I am/@ok3> <Wtf have you been smoking?/@exit>

[@ok3]
#IF
checklevel > 20
#ACT
recallmob Omawarrior 5 1
#SAY
Have fun
#ELSESAY
Umm I guess I was wrong about you\\

[@p4]
#SAY
Your at this point already?\
<of course/@ok4> <maybe not/@exit>

[@ok4]
#IF
checklevel > 24
#ACT
recallmob BlackMaggot 5 1
#SAY
Have fun
#ELSESAY
I lied your not even close\\

[@p5]
#SAY
I must admin I really like these\
<same/@ok4> <They look crap/@exit>

[@ok5]
#IF
checklevel > 28
#ACT
recallmob Tongs 5 1
#SAY
Have fun
#ELSESAY
Well I dont think they like you\\

[@p6]
#SAY
These should bug some people
<BRILL!/@ok6> <I dont like pissing off people/@exit>

[@ok6]
#IF
checklevel > 31
#ACT
recallmob WedgeMoth 5 1
#SAY
Careful
#ELSESAY
I dont trust your with these stoners\\

[@p7]
#SAY
The things of nightmares
<Im not scared/@ok7> <eek!/@exit>

[@ok7]
#IF
checklevel 35
#ACT
recallmob VenomSpider 5 1
#SAY
Careful
#ELSESAY
These will turn and kill you at the first chance\
sorry but I cant allow you to take these\\

[@p8]
#SAY
Think your the best?
<Dam right/@ok8> <working on it but not quite there/@exit>

[@ok8]
#IF
checklevel 38
CHECKSLAVECOUNT < 2
#ACT
recallmob EvilTongs 1 0
#SAY
Enjoy it doesnt get any better than this
#ELSESAY
These are only for the best wizards\\
 
Last edited:

Chris22

LOMCN Veteran
Veteran
Jun 10, 2009
372
1
45
If the error was with the script it just wouldnt work, your wouldnt get any errors.

Make sure you have the npc in sql in the npc table, and the script in npc.def.

Or merchant in sql and script in merchant.def.

If you have your npc in merchant table, and the script in npc.def, you will likely get a error like:

Merchant Initalize fail... (m.PEnvir=nil) Petguy

:lol:
 
Last edited:
Upvote 0

Praktica

Dedicated Member
Dedicated Member
Jun 16, 2009
240
1
45
England
Normal NPC's go in NPC_Def folder (these are for scripts WITHOUT windows opening like storage or buying pots)

Merchant NPC's go in Market_Def folder (these are scripts WITH windows opening e.g to buy and sell or store accessories)

So when you add a "Normal NPC" to your database, you would add it in the NPC Table.

When you add a "Merchant NPC" to your database, you would add it in the MERCHANT Table.


NPC Must have a mapname on the end
E.G

PetGuy-0 (0 being bichonwall)
then in your map database
it should say:

FileName..Map...X...Y..Enabled
PetGuy....0.....10.10..1

And so on.
(X + Y) meaning the coordinates of where you want to place the NPC on Z (Z being the map which is 0)

Hope this helps.
 
Last edited:
Upvote 0

Chris22

LOMCN Veteran
Veteran
Jun 10, 2009
372
1
45
http://img706.imageshack.us/img706/9149/npcerror.png

The npc i saved in C:\mirserver\Mir200\Envir\market_def

and i've inc'd in in the merchant.txt. any idea's where i've gone wrong here? Sorry but i suck at this :(

Ok i know whats wrong....

On your "pet01" file, you need to select the map that it relates to, its the way the server works out which map uses which script, you need to add a dash so it reads "pet01-0", this means that this is the script for pet01 on map 0.
:thumbup2:
 
Upvote 0

Bon

Legend
Legendary
Jul 29, 2004
6,741
342
330
Kent, UK
Merchant Initalize fail... (m.PEnvir=nil) Petguy

means it cant load...... the coords are coords that the NPC cant go at

eg ur tryin to put it in the mountains or something

go check its coords








script error means that command uve tried to use is no such command, like the spellin is wrong, or there just isnt such a command.....
 
Upvote 0

lizen

Dedicated Member
Dedicated Member
Feb 5, 2010
11
0
27
@recallmob (name) (amount) (level) works on the my GM character. its been many years since i've played private mir server but I'm sure the one's I used to play had Pet npc's.
 
Upvote 0

Chris22

LOMCN Veteran
Veteran
Jun 10, 2009
372
1
45
@recallmob (name) (amount) (level) works on the my GM character. its been many years since i've played private mir server but I'm sure the one's I used to play had Pet npc's.

My advice is ditch 1.4 and make a 2.3 :thumbup2:
 
Upvote 0