Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
145 lines (129 sloc) 4.21 KB
#CLASS {msdp} {OPEN}
#FORMAT {IAC} {%a} {255};
#FORMAT {DONT} {%a} {254};
#FORMAT {DO} {%a} {253};
#FORMAT {WONT} {%a} {252};
#FORMAT {WILL} {%a} {251};
#FORMAT {SB} {%a} {250};
#FORMAT {SE} {%a} {240};
#FORMAT {MSDP} {%a} {69};
#FORMAT {VAR} {%a} {01};
#FORMAT {VAL} {%a} {02};
#ALIAS {msdp} {
#FORMAT {msdp_parameter} {%l} {%0};
#IF {"$msdp_parameter" == "toggle"} {
#MATH {MSDP_ON} {!$MSDP_ON};
#IF {$MSDP_ON} {
#SEND {${IAC}${DO}${MSDP}};
msdp_report;
};
#ELSE {
#SEND {${IAC}${DONT}${MSDP}};
};
};
#ELSEIF {"$msdp_parameter" == "on"} {
#VARIABLE {MSDP_ON} {$ON};
#SEND {${IAC}${DO}${MSDP}};
msdp_report;
};
#ELSEIF {"$msdp_parameter" == "off"} {
#VARIABLE {MSDP_ON} {$OFF};
#SEND {${IAC}${DONT}${MSDP}};
};
#ELSEIF {"$msdp_parameter" == "status"} {
#IF {$MSDP_ON} {
#SHOWME {MSDP Status: ON};
};
#ELSE {
#SHOWME {MSDP Status: OFF};
};
};
#ELSEIF {"$msdp_parameter" == "restart"} {
};
#ELSE {
#SHOWME {Usage: msdp <command>};
#SHOWME { COMMANDS};
#SHOWME { off Turn off msdp};
#SHOWME { on Turn on msdp};
#SHOWME { restart Restart msdp};
#SHOWME { status Show the msdp status};
#SHOWME { toggle Toggle msdp};
#SHOWME { help Show this message};
};
#UNVARIABLE {msdp_parameter};
}
#VARIABLE {msdp_reportable_variables} {{CHARACTER_NAME};{CLASS};{LEVEL};{HEALTH};
{HEALTH_MAX};{MANA};{MANA_MAX};{BLOOD};{MOVEMENT};{MOVEMENT_MAX};{MONEY};
{HITROLL};{DAMROLL};{AC};{STR};{INT};{WIS};{DEX};{CON};{CHA};{LCK};
{STR_PERM};{INT_PERM};{WIS_PERM};{DEX_PERM};{CON_PERM};{CHA_PERM};{LCK_PERM};
{OPPONENT_NAME};{OPPONENT_LEVEL};{OPPONENT_HEALTH};{AREA_NAME};{WORLD_TIME};
{ROOM_NAME};{RACE};{AFFECTS};{WIMPY};{ALIGNMENT};{FAVOR};{WEIGHT}};
#ALIAS {msdp_report} {
#VARIABLE {result} {$IAC$SB$MSDP${VAR}REPORT};
#FOREACH {$msdp_reportable_variables[]} {tmp} {
#VARIABLE {result} {$result${VAL}$tmp};
};
#SEND {$result$IAC$SE\};
#UNVARIABLE {tmp};
}
#ALIAS {msdp_list} {
#SEND {$IAC$SB$MSDP${VAR}LIST${VAL}%0$IAC$SE\};
}
#ALIAS {msdp_send} {
#SEND {$IAC$SB$MSDP${VAR}SEND${VAL}%0$IAC$SE\};
}
#NOP ******Turn telnet debug off once everything works as it's spammy.******;
#NOP #CONFIG {debug telnet} {on};
#EVENT {IAC WILL MSDP} {
#SEND {$IAC$DO$MSDP\};
}
#EVENT {IAC SB MSDP} {
#NOP {Save all variables in associated array msdp_info.};
#IF {"%0" == "AFFECTS"} {
#VARIABLE {msdp_value} {%1};
#REPLACE {msdp_value} {\a\a} {;};
#REPLACE {msdp_value} {\a} {;};
#NOP Clear variable;
#UNVARIABLE {msdp_info[%0]};
#IF {"$msdp_value" != ""} {
#FORALL {$msdp_value} {
#VARIABLE {msdp_affect} {&0};
#REPLACE {msdp_affect} {,} {;};
#VARIABLE {msdp_level} {1};
#FOREACH {$msdp_affect} {msdp_item} {
#IF {$msdp_level == 1} {
#FORMAT {msdp_spell} {%l} {$msdp_item};
#VARIABLE {msdp_level} {2};
};
#ELSE {
#VARIABLE {msdp_info[%0][$msdp_spell]} {$msdp_item};
};
};
#NOP Clean up;
#UNVARIABLE {msdp_item};
#UNVARIABLE {msdp_level};
#UNVARIABLE {msdp_spell};
};
};
#UNVARIABLE {msdp_value};
};
#ELSEIF {"%0" == "OPPONENT_NAME" && "%1" == ""} {
#UNVARIABLE {msdp_info[OPPONENT_NAME]};
#UNVARIABLE {msdp_info[OPPONENT_HEALTH]};
#UNVARIABLE {msdp_info[OPPONENT_LEVEL]};
};
#ELSEIF {"%0" == "OPPONENT_LEVEL" && "%1" == "0"} {
#UNVARIABLE {msdp_info[OPPONENT_NAME]};
#UNVARIABLE {msdp_info[OPPONENT_HEALTH]};
#UNVARIABLE {msdp_info[OPPONENT_LEVEL]};
};
#ELSE {
#VARIABLE {msdp_info[%0]} {%1};
};
}
#NOP This event is generated at the end of an MSDP sub negotiation.;
#EVENT {IAC SB MSDP IAC SE} {
#NOP {};
#NOP {show_prompt};
}
#CLASS {msdp} {CLOSE}