[dg_scripts]

From: Marie Winter (shawnyve@home.com)
Date: 03/25/00


Hello

Ok I'm having a problem with the following script to run a ferry boat.
Basis is, the ferry runs every 4 hours from one city to another city.

This script does a few things, 1) determines if you've bought the proper
ticket (obj 7000), 2) it checks the time and determines which of 5 other
triggers to attach to the ferry captain to allow him to run at the
proper time, 3) attaches that trigger to the captain of the ferry, 4)
then sends the player to the boat and 5) triggers the captain to start
the countdown to when the ferry leaves.

Now it all works, accept it doesn't attach the proper trigger. if its
between >23 & <6 it will attach the proper trigger 7001, if its >7 & <10
it attaches the proper trigger 7006, but for all other cases it keeps
attaching 7006...

can any dg experts out there see anything that could be causing this?
we've tried changing & to &&, taken out all the brackets, making the < >
=< and >= and no luck there. we can also get it to evaluate the times on
a test trigger properly.

---------
Trigger Intended Assignment: Mobiles
Trigger Type: Receive , Numeric Arg: 100, Arg list: None
Commands:
 wait 10
 If (%object.vnum% == 7000) then
 smile %actor.name%
  if ((%time.hour% >= 23) || (%time.hour% < 6))
   then
    attach 7001 %captain_ID%
  else
  if ((%time.hour% > 7) & (%time.hour% < 10))
   then
    attach 7006 %captain_ID%
  else
  if ((%time.hour% > 11) & (%time.hour% < 14))
   then
    attach 7007 %captain_ID%
  else
  if ((%time.hour% > 15) & (%time.hour% < 18))
   then
    attach 7008 %captain_ID%
  else
  if ((%time.hour% > 19) & (%time.hour% < 22))
   then
    attach 7009 %captain_ID%
   end
   end
   end
   end
   end
 wait 5s
 say Ahhh you wish to visit the city of Aringill. A fine city that is.
 wait 5s
 say The ferry departs five times a day, at 6:00 and 10:00 am, and again
at 2, 6:00 and 10:00 pm.
 wait 5s
 say It is now the %time.hour% th hour.
 wait 5s
 say Please enjoy the ride.
 wait 5s
  if (%actor.room% != %self.room%) then
   drop token
   yell If you don't wish to take the ferry then why buy a ticket!
     halt
  end
 bow %actor.name%
 wait 5s
  if (%actor.room% != %self.room%) then
   drop token
   yell If you don't wish to take the ferry then why buy a ticket!
     halt
  end
 msend %actor.name% The first mate ushers you up the ramp onto the
ferry.
 mechoaround %actor.name% The first mate ushers %actor.name% up the ramp
onto the ferry.
 mteleport %actor.name% 7099
 mat 7099 mforce %actor.name% look
----------------

p.s. there are other checks needed to add to this but i need to make
sure it works before i keep adding more stuff, ie if its the right obj
given ect.


--
Shawnyve
Mirrors of the Wheel
mirrors.inetsolve.com:2222
Come see how your thread weaves into the Pattern


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT