[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]  Area Editor
. -> [Folder]  General
. . -> [Subject]  Programs
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Programs

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


Posted by Alkarindil   Brazil  (70 posts)  [Biography] bio
Date Thu 21 Jun 2007 02:13 AM (UTC)
Message
I am thinking in how to make a program to lead the mob to another room in a date and time, without the mob get lost.

For example, I found this code:

time_prog 22
yawn
emote lies down
sleep

This makes the mob sleep at 22h, right?
I can make the mob go east at 22h and then sleep in a bed, right?
The problem is: if some player uses a charm spell to force the mob out of the room, how do I make the program examine the room where the mob is and lead the mob to the right place?

Thanks in advance!
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #1 on Thu 21 Jun 2007 02:31 AM (UTC)
Message
Use mpgoto and a room echo. Wont matter where in the world the mob is at the appointed time, he'll end up in his bed like he's supposed to be.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #2 on Thu 21 Jun 2007 02:33 AM (UTC)
Message
There is no way for the prog to navigate the mob to the right room, unless you coding something new in (such as moving based on the track code).

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

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #3 on Thu 21 Jun 2007 03:22 AM (UTC)
Message
Series of goto commands "navigates" just fine, Ive used the trick a number of times myself.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #4 on Thu 21 Jun 2007 03:58 AM (UTC)
Message
I don't consider that navigating. :P I meant moving (north/west/etc).

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

Posted by Kamir   (9 posts)  [Biography] bio
Date Reply #5 on Mon 25 Jun 2007 09:04 PM (UTC)
Message
SMAUG 1.8 has a "MPHUNT" command that lets an NPC track a player or NPC, then attack on sight...

Maybe something like this....

guard james(vnum #1) - stationed at "East Gate", (vnum #100)
gilbert_rat (vnum #2) -

At time 22, James want to go to bed, in his barrack (vnum #130).


>time_prog 22
mpat 130 mpmload 2 1
mphunt gilbert_rat

>entry_prog 100
if mobinroom(gilbert_rat) == 1
mppeace $i
say Home sweet home...
say Hello there buddy...
sleep
endif


[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #6 on Mon 25 Jun 2007 09:28 PM (UTC)
Message
I wonder if you could combine mphunt and the pacifist flag to make is more simple, so that it doesn't attack.

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

Posted by Kamir   (9 posts)  [Biography] bio
Date Reply #7 on Tue 26 Jun 2007 12:25 AM (UTC)
Message
Pacifist flags on either/both NPCs will not start a fight, but the "hunting" NPC will still be stuck in a fighting "mode".

(If you "if isfight($i)", it will return true).

With MPPEACE, the fighting is suppressed immediately, so the fight won't start at all.
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #8 on Tue 26 Jun 2007 01:58 AM (UTC)
Message
Ah, I didn't think the mppeace would work in time before a few hits got in.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[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.


9,699 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]