npc command problem. help plz.

Desolation Mir2 (Med Rate Server)

Far

tinmymouthpl0x
Staff member
Administrator
May 19, 2003
20,709
35
3,357
520
iv got this script. only part of it...

Code:
#SAY
<Please input your chip amount/@@throw1to6>\
<Back/@main>\

[@@throw1to6]
#IF
#ACT
MOV A1 %INPUTSTR
#SAY
Now please enter the number you would like\
to bet on.\\

<Please input your chosen Number/@@chips1to6>\

[@@chips1to6]
#IF
Check GambleChip %A1
#ACT
MOV A2 %INPUTSTR
#SAY
When you are ready to gamble, throw the dice\\

<Roll the Dice/@roll1to6>\
#ELSESAY
You havnt got that many chips to gamble!

the problem im having is, when its meant to check how many chips i have, it doesnt.

you input how many chips you wanna gamble, then it checks that you have them. but even if u dont, it carrys on.
 

Far

tinmymouthpl0x
Staff member
Administrator
May 19, 2003
20,709
35
3,357
520
u mean switch

#ACT and #SAY around?

cant do that, otherwise the npc wont work properly.

the #ACT needs to come before #SAY
 

DayWalker™

Golden Oldie
Golden Oldie
Dec 11, 2004
761
1
103
Middlesbrough ! Smoggy!
[@@chips1to6]
#IF
Check GambleChip %A1
#ACT
MOV A2 %INPUTSTR
#SAY
When you are ready to gamble, throw the dice\\

<Roll the Dice/@roll1to6>\
#ELSESAY
You havnt got that many chips to gamble!

Change this to :

[@@chips1to6]
#IF
check gamblechip %A1
#SAY
Picks up dice!\ \

<Ready/@@chips1to6_a>\
#ELSESAY
No gamble chips..\

[@@chips1to6_a]
#ACT
MOV A2 %INPUTSTR
#SAY
When you are ready to gamble, throw the dice\\

<Roll the Dice/@roll1to6>\
 

Far

tinmymouthpl0x
Staff member
Administrator
May 19, 2003
20,709
35
3,357
520
ok cheers. i did think of that after what u said lol, will try in an hour. stupid lectures again now.
 

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,401
36
275
Germany
o-O

[@@chips1to6]
#IF
Check GambleChip %A1
#ACT
MOV A2 %INPUTSTR
#SAY
When you are ready to gamble, throw the dice\\

<Roll the Dice/@roll1to6>\
#ELSESAY
You havnt got that many chips to gamble!


[@@chips1to6]
#ACT
MOV A2 %INPUTSTR
#IF
Check GambleChip %A1
#SAY
When you are ready to gamble, throw the dice\\

<Roll the Dice/@roll1to6>\
#ELSESAY
You havnt got that many chips to gamble!

better !!

and Check GambleChip %A1 ??? you check the GambleChip (Number) with a String Variable ?? A* = String D,N,P, = Number (P = Local) D,N = Global
you can Tranform the given String with %D1
 

Far

tinmymouthpl0x
Staff member
Administrator
May 19, 2003
20,709
35
3,357
520
how to i transform?

mov A1 %P1?

tbh i didnt think it mattered what variable letter and number u used.
 

Far

tinmymouthpl0x
Staff member
Administrator
May 19, 2003
20,709
35
3,357
520
the reason why its not working is because this is coming up in my cd.exe

17:28:36:Script error at #IF: "Check GambleChip %A1" line:37 : c:\Mud3C\Envir\Market_Def\GinkoVillage\Ginko_General-02.txt

no matter where i put it n the script.

any ideas on why its saying that?
 

Far

tinmymouthpl0x
Staff member
Administrator
May 19, 2003
20,709
35
3,357
520
lol. im v suprised you didnt notice this coly or stan. the script was fine.

i just used Check, instead of Checkitem.

pft. im still thinking the m2 way after 2 years.