View Single Post
  #8  
Old 10-08-2004, 02:58 PM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Im not sure if you wanted the source code or the perl quest, but here is an example of a perl quest I have for a Planar Projection that is triggered by quest::spawn(); on the death of Manaetic Behemoth in Innovation.

The code is set up so after 5 hails he depops or after 1 minute.
Code:
sub EVENT_SAY
{
if($text=~/hail/i)
 {
 if($temple2 == 0){
   if($pplimit == 0){
   quest::me("A Planar Progression says, 'You have slain the Manaetic Behemoth? Astounding. See Relm M`Loch.");
   quest::setglobal("temple2","1","7","C999999");
   quest::setglobal("pplimit","1","2","C010000");
   quest::yellow("You have recieved a character flag!");}
   if($pplimit == 1){
   quest::me("A Planar Progression says, 'You have slain the Manaetic Behemoth? Astounding. See Relm M`Loch.");
   quest::setglobal("temple2","1","7","C999999");
   quest::setglobal("pplimit","2","2","C010000");
   quest::yellow("You have recieved a character flag!");}
   if($pplimit == 2){
   quest::me("A Planar Progression says, 'You have slain the Manaetic Behemoth? Astounding. See Relm M`Loch.");
   quest::setglobal("temple2","1","7","C999999");
   quest::setglobal("pplimit","3","2","C010000");
   quest::yellow("You have recieved a character flag!");}
   if($pplimit == 3){
   quest::me("A Planar Progression says, 'You have slain the Manaetic Behemoth? Astounding. See Relm M`Loch.");
   quest::setglobal("temple2","1","7","C999999");
   quest::setglobal("pplimit","4","2","C010000");
   quest::yellow("You have recieved a character flag!");}
   if($pplimit == 4){
   quest::me("A Planar Progression says, 'You have slain the Manaetic Behemoth? Astounding. See Relm M`Loch.");
   quest::setglobal("temple2","1","7","C999999");
   quest::setglobal("pplimit","5","2","C010000");
   quest::yellow("You have recieved a character flag!");}
   if($pplimit == 5){
   quest::me("A Planar Progression says, 'You have slain the Manaetic Behemoth? Astounding. See Relm M`Loch.");
   quest::setglobal("temple2","1","7","C999999");
   quest::setglobal("pplimit","6","2","C010000");
   quest::yellow("You have recieved a character flag!");
   quest::setglobal("pplimit","0","2","C999999");
   quest::depop();}
 } }
}
sub EVENT_SPAWN
{
quest::settimer(1,60);
}
sub EVENT_TIMER
{
quest::depop();
}
quest::yellow(); is a custom command which acts like quest::me(); only it displays yellow text.
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote