Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #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;
- }
- {5}
- #EVENT {IAC SB GMCP char.maxstats IAC SE}
- {
- #variable GMCP[CHAR][MAXSTATS] {%0};
- #if {$debug}
- {
- #showme %1
- };
- #nop;
- }
- #event {IAC SB GMCP group IAC SE}
- {
- #var GMCP[GROUP] {%0};
- #line log {$dir/../../../group} {\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n};
- #format {name_line} {$GMCP[GROUP][groupname]};
- #format {leader_line} {%cLed by%c: $GMCP[GROUP][leader]} {light cyan} {light white};
- #foreach {$GMCP[GROUP][members][]} {gmcp_groupie}
- {
- #if {"gmcp_groupie_list" != ""}
- {
- #var {pregroup} {$gmcp_groupie_list\n}
- }
- {
- #var pregroup {}
- };
- #math {hp_percent_tmp} {(1.00 * $GMCP[GROUP][members][$gmcp_groupie][info][hp]/$GMCP[GROUP][members][$gmcp_groupie][info][mhp])*100};
- #math {mn_percent_tmp} {(1.00 * $GMCP[GROUP][members][$gmcp_groupie][info][mn]/$GMCP[GROUP][members][$gmcp_groupie][info][mmn])*100};
- #math {mv_percent_tmp} {(1.00 * $GMCP[GROUP][members][$gmcp_groupie][info][mv]/$GMCP[GROUP][members][$gmcp_groupie][info][mmv])*100};
- #format {gmcp_groupie_list} {$pregroup%c[%c$GMCP[GROUP][members][$gmcp_groupie][name]%c(%c$GMCP[GROUP][members][$gmcp_groupie][info][lvl]%c)%c]%c: %c${hp_percent_tmp} %c${mn_percent_tmp} %c${mv_percent_tmp} %c-- %cTNL%c: %c$GMCP[GROUP][members][$gmcp_groupie][info][tnl]} {blue} {red} {light black} {light yellow} {light black} {blue} {white} {green} {blue} {yellow} {light black} {white} {light black} {red}
- };
- #line log {$dir/../../../group} {$name_line\n\n$leader_line\n\n\n$gmcp_groupie_list};
- #var gmcp_groupie_list {};
- }
- #EVENT {IAC SB GMCP char.status IAC SE}
- {
- #variable GMCP[CHAR][STATUS] {%0};
- #if {$debug}
- {
- #showme %1
- };
- ||gmcp_prompt_statmon;
- #nop;
- }
- #EVENT {IAC SB GMCP char.vitals IAC SE}
- {
- #variable GMCP[CHAR][VITALS] {%0};
- #if {$debug}
- {
- #showme %1
- };
- ||gmcp_prompt_statmon;
- #nop;
- }
- #EVENT {IAC SB GMCP char.worth IAC SE}
- {
- #variable GMCP[CHAR][WORTH] {%0};
- #if {$debug}
- {
- #showme %1
- };
- #nop
- }
- #alias {afk {on|off}}
- {
- #if {"%1" == "on"}
- {
- #var afk 1;
- #var prewarning 0;
- }
- {
- #var afk 0;
- #var tellsent {};
- }
- }
- #EVENT {IAC SB GMCP comm.channel IAC SE}
- {
- #var {GMCP[COMM][CHATLOGGER]} {%0};
- #var {chanrec} {$GMCP[COMM][CHATLOGGER][chan]};
- #var {player} {$GMCP[COMM][CHATLOGGER][player]};
- #if {"$GMCP[COMM][CHATLOGGER][chan]" != "mobsay"}
- {
- #line log {/home/colby/tintin/Aardwolf-chats} {$GMCP[COMM][CHATLOGGER][msg]};
- };
- #if {$debug}
- {
- #showme %1
- };
- #if {"$GMCP[COMM][CHATLOGGER][chan]" == "tell"}
- {
- #nop {#if {$afk}
- {
- #if {!$tellsent[$GMCP[COMM][CHATLOGGER][player]]}
- {
- #if {"$GMCP[COMM][CHATLOGGER][player]" != "Cheezburger"}
- {
- #var {tellsent[$GMCP[COMM][CHATLOGGER][player]]} {1};
- reply Sorry, but I'm afk: @Y[@R$afk_reason@Y]@c;
- }
- }
- }}
- };
- #if {$autochat}
- {
- #if {"$chanrec" == "gtell" || ("$chanrec" == "ftalk" && "$GMCP[COMM][CHATLOGGER][msg]" == "%i%*chatbot:%*")}
- {
- #if {($selfonly && "$player" == "Cheezburger") || !$selfonly}
- {
- #replace {GMCP[COMM][CHATLOGGER][msg]} {chatbot:} {};
- #nop {"$chanrec" == "ftalk" || "$chanrec" == "clantalk" || || "$chanrec" == "gtell"};
- #if {"$GMCP[COMM][CHATLOGGER][msg]" != "%*%ichatbot%*"}
- {
- #format {msg} {%l} {$GMCP[COMM][CHATLOGGER][msg]};
- #replace {msg} {'} {};
- #replace {msg} {"} {};
- #replace {msg} {;%dm} {};
- #replace {msg} {0$} {};
- #regexp {$msg} {{.*}{tells you|\(.*group.*\) .*\:|\(.*friend.*\) .*:|you tell your friends.*: }{.*}} {#var msg {&3}};
- perl chatbot.pl '$chanrec' '$GMCP[COMM][CHATLOGGER][player]' '$msg';
- #Nop {#chatbot $msg};
- }
- };
- };
- #elseif {(("$chanrec" == "tell") && $afk && "$player" != "Cheezburger" && ("$prewarning[$GMCP[COMM][CHATLOGGER][player]]" != "" || $prewarning[$GMCP[COMM][CHATLOGGER][player]]))}
- {
- #format {msg} {%l} {$GMCP[COMM][CHATLOGGER][msg]};
- #replace {msg} {'} {};
- #replace {msg} {"} {};
- #replace {msg} {;%dm} {};
- #regexp {$msg} {{.*}{tells you|\(.*group.*\) .*\:}{.*}} {#var msg {&3}};
- perl chatbot.pl '$chanrec' '$GMCP[COMM][CHATLOGGER][player]' '$msg';
- #nop {#chatbot $msg};
- };
- #elseif {"$prewarning[$GMCP[COMM][CHATLOGGER][player]]" == "" && $afk && "$chanrec" == "tell" && "$player" != "Cheezburger"}
- {
- reply Sorry, but i'm afk. You're in luck though, Chatbot will talk with you instead if you send more tells. :) @Y[@R$afk_reason@Y]@c;
- #var prewarning[$GMCP[COMM][CHATLOGGER][player]] 1;
- };
- };
- }
- #EVENT {IAC SB GMCP char.stats IAC SE}
- {
- #variable GMCP[CHAR][STATS] {%0};
- #if {$debug}
- {
- #showme %1
- };
- #nop;
- }
- #EVENT {IAC SB GMCP comm.quest IAC SE}
- {
- #var {GMCP[COMM][QUEST]} {%0};
- #if {"$GMCP[COMM][QUEST][action]" == "start"}
- {
- $repchan @Y[@RQuest Requested@Y]@w: @YTarget@w=@R$GMCP[COMM][QUEST][targ]@w. @YRoom@w=@R$GMCP[COMM][QUEST][room]@w. @YArea@w=@R$GMCP[COMM][QUEST][area]@w.;
- #format {quest[start]} {%T};
- };
- #elseif {"$GMCP[COMM][QUEST][action]" == "fail"}
- {
- $repchan @W\{-=@RQuest Failed@W=-\}@w;
- #var quest {};
- #var temp {};
- #var $GMCP[COMM][QUEST] {};
- #var action {};
- };
- #elseif {"$GMCP[COMM][QUEST][action]" == "comp"}
- {
- #format {quest[end]} {%T};
- #math {quest[time]} {$quest[end] - $quest[start]};
- timer quest;
- #if {$GMCP[COMM][QUEST][pracs] != 0}
- {
- #if {"$quest[bonus]" != ""}
- {
- #var quest[bonus] {$quest[bonus]@w, @R$GMCP[COMM][QUEST][pracs] prac(s)};
- }
- {
- #var {quest[bonus]} { @Y[@WBonus: @R$GMCP[COMM][QUEST][pracs] prac(s)};
- };
- #var quest[bonus] {@Y]@w};
- };
- #if {$GMCP[COMM][QUEST][trains] != 0}
- {
- #if {"$quest[bonus]" != ""}
- {
- #var quest[bonus] {$quest[bonus]@w, @R$GMCP[COMM][QUEST][trains] train(s)};
- }
- {
- #var {quest[bonus]} { @Y[@WBonus: @R$GMCP[COMM][QUEST][trains] train(s)};
- };
- #var quest[bonus] {@Y]@w};
- };
- #if {$GMCP[COMM][QUEST][tp] != 0}
- {
- #if {"$quest[bonus]" != ""}
- {
- #var quest[bonus] {$quest[bonus]@w, @R$GMCP[COMM][QUEST][tp] tp};
- }
- {
- #var {quest[bonus]} { @Y[@WBonus: @R$GMCP[COMM][QUEST][tp] tp};
- };
- #var quest[bonus] {@Y]@w};
- };
- $repchan @R[@YQuest Completed@R] @Y[@WQp: @R$GMCP[COMM][QUEST][totqp]@Y] $quest[TimeMsg]$quest[bonus];
- #var quest {};
- #var temp {};
- #var GMCP[COMM][QUEST] {};
- #var action {};
- };
- #elseif {"$GMCP[COMM][QUEST][action]" == "ready"}
- {
- $repchan @W\{-=@RQuest Time@W=-\}@w;
- #sys {notify-send 'Quest Time'};
- };
- #if {$debug}
- {
- #showme %1
- };
- #nop;
- }
- #EVENT {IAC SB GMCP comm.repop IAC SE}
- {
- #var {GMCP[COMM][REPOP]} {%0};
- #format {curr_time} {%T};
- #if {$repoptrack}
- {
- #if {$repop}
- {
- #format {last_repop} {%T};
- }
- };
- #format {time} {%t} {%H:%M:%S};
- $repchan @WRepop @w= @r$GMCP[COMM][REPOP][zone]@w @@ @r$time;
- #var time {};
- #nop;
- }
- #alias {^repopwatch {on|off}$}
- {
- #if {"%1" == on"}
- {
- #var repoptrack 1;
- }
- {
- #var repoptrack 0;
- }
- }
- #alias {^check repop$}
- {
- #format curr_time {%T};
- #math {time_till_pop} {($last_repop+606)-$curr_time};
- #send {$raidchan @CNext repop@w: @R$time_till_pop @Wseconds.};
- };
- #EVENT {IAC SB GMCP char.base IAC SE}
- {
- #variable GMCP[CHAR][BASE] {%0};
- #nop;
- }
- #event {IAC SB GMCP room.info IAC SE}
- {
- #var GMCP[ROOM][INFO] {%0};
- #if {$mapping}
- {
- #if {"$GMCP[ROOM][INFO][details]" != "%*maze%*" && $GMCP[ROOM][INFO][num] != -1}
- {
- #map goto {$GMCP[ROOM][INFO][num]} {dig};
- #map get roomname {result};
- #if {"$result" == "{\d+}"}
- {
- #map set roomname $GMCP[ROOM][INFO][name];
- #map set roomvnum $GMCP[ROOM][INFO][num];
- #map set roomcolor <178>
- };
- #foreach {$GMCP[ROOM][INFO][exits][]} {exit}
- {
- #map get {roomexit} {result};
- #if {&result[$exit] == 0}
- {
- #map get {roomvnum} {result} {$GMCP[ROOM][INFO][exits][$exit]};
- #map dig {$exit} {$GMCP[ROOM][INFO][exits][$exit]};
- #if {$result == 0}
- {
- #map set {roomcolor} {<fca>} {$GMCP[ROOM][INFO][exits][$exit]}
- }
- }
- }
- };
- }
- }
- #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;
- #read chicomecoatl'
- }
- protocol gmcp sendchar
- #CLASS {gmcp} CLOSE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement