lotto npc

Play Now

azzi

Golden Oldie
Golden Oldie
Aug 16, 2005
1,662
19
175
well i had it working before. But i cant remember how i did it. Will try and find my other script.
 
Upvote 0

TheBoss

Golden Oldie
Golden Oldie
Sep 6, 2004
1,810
6
175
Middlesbrough
Just add an
Code:
#ACT
TAKE LotteryTicket 1
If you want the script to take a ticket from your bag?


Yeah , i want it to take the ticket then give me a random prize or give me nothing.

edit

[@lotteryyes1]
#IF
CHECK LotteryTicket 1
RANDOM 35000
#ACT
TAKE LotteryTicket 1
SENDMSG 6 "Congrats <$USERNAME>, you won a ClearRing from Lottery!"
goto @main
#ELSEACT
goto @lotteryno

Dunno if this is right or not but ive added Take LotteryTicket 1 and it still does the same :-/
 
Last edited:
Upvote 0

JealY

LOMCN VIP
VIP
Nov 28, 2004
5,357
55
335
England
Code:
[@lotteryyes1]
#IF
RANDOM 35000
#ACT
TAKE LotteryTicket 1
SENDMSG 6 "Congrats <$USERNAME>, you won a ClearRing from Lottery!"
GIVE ClearRing 1
#ELSEACT
SENDMSG 6 "Sorry <$USERNAME>, you didn't win Lottery today!"
 
Upvote 0

TheBoss

Golden Oldie
Golden Oldie
Sep 6, 2004
1,810
6
175
Middlesbrough
Code:
[@lotteryyes1]
#IF
RANDOM 35000
#ACT
TAKE LotteryTicket 1
SENDMSG 6 "Congrats <$USERNAME>, you won a ClearRing from Lottery!"
GIVE ClearRing 1
#ELSEACT
SENDMSG 6 "Sorry <$USERNAME>, you didn't win Lottery today!"


I'll give this a try now .. Thanks
 
Upvote 0

JealY

LOMCN VIP
VIP
Nov 28, 2004
5,357
55
335
England
Holy Crap, EDITED!

Just realised why it wouldn't work... Gosh I feel stupid...

Code:
#IF
RANDOM 35000
#ACT
TAKE LotteryTicket 1
SENDMSG 6 "Congrats <$USERNAME>, you won a ClearRing from Lottery!"
GIVE ClearRing 1
#ELSEACT
SENDMSG 6 "Sorry <$USERNAME>, you didn't win Lottery today!"

This would ONLY take the lottery ticket when you win...

Just add a TAKE to ELSEACT;

Code:
#IF
RANDOM 35000
#ACT
TAKE LotteryTicket 1
SENDMSG 6 "Congrats <$USERNAME>, you won a ClearRing from Lottery!"
GIVE ClearRing 1
#ELSEACT
TAKE LotteryTicket 1
SENDMSG 6 "Sorry <$USERNAME>, you didn't win Lottery today!"


-----------------------------------------------------------MERGE-------------------------------------------------------------

You could use Qfunction, change the STDMODE of your lottery ticket to 31, then in your QFunction, add this;

Code:
[@StdModeFunc20]
#IF
RANDOM [COLOR=Red]<<<Chance>>>[/COLOR]
#ACT
TAKE LotteryTicket 1
SENDMSG 6 "Congrats <$USERNAME>, you won a [COLOR=Blue]<<<Item>>>[/COLOR] from Lottery!"
GIVE [COLOR=Blue]<<<Item>>>[/COLOR] 1
#ELSEACT
TAKE LotteryTicket 1
SENDMSG 6 "Sorry <$USERNAME>, you didn't win Lottery today!"

Change <<<Item>>> to whatever item you want them to win.
Change <<<Chance>> to the chance you want it to be for them to win.

Then just do more for different items to win, like this;

Code:
[@StdModeFunc20]
#IF
RANDOM [COLOR="Red"]<<<Chance1>>>[/COLOR]
#ACT
TAKE LotteryTicket 1
SENDMSG 6 "Congrats <$USERNAME>, you won a [COLOR="Blue"]<<<Item1>>>[/COLOR] from Lottery!"
GIVE [COLOR="Blue"]<<<Item1>>>[/COLOR] 1
#ELSEACT
TAKE LotteryTicket 1
SENDMSG 6 "Sorry <$USERNAME>, you didn't win Lottery today!"
#IF
RANDOM [COLOR="Red"]<<<Chance2>>>[/COLOR]
#ACT
TAKE LotteryTicket 1
SENDMSG 6 "Congrats <$USERNAME>, you won a [COLOR="Blue"]<<<Item2>>>[/COLOR] from Lottery!"
GIVE [COLOR="Blue"]<<<Item2>>>[/COLOR] 1
#ELSEACT
TAKE LotteryTicket 1
SENDMSG 6 "Sorry <$USERNAME>, you didn't win Lottery today!"
#IF
RANDOM [COLOR="Red"]<<<Chance3>>>[/COLOR]
#ACT
TAKE LotteryTicket 1
SENDMSG 6 "Congrats <$USERNAME>, you won a [COLOR="Blue"]<<<Item3>>>[/COLOR] from Lottery!"
GIVE [COLOR="Blue"]<<<Item3>>>[/COLOR] 1
#ELSEACT
TAKE LotteryTicket 1
SENDMSG 6 "Sorry <$USERNAME>, you didn't win Lottery today!"
 
Last edited:
Upvote 0

JealY

LOMCN VIP
VIP
Nov 28, 2004
5,357
55
335
England
Not if you use STDMODE 31 and that script inside your QFunction.

It will automatically call up that script when you double click the item.

But change the Function of the item to whatever is in the [@StdModeFunc#]

The example I used is: [@StdModeFunc20].

So your lottery Ticket would be: STDMODE 31, Function 20.
 
Upvote 0