1997Q3/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] C&#38;C and Event Rescheduling -->
<!--X-From-R13: pynjerapNphc.uc.pbz -->
<!--X-Date: Fri, 12 Sep 1997 23:01:06 +0000 -->
<!--X-Message-Id: 199709122259.PAA11371#xsvr3,cup.hp.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 199708171721.MAA14449@dfw&#45;ix11.ix.netcom.com -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] C&amp;C and Event Rescheduling</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:clawrenc#cup,hp.com">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg01200.html">Previous</a>
&nbsp;|&nbsp;<a href="msg01202.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00640.html">Previous</a>
&nbsp;|&nbsp;<a href="msg01227.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#01201">Author</A>
&nbsp;|&nbsp;<A HREF="#01201">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#01201">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] C&amp;C and Event Rescheduling</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A></LI>
<LI><em>Subject</em>: Re: [MUD-Dev] C&amp;C and Event Rescheduling</LI>
<LI><em>From</em>: <A HREF="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</A></LI>
<LI><em>Date</em>: Fri, 12 Sep 97 14:47:16 -0700</LI>
<LI><em>Reply-to</em>: <A HREF="mailto:claw#null,net">claw#null,net</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
In &lt;<A HREF="msg00640.html">199708171721.MAA14449#dfw-ix11,ix.netcom.com</A>&gt;, on 08/17/97 
   at 10:22 AM, "Jon A. Lambert" &lt;jlsysinc#ix,netcom.com&gt; said:

&gt;Perhaps there is another way?  Someone requested (Shawn?) that I post
&gt;an example of a mud language which handled transactions. So here be
&gt;it:

&gt;object Dragon class BigMutha {
&gt; var fatigue_points;
&gt; var location;
&gt; method event Move(var direction) {
&gt;  if Dragonden.ExitStatus(direction) == OPEN {
&gt;   Dragonden.RemoveObj(this);
&gt;   Dragonden.GetExitLocation().AddObject(this);
&gt;   FatigueMe(5);
&gt;   EvaluateSituation(10);
&gt;  }
&gt;  else 
&gt;   SendOut("The Door is Closed");
&gt;   EvaluateSituation(10);
&gt;   throw #EVENTFAIL;
&gt;  }
&gt; }
&gt; method FatigueMe(var points) {
&gt;  fatigue_points = fatigue_points - points;
&gt;  if fatigue_points &lt; 0 {
&gt;   fatigue_points = 0;
&gt;   SendOut("Your too tired to move");
&gt;      EvaluateSituation(10);
&gt;   throw #EVENTFAIL;
&gt;  }
&gt; }
&gt; method event EvaluateSituation() {
&gt;  ...Insert some clever code here 
&gt;  which might at some point select...
&gt;  Move(20,"east");
&gt; }
&gt;}

&gt;The important points are the different types of methods.  Event
&gt;methods form a logically consistent transaction and may call any
&gt;number of methods of any type.  Commit of the transaction is done at
&gt;the end of the event's method.  Also when 
&gt;EvaluateSituation() is called above a new event is logged and it is
&gt;not executed immediately.  The next statement is. 

&gt;Event methods have as their first implicit parameter a timing value. 
&gt;In the above case Move(20,"east") will occur in 20 tenths of a second
&gt;(I hope).

&gt;Comments?

A greviously long quote, but needed I think.

What determines if a method call will be made as a nested transaction,
or as a seperate event?  The problem here is taht a method/transaction
which may normally be considered logically atomic (move character to
next room for example), may have logical dependencies in a specific
event context (transactions which depend on correct order of
processing of nested transactions).  

eg:

  "Move" is an event method as above.
  The code reads:

    Move (east);
    FillBucket (water);
    Move (east);
    EmptyBucket (Fire);

Without each Move only being done and compleated prior to the next
calls, the fire may or may not get doused.

-- 
J C Lawrence                           Internet: claw#null,net
(Contractor)                           Internet: coder#ibm,net
---------------(*)               Internet: clawrenc#cup,hp.com
...Honorary Member Clan McFUD -- Teamer's Avenging Monolith...


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="01227" HREF="msg01227.html">Re: [MUD-Dev] C&amp;C and Event Rescheduling</A></strong>
<ul compact><li><em>From:</em> "Jon A. Lambert" &lt;jlsysinc#ix,netcom.com&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00640" HREF="msg00640.html">[MUD-Dev] C&amp;C and Event Rescheduling</A></STRONG>
<UL><LI><EM>From:</EM> "Jon A. Lambert" &lt;jlsysinc#ix,netcom.com&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg01200.html">[MUD-Dev] Resource management</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg01202.html">[MUD-Dev]  Mud Games (fwd)</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00640.html">[MUD-Dev] C&amp;C and Event Rescheduling</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg01227.html">Re: [MUD-Dev] C&amp;C and Event Rescheduling</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#01201"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#01201"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>Re: [MUD-Dev] C&amp;C and Event Rescheduling</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00687" HREF="msg00687.html">Re: [MUD-Dev] C&amp;C and Event Rescheduling</A></strong>, 
Adam Wiggins <a href="mailto:nightfall#user1,inficad.com">nightfall#user1,inficad.com</a>, Wed 20 Aug 1997, 04:02 GMT
<UL>
<LI><strong><A NAME="00749" HREF="msg00749.html">Re: [MUD-Dev] C&amp;C and Event Rescheduling</A></strong>, 
clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Wed 27 Aug 1997, 00:24 GMT
</LI>
</UL>
</LI>
</ul>
</ul>
</ul>
</ul>
<LI><strong><A NAME="00630" HREF="msg00630.html">[MUD-Dev] C&amp;C and Event Rescheduling</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix23,ix.netcom.com">jlsysinc#ix23,ix.netcom.com</a>, Sun 17 Aug 1997, 06:21 GMT
</LI>
<LI><strong><A NAME="00640" HREF="msg00640.html">[MUD-Dev] C&amp;C and Event Rescheduling</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Sun 17 Aug 1997, 17:21 GMT
<UL>
<LI><strong><A NAME="01201" HREF="msg01201.html">Re: [MUD-Dev] C&amp;C and Event Rescheduling</A></strong>, 
clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Fri 12 Sep 1997, 23:01 GMT
<UL>
<LI><strong><A NAME="01227" HREF="msg01227.html">Re: [MUD-Dev] C&amp;C and Event Rescheduling</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Tue 16 Sep 1997, 16:22 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</ul>
</LI>
<LI><strong><A NAME="00482" HREF="msg00482.html">Re: [MUD-Dev]	New to this mailing list</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Tue 12 Aug 1997, 06:06 GMT
<UL>
<LI><strong><A NAME="00487" HREF="msg00487.html">Re: [MUD-Dev] New to this mailing list</A></strong>, 
Matt Chatterley <a href="mailto:root#mpc,dyn.ml.org">root#mpc,dyn.ml.org</a>, Tue 12 Aug 1997, 16:41 GMT
</LI>
<LI><strong><A NAME="00488" HREF="msg00488.html">Re: [MUD-Dev] New to this mailing list</A></strong>, 
Richard Woolcock <a href="mailto:KaVir#dial,pipex.com">KaVir#dial,pipex.com</a>, Tue 12 Aug 1997, 17:18 GMT
</LI>
</UL>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>