You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
2.3 KiB
89 lines
2.3 KiB
#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 {<fca>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 <cfa>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
|