Page 1 of 2

Western Light Time Progs

Posted: Sat Apr 12, 2008 11:23 am
by Japcil
Looking at the mpstat on m16304, I feel it is a area bug.

On my own object I created:

Code: Select all

Name: dawn japcil painting i1791.  Vnum: 1791.
{0F}Short description: {D0}a painting of dawn{0F}.
>time_prog 13 30
mpecho {90}This is a test of the time 30 code.

>time_prog 14 15
mpecho {90}This is a test of the time 15 code.

>time_prog 14 
mpecho {90}This is a test of the time 00 code.
All the echoes show. At this time all I can think is to look at the file for any mistakes that may have been missed.

Re: Western Light Time Progs

Posted: Sat Apr 12, 2008 12:03 pm
by Raona
Japcil, can you post the area code for the Western Light, or better yet, tell me (and other newbs) how to access it?

Re: Western Light Time Progs

Posted: Sat Apr 12, 2008 12:12 pm
by Japcil
mpstat m16304

Re: Western Light Time Progs

Posted: Sun Apr 13, 2008 9:18 am
by Dalvyn

Code: Select all

#16304
captain Orlyn Jhamluuth~
{70}Captain Orlyn Jhamluuth~
{70}Captain Orlyn Jhamluuth of the Western Light ship stands here.~
Dressed rather flamboyantly in a red silk loose fitting shirt,
and tight black leather pants, topped with a bright blue hat
with a white feather, this human looks almost piranical in
nature.
~
U 50 CLASS_FIGHTERS RACE_HUMAN SEX_MALE POS_STANDING DEITY_NONE
ACT_SENTINEL|ACT_CITIZEN|ACT_NOSHOVE
AFF_NONE
ARMOR_TYPE_LEATHER MATERIAL_LEATHER
d10+1 1000
13 13 13 18 13 18 13
0 0 0 0 0
LANG_COMMON|LANG_ELVEN
LANG_COMMON|LANG_ELVEN
RIS_NONE RIS_CHARM RIS_NONE
>greet_prog 100~
if questr(16300,31,1,$n) == 1
 sayto $n You are not welcome aboard, murderer!
 mpechoat $n $I has sailors remove you from the ship.
 mpechoaround $n $I has sailors remove @N from the ship.
 mpforce $n e
else
 if questr(16300,0,1,$n) == 1
  sayto $n Welcome aboard. Remember that if you leave the
  sayto $n ship, you will have to buy a new token.
 else
  sayto $n You shouldn't be here!
  mpechoat $n $I has sailors remove you from the ship.
  mpechoaround $n $I has sailors remove @N from the ship.
  mpforce $n e
 endif
endif
~
>intercept_prog east~
mpmset $n questr 16300 0 1 0
mpunintercept
~
>death_prog 100~
yell Aaaargh!
mpmset $n questr 16300 31 1 1
mplog WITNESS: $n has killed $I on $b ($v) - Shipping lines
~
>time_prog 23 30~
mpat 5390 yell In 30 minutes, the Western Light will leave for Waterdeep.
~
>time_prog 0 0~
connect east
mpat 16327 connect west
mpat 16327 mpecho {70}The Western Light leaves the docks.
mpat 5390 mpareaecho {70}The Western Light leaves the docks.
mpecho {70}The Western Light leaves the docks of Daggerford.
mpat 16355 mpecho {70}You feel the Western Light move as it leaves the docks of Daggerford.
~
>time_prog 0 30~
mpecho {70}The Western Light sets sails west along river Delimbiyr.
mpat 16355 mpecho {70}The Western Light sets sails west along river Delimbiyr.
~
>time_prog 0 45~
mpecho {70}The Western Light sails north along the Sword Coast.
mpat 16355 mpecho {70}The Western Light sails north along the Sword Coast.
~
>time_prog 1 0~
mpecho {70}The Western Light pulls into to the Waterdeep Docks and the crew starts to load new cargo.
mpat 16355 mpecho {70}The Western Light pulls into the Waterdeep Docks.
mpat 16301 mpecho {70}The Western Light pulls into dock and the crew starts to load new cargo.
mpat 8030 mpareaecho {70}The Western Light enters the docks.
connect east 16301
mpat 16301 connect west 16354
~
>time_prog 2 30~
mpat 8030 yell In 30 minutes, the Western Light will leave for Corwell.
~
>time_prog 3 0~
connect east
mpat 16301 connect west
mpat 16301 mpecho {70}The Western Light leaves the docks.
mpat 8030 mpareaecho {70}The Western Light leaves the docks.
mpecho {70}The Western Light leaves the docks of Waterdeep.
mpat 16355 mpecho {70}You feel the Western Light move as it leaves the docks of Waterdeep.
~
>time_prog 3 30~
mpecho {70}The Western Light sets sails south-west through the Sea of Swords.
mpat 16355 mpecho {70}The Western Light sets sails south-west through the Sea of Swords.
~
>time_prog 4 0~
mpecho {70}You can barely see the lights of the Sword Coast on the far horizon now.
mpat 16355 mpecho {70}You can barely see the lights of the Sword Coast on the far horizon now.
~
>time_prog 4 30~
mpecho {70}The Western Light sails west towards the Moonshae Islands.
mpat 16355 mpecho {70}The Western Light sails west towards the Moonshae Islands.
~
>time_prog 5 15~
mpecho {70}The docks of Corwell can be seen in the distance.
mpat 16355 mpecho {70}The docks of Corwell can be seen in the distance through the port holes.
~
>time_prog 5 30~
mpecho {70}The Western Light pulls into to the Corwell Docks and the crew starts to load new cargo.
mpat 16355 mpecho {70}The Western Light pulls into the Corwell Docks.
mpat 16320 mpecho {70}The Western Light pulls into dock and the crew starts to load new cargo.
connect east 16320
mpat 16320 connect west 16354
mpat 2000 mpareaecho {70}The Western Light enters the docks.
mpat 2000 yell In 30 minutes, the Western Light will leave for Daggerford.
~
>time_prog 6 0~
connect east
mpat 16320 connect west
mpat 16320 mpecho {70}The Western Light leaves the docks.
mpat 2000 mpareaecho {70}The Western Light leaves the docks.
mpecho {70}The Western Light leaves the docks of Corwell.
mpat 16355 mpecho {70}You feel the Western Light move as it leaves the docks of Corwell.
~
>time_prog 6 30~
mpecho {70}The Western Light sets sails south and east around the Moonshae Islands.
mpat 16355 mpecho {70}The Western Light sets sails south and east around the Moonshae Islands.
~
>time_prog 7 0~
mpecho {70}The Moonshae Islands are but tiny dots on the horizon by now.
mpat 16355 mpecho {70}The Moonshae Islands are but tiny dots on the horizon by now.
~
>time_prog 7 30~
mpecho {70}The Western Light sails east through the Sea of Swords.
mpat 16355 mpecho {70}The Western Light sails east through the Sea of Swords.
~
>time_prog 8 0~
mpecho {70}The Sword Coast appears on the horizon.
mpat 16355 mpecho {70}The Sword Coast appears on the horizon.
~
>time_prog 8 30~
mpecho {70}The Western Light leaves the sea to sail on River Delimbiyr.
mpat 16355 mpecho {70}The Western Light leaves the sea to sail on River Delimbiyr.
~
>time_prog 9 0~
mpecho {70}The Western Light pulls into to the Daggerford Docks and the crew starts to load new cargo.
mpat 16355 mpecho {70}The Western Light pulls into the Daggerford Docks.
mpat 16327 mpecho {70}The Western Light pulls into dock and the crew starts to load new cargo.
connect east 16327
mpat 16327 connect west 16354
~
>time_prog 9 30~
mpat 5390 yell In 30 minutes, the Western Light will leave for Zazesspur.
~
>time_prog 10 0~
connect east
mpat 16327 connect west
mpat 16327 mpecho {70}The Western Light leaves the docks.
mpat 5390 mpareaecho {70}The Western Light leaves the docks.
mpecho {70}The Western Light leaves the docks of Daggerford.
mpat 16355 mpecho {70}You feel the Western Light move as it leaves the docks of Daggerford.
~
>time_prog 10 30~
mpecho {70}The Western Light sets sails west along river Delimbiyr.
mpat 16355 mpecho {70}The Western Light sets sails west along river Delimbiyr.
~
>time_prog 11 0~
mpecho {70}The Western Light sails south along the Sword Coast.
mpat 16355 mpecho {70}The Western Light sails south along the Sword Coast.
~
>time_prog 11 30~
mpecho {70}The Western Light passes by the high walls of Baldur's Gate then Candlekeep.
mpat 16355 mpecho {70}The Western Light passes by the high walls of Baldur's Gate then Candlekeep.
~
>time_prog 12 0~
mpecho {70}The docks of Zazesspur can be seen in the distance.
mpat 16355 mpecho {70}The docks of Zazesspur can be seen in the distance through the port holes.
~
>time_prog 12 30~
mpecho {70}The Western Light pulls into to the Zazesspur Docks and the crew starts to load new cargo.
mpat 16355 mpecho {70}The Western Light pulls into the Zazesspur Docks.
mpat 16321 mpecho {70}The Western Light pulls into dock and the crew starts to load new cargo.
mpat 15274 mpareaecho {70}The Western Light enters the docks.
connect east 16321
mpat 16321 connect west 16354
~
>time_prog 13 30~
mpat 15274 yell In 30 minutes, the Western Light will leave for Holyhead.
~
>time_prog 14 0~
connect east
mpat 16321 connect west
mpat 16321 mpecho {70}The Western Light leaves the docks.
mpat 15274 mpareaecho {70}The Western Light leaves the docks.
mpecho {70}The Western Light leaves the docks of Zazesspur.
mpat 16355 mpecho {70}You feel the Western Light move as it leaves the docks of Zazesspur.
~
>time_prog 14 30~
mpecho {70}The Western Light sets sails north along the coast.
mpat 16355 mpecho {70}The Western Light sets sails north along the coast.
~
>time_prog 15 0~
mpecho {70}The Western Light sets sails west through the Sea of Swords.
mpat 16355 mpecho {70}The Western Light sets sails west through the Sea of Swords.
~
>time_prog 15 30~
mpecho {70}The island of Alaron can be seen in the distance.
mpat 16355 mpecho {70}The island of Alaron can be seen in the distance through the port holes.
~
>time_prog 16 0~
mpecho {70}The Western Light pulls into to the Holyhead Docks and the crew starts to load new cargo.
mpat 16355 mpecho {70}The Western Light pulls into the Holyhead Docks.
mpat 16324 mpecho {70}The Western Light pulls into dock and the crew starts to load new cargo.
mpat 1795 mpareaecho {70}The Western Light enters the docks.
connect east 16324
mpat 16324 connect west 16354
~
>time_prog 16 30~
mpat 1795 yell In 30 minutes, the Western Light will leave for Zazesspur.
~
>time_prog 17 0~
connect east
mpat 16324 connect west
mpat 16324 mpecho {70}The Western Light leaves the docks.
mpat 1795 mpareaecho {70}The Western Light leaves the docks.
mpecho {70}The Western Light leaves the docks of Holyhead.
mpat 16355 mpecho {70}You feel the Western Light move as it leaves the docks of Holyhead.
~
>time_prog 17 30~
mpecho {70}The Western Light sails east towards the Sword Coast.
mpat 16355 mpecho {70}The Western Light sails east towards the Sword Coast.
~
>time_prog 18 0~
mpecho {70}The Moonshae Islands are but tiny dots on the horizon by now.
mpat 16355 mpecho {70}The Moonshae Islands are but tiny dots on the horizon by now.
~
>time_prog 18 30~
mpecho {70}The Western Light sails south along the coast.
mpat 16355 mpecho {70}The Western Light continues south along the coast.
~
>time_prog 19 0~
mpecho {70}You can see the large Forest of Tethyr to the east.
mpat 16355 mpecho {70}You can see the large Forest of Tethyr to the east.
~
>time_prog 19 30~
mpecho {70}The city of Zazesspur can be seen in the distance.
mpat 16355 mpecho {70}The city of Zazesspur can be seen in the distance through the port holes.
~
>time_prog 20 0~
mpecho {70}The Western Light pulls into to the Zazesspur Docks and the crew starts to load new cargo.
mpat 16355 mpecho {70}The Western Light pulls into the Zazesspur Docks.
mpat 16321 mpecho {70}The Western Light pulls into dock and the crew starts to load new cargo.
mpat 15274 mpareaecho {70}The Western Light enters the docks
connect east 16321
mpat 16321 connect west 16354
~
>time_prog 20 30~
mpat 15274 yell In 30 minutes, the Western Light will leave for Daggerford.
~
>time_prog 21 0~
connect east
mpat 16321 connect west
mpat 16321 mpecho {70}The Western Light leaves the docks.
mpat 15274 mpareaecho {70}The Western Light leaves the docks.
mpecho {70}The Western Light leaves the docks of Zazesspur.
mpat 16355 mpecho {70}You feel the Western Light move as it leaves the docks of Zazesspur.
~
>time_prog 21 30~
mpecho {70}The Western Light sets sails north along the coast.
mpat 16355 mpecho {70}The Western Light sets sails north along the coast.
~
>time_prog 22 0~
mpecho {70}The Western Light passes by the high walls of Candlekeep.
mpat 16355 mpecho {70}The high walls of Candlekeep can be seen on the coast through the port holes.
~
>time_prog 22 30~
mpecho {70}The Western Light continues to sail north along the Sword Coast.
mpat 16355 mpecho {70}The Western Light continues to sail north along the Sword Coast.
~
>time_prog 23 0
mpecho {70}The Western Light enters river Delimbiyr
mpat 16355 mpecho {70}The Western Light enters river Delimbiyr.
~
>time_prog 23 15
mpecho {70}The Western Light pulls into to the Daggerford Docks and the crew starts to load new cargo.
mpat 16355 mpecho {70}The Western Light pulls into the Daggerford Docks.
mpat 16327 mpecho {70}The Western Light pulls into dock and the crew starts to load new cargo.
mpat 5390 mpareaecho {70}The Western Light pulls into the docks.
connect east 16327
mpat 16327 connect west 16354
~
|

Re: Western Light Time Progs

Posted: Sun Apr 13, 2008 10:59 am
by Japcil
The two programs at the end are missing ~ at the end of the times, other than that why do you have 7 0 instead of just 7? Maybe humor the situation and try changing them to just 7 and they will work?

Re: Western Light Time Progs

Posted: Sun Apr 13, 2008 12:32 pm
by Raona
Does it matter that some of the connect east/connect west commands are not preceded by mpat?

Re: Western Light Time Progs

Posted: Sun Apr 13, 2008 4:01 pm
by Japcil
Those are right. you use mpat when the supermob is executing a command in a room it is not in.

Re: Western Light Time Progs

Posted: Mon Apr 14, 2008 11:49 am
by Raona
If anyone else wants to help find the culprit, here are the in-game symptoms we are trying to find a cause for:
The Western Light fails to echo that it is pulling into port at two
spots in its travels:
1) at 5-something, when it is supposed to pull into the docks at Corwell
Does not allow disembarkation at Corwell 5:30-6:00; the programmed echo
at time_prog 5 30~ doesn't seem to trigger. At 5:15, you get "The docks
of Corwell can be seen in the distance." and at 6:00, "The Western Light
leaves the docks of Corwell." While in port, you sometimes hear "You
hear the hustle and bustle of the city" - so I think the ship is in the
right spot, the exit just doesn't open.

2) at 12-something, when it is supposed to pull into Zazzesspur.
Does not allow disembarkation at Zazzesspur, 12:30-13:00; "The docks of
Zazesspur can be seen in the distance." echo comes, then nothing until
14:?? when there's "The Western Light leaves the docks of Zazesspur."

Is there anything at all that clearly differentiates the area code for
these two echoes from the others?

In both cases, the echoes of a nearby city can be heard while the ship is supposed to be in port...so I think it moves to the right spot, it just doesn't open an exit or announce its arrival.

Re: Western Light Time Progs

Posted: Mon Apr 14, 2008 11:53 am
by Raona
Japcil wrote:The two programs at the end are missing ~ at the end of the times
Your spot of sample code up above doesn't have the end ~'s - perhaps if they ARE there, :30 time commands don't work?!?

Re: Western Light Time Progs

Posted: Mon Apr 14, 2008 12:14 pm
by Dalvyn
Japcil wrote:The two programs at the end are missing ~ at the end of the times, other than that why do you have 7 0 instead of just 7? Maybe humor the situation and try changing them to just 7 and they will work?
Keen eyes. Ok, I'll upload the file with more tildas and we'll see if that works.

"time_prog 7 0" is supposed to happen precisely at 7:00, while "time_prog 7" is supposed to happen anywhere between 7:00 and 7:59, so they are not exactly the same thing.

Re: Western Light Time Progs

Posted: Tue Apr 15, 2008 10:27 am
by Raona
I'm not sure if you managed to finish doing it before I checked just now, but I regret to say, behaviour remains as it was before, currently, on the testport.

Re: Western Light Time Progs

Posted: Tue Apr 15, 2008 11:22 am
by Dalvyn
Bleh. Yes, I updated the file with the added tildas to both ports yesterday.

Re: Western Light Time Progs

Posted: Wed Apr 16, 2008 12:22 pm
by Raona
Bummer - I re-checked this morning...that didn't do it. I'll take a deeper look at the code again this weekend!

Perhaps it is the order of the commands that follow the time_prog?

Re: Western Light Time Progs

Posted: Wed Apr 16, 2008 5:58 pm
by Japcil
We need to look into the hard code again, its fine until a time like 7 0 is placed into the programs.

Re: Western Light Time Progs

Posted: Thu Apr 17, 2008 10:48 am
by Raona
Japcil wrote:We need to look into the hard code again, its fine until a time like 7 0 is placed into the programs.
Ah...did you do some testing along these lines, Japcil? I'm understanding that you added time 7 0 into your test program, and then it started acting strange?

Perhaps it would have to be time 7 00, and any one-digit minute would cause trouble?

Re: Western Light Time Progs

Posted: Fri Apr 18, 2008 11:37 am
by Raona
Japcil, could you perhaps see if this modification of your painting code works properly?

Code: Select all

Name: dawn japcil painting i1791.  Vnum: 1791.
{0F}Short description: {D0}a painting of dawn{0F}.
>time_prog 5 0~
mpecho {90}This is a test of the time 00 code.
~
>time_prog 5 15~
mpecho {90}This is a test of the time 15 code.
~
>time_prog 5 30~
mpecho {90}This is a test of the time 30 code.
~

Re: Western Light Time Progs

Posted: Fri Apr 18, 2008 10:12 pm
by Japcil

Code: Select all

Name: dawn japcil painting i1791.  Vnum: 1791.
{0F}Short description: {D0}a painting of dawn{0F}.
>time_prog 5 0
mpecho {90}0 Test

>time_prog 5 15
mpecho {90}15 Test

>time_prog 5 30
mpecho {90}30 Test
as well as:

Code: Select all

Name: dawn japcil painting i1791.  Vnum: 1791.
{0F}Short description: {D0}a painting of dawn{0F}.
>time_prog 5 00
mpecho {90}00 Test

>time_prog 5 15
mpecho {90}15 Test

>time_prog 5 30
mpecho {90}30 Test
do not work beyond the first program. Are we sure a time_prog 5~ will not operate at exactly 5?

Re: Western Light Time Progs

Posted: Fri Apr 18, 2008 10:21 pm
by Dalvyn
Even if a time_prog 5 ~ is (wrongly) coded to happen at 5:00, it seems to me that there's definitely a problem with the time_prog X 0~ programs and that the solution would be to have it fixed, no?

Re: Western Light Time Progs

Posted: Sat Apr 19, 2008 3:22 am
by Japcil
Well not really. If its set that if no value is after 5 to be read that it should happen at 5:00, there is no bug. Just a misunderstanding of how the time progs work.

Here is what I think is how it works but I have asked Martin to post with the diffinitive answer in bugzilla:

If time() == 5 would allow for 5:00 to 5:59
time_prog 5~ should always go off at 5:00. If you wanted a different time you would make it time_prog 5 03~

Re: Western Light Time Progs

Posted: Sat Apr 19, 2008 11:15 am
by Kregor
A sleep-influenced thought...

What if we tried putting the 7 00 prog after all the others with minutes? If you have a 7 45, a 7 30, and a 7 00, for example, try putting the 7 00 after the 7 30 and 7 45 ones.

I'm thinking along the lines of Smaug voodoo, and arrangement might make a diff, like putting rand and bribe progs in a certain order for all of them to trigger.