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 ➜ Long Range Spellcasting

Long Range Spellcasting

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


Posted by Manakra   (27 posts)  Bio
Date Thu 23 Jun 2005 04:17 AM (UTC)
Message
I would like to include a feature in my mud, Long Ranged Spellcasting. Only IMM's would have this function, and it would work similiar to AT.
something like
Clr (Cast long range) person 'spell' spelltarget

Except, anyone in the room, including the victim, that it casts too, will not be able to see like "Kalise utters the words..." They will just feel the affect.

Anyone know how to do this?
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Thu 23 Jun 2005 05:14 AM (UTC)
Message
A fairly straightforward way of doing this would be talking the cast code, copying it, and removing the parts where it prints (e.g. when it calls the act function.) You'll still have the spell effect messages printed, but not the incantation.

A cleaner way of doing the above would be to take the cast code, bring it to a different function, add another parameter called e.g. 'silent'. If silent is set, do not make calls to act. In the normal cast code, call the function with silent set to false, and in the new cast code, call the function with silent set to true.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Dralnu   USA  (277 posts)  Bio
Date Reply #2 on Fri 24 Jun 2005 06:07 PM (UTC)
Message
Might want to add in an ifcheck to make sure the target is a player, otherwise you could end up casting it on mobiles, too. Preventive coding is always nice.
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #3 on Fri 24 Jun 2005 06:55 PM (UTC)
Message
Why would we not want to cast on mobiles as well? When selecting a target players should probably be considered first but I see no reason in particular why mobiles should be excluded. Unless, of course, that's part of Manakra's specifications...

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.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.


18,134 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.