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.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Global messages on timer

Global messages on timer

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


Posted by Solo   (4 posts)  Bio
Date Sat 21 Mar 2009 12:34 AM (UTC)
Message
Relatively new to coding for smaug, was wondering two things. One I was wanting to display the layer value on objects specifically armor when you analyze it, and two, is there any way to code in a timer that sends a global message or forces the player to perform certain actions. IE reading a hfile or something along those lines.
Top

Posted by Solo   (4 posts)  Bio
Date Reply #1 on Sat 21 Mar 2009 07:32 AM (UTC)
Message
Ok I figured out the layer thing by myself. Felt kinda dumb afterward. But still having trouble with the timer function. Any help or a pointer in the right direction would be appreciated.
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #2 on Sat 21 Mar 2009 06:39 PM (UTC)
Message
Do you want to echo this stuff at same intervals?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Solo   (4 posts)  Bio
Date Reply #3 on Sat 21 Mar 2009 11:38 PM (UTC)
Message
Yes, was looking to do it roughly every 30 to 45 minutes.
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #4 on Sat 21 Mar 2009 11:41 PM (UTC)
Message
During the update tick function in update.c, you could do an ifcheck on the current real time and then perform whatever is needed. I think the function is char_update?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Solo   (4 posts)  Bio
Date Reply #5 on Sun 22 Mar 2009 09:27 AM (UTC)
Message
Ok I went into update.c and added an if check, under char_update. But its not doing what its supposed to do.

if ( (current_time % 1800) == 0 )
{
do_help( ch, "voteinfo" );
}

Now, if I'm not mistaken, this should, every 30 minutes, every character should have the voteinfo hfile displayed. I am I missing something?
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #6 on Sun 22 Mar 2009 05:05 PM (UTC)
Message
Try it in the char_check function. That one is called more frequently.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Orik   USA  (182 posts)  Bio
Date Reply #7 on Mon 23 Mar 2009 04:27 PM (UTC)
Message
You should probably add in a config option to turn that off as I would never play a game that spams me to vote every 30 minutes. That's just a personal preference though.

To me, that's just poor taste and makes the mud look bad. Again, just my personal opinion.
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.


28,065 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.