SHARE
TWEET

Untitled

a guest Apr 19th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //cmd.cpp
  2. ACMD(do_immortal);
  3. [..]
  4. { "immortal",   do_immortal,        0,          POS_DEAD,   GM_PLAYER   },
  5.  
  6.  
  7. //cmd_gm.cpp
  8. ACMD(do_immortal)
  9. {
  10.     if (!ch->IsGM())
  11.         return;
  12.  
  13.     if (ch->GetPlayerImmortal() == 0)
  14.         ch->SetPlayerImmortal(1);
  15.     else
  16.         ch->SetPlayerImmortal(0);
  17. }
  18.  
  19.  
  20. //char.h
  21.     public:
  22.         int         GetPlayerImmortal(void) { return isImmortal; }
  23.         void        SetPlayerImmortal(int val);
  24.        
  25.     protected:
  26.         int         isImmortal;
  27.        
  28.        
  29.        
  30. //char.cpp
  31.  
  32. //nad m_pkPoisonEvent = NULL;
  33. isImmortal = 0;
  34.  
  35. //
  36. void CHARACTER::SetPlayerImmortal(int val)
  37. {
  38.     isImmortal = val;
  39. }
  40.  
  41.  
  42.  
  43. //char_battle.cpp
  44.     if(pkVictim->IsGM() && pkVictim->GetPlayerImmortal() == 1)
  45.         return false;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top