[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]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Potions
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Potions

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


Posted by Kalados   (17 posts)  [Biography] bio
Date Tue 17 Nov 2009 05:14 PM (UTC)
Message
Trying to make Potions, and according to the help files and Herne's guide

the values, v0 is spell level, v1 is sn1, v2 sn2, and v3 is sn3

What do these mean?

What would be the proper syntax for creating a potion that heals 20 hp or mana?

and yes I've set the item type to potion.

Thanks :)
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #1 on Tue 17 Nov 2009 05:44 PM (UTC)
Message
If I remember correctly -- it's been a while -- potions "cast spells" when you drink them. So, you can set skill/spell numbers in the sn1, sn2 and sn3 slots, and set the level at which the spell is being cast (as if it were being cast by a character) using v0.

So if you want to heal 20 hp, find a spell that heals about that much as use its number as sn1.

But again, it's been quite a while since I've used these, so take the above with a grain of salt...

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Hanaisse   Canada  (114 posts)  [Biography] bio
Date Reply #2 on Tue 17 Nov 2009 10:21 PM (UTC)
Message
SN = spell number

You can use slookup <spellname> to find out what it's sn is, then;

oset (your potion name) value0 <min level to use>
oset (your potion name) value1 59 -- (this is sn of cure critical or you could use cure light, cure serious, whatever suits your needs)
oset (your potion name) value2 203 -- (this is sn of restore mana)

You don't need to use value3 unless you want to put a third spell on it.

aka: Hana
Owner in Training of: Fury of the Gods
alm-dev.org:4000
[Go to top] top

Posted by Kalados   (17 posts)  [Biography] bio
Date Reply #3 on Wed 18 Nov 2009 01:43 PM (UTC)
Message
What would I set the potion to so a shopkeeper would sell an unlimited number of it?
[Go to top] top

Posted by Hanaisse   Canada  (114 posts)  [Biography] bio
Date Reply #4 on Wed 18 Nov 2009 04:43 PM (UTC)
Message
oset potion flags inventory

aka: Hana
Owner in Training of: Fury of the Gods
alm-dev.org:4000
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #5 on Wed 18 Nov 2009 05:12 PM (UTC)
Message
Don't forget you can also create use progs on items, which is more flexible as opposed to obj spells.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Kalados   (17 posts)  [Biography] bio
Date Reply #6 on Thu 19 Nov 2009 10:51 AM (UTC)
Message
So for the object prog it would be

opedit potion add use, got that

But what would be the program syntax for setting the hp/mana restore values and action on use?
[Go to top] top

Posted by Hanaisse   Canada  (114 posts)  [Biography] bio
Date Reply #7 on Thu 19 Nov 2009 01:51 PM (UTC)
Message
Yeah, you could use a use program. I don't see the benefit of one over the other though but it does allow you to get fancy with the use message.

opedit potion add use 100 (requires the % of the time it will trigger)
mpechoat $n You feel instant relief as you quaff a violet potion <--- overrides standard use messages
mprestore $n 20 <--- amount to restore

I suppose it works for a simple heal potion but won't work for potions with other spells (there's no mpcast command).

aka: Hana
Owner in Training of: Fury of the Gods
alm-dev.org:4000
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #8 on Thu 19 Nov 2009 02:03 PM (UTC)
Message
Programs are more flexible than standard SMAUG spells, but then again a spell can always be implemented in C as well. Using programs would prevent putting a lot of "potion spells" in the spell list, if you don't like the clutter. Personally I prefer avoiding the clutter; the potion effect is usually quite specific to the potion it's on.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

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


7,089 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]