Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, Bing, Yandex

Members: 0
Guests: 6
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Building » Mpcommand for item and effect...
Forum Rules | Mark all | Recent Posts

Mpcommand for item and effect exchange
< Newer Topic :: Older Topic > Give an item, get something back..

Pages:<< prev 1 next >>
Post is unread #1 Jun 11, 2005, 10:10 pm
Go to the top of the page
Go to the bottom of the page

AxelFayt

GroupMembers
Posts5
JoinedJun 1, 2005

Hey.. quick question, and most like a stupid one. I seek to make it so that a mob, when given a certain item, like a medpac, from someone... will use a healing ability on that person. I was told it's a basic mpcommand, but I'm not too familiar with building, personally. I'll go into details here:

Mob Name: Apprentice Medic
Item Needed: A small medicine kit
Affect: Use Ki Heal

Ki Heal: My MUD's variation of the Heal Spell.


When a PC gets the small medicine kit, and gives it to the Apprentice Medic, the Apprentice Medic then uses ki heal on the PC. How do I get this set up to function?
       
Post is unread #2 Jun 13, 2005, 8:02 pm   Last edited Jun 13, 2005, 8:13 pm by Cam
Go to the top of the page
Go to the bottom of the page

Cam

GroupAFKMud Team
Posts61
JoinedJan 1, 2002

As for being an mpcommand, I don't know one that facilitates what you are looking for. But it sounds like you are looking for a mobprog. Not sure what codebase you are using but it would most likely fall under an act_prog. It would also probably be set up as:

act_prog p gives you A small medicine kit.
cast 'ki heal' $n


Note that if you put the p after act_prog, it has to match exactly what the mud sends to the character when that action is normally taken. That is just a way to help make sure that only your specified action is triggering the mobprog.

Again, not sure of your exact setup, but that is the shortest method to a "give item, get result" affect. If you wanted it broken down further you could add ifchecks for their current hp to see if they even needed healing, or only certain classes or aligns... but if it is for everybody then that should do it.

If you have any more questions or I can be of any further assistance, fee free to post.
       
Post is unread #3 Jun 16, 2005, 9:24 pm
Go to the top of the page
Go to the bottom of the page

AxelFayt

GroupMembers
Posts5
JoinedJun 1, 2005

Thanks for the help, Cam. It's greatly appreciated. After fiddling around with your provided Code, I realized it wasn't really working with my MUD. So, I went the extra mile, and toyed around with the mobprog's in-game. I've now got it set up for a simple mprog, for when a character says either yes or no, it does a different result, and gives the effect that I wish to have.
       
Post is unread #4 Jun 17, 2005, 9:17 pm
Go to the top of the page
Go to the bottom of the page

Cam

GroupAFKMud Team
Posts61
JoinedJan 1, 2002

Haha... I'm sorry, I didn't mean for what I provided to actually be code. I figured it would be close enough to let you know what you needed to do on whatever codebase you're on. Sorry about that ;)

I am glad that you got a prog to work. And if you got a speech prog to work, it's just as easy to get an act prog to work.

"A good prog is all a mobile needs to survive"

-- Me, Today


Take care and happy progging.
       
Pages:<< prev 1 next >>