Thread: Help with Dicing?

Results 1 to 2 of 2
  1. #1 Help with Dicing? 
    Registered Member
    Join Date
    Aug 2011
    Posts
    179
    Thanks given
    2
    Thanks received
    1
    Rep Power
    11
    Hey guys can someone look over these codes and tell me whats wrong everytime i roll with a dice on my server it just says rolling... but it never comes up with what the number is here is the code:
    public void FetchDice()
    {
    int rnd;
    String Message = "";
    if (cDice == 0 || (System.currentTimeMillis() - diceDelay <= 1000)) {
    return;
    }
    switch (cDice) {
    //Dice
    case 15096: rnd = Misc.random(19)+1; Message = ("rolled <col=16711680>"+ rnd +"</col> on a twenty-sided die."); break;
    case 15094: rnd = Misc.random(11)+1; Message = ("rolled <col=16711680>"+ rnd +"</col> on a twelve-sided die."); break;
    case 15092: rnd = Misc.random(9)+1; Message = ("rolled <col=16711680>"+ rnd +"</col> on a ten-sided die."); break;
    case 15090: rnd = Misc.random(7)+1; Message = ("rolled <col=16711680>"+ rnd +"</col> on an eight-sided die."); break;
    case 15100: rnd = Misc.random(3)+1; Message = ("rolled <col=16711680>"+ rnd +"</col> on a four-sided die."); break;
    case 15086: rnd = Misc.random(5)+1; Message = ("rolled <col=16711680>"+ rnd +"</col> on a six-sided die."); break;
    case 15088: rnd = Misc.random(11)+1; Message = ("rolled <col=16711680>"+ rnd +"</col> on two six-sided dice."); break;
    case 15098: rnd = Misc.random(99)+1; Message = ("rolled <col=16711680>"+ rnd +"</col> on the percentile dice."); break;
    }
    sendMessage("You " + Message);
    if (clanDice){
    if (clanId >= 0) {
    Server.clanChat.messageToClan("Clan Chat channel-mate <col=16711680>"+playerName+"</col> "+Message, clanId);
    }
    }
    cDice = 0;
    }

    public void useDice(int itemId, boolean clan){
    if (System.currentTimeMillis() - diceDelay >= 3000) {
    sendMessage("Rolling...");
    startAnimation(11900);
    diceDelay = System.currentTimeMillis();
    cDice = itemId;
    clanDice = clan;
    switch (itemId) {
    //Gfx's
    case 15086: gfx0(2072); break;
    case 15088: gfx0(2074); break;
    case 15090: gfx0(2071); break;
    case 15092: gfx0(2070); break;
    case 15094: gfx0(2073); break;
    case 15096: gfx0(2068); break;
    case 15098: gfx0(2075); break;
    case 15100: gfx0(2069); break;
    }
    }

    }
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Banned
    Join Date
    Aug 2012
    Posts
    808
    Thanks given
    56
    Thanks received
    98
    Rep Power
    0
    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. dicing PI
    By badroots in forum Help
    Replies: 9
    Last Post: 09-19-2011, 03:20 AM
  2. Dicing..
    By Godzkiller in forum Chat
    Replies: 3
    Last Post: 08-26-2011, 03:52 PM
  3. [Pi] 60% Dicing
    By Kickyamom in forum Snippets
    Replies: 21
    Last Post: 08-20-2011, 02:46 AM
  4. Dicing help
    By Banter in forum Help
    Replies: 11
    Last Post: 08-13-2011, 02:20 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •