Code npc

Play Now

T0MMY

LOMCN Veteran
Veteran
Aug 5, 2007
2,153
24
125
United Kingdom
Hi i am just wondering how to write an npc, where you have to enter the right code to receive something e.g. enter 455 and you get a free wooden sword.
 

mapadale

Guest
What sort of thing are you looking for, as you need to give more details.

Cause you can do it where that number gives the same thing out each time, or set it so that its random numbers for random things and so forth.
 
Upvote 0

T0MMY

LOMCN Veteran
Veteran
Aug 5, 2007
2,153
24
125
United Kingdom
Right i'll start it:

Code:
[@main]
#SAY
Hello,\
Do you want to play my game?\ \

<Yes/@main-1>\ 
<No/@exit>\

[@main-1]
#SAY
Enter the secret code to receive a prize.\ \


<[1]/@m-1> , <[2]/@m-2> , <[3]/@m-3> , <[4]/@m-4>\

I want it so if you click 4 then 4 then 3 it will give you a prize.

Nice detailed description.
 
Upvote 0

iJam

To the rhythm
VIP
Oct 8, 2007
1,526
105
240
London
Code:
[@main]
#SAY
Hello,\
Do you want to play my game?\ \
 
<Yes/@main-1>\ 
<No/@exit>\
 
[@main-1]
#SAY
Enter the secret code to receive a prize.\ \
 
 <[1]/@m-1> , <[2]/@m-2> , <[3]/@m-3> , <[4]/@m-4>\
 
[@m-4]
#SAY
Nice one you got the first number, now please enter the second number\ \

<[1]/@m-1> , <[2]/@m-2> , <[3]/@m-3> , <[4]/@m-42>\
 
[@m-42]
#SAY
Nice one you got the Second number, now please enter the third number\ \
 
<[1]/@m-1> , <[2]/@m-2> , <[3]/@m-32> , <[4]/@m-40>\
 
[@m-32]
#SAY
Grats you got all the numbers correct\
please choose your prise\ \
 
<WoodenSword/@sword>\
 
 
[@sword]
#SAY
Here you go
#ACT
Give WoodenSword 1
close
 
 
 
[@m-1]
#SAY
Sorry Try again\ \
<Back/@main-1>\
 
[@m-2]
#SAY
Sorry Try again\ \
<Back/@main-1>\

[@m-3]
#SAY
Sorry Try again\ \
<Back/@main-1>\

[@m-40]
#SAY
Sorry Try again\ \
<Back/@main-1>\


Shud work
 
Last edited:
Upvote 0

JealY

LOMCN VIP
VIP
Nov 28, 2004
5,357
55
335
England
This is a bit silly as it can be re-done over and over, you can't lose.

Maybe making it a one-time script would help.

A hacker would be all over a script like that in the old days, your floor would be full (and I mean full) of woodenswords before you can say "WTF QUIT IT YOU STUPID ROMANIAN"




Disclaimer: I have nothing against romanians, that just happened to be the nationality of the fuckers that kept hacking my server back in the day...
 
Upvote 0