Jump to content

Recommended Posts

System for drawing items for points

 

1.png?raw=true

 

The look is exemplary, if you want prettier and more functional, write to me.

https://github.com/Alerinos/M2-System-Carousel

 

For the system to work, you need to connect to your base (class, function, etc.). They are marked as TODO

 

Setting:

$c->price = 100;  // Number of points needed for the draw
$c->items([       // List of items to be won. [ID, Promil] (percentage * 10)
    [100100, 500],
    [100200, 500],
    [100000, 500],
    [100300, 200],
    [100400, 200],
    [100500, 100],
    [30270, 100],
    [50255, 100],
    [50256, 100],
    [50257, 100],
    [50258, 100],
    [50259, 100],
]);



Instruction

Quote

 

The class has no database connection, you must use your (PDO, MySQLi etc.)
1.) Find the reward() function, paste your SQL into the database where it will receive the prize. The $item variable is the item ID.
2.) Check the status of your points in the getPoints() function
3.) In the subtractPoints() function you must subtract points from your account.

4.) Create a folder called item and place there pictures of your items in png.

 

$this->account - User account ID
$this->price - Price for using the draw

 

 

 

Do you need a quest, system or www? Write to me, I can create everything. (Full STACK, Web (PHP, JS, SQL, HTML, CSS), Server (C ++, Python, Lua))

Discord Alerin#5559

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.