Advertisement
ijontichy

derp.c

Aug 7th, 2012
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.58 KB | None | 0 0
  1. #include "zcommon.acs"
  2. #library "derp"
  3.  
  4. #include "commonFuncs.h"
  5.  
  6. #define PAPER_COUNT 8  // why not
  7. int paperNames[PAPER_COUNT] =
  8. {
  9.     "HERPFONT", "DERPFONT", "PAPER001", "PAPER002",
  10.     "DERPDERP", "HERPDERP", "NERPBERP", "IAERDERP",
  11. }
  12.  
  13. script 494 (int paperIndex)
  14. {
  15.     if ((paperIndex < 0) || (paperIndex >= PAPER_COUNT)) { terminate; }
  16.  
  17.     if (CheckInventory("DerpCounter"))
  18.     {
  19.         TakeInventory("DerpCounter", 1);
  20.         Print(s:"Toggling off");
  21.     }
  22.     else
  23.     {
  24.         GiveInventory("DerpCounter", 1);
  25.         Print(s:"Toggling on - ", s:paperNames[paperIndex]);
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement