#class quest kill #class quest open #NOP ############################ #NOP ### GMCP Quest Handler #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.; #var quest_timer {ACTIVE<099>}; #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]}; #var quest_timer 30; #tic quest_timer { #math quest_timer {$quest_timer - 1}; #if $quest_timer==0 {#untic quest_timer;#var quest_timer READY<099>}; } {60} ; #if {$GMCP[COMM][QUEST][pracs] != 0} { #if {"$quest[bonus]" != ""} { #var quest[bonus] {$quest[bonus]@w, @R$GMCP[COMM][QUEST][pracs] prac}; } { #var {quest[bonus]} { @Y[@WBonus: @R$GMCP[COMM][QUEST][pracs] prac}; }; #var quest[bonus] {$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}; } { #var {quest[bonus]} { @Y[@WBonus: @R$GMCP[COMM][QUEST][trains] train}; }; #var quest[bonus] {$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] {$quest[bonus]@Y]@w}; }; $repchan @R[@YQuest Completed@R] @Y[@WQp: @R$GMCP[COMM][QUEST][totqp]@Y] $quest[time] secs $quest[bonus]@w; #var quest {}; #var temp {}; #var GMCP[COMM][QUEST] {}; #var action {}; }; #elseif {"$GMCP[COMM][QUEST][action]" == "ready"} { $repchan @W\{-=@RQuest Time@W=-\}@w; #var quest_timer {<129>READY<099>}; #bell; }; #if {$debug} { #showme %1 }; #nop; } #class quest close