Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ Area Editor ➜ General ➜ Programs

Programs

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


Posted by Alkarindil   Brazil  (70 posts)  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!
Top

Posted by Meerclar   USA  (733 posts)  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
Top

Posted by Zeno   USA  (2,871 posts)  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
Top

Posted by Meerclar   USA  (733 posts)  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
Top

Posted by Zeno   USA  (2,871 posts)  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
Top

Posted by Kamir   (9 posts)  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


Top

Posted by Zeno   USA  (2,871 posts)  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
Top

Posted by Kamir   (9 posts)  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.
Top

Posted by Zeno   USA  (2,871 posts)  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
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.


30,886 views.

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

Go to topic:           Search the forum


[Go to top] top

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