[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  Running the server
. . -> [Subject]  Smaug, mprog problem
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Smaug, mprog problem

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Sun 02 Jan 2005 09:49 PM (UTC)
Message
>speech_prog "I need a katana"
if class($n) == combatant
if iscarrying($n) == 154
say You have no need for another katana.
else
tsk $n
say Very well i shall provide you with another
mpoload 154
mpe Komosai walks across the cave vanishing into the shadows.
mpsleep 15
mpe He returns with a new katana in his hands.
mpsleep 8
say Here you go now be more careful with it!
give katana $n
endif
endif/code]

Ryo says 'i need a katana'
Komosai looks at Ryo and says 'tsk tsk tsk'.
Komosai says 'Very well i shall provide you with another'
Komosai walks across the cave vanishing into the shadows.
He returns with a new katana in his hands.
Komosai says 'Here you go now be more careful with it!'
Komosai gives a combatant's crystal katana to Ryo.

The above works fine. But if they have a katana...

Ryo says 'i need a katana'
Komosai says 'You have no need for another katana.'
He returns with a new katana in his hands.
Komosai says 'Here you go now be more careful with it!'

The above works, but then the prog continues right after the mpsleep, even though it should stop right after he says you don't need another. Whats wrong?


Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] bio
Date Reply #1 on Sun 02 Jan 2005 10:28 PM (UTC)

Amended on Sun 02 Jan 2005 10:31 PM (UTC) by Nick Cash

Message
I belive this should do it.

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=2646

~Nick Cash
http://www.nick-cash.com
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #2 on Sun 02 Jan 2005 10:37 PM (UTC)

Amended on Sun 02 Jan 2005 10:51 PM (UTC) by Zeno

Message
[EDIT]
Doesn't work. mpsleep now just ends the whole prog. Here is what I have.
 for (count = 0; count < MAX_IFS; count++)
 {
 //for (count2 = 0; count2 < DO_ELSE; count2++)  Old line
 for (count2 = 0; count2 <= DO_ELSE; count2++)
 ifstate[count][count2] =
 current_mpsleep->ifstate[count][count2];
 }

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] bio
Date Reply #3 on Mon 03 Jan 2005 12:31 AM (UTC)

Amended on Mon 03 Jan 2005 12:32 AM (UTC) by Nick Cash

Message
I would go through and reinstall the mpsleep snippet you used and make sure you did everything correctly. Other then that I don't really know what to tell you. :(

I recall some times when I added things and hit one error that I could never get past, so I just ripped it out and redid everything and it all went away. Its worth a shot. I usually learn quite a bit in the process, as I tend to debug during the day, but do the majority of my coding at night or early morning when I'm tired (which makes me prone to errors).

~Nick Cash
http://www.nick-cash.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


3,257 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]