Thread: Yell tickets

Results 1 to 4 of 4
  1. #1 Yell tickets 
    Registered Member
    Join Date
    Feb 2014
    Posts
    57
    Thanks given
    1
    Thanks received
    1
    Rep Power
    11
    So i wanna make yell ticket for players for example they could buy them in the shop and the ticket would give like 5 yell points so he could yell 5 times. anyone could help?
    Reply With Quote  
     

  2. #2  
    Registered Member
    hc747's Avatar
    Join Date
    Dec 2013
    Age
    26
    Posts
    1,474
    Thanks given
    3,312
    Thanks received
    691
    Rep Power
    1098
    I only have experience with 718's but I imagine that it'd be similar to this.
    Code:
    private int yellCredit;
    public void setYellCredit(int yellCredit) {
    this.yellCredit = yellCredit;
    }
    public int getYellCredit() {
    return yellCredit;
    }
    In your send yell method, add a check similar to
    Code:
    if (player.getYellCredit() < 1) {
    return;
    }
    In your inventoryOptionsHandler, make redeeming the item add yell credits, ie,
    Code:
    player.setYellCredit(player.getYellCredit() + 5);
    Reply With Quote  
     

  3. #3  
    Community Veteran

    Songoty's Avatar
    Join Date
    Dec 2007
    Posts
    2,740
    Thanks given
    211
    Thanks received
    1,034
    Rep Power
    2455
    songoty thinks that this is an odd idea. songoty will also point out it will require a bit more than copy and paste help.
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Dec 2010
    Posts
    1,982
    Thanks given
    174
    Thanks received
    256
    Rep Power
    223
    No, it's fairly straight forward.

    make an integer, save it, make it decrease every time someone yells.
    make it purchasable by integer += 5;

    Pseudo code

    int yellTickets = 0;

    if(s.equalsIgnoreCase("yell") {
    if(yellTickets > 0) {
    yellTickets--;

    else {
    sendM("You have no yell tickets)
    Reply With Quote  
     


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. Replies: 63
    Last Post: 05-20-2008, 06:32 AM
  2. Sigex - Castle wars Ticket Exchange 100%
    By littleplop in forum Tutorials
    Replies: 60
    Last Post: 02-22-2008, 12:49 PM
  3. Making Yell command log to a seperate file
    By DegeneralizationX in forum Tutorials
    Replies: 8
    Last Post: 10-04-2007, 05:20 AM
  4. Censoring yell
    By Bushido in forum Tutorials
    Replies: 6
    Last Post: 09-17-2007, 01:49 PM
  5. How to add a good logging system [CHAT,CMDS,YELL]
    By Shawn101 in forum Tutorials
    Replies: 8
    Last Post: 08-16-2007, 02:10 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
  •