Lottery Npcs Help

Play Now

Prai

Most Importantest
VIP
Sep 10, 2004
2,616
68
275
Looking for a npc, That is like lottorey, Purchase a ticket but it gives random items out instead of cash.

Any help.
 

Jeff

Dedicated Member
Dedicated Member
Nov 23, 2003
142
0
43
Farnham, Surrey
u mean you want to double click on it and make it give items ?

1 idea is to make the ticket bought that u talk to npc who exchanges it for a random prize.
 
Upvote 0

transporter

LOMCN Veteran
Veteran
Jul 12, 2008
608
8
105
Darlington
Whatever, i just want the npc ><

You could do it useing random command.

Code:
[@Main]
The lotto offers you a wide range of prizes, prizes varie from,\
(HP)Drugs to rare items or even EXP.\
You chances of winning a rare item is obviously rare, but you\
Never know, it could be you!!!\
Do you want to play the lottery?\
<Yes/@Lotto1>\
<No Thanks/@Exit>\
<Close/@Exit>\


[@Lotto1]
To play the lottery its 2 Million Gold per go\
Are you sure you want to play?\
<Yes/@Lotto2>\
<No/@Main>\
<Close/@exit>\

[@lotto2]
#IF
CHECKGOLD 2000000
#ACT
GOTO @Lotto3
#ELSEACT
GOTO @NO2Mill

[@NO2Mill]
You do not have 2 million gold to play!\  \  \
<Close/@exit>\

[@lotto3]
#ACT
TAKE GOLD 2000000
GOTO @Lotto4
#ELSEACT
GOTO @NO2Mill\ \ \

[@Lotto4]
#IF
RANDOM 50000
#ACT
GOTO @?????
BREAK
#IF
RANDOM 50000
#ACT
GOTO @?????
BREAK
#IF
RANDOM 50000
#ACT
GOTO @?????
BREAK
#IF
RANDOM 10000
#ACT
GOTO @?????
BREAK
#IF
RANDOM 500
#ACT
GOTO @?????
BREAK
#IF
RANDOM 500
#ACT
GOTO @?????
BREAK
#IF
RANDOM 500
#ACT
GOTO @?????
BREAK
RANDOM 50
#ACT
GOTO @?????
BREAK
#IF
RANDOM 50
#ACT
GOTO @?????
[B]RANDOM 5
#ACT
GOTO @(HP)DrugBundleXL
BREAK[/B]
#IF
RANDOM 1
#ACT
GOTO @?????
#ELSESAY
Congratulations <$USERNAME> \ \
<Play again/@Lotto1>\
<Exit/@exit>

[@(HP)DrugBundleXL]
#ACT
sendmsg 6 "<$USERNAME> You Won a (HP)DrugBundleXL on the lottery."
Give (HP)DrugBundleXL 1
Close
The more higher the Random number the less chance of the NPC selecting it.

This has just took 5 minutes to do, gives you the idea though...
/JayZ
 
Last edited:
Upvote 0

Painkiller

LOMCN Veteran
Veteran
Loyal Member
Feb 11, 2006
316
2
45
will use that, will tke ages to type out but good enough hehe , ty



does


random 5000


mean 1/5000 chance of getting?
 
Last edited:
Upvote 0

transporter

LOMCN Veteran
Veteran
Jul 12, 2008
608
8
105
Darlington
will use that, will tke ages to type out but good enough hehe , ty



does


random 5000


mean 1/5000 chance of getting?

i think it means that aye, means a 5000/1 chance of the NPC selecting that or something like that anyway.. Seems to work fine on my server.
There is a way of doing it useing variables but that i just cba with lol...

Just make sure you give it a good testing before you add to your server so you get an idea of the odds.
 
Last edited:
Upvote 0