Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUDs ➜ MUD Design Concepts ➜ hiding wizinvis actions in CircleMUD

hiding wizinvis actions in CircleMUD

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Wifidi   (14 posts)  Bio
Date Wed 23 Mar 2011 10:34 AM (UTC)

Amended on Tue 03 May 2011 11:59 PM (UTC) by Nick Gammon

Message
Stock wizinvis 'look' doesn't echo, so I feel authorized on the basis of consistency to unecho wizinvis spells from the room they're cast.

In CircleMUD3.62, it's in spell_parser.c after line 115. Additions 1 and 2 are labeled.


111111111111111111111111111111111111111
1 while (GET_INVIS_LEV(ch) < LVL_IMPL) { 1
111111111111111111111111111111111111111
  if (tch != NULL && IN_ROOM(tch) == IN_ROOM(ch)) {
    if (tch == ch)
      format = "$n closes $s eyes and utters the words, '%s'.";
    else
      format = "$n stares at $N and utters the words, '%s'.";
  } else if (tobj != NULL &&
         ((IN_ROOM(tobj) == IN_ROOM(ch)) || (tobj->carried_by == ch)))
    format = "$n stares at $p and utters the words, '%s'.";
  else
    format = "$n utters the words, '%s'.";

  snprintf(buf1, sizeof(buf1), format, skill_name(spellnum));
  snprintf(buf2, sizeof(buf2), format, buf);

  for (i = world[IN_ROOM(ch)].people; i; i = i->next_in_room) {
    if (i == ch || i == tch || !i->desc || !AWAKE(i))
      continue;
    if (GET_CLASS(ch) == GET_CLASS(i))
      perform_act(buf1, ch, tobj, tch, i);
    else
      perform_act(buf2, ch, tobj, tch, i);
  }

  if (tch != NULL && tch != ch && IN_ROOM(tch) == IN_ROOM(ch)) {
    snprintf(buf1, sizeof(buf1), "$n stares at you and utters the words, '%s'.",
        GET_CLASS(ch) == GET_CLASS(tch) ? skill_name(spellnum) : buf);
    act(buf1, FALSE, ch, NULL, tch, TO_VICT);
  }
}
222
2}2
222



...without this modification, wizinvisibility is compromised when Implementors(!) cast spells. Neutralizing :wizinvis'ed spell caster's: spell hits as "A <spell> hits" rather than "Someone hits" or "an immortal hits" is technically out of my league at this time, though it stands to reason the highest level of wizinvisibility would leave no traces by default.

[EDIT] Edited by Nick to add code tags.
Top

Posted by Wifidi   (14 posts)  Bio
Date Reply #1 on Tue 03 May 2011 06:19 PM (UTC)
Message
This mod locks up the mud when visible level 34's cast spells. "While" (het hem) 'while' makes the right sense in the English language, 'if' works. Please replace 'while' with 'if' in this mod.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


12,594 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.