The Dawn Of Time
The Official Forums for the Dawn Of Time Mud Codebase
 
Log in Register FAQ Memberlist Search The Dawn Of Time Forum Index Goto the Official Dawn Website

just.. can't figure this out!

 
Post new topic   Reply to topic    The Dawn Of Time Forum Index » Coding
View previous topic :: View next topic  
Author Message
Naylor



Joined: 03 Dec 2012
Posts: 95

PostPosted: Fri Mar 08, 2013 9:43 pm    Post subject: just.. can't figure this out! Reply with quote

okay so.. the only place i can find where the player is ever given requests for input( such a yes or no) is in the nanny stuff.. and trying to replicate that has done me no good at all..

Does ANYONE know how i could get this to work:

Player Jade types: houseinvite Naylor

Jade then recieves following message: Waiting for them to accept.
while Naylor gets: Jade wishes to invite you to join their household. Do you accept Y/N?

then naylor can type Y and get added or N and the attempt is cancelled.
it's driving me bonkers since i need to put similar 'request messages' into multiple places..


Back to top
View user's profile Send private message
Oreant



Joined: 16 Jul 2010
Posts: 47

PostPosted: Sun Mar 10, 2013 10:41 am    Post subject: Reply with quote

Dig around in the Duel code (duel.cpp and starting with do_duel() ). It requires someone to send a duel request to another player and them to accept or decline it within a minute otherwise it cancels. From what I can see in there, that probably has a flavor of what you want.

You could probably even build a new .cpp just for request type commands if you want to use lots of them. Even make a table for different request types. Then one function could end up doing the bulk of the work and feed it to the more specific functions like households, trades, whatever else you go for.


Back to top
View user's profile Send private message
Naylor



Joined: 03 Dec 2012
Posts: 95

PostPosted: Sun Mar 10, 2013 6:02 pm    Post subject: Reply with quote

lookin over it now, thank you! hopefully this will lead to a solution to my problem!


Back to top
View user's profile Send private message
Daos



Joined: 29 Jan 2003
Posts: 1219
Location: United States

PostPosted: Mon Aug 24, 2015 11:12 pm    Post subject: Reply with quote

Naylor wrote:
lookin over it now, thank you! hopefully this will lead to a solution to my problem!


What you are really looking for is connected_states; which is the whole functionality of the creation process.

Example:

CON_GET_CLASS
CON_GET_RACE

etc...

If you want to make things based on responses, that would be the best way to go. Additionally, if you do not want to mess with the hard code - you can probably do a lot of creative mudprogs that would rely upon the speech triggers "yes" and "no".



_________________
- Daos

http://www.dawnoftime.org
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    The Dawn Of Time Forum Index » Coding All times are GMT + 13 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2005 phpBB Group
Theme created by Vjacheslav Trushkin