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 ➜ Adding Togglemurder, getting errors :(

Adding Togglemurder, getting errors :(

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


Pages: 1  2 

Posted by Mopop   (115 posts)  Bio
Date Reply #15 on Fri 25 Nov 2005 03:47 AM (UTC)
Message
I put victim there so it doesnt kill them when they go below 0 life, it needs to know who not to kill right?
Top

Posted by Nick Gammon   Australia  (23,162 posts)  Bio   Forum Administrator
Date Reply #16 on Fri 25 Nov 2005 05:18 AM (UTC)
Message
How are you planning to use this command?

toggle_murder

or

toggle_murder nick


If the first case, then you don't know the victim, so you can hardly say:

$n's life has been spared!

can you? Who is $n?

If you are doing "toggle_murder nick" (which doesn't make a huge amount of sense to me) then you need to look up "nick" and get his pointer into victim. Look at any skill that has a victim for how to do this (eg. murder).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Mopop   (115 posts)  Bio
Date Reply #17 on Fri 25 Nov 2005 05:52 AM (UTC)
Message
Well it was just going to be the command "Togglemurder"
then it will say if you are going to kill or stun.
So all I will need to do is remove the $n or just change it to something more generic?
Top

Posted by Conner   USA  (381 posts)  Bio
Date Reply #18 on Fri 25 Nov 2005 09:20 PM (UTC)
Message
I think what Nick's saying here is that the portions of your function that are meant to tell the code what to do if someone is flagged (set to stun) should be a modification to the combatcode and that this function by itself should just do the actual toggling of the flag and output your message to let them know their current status. Personally I still think that you are better off (the easier way) to just make the toggle portion a new option under the config command (do_config) and the add your flag defination to fight.c, but it's your mud. ;)

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #19 on Fri 25 Nov 2005 10:18 PM (UTC)
Message
Right. Like I said, that command is only to toggle the flag right? That's what I was asking.

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

Posted by Mopop   (115 posts)  Bio
Date Reply #20 on Sat 26 Nov 2005 05:56 AM (UTC)
Message
Oh no it is suppose to be the whole command, I didnt realize I had it done wrong. So what you are sayin is, this doesnt do a thing except gives the player the flag? So I need to add the stunning somewhere else? If so where should I add it?
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #21 on Sat 26 Nov 2005 08:48 PM (UTC)
Message
Well I'm not sure how you want it. I figured it was something like this. The command is to toggle the flag. And the flag is to decide if you spare a victim in combat or not. If that's right, then that function does too much. It just needs to toggle the flag like I said.

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.


62,666 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

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.