"Lotery" System

Rawwwr

Dedicated Member
Dedicated Member
Feb 27, 2010
198
1
45
Hi! :)
I want to create a npc, wich will give you a random item, if you give him a item, so... Im talking about chances, for exemple, if you give that item to the npc, there's a:
1% chance to get an item
10% chance to get an item
25% chance to get an item
50% chance to get an item
75% chance to get an item
And it will give the player, only 1 item each time
I was searching on the forum, and asking, and seems that no one knows the answer D:
Can you help me? :)
Thank you :D
 

lina

LOMCN Veteran
Veteran
Loyal Member
Jul 28, 2010
283
5
45
Poland
You can easly do that using the dice game but instead of giving money, you can give item instead. That would be a long script tho.
 
Upvote 0

Rawwwr

Dedicated Member
Dedicated Member
Feb 27, 2010
198
1
45
I checked that script, and I don't understand what may i modify to get a higher chance or lower D:
 
Upvote 0

lina

LOMCN Veteran
Veteran
Loyal Member
Jul 28, 2010
283
5
45
Poland
Repeat the script for example, if you get nr 1 on ur dice, it takes you to a different script which rolls again, and if you get a 4 on that script it will give you an item. If you get 5 on that one, it will give you the same item, If you get 6 on that script, it gives you different item. you get what im trying to say?
thats how i would do it, its a lot of scripting but i suppose its worth it.
 
Upvote 0

Raffis

Dedicated Member
Dedicated Member
Dec 9, 2008
69
1
34
Try to use command like:

#ACT
movr D1 10

#IF
Equal D1 1
#ACT
goto @firstitem
break

#IF
Equal D1 2
#ACT
goto @seconditem
break

...etc
 
Upvote 0