mystickdreamer

testfunction

Jan 12th, 2022
994
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 KB | None | 0 0
  1. ACMD(do_health)
  2. {
  3.   struct obj_data *wielded = GET_EQ(ch, WEAR_WIELD);
  4.   int atksk, attk;
  5.  
  6.   athind = GET_HIND(ch);
  7.   if (athind < 0)
  8.     athind = 0;
  9.  
  10.  
  11.  //What skill does the weapon use?
  12.     if (wielded && GET_OBJ_TYPE(wielded) == ITEM_WEAPON)
  13.         atksk = GET_OBJ_VAL(wielded, 4);
  14.     else
  15.         send_to_char(ch, "You are not wielding a weapon\r\n");
  16.  
  17.  
  18.       //Lets roll some dice!
  19.     attk = roll_skill(ch, atksk, athind, GET_DEX(ch));
  20.     send_to_char(ch, "Test return %d\r\n", attk);
  21. }
Advertisement
Add Comment
Please, Sign In to add comment