Thread: EverythingRS Voting Donate Hiscores Heatmaps Installation & More [ANY BASE]

Page 124 of 124 FirstFirst ... 2474114122123124
Results 1,231 to 1,232 of 1232
  1. #1231  
    Rune-Server Affiliate
    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    4,019
    Thanks given
    1,499
    Thanks received
    1,967
    Rep Power
    4898
    For the Webstore, version 2 tutorial.

    Code:
    if (command.equalsIgnoreCase("claim")) {
        NetworkThread networkService = ThreadService.getThreadService().getNetworkThread();
        networkService.addToQueue(new NetworkRequest("<username>", "<secret>", "claim-store"));
        c.sendMessage("Processing transaction. Please wait a few seconds and then type ::finish");
    }
    if (command.equalsIgnoreCase("finish")) {
        NetworkThread networkService = ThreadService.getThreadService().getNetworkThread();
        final TeamGamesRequest[] teamgamesRequest = networkService.getAndRemoveFromMap("<username>");
        if (teamgamesRequest != null) {
            final String className = teamgamesRequest[0].getClassName();
            if (className.equalsIgnoreCase("Transaction")) {
                final Transaction[] transactions = (Transaction[]) teamgamesRequest.clone();
                if (transactions.length == 0) {
                    c.sendMessage("You currently don't have any items waiting. You must donate first!");
                    return;
                }
                if (transactions[0].getMessage() != null) {
                    c.sendMessage(transactions[0].getMessage());
                    return;
                }
                for (Transaction transaction: transactions) {
                    c.getItems().addItem(transaction.getProductId(), transaction.getProductAmount());
                }
                c.sendMessage("Thank you for donating!");
            }
        }
    }
    Reply With Quote  
     

  2. #1232  
     

Page 124 of 124 FirstFirst ... 2474114122123124

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. MotivoteRS Installation Tutorial [ANY BASE]
    By funkE in forum Tutorials
    Replies: 147
    Last Post: 02-19-2019, 11:40 PM
  2. Replies: 8
    Last Post: 03-05-2018, 11:06 PM
  3. Setup Ruse Vote/Donate/Hiscores
    By NoahLH in forum Buying
    Replies: 6
    Last Post: 04-07-2017, 07:47 PM
  4. Replies: 6
    Last Post: 09-15-2016, 01:24 AM
  5. Replies: 8
    Last Post: 04-01-2016, 08:49 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •