binaryatrocity cleanup second commit
This commit is contained in:
1 parent
d43c2cdb72
commit
657e0be442
11 files changed
+357
No files matched your search
@@ -0,0 +1,48 @@
|
||||
#class char kill
|
||||
#class char open
|
||||
|
||||
|
||||
#event {IAC SB GMCP char.vitals IAC SE}
|
||||
{
|
||||
#if {$debug} { #showme %1 };
|
||||
#var {GMCPDATA[CHAR][VITALS]} {%0};
|
||||
#var {hp} {$GMCPDATA[CHAR][VITALS][hp]};
|
||||
#var {mana} {$GMCPDATA[CHAR][VITALS][mana]};
|
||||
#var {moves} {$GMCPDATA[CHAR][VITALS][moves]};
|
||||
prompt_statmon;
|
||||
}
|
||||
|
||||
#event {IAC SB GMCP char.maxstats IAC SE}
|
||||
{
|
||||
#if {$debug} { #showme %1 };
|
||||
#var {GMCPDATA[CHAR][MAXSTATS]} {%0};
|
||||
#var {maxhp} {$GMCPDATA[CHAR][MAXSTATS][maxhp]};
|
||||
#var {maxmana} {$GMCPDATA[CHAR][MAXSTATS][maxmana]};
|
||||
#var {maxmoves} {$GMCPDATA[CHAR][MAXSTATS][maxmoves]};
|
||||
#nop Actual stats below are yet unusued.
|
||||
#var {maxstr} {$GMCPDATA[CHAR][MAXSTATS][maxstr]};
|
||||
#var {maxint} {$GMCPDATA[CHAR][MAXSTATS][maxint]};
|
||||
#var {maxwis} {$GMCPDATA[CHAR][MAXSTATS][maxwis]};
|
||||
#var {maxdex} {$GMCPDATA[CHAR][MAXSTATS][maxdex]};
|
||||
#var {maxcon} {$GMCPDATA[CHAR][MAXSTATS][maxcon]};
|
||||
#var {maxluck} {$GMCPDATA[CHAR][MAXSTATS][maxluck]};
|
||||
prompt_statmon;
|
||||
}
|
||||
|
||||
#event {IAC SB GMCP char.status IAC SE}
|
||||
{
|
||||
#variable {GMCPDATA[CHAR][STATUS]} {%0};
|
||||
#if {$debug} {#showme %1};
|
||||
#var {level} {$GMCPDATA[CHAR][STATUS][level]};
|
||||
#var {tnl} {$GMCPDATA[CHAR][STATUS][tnl]};
|
||||
#var {hunger} {$GMCPDATA[CHAR][STATUS][hunger]};
|
||||
#var {thirst} {$GMCPDATA[CHAR][STATUS][thirst]};
|
||||
#var {align} {$GMCPDATA[CHAR][STATUS][align]};
|
||||
#var {state} {$GMCPDATA[CHAR][STATUS][state]};
|
||||
#var {position} {$GMCPDATA[CHAR][STATUS][pos]};
|
||||
#var {enemy} {$GMCPDATA[CHAR][STATUS][enemy]};
|
||||
#var {enemy_health} {$GMCPDATA[CHAR][STATUS][enemypct]};
|
||||
prompt_statmon;
|
||||
}
|
||||
|
||||
#class char close
|
||||
@@ -0,0 +1,61 @@
|
||||
#class gmcp kill
|
||||
#class gmcp 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 GMCP %a 201
|
||||
|
||||
#alias {debug {on|off}}
|
||||
{
|
||||
#if {"%1" == "on"} { #variable debug 1 };
|
||||
#else { #variable debug 0 };
|
||||
#nop;
|
||||
}
|
||||
|
||||
#event {IAC SB GMCP comm.channel IAC SE}
|
||||
{
|
||||
#if {$debug} { #showme %1 };
|
||||
#var {GMCPDATA[COMM][CHATLOGGER]} {%0};
|
||||
#if {"$GMCPDATA[COMM][CHATLOGGER][chan]" != "mobsay"}
|
||||
{
|
||||
#line log {$dir/logs/channel.log} {$GMCPDATA[COMM][CHATLOGGER][msg]};
|
||||
};
|
||||
}
|
||||
|
||||
#nop Start up GMCP connection with the server
|
||||
#event {IAC WILL GMCP}
|
||||
{
|
||||
#send {$IAC$DO$GMCP\};
|
||||
#send {$IAC$SB$GMCP Core.Hello { "client": "$CLIENT_NAME", "version": "$CLIENT_VERSION" } $IAC$SE\};
|
||||
#send {$IAC$SB$GMCP Core.Supports.Set [ "Room 1", "Char 1", "Core 1", "Comm 1", "Debug 1", "Group 1" ] $IAC$SE\}
|
||||
}
|
||||
|
||||
#event {PROGRAM START}
|
||||
{
|
||||
#variable CLIENT_NAME %0;
|
||||
#variable CLIENT_VERSION %1;
|
||||
}
|
||||
|
||||
#nop Write out command history and variable class on disconnect
|
||||
#event {SESSION DISCONNECTED}
|
||||
{
|
||||
#history write {$dir/logs/history.log};
|
||||
}
|
||||
|
||||
#event {SESSION CONNECTED}
|
||||
{
|
||||
$name;
|
||||
$password;
|
||||
#unvar name;
|
||||
#unvar password;
|
||||
#history read {$dir/logs/history.log};
|
||||
}
|
||||
|
||||
#class gmcp close
|
||||
@@ -0,0 +1,38 @@
|
||||
#class init kill
|
||||
#class init open
|
||||
|
||||
#ALIAS {do_on_connect}
|
||||
{
|
||||
protocol gmcp sendchar;
|
||||
quest time;
|
||||
};
|
||||
|
||||
#ACTION {^############# Reconnecting to Game #############$} {do_on_connect}
|
||||
#ACTION {^Welcome to Aardwolf. May your adventures be mystical, challenging and rewarding.} {do_on_connect}
|
||||
|
||||
#ACTION {^You do not have to wait to go on another quest.$}
|
||||
{
|
||||
#var {quest[timer]} {<129>READY<099>};
|
||||
prompt_statmon;
|
||||
#class init kill
|
||||
}
|
||||
#ACTION {^There are %d minutes remaining until you can go on another quest.$}
|
||||
{
|
||||
start_quest_timer %1;
|
||||
prompt_statmon;
|
||||
#class init kill
|
||||
}
|
||||
#ACTION {^There is less than a minute remaining until you can go on another quest.$}
|
||||
{
|
||||
start_quest_timer 1;
|
||||
prompt_statmon;
|
||||
#class init kill
|
||||
}
|
||||
#ACTION {^Time left for current quest: %d$}
|
||||
{
|
||||
#var {quest[timer]} {<fca>ACTIVE<099>};
|
||||
prompt_statmon;
|
||||
#class init kill
|
||||
}
|
||||
|
||||
#class init close
|
||||
@@ -0,0 +1,39 @@
|
||||
#FUNCTION {percent_color}
|
||||
{
|
||||
#var {percent_store} {};
|
||||
#if {%1 > 80} { #format {percent_store} {%c%d<099>} {bold green} {%1} };
|
||||
#if {%1 < 80 && %1 > 30} { #format {percent_store} {%c%d<099>} {bold yellow} {%1} };
|
||||
#if {%1 < 30} { #format {percent_store} {%c%d<099>} {bold red} {%1} };
|
||||
#return $percent_store;
|
||||
}
|
||||
|
||||
#ALIAS {prompt_statmon}
|
||||
{
|
||||
#math hp_percent {((1.00*$hp) / $maxhp)*100};
|
||||
#math mana_percent {((1.00*$mana) / $maxmana)*100};
|
||||
#math moves_percent {((1.00*$moves) / $maxmoves)*100};
|
||||
|
||||
#var {c_hp_percent} {@percent_color{$hp_percent}};
|
||||
#var {c_mana_percent} {@percent_color{$mana_percent}};
|
||||
#var {c_moves_percent} {@percent_color{$moves_percent}};
|
||||
|
||||
#var {hp_prompt} {<039>$hp<099>/<139>$maxhp<099>hp ($c_hp_percent%)};
|
||||
#var {mana_prompt} {<069>$mana<099>/<169>$maxmana<099>m ($c_mana_percent%)};
|
||||
#var {moves_prompt} {<049>$moves<099>/<149>$maxmoves<099>mv ($c_moves_percent%)};
|
||||
|
||||
#var {prompt} {<$hp_prompt | $mana_prompt | $moves_prompt>};
|
||||
#if {$state == 8}
|
||||
{
|
||||
#var {c_enemy_health} {@percent_color{$enemy_health}};
|
||||
#var {battleprompt} {<119>$enemy<099>: $c_enemy_health%};
|
||||
#var {prompt} {$prompt $battleprompt};
|
||||
};
|
||||
#elseif {$state == 9 || $state == 11} { #var {prompt} {$prompt <159>RESTING<099>}};
|
||||
#showme {$prompt} {1};
|
||||
|
||||
#var {c_hunger} {@percent_color{$hunger}};
|
||||
#var {c_thirst} {@percent_color{$thirst}};
|
||||
#var {top_prompt} {[Quest: <169>$quest[timer]<099> | TNL: <059>$tnl<099> | Align: <149>$align<099> | Hunger/Thirst: $c_hunger%/$c_thirst%]};
|
||||
#showme {$top_prompt} {2};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
#class quest kill
|
||||
#class quest open
|
||||
|
||||
|
||||
#ALIAS {start_quest_timer}
|
||||
{
|
||||
#var {quest[timer]} {%1};
|
||||
#ticker {quest[timer]}
|
||||
{
|
||||
#math {quest[timer]} {$quest[timer] - 1};
|
||||
#if {$quest[timer] == 0}
|
||||
{
|
||||
#untick {quest[timer]};
|
||||
#var {quest[timer]} {<cfa>READY<099>};
|
||||
};
|
||||
prompt_statmon;
|
||||
} {60}
|
||||
};
|
||||
|
||||
|
||||
#EVENT {IAC SB GMCP comm.quest IAC SE}
|
||||
{
|
||||
#if {$debug} { #showme {%1} };
|
||||
#var {GMCPDATA[COMM][QUEST]} {%0};
|
||||
|
||||
#if {"$GMCPDATA[COMM][QUEST][action]" == "ready"}
|
||||
{
|
||||
#send {$repchan @W\{-=@RQuest Time@W=-\}@w};
|
||||
#var {quest[timer]} {<129>READY<099>};
|
||||
#bell;
|
||||
};
|
||||
#elseif {"$GMCPDATA[COMM][QUEST][action]" == "start"}
|
||||
{
|
||||
#format {quest[start]} {%T};
|
||||
#var {quest[timer]} {<fca>ACTIVE<099>};
|
||||
#var {quest[room]} {$GMCPDATA[COMM][QUEST][room]};
|
||||
#var {quest[area]} {$GMCPDATA[COMM][QUEST][area]};
|
||||
#var {quest[target]} {$GMCPDATA[COMM][QUEST][targ]};
|
||||
|
||||
#send {$repchan @Y[@RQuest Requested@Y]@w: @YTarget@w=@R$quest[target]@w. @YRoom@w=@R$quest[room]@w. @YArea@w=@R$quest[area]@w.};
|
||||
};
|
||||
#elseif {"$GMCPDATA[COMM][QUEST][action]" == "fail"}
|
||||
{
|
||||
#send {$repchan @W\{-=@RQuest Failed@W=-\}@w};
|
||||
#var {quest} {};
|
||||
|
||||
start_quest_timer 30;
|
||||
};
|
||||
#elseif {"$GMCPDATA[COMM][QUEST][action]" == "comp"}
|
||||
{
|
||||
#format {quest[end]} {%T};
|
||||
#math {quest[time]} {$quest[end] - $quest[start]};
|
||||
#var {quest[trivia]} {$GMCPDATA[COMM][QUEST][tp]};
|
||||
#var {quest[pracs]} {$GMCPDATA[COMM][QUEST][pracs]};
|
||||
#var {quest[trains]} {$GMCPDATA[COMM][QUEST][trains]};
|
||||
#var {quest[qp]} {$GMCPDATA[COMM][QUEST][totqp]};
|
||||
|
||||
#send {$repchan @R[@YQuest Completed@R] @Y[@WQp: @R$quest[qp]@Y] $quest[time] secs @Y[@WBonus: @R $quest[pracs] / $quest[train] / $quest[trivia]@Y]@w};
|
||||
#var {quest} {};
|
||||
|
||||
start_quest_timer 30;
|
||||
};
|
||||
#elseif {"$GMCP[COMM][QUEST][target]" == "killed"}
|
||||
{
|
||||
#send {$repchan @W\{-=@RQuest Target Killed@W=-\}@w};
|
||||
#var {quest[timer]} {<169>RETURN<099>};
|
||||
};
|
||||
|
||||
prompt_statmon;
|
||||
}
|
||||
|
||||
#class quest close
|
||||
Reference in new issue
Block a user