npc script command wont work correctly

Mike_BE

Dedicated Member
Dedicated Member
Aug 1, 2008
34
0
52
this is part of the script where it go's wrong.
The command CHECKSLAVENAME Oma 5 isnt working, normally it would check if the player has 5 oma pets. if the player has 5 oma should goto @givemewhitenow, if not should say Come back to me when blablabla...

Code:
[@givemewhite]
#IF 
CHECKSLAVENAME Oma 5
#ACT
GOTO @givemewhitenow
#ELSESAY
Come back to me when you have 5 tamed oma pet's\
 

NeOn

Golden Oldie
Golden Oldie
Aug 12, 2003
845
0
173
Chatsworth Estate, Manchester
this is part of the script where it go's wrong.
The command CHECKSLAVENAME Oma 5 isnt working, normally it would check if the player has 5 oma pets. if the player has 5 oma should goto @givemewhitenow, if not should say Come back to me when blablabla...

Code:
[@givemewhite]
#IF 
CHECKSLAVENAME Oma 5
#ACT
GOTO @givemewhitenow
#ELSESAY
Come back to me when you have 5 tamed oma pet's\

try it without the name

CHECKSLAVE Oma 5
 
Upvote 0

Mike_BE

Dedicated Member
Dedicated Member
Aug 1, 2008
34
0
52
try it without the name

CHECKSLAVE Oma 5

gives me an error in m2 server:

Code:
[3-2-2009 19:51:43] Quest problem: CHECKSLAVE Oma 5 Row:34 Filename: .\Envir\Npc_def\PetLicense-1Garden.txt

btw i use the server files that come in mStation's server setup guide.
 
Last edited:
Upvote 0

Viper

LOMCN Veteran
Veteran
Feb 14, 2007
519
1
125
Newcastle
this is part of the script where it go's wrong.
The command CHECKSLAVENAME Oma 5 isnt working, normally it would check if the player has 5 oma pets. if the player has 5 oma should goto @givemewhitenow, if not should say Come back to me when blablabla...

Code:
[@givemewhite]
#IF 
CHECKSLAVENAME Oma [COLOR=Red]=[/COLOR] 5
#ACT
GOTO @givemewhitenow
#ELSESAY
Come back to me when you have 5 tamed oma pet's\

try that m8.
 
Upvote 0

RalosZek

Dedicated Member
Dedicated Member
Aug 6, 2008
50
0
53
Germany
Example script:

Code:
[@main]
#IF
CHECKSLAVENAME Oma = 5
#SAY
Well done you have 5 omas.
#ELSESAY
You don't have 5 omas!
[COLOR=Red][B]
The npc will only work if you have 5 omas[/B][/COLOR]
 
Upvote 0

Viper

LOMCN Veteran
Veteran
Feb 14, 2007
519
1
125
Newcastle
Example script:

Code:
[@main]
#IF
CHECKSLAVENAME Oma = 5
#SAY
Well done you have 5 omas.
#ELSESAY
You don't have 5 omas!
[COLOR=Red][B]
The npc will only work if you have 5 omas[/B][/COLOR]

yea i already answered that..

@grinch

if it dont work you have a script error, post yours and we'll see
 
Upvote 0

Grinch

Dedicated Member
Dedicated Member
Dec 30, 2008
115
0
43
U dont understand me , i made 1 scrip something like this :

[@main]
#IF
CHECKSLAVENAME Oma = 1
#say
U have 1 Oma!\
<OK/@exit>
#elseact
goto @main-1

[@main-1]
#IF
CHECKSLAVENAME Oma = 2
#say
U have 2 Oma!\
<OK/@exit>
#elseact
goto @main-2 .....
.
.
.
[@main-5]
#IF
CHECKSLAVENAME Oma = 5
#say
U have 5 Oma!\
<OK/@exit>
#elsesay
U dont have any Oma pet.\


I make it like this , other script to tell you how nr of mobs are, for testing... but if i have a OMA pet with me, dont say to me how pet i have.

And say to me : U dont have any Oma pet\

So dont read the nr. of pet.
 
Last edited:
Upvote 0

JealY

LOMCN VIP
VIP
Nov 28, 2004
5,354
52
305
England
Code:
#elseact 
goto @main-2   .....
.
.
.
[@main-5]

It's trying to goto @main-2 whereas it's actually @main-5.

Also, this should work, not 100% sure though

Code:
[@main]
#IF
CHECKSLAVENAME Oma = 1
#SAY
U have 1 Oma!\
<OK/@exit>
#IF
CHECKSLAVENAME Oma = 2
#SAY
U have 2 Oma!\
<OK/@exit>
#IF
CHECKSLAVENAME Oma = 5
#SAY
U have 5 Oma!\
<OK/@exit>

If it doesn't work try ELSEIF's after the first IF
 
Upvote 0

Grinch

Dedicated Member
Dedicated Member
Dec 30, 2008
115
0
43
Not the script is the problem, i write an example there , to show you this line dont work,

checkslavename oma = x

And the checkslavelevel the same.
 
Last edited:
Upvote 0

Mike_BE

Dedicated Member
Dedicated Member
Aug 1, 2008
34
0
52
Got it working now. here's the script.

Code:
[@main] 
#IF
CHECKNAMELIST whitelicense.txt
#ACT
GOTO @alrdy
#ELSESAY
Come back to me when you have 5 tamed oma pet's.\
Go to OmaCave. Im sure there will be plenty there.\
<Give me my license!/@givemewhite> <Ok il get them./@exit>\

[@givemewhite]
#IF 
CHECKSLAVENAME Oma = 5
#ACT
GOTO @givemewhitenow
#ELSESAY
Come back to me when you have 5 tamed oma pet's\

[@givemewhitenow]
#ACT
ADDNAMELIST whitelicense.txt
#SAY
Congratulations you have received the white license!!\
Now go to the PetRenter with your license.\
<Okay. Cya later/@exit>
 
Upvote 0

Viper

LOMCN Veteran
Veteran
Feb 14, 2007
519
1
125
Newcastle
[@main]
#IF
CHECKSLAVENAME Oma = 1
#ACT
#say
U have 1 Oma!\
<OK/@exit>
#elseact
goto @main-1

[@main-1]
#IF
CHECKSLAVENAME Oma = 2
#ACT
#say
U have 2 Oma!\
<OK/@exit>
#elseact
goto @main-5

[@main-5]
#IF
CHECKSLAVENAME Oma = 5
#ACT
#say
U have 5 Oma!\
<OK/@exit>
#elsesay
U dont have any Oma pet.\

There, Cant see a problem with that..
 
Upvote 0

Grinch

Dedicated Member
Dedicated Member
Dec 30, 2008
115
0
43
U dont understand nothing, no the script are the problem, I make this kind of script from 8 years, are very simple , but this 2 line CHECKSLAVENAME & CHECKSLAVELEVEL DONT work like this, ...you see up!

Work only type :
CHECKSLAVECOUNT

Not how is the script, i know very well to make scripts are very simple...
but this 2 dont work for me...

And @viper

!!! Dont need there and line #ACT if u dont have nothing else to put there!!!!!!!!
 
Upvote 0

Viper

LOMCN Veteran
Veteran
Feb 14, 2007
519
1
125
Newcastle
U dont understand nothing, no the script are the problem, I make this kind of script from 8 years, are very simple , but this 2 line CHECKSLAVENAME & CHECKSLAVELEVEL DONT work like this, ...you see up!

Work only type :
CHECKSLAVECOUNT

Not how is the script, i know very well to make scripts are very simple...
but this 2 dont work for me...

And @viper

!!! Dont need there and line #ACT if u dont have nothing else to put there!!!!!!!!

yeah i no tht, dont really matter as its not going to stop the script working. uv not said what files your using for a start, each have different commands and checks.
 
Upvote 0

Grinch

Dedicated Member
Dedicated Member
Dec 30, 2008
115
0
43
Dont work in any version I have make it MIR2 LEDU 1.9 and on other laptop i have 2.3 version and the same make this error.... All the server files work just fine , without any errors. Im interested to work just fine in 1.9 Ledu coz i dont like 2.3(Work improper and i dont like).
 
Last edited:
Upvote 0