Jump to content

Recommended Posts

Posted (edited)

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

Edited by Alerin (see edit history)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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.