Games - Scratch Tickets
The setting of this game is done from the file /mods/jeux/tickets/ticketsAgratter.php
Set your tickets in the array:
$ticketAgratter = array (
//ticket 1
1 => array(
'active'=>1,//1 = active, 0 = inactive
'title'=>_t('CA$H'),//title of your ticket - Use _t("Your Title") if you want to translate
'instructions'=>_t('Gratte le ticket'),//instruction - Use _t("Your Title") if you want to translate
'cost'=>100,//price of each game (points or money see below)
'typecost'=>'point',// point or money - nothing else is supported
'image'=>'/mods/jeux/tickets/ticket1.png', // main image
'width'=>250, //width in px
'height'=>163, //height in px
'img' => array(
1=> array('/mods/jeux/tickets/ticket1img01.png', 30, 50, 'point'),//url img01 + frequency + winnings + type winning
2=> array('/mods/jeux/tickets/ticket1img02.png', 15, 100, 'point'),//url img02 + frequency + winnings + type winning
3=> array('/mods/jeux/tickets/ticket1img03.png', 6, 150, 'point'),//url img03 + frequency + winnings + type winning
4=> array('/mods/jeux/tickets/ticket1img04.png', 5, 200, 'point'),//url img04 + frequency + winnings + type winning
5=> array('/mods/jeux/tickets/ticket1img05.png', 1, 500, 'point'),//url img05 + frequency + winnings + type winning
),
),
//ticket 2
2 => array(
'active'=>1,
'title'=>_t("Gratt' LaBank"),
'instructions'=>_t('Gratte le coffre'),
'cost'=>0.1,
'typecost'=>'money',
'image'=>'/mods/jeux/tickets/ticket2.jpg',
'width'=>162,
'height'=>247,
'img'=> array(
1=>array('/mods/jeux/tickets/ticket2img01.jpg', 30, 50, 'point'),
2=> array('/mods/jeux/tickets/ticket2img02.jpg', 18, 0.02, 'money'),
3=> array('/mods/jeux/tickets/ticket2img03.jpg', 20, 0.10, 'money'),
4=> array('/mods/jeux/tickets/ticket2img04.jpg', 2, 0.50, 'money'),
),
),
);
You put as many tickets as you want, there is no limit.
For pictures:
- It takes a main image (the one seen before scraping) (in 'image')
- As many images as different gains (in 'img')
- All images of a ticket have the same size
For winnings, 2 settings:
- The type of cost: points or money
- How much it costs in points or money
- In the example above: it costs: 100 points in the 1st ticket, 0.10 € (the currency of your site) in the 2nd ticket
Here, the Scratch tickets are ready!