Difference between revisions of "ItemSkill(Script)"
Jump to navigation
Jump to search
(Created page with "{{CoffeeMUDWikiBuilderTOC}} = Skill Use on an Item = When designing a mob to work on a player's items, there are several considerations: *You need to make sure the player wil...") |
(→Notes) |
||
(One intermediate revision by the same user not shown) | |||
Line 14: | Line 14: | ||
give $o $n | give $o $n | ||
drop $o | drop $o | ||
− | + | sayto $n That's more like it. | |
else | else | ||
if isimmort($n) | if isimmort($n) | ||
Line 34: | Line 34: | ||
=Notes= | =Notes= | ||
− | . | + | *Note the DROP after the GIVE. This is a catch statement in case there is some reason preventing the character from receiving the item, the MOB will drop the item to the ground and the player can resolve their inventory issue without killing the MOB. |
Latest revision as of 21:24, 13 September 2022
CoffeeMUD |
---|
Administrator Builder Player |
=CoffeeMUD Builder Information= | |||
---|---|---|---|
Basics | Praetor Player Support Commands Zapper Masks | Advanced | Races Classes Abilities Socials Scripting |
Building | Behaviors Properties Areas Rooms Exits Items Mobs | Systems | Achievements Crafting Help Info Ships Planes of Existence Quests Triumphs |
Skill Use on an Item
When designing a mob to work on a player's items, there are several considerations:
- You need to make sure the player will get back their item, even if their inventory is full, or they are overloaded. If you do a GIVE command, and the player cannot accept the item, the mob will keep the item. Therefore, it is best to follow any GIVE commands with a DROP command.
- When charging for services, you really don't want to encourage players killing the mob to get their money back. Therefore, consider resetting the mob's money.
Casting Refit for Free
give_prog all if level($n <= 25) mpcast refit $o give $o $n drop $o sayto $n That's more like it. else if isimmort($n) mpcast refit $o give $o $n drop $o sayto $n Anything for an immortal! else tsk $n sayto $n Tried to fool ol' Sandibald you did! Go to the mainlands. give $o $n drop $o chuckle endif endif ~
Notes
- Note the DROP after the GIVE. This is a catch statement in case there is some reason preventing the character from receiving the item, the MOB will drop the item to the ground and the player can resolve their inventory issue without killing the MOB.