From: br0ke Wind
Can you guys help me out
Im trying to make a basic lotto machine
$10 an entry, 9 goes to the pot, 1 to me
im learning to script so i dont know any of the commands, can anyone tell me what i will be using and a basic idea what the program needs to do?
Firstly you really need to sit down and define all the parameters for the game,
Will it be just buy a 'ticket' and hope or will players need to enter a set of numbers?
How long will it run? How many tickets will you sell?
Once you define the basic parameters you will be in a better position to decide what else you need.
Obviously you will need a 'vendor' object, and if its a choose your numbers type thing, some form of user entry system, either dialog or chat.
As money is involved you will need debit permissions. You will also need to think about spoofing or at least stopping it being spoofed.
Either way you need to maintain a list ,or lists, of everyone who buys a ticket.
Be very aware of the memory limitations within LSL, list can eat script memory very quickly. You can of course export the data to an off world database if you need to. Again spoofying may become an issue.
Then you need to be able to choose a winner and pay them.
Any money paid into your vendor will automatically go to you, so your script will need to track the numbers.
Hope some of that helps.