mystickdreamer

roll_skill

Jan 12th, 2022
813
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.47 KB | None | 0 0
  1. int roll_skill(struct char_data *ch, int sact, int hind, int stat)
  2. {
  3.   int roll = 0, i, rolldice = 0;
  4.   int sktot = 0;
  5.  
  6.  
  7.     rolldice = (GET_CLASS_RANKS(ch, sact));
  8.     rolldice -= hind;
  9.     rolldice += stat;
  10.  
  11.  
  12.   for (i = 0; i < rolldice; i++) {
  13.     roll = rand_number(1, 10);
  14.     send_to_char(ch, "Roll :%d\r\n", roll);
  15.     if (roll > 5)
  16.       sktot++;
  17.      
  18.       //DICEROLL(ch) = sktot;
  19.   }
  20.   send_to_char(ch, "Sktot %d\r\n",sktot);
  21.   return sktot;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment