Mod: Wizzes can't be killed

Add this block of code to the beginning of varargs int eventDie(mixed agent) in /lib/player.c.

    int mhp, msp, mmp;
    string *limb_arr = ({});

    if(!agent) agent = previous_object();
    if(!agent) agent = this_object();

    if(wizardp(agent)) {
        mhp = agent->GetMaxHealthPoints();
        msp = agent->GetMaxStaminaPoints();
        mmp = agent->GetMaxMagicPoints();
        if(agent->GetPoison() > 0) agent->AddPoison(0 - agent->GetPoison());
        limb_arr = agent->GetLimbs();
        foreach(string limb in limb_arr) {
        return 1;

This code is formed such that when a wizard should die, they are instead healed and restored to full health, stamina, and magic.

This code falls under the Dead Souls license.

Trackback URL for this post:


Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <b> <i> <u> <cite> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <br> <p> <img> <pre>
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Lines and paragraphs break automatically.

More information about formatting options