[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  help with object creation/coding
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

help with object creation/coding

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Soul Demon   (6 posts)  [Biography] bio
Date Mon 19 Jan 2004 02:52 AM (UTC)  quote  ]
Message
I have a question regarding object creation in smaug1.4a
Is it possible through the online creation method to set an object up to csat a spell upon a particular command word or phrase? i see how to set them up with the wearspell and weaponspell flags, but what i am looking for is something along the lines of a keyword trigger that invokes a spell. Is this something that can be done with object programs?... or do i have to alter the source code, if i have to change the code is it a difficult change..

I have tried to set up speech and act progs to achieve this but so far i have not been successfull....
i have also searched the forums and online help for my answer but thus far have come up empty.

any help would be greatly appreciated
[Go to top] top

Posted by Meerclar   USA  (569 posts)  [Biography] bio
Date Reply #1 on Mon 19 Jan 2004 03:51 AM (UTC)  quote  ]

Amended on Mon 19 Jan 2004 03:52 AM (UTC) by Meerclar

Message
Easiest way to do this is probably thru speech mobprogs though the setup can be tricky.

Sample mprog (this is written for DoT parser, may require changes):


speech heal
(code)
if ispc $n (failsafe check)
mpcast heal $n


As for oprogs, Im not sure how reliable they are and Im not particularly certain they can even be used to cast spells.
I have seen weapon v4 flags used to have them cast spells in combat before though.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by Soul Demon   (6 posts)  [Biography] bio
Date Reply #2 on Mon 19 Jan 2004 05:20 AM (UTC)  quote  ]
Message
thanks fer the response
Yes i have used the mprogs to create triggers that cause mobs to cast spells and invoke some immortal commands such as transfer and force.. but i was hoping i was overlooking some method of using triggers with weapons and other items.

these would be for like a sword that can make its wielder invisible by saying a trigger word.
or a cloak that can invoke a word of recall by rubbing it

is this a code thing?

any help is appreciated



[Go to top] top

Posted by Meerclar   USA  (569 posts)  [Biography] bio
Date Reply #3 on Mon 19 Jan 2004 07:12 AM (UTC)  quote  ]
Message
AFAIK, obj progs were never meant for anything quite so elaborate so what function they do have is very very limited. Most likely, you will need to do some fairly extensive code modifications to allow for such things to be possible.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #4 on Mon 19 Jan 2004 07:20 PM (UTC)  quote  ]

Amended on Mon 19 Jan 2004 07:33 PM (UTC) by Greven

Message
One of the easiest ways that I can think to do it would be to put in something like opcast, that uses the supermob to cast spells on you. I also was able to have the object cast a spell on me when set to a device and I used it, cause I think my object speech progs are busted, but I just made it invoke the SWR mobslave to cast it, a general all-purpose mob that is set with the secretive flag.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Soul Demon   (6 posts)  [Biography] bio
Date Reply #5 on Fri 23 Jan 2004 01:19 PM (UTC)  quote  ]
Message
Regarding the supermob solution to my problem (which i find to be very crafty) i have some questions..

1. could this be set up without altering the source code (something i am not experienced enough to handle yet)
2. if i do this through mprogs how will i get the supermob to follow a specific player without fail or would i have to have copies of the supermob all over the place?

Thanks for the assistance
S.D.
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #6 on Fri 23 Jan 2004 07:23 PM (UTC)  quote  ]
Message
No, you would have to code opcast, there is no way to make it use the supermob other than it already does. There is a supermob in every room, I beleive, the supermob is the one that does room progs, rather than a specific mob. So you have to code opcast, I think, sorry.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] 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.


1,928 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]