1. This forum is ARCHIVED! Visit the new Cloud Sixteen forums, codename Eden, at https://eden.cloudsixteen.com. These forums will remain archived for a few months before being closed down, so try to encourage plugin developers to begin moving their content across to the new forums.
Dismiss Notice
Hi Guest, you need a Steam account to register and post on these forums. Login with Steam at the top of the forums to get started!
Dismiss Notice
Hi Guest, do you want to buy HL2RP or another Clockwork schema? Visit the Cloud Sixteen Store to get started!

Clockwork Donation Script

Discussion in 'Plugins' started by trurascalz, Mar 17, 2014.

  1. trurascalz

    trurascalz C16 Developer Legend

    Clockwork Kode(Key) Redeemer
    (IDK its kode, i set [CKR] in prints but forgot why :s)


    Ok I spent quite a bit of time on this script, duck moaned at me for using .net libary but watever. I tried using tmysql4 but that broke clockwork for some reason?


    Description:
    Yay! No more manual donations! This gives your players a website to donate on, once paid they will be sent a email with a unique kode(or key) which they can then enter in game! Amazing i know!


    Pictures for TL;DR people
    http://trurascalz.tk/portfolio/c16/donationtest/

    [​IMG]
    [​IMG]
    [​IMG]

    [SIZE=78%]Installation:[/SIZE]
    Read the .docx or .rtf included.


    This can be complex if you have totally no idea what you're doing.




    Download:
    PRICE: $0.00
    https://github.com/trurascalz/clockworkplugins

    Free because i love everyone


    FAQ:
    How do i change email message?
    https://github.com/trurascalz/clock...ork/donation-coderedeemer/web/ipn/ipn.php#L54
    How do i change the info message?
    https://github.com/trurascalz/clock...ork/donation-coderedeemer/web/ipn/ipn.php#L30
    Can i make it in GBP

    It can either be $ or GBP
    What can be done?
    Anything really, I wont help you add new functions, i provided samples. I couldn't get flags to work.



    Noties:
    The script worked in theory with the paypal ipn simulator and in game.
    Still works even even though duck denounces it ._.
    Here's a complex list of mysql error codes. Hopefully it helps you fix your problems
    http://major.io/2007/08/09/mysql-error-codes/
     
    Last edited: Apr 4, 2015
  2. diablo1675

    diablo1675 Guest

    firsfirstfirst

    ohmygodthisiswhatibeenlookingforiloveyouforeverinabromancewaykthxiwillgofapnow
     
  3. Datzy

    Datzy Guest

    Free

    this man is an example to follow
     
  4. Monkah

    Monkah Guest

    It's like Buycraft for Clockwork. Seems great, is there any chance of website integration?
     
  5. GreenPepper

    GreenPepper Guest

    Although I don't advocate for donation benefits, nice work on this :)
     
  6. It's nice, but I really wish you made the one function to add any package and using datastreams.

    Datastreams are easy as hell, dude.

    client
    Code:
    Clockwork.datastream:Start("Test", "An example message being sent to the server to be printed.");
    server
    Code:
    Clockwork.datastream:Hook("Test", function(player, data)
    	print(data);
    end);
    EDIT: You also aren't escaping the string. It is unsafe to trust user input. Leaves you open to SQL exploits. Use db:escape(string)
     
  7. trurascalz

    trurascalz C16 Developer Legend

    I was going to do that but missed it :/
     
  8. Can you make it do more than one thing? Cause I want all my donations to get a certain amount of tokens with them too
     
  9. You still didn't fix it @[email protected]

    You don't have to use mysqloo either. Clockwork lets you interact with the database.

    Code:
    local myInsert = Clockwork.database:Insert();
    		myInsert:SetTable("players");
    		myInsert:SetValue("_Name", "Joe");
    		myInsert:SetValue("_SteamID", "STEAM_0:1:9483843344");
    		myInsert:AddCallback(MyCallback);
    	myInsert:Push();
    The script itself is nice but it all just seems a bit rushed. I would've helped you with this. If you still want me to, I can.
     
  10. trurascalz

    trurascalz C16 Developer Legend

    I was asleep. _. If u really wanr to do a pull request I wont be able to do it on like 6ish hours now
     
  11. ZeMysticalTaco

    ZeMysticalTaco yo i'm a taco have some lunch Clockwork Customer

     
  12. trurascalz

    trurascalz C16 Developer Legend

    Its filler text.. I dont even own a community
     
  13. Soviet Jesus

    Soviet Jesus Change is a good thing, at some points.

    THANK GOD! Ive been looking for something like this for ages! Nice job btw.
     
  14. Arbiter329

    Arbiter329 Owner of Arc-Factory Roleplay

    Looks pretty nice. Good work.
     
  15. Nice work, can see this getting used a lot
     
  16. I don't recommend using this until I'm done revamping it. Right now it isn't optimized at all.
     
  17. Grestin

    Grestin Schema Coder.

    using this
    editting the hell cause not selling fagtions or admin k
    (once duck revamps it :^) )
     
  18. seigfred

    seigfred Dank af

    oh my god I love you for this, thank you
     
  19. trurascalz

    trurascalz C16 Developer Legend

    Updated:

    Added Web Admin interface.
    Added Refund protection. (Disables keys on reverse or refund & mails you when it is done.)
    Added More logging. (available at /ipn/ipn.log) http://trurascalz.tk/portfolio/c16/donationtest/ipn/ipn.log
    Notice: Requires MySQL table alteration. Backup your tables first.

    Update Instructions for phpmyadmin
    - Export both `activationkeys` and `notifications`
    - Note down unredeemed codes.
    - Delete or 'drop' both `activationkeys` and `notifications`
    - Import Both .sql files
    - Add unredeemed codes in new admin interface.
    - You might be able to import your backed up notifications table once done.
     
  20. MrSky

    MrSky player:NotifyAll("hitler is best") Clockwork Customer

    Very nice, good work.
     

Previous Readers (Total: 0)