Taerin writes, "arena combat code to permit players to fight each other in certain zones with no casualties and no killer flags. defeated players will just be recalled and set to 1 hp. REQUIRES the previous zoneflag snippet posted above by Ming."
next reboot, the colesseum under rome will have this feature.
from the player testing, people really seem to enjoy this!
010718 arena combat code to permit players to fight each other in certain
zones with no casualties and no killer flags. defeated players
will just be recalled and set to 1 hp. REQUIRES the previous
zoneflag snippet by sarq on the web page.
info.hlp:
ARENA GLADIATOR
The Roman Coliseum is an arena zone which permits pkill battles without
risk of loss. In this zone, players defeated by either fellow players or
mobiles will merely be returned to the temple square stunned. Equipment,
gold, experience and pkill ratio will remain intact. No PKILLER flags will
be issued and no protection will be afforded to the Templars. Risk free
gladiatorial combat! Strength and Honor!
#
ok, first define the zoneflag ARENA...
structs.h, in zone-related structs:
/* arena, taerin 010718 */
struct zone_flag_struct {
/* if these are set to 1 during game, you can NOT do them in that zone */
int NOPORTAL, NOPKILL, NOQUIT, NORECALL, ARENA;
};
utils.h, basic bitvector utils:
#define ZONE_ARENA(zone) (zone_flags[zone].ARENA)
act.informative.c, void look_at_room():
if (ZONE_ARENA(IN_ZONE(ch)) == 1)
strcat(zf_buf, " [ ARENA ]");
act.wizard.c, ACMD(do_show) in respective locations (check sarq's snippet):
if(zone_flags[world[ch->in_room].zone].ARENA == 1) {
strcat(buf," ARENA");
}
if(zone_flags[i].ARENA == 1) {
strcat(buf," ARENA");
}
if(zone_flags[i].ARENA == 1) {
strcat(buf," ARENA");
db.c, void reset_zone(), in respective locations:
* ARENA 5 arena combat permitted
case 5:
test_log("Zone Command Z - 5 ARENA initiated");
zone_flags[zone].ARENA = 1;
break;
fight.c, void check_killer():
if ( (ZONE_ARENA(IN_ZONE(ch)) == 1) && !IS_NPC(vict) )
{
send_to_room("Cry Havoc! And let slip the dogs of war!\r\n", ch->in_room);
} else
fight.c, int check_can_pkill(), just prior to checking room and zone flags:
if (ZONE_ARENA(IN_ZONE(ch)) == 1)
{
return 1;
}
fight.c, void damage(), where it processes the death of a victim:
/* Uh oh. Victim died. */
if (GET_POS(victim) == POS_DEAD) {
/* pc victims that die in an arena zone just get sent to the temple */
if (!IS_NPC(victim) && ZONE_ARENA(IN_ZONE(victim)) == 1)
{
sprintf(buf2, "%s%sINFO: %s was just defeated by %s in arena combat!%s\r\n", CCNRM(ch, C_NRM),
CCRED(ch, C_NRM), GET_NAME(victim), GET_NAME(ch), CCNRM(ch, C_NRM));
send_to_all(buf2);
char_from_room(victim);
char_to_room(victim, real_room(3005));
act("$n crumples to the floor in defeat!", TRUE, victim, 0, 0, TO_ROOM);
look_at_room(victim, 0);
GET_HIT(victim) = 1;
GET_MANA(victim) = 0;
GET_MOVE(victim) = 0;
WAIT_STATE(victim, 100 * PULSE_VIOLENCE);
GET_POS(victim) = POS_STUNNED;
return;
}
<< Zone Flags [by Ming] | Reply | Threaded >>
|
|
|||||||||||||||||