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

Gammon Forum

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

[Folder]  Entire forum
-> [Folder]  Programming
. -> [Folder]  General
. . -> [Subject]  Working on adding perm affects for objects in olc
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Working on adding perm affects for objects in olc

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


Posted by Trom   (82 posts)  [Biography] bio
Date Sat 30 Oct 2004 02:32 PM (UTC)
Message
I've checked the perm snippet and tried figuring it out in olc. I've also made a new 'paf->where' value called 'TO_D_AFFECTS', when the object is equipped if it comes across an affect with that type of where, it gets the spell number from 'paf->type' and casts the spell. Now theoritically i think it should work well and its coded.
When i load the object right after adding the affect, then wear the object it doesn't do anything.. Any ideas on how to add perm affects in olc to objects?
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #1 on Sat 30 Oct 2004 06:01 PM (UTC)
Message
Typicly, spell effects on worn items will not be displayed to the character in an obvious way - no affects list, no wear messages, nothin. About the only ways to be sure to to either stat them before and after to be sure the affect is adding properly or live testing. There may also be issues with resetting flags properly when a char has camped and come back, it's been my experience that they'll need to rewear any gear with a permspell - mostly because the char construct wasn't designed to track perm effects from items.

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 Trom   (82 posts)  [Biography] bio
Date Reply #2 on Sat 30 Oct 2004 09:00 PM (UTC)

Amended on Sat 30 Oct 2004 09:01 PM (UTC) by Trom

Message
so far i've figured out a way for it to cast the spell when the item is worn (so the actual spell is placed on the char as if it was cast by themselves). The next 2 problems i'm trying to over come is figuring out how to remove the spell which came from the item, for when they remove the item, (probably the -1 duration) and figuring out a way to save it in olc_save.c (which shouldn't be hard. Btw i'm doing this in my own codebase which came from rom/rot, its a multiclass mud so its a little different but similar to rom/rot still.
[Go to top] top

Posted by Trom   (82 posts)  [Biography] bio
Date Reply #3 on Mon 01 Nov 2004 01:24 AM (UTC)
Message
I figured it out after many hours of working on it. Basically put out the plan in point form and coded it and it works quite well so far. Using only a few of the properties of an affect and specifying a different type of affect it was possible to set a special set of rules for perm spells. My codebase can now use permanant spells of infinite duration or a set amount of ticks (should be infinite but the option is open). Thanks for any and all help.
[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.


5,350 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

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

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]