Welcome to the Builder Academy

Question Healing for a Price - Trigger for MOBs

More
27 Aug 2025 16:45 #10875 by wlessard1
A mud I played about 30 years ago. Crimson II, had a zone, Temple of T'Salchoic. In this zone there was a mob named Rahnkara that for a price would heal you, add to your abilities and cast some spells. I have been trying to get it to work on my little local mud and finally got it working in a trigger. 

I hope someone finds it useful and here is the trigger that seems to work from my testing so far.
Code:
Name: 'Healing for a price',  VNum: [ 1001], RNum: [  297] Trigger Intended Assignment: Mobiles Trigger Type: Speech , Numeric Arg: 1, Arg list: * Commands: eval word %speech.car% eval rest %speech.cdr% while %word% if %word% == list wait 1 sec   %send% %actor%   Say any of these words to be helped                            COST   %send% %actor% -------------------------------------------------------------------------   %send% %actor%   @n1)    @MHeal@n     This will cast Heal on you                          500   %send% %actor%   @n2)    @WSanc@n     This will cast Sanctuary on you for 20 game hours   500   %send% %actor%   @n3)    @RArmor@n    This will cast Armor on you                         500   %send% %actor%   @n4)    @BRegen@n    This will cast Regeneration on you                  500   %send% %actor%   @n5)    @DDemon@n    This will cast Demon Skin on you                    500   eval hitcost (%actor.maxhitp% - %actor.hitp%) * 100   %send% %actor%   @n6)    @grhit@n     This will Restore all your Hit points               %hitcost%   eval manacost (%actor.maxmana% - %actor.mana%) * 100   %send% %actor%   @n7)    @Crman@n     This will Restore all your Mana points              %manacost%   eval movecost (%actor.maxmove% - %actor.move%) * 100   %send% %actor%   @n8)    @brmov@n     This will Restore all your Move points              %movecost%   eval strcost 1000 * (%actor.str% - 1)   %send% %actor%   @n9)    @Rastr@n     This will add 1 Strength point                      %strcost%   eval straddcost 1000 * (100 - %actor.stradd%)   %send% %actor%  @n10)   @Rsadd@n     This will add 10 points of bonus Strength 18/XX     %straddcost%   eval concost 1000 * (%actor.con% - 1)   %send% %actor%  @n11)   @gacon@n     This will add 1 Constitution point                  %concost%   eval dexcost 1000 * (%actor.dex% - 1)   %send% %actor%  @n12)   @madex@n     This will add 1 Dexterity point                     %dexcost%   eval intcost 1000 * (%actor.int% - 1)   %send% %actor%  @n13)   @baint@n     This will add 1 Intelligence point                  %intcost%   eval wiscost 1000 * (%actor.wis% - 1)   %send% %actor%  @n15)   @yawis@n     This will add 1 Wisdom point                        %wiscost%   eval chacost 1000 * (%actor.cha% - 1)   %send% %actor%  @n16)   @macha@n     This will add 1 Charisma point                      %chacost% elseif %word% == heal if %actor.gold% < 500 tell %actor.name% You Don't have enough gold for that. else dg_cast 'heal' %actor% %force% %actor% give 500 coin healer end elseif %word% == armor if %actor.gold% < 500 tell %actor.name% You Don't have enough gold for that. else dg_cast 'armor' %actor% %force% %actor% give 500 coin healer end elseif %word% == sanc if %actor.gold% < 500 tell %actor.name% You Don't have enough gold for that. else dg_affect %actor% sanct on 20 %force% %actor% give 500 coin healer end elseif %word% == regen if %actor.gold% < 500 tell %actor.name% You Don't have enough gold for that. else dg_cast 'regen' %actor% %force% %actor% give 500 coin healer end elseif %word% == demon if %actor.gold% < 500 tell %actor.name% You Don't have enough gold for that. else dg_cast 'demon' %actor% %force% %actor% give 500 coin healer end elseif %word% == rhit eval hitcost (%actor.maxhitp% - %actor.hitp%) * 100 if %actor.gold% < %hitcost% tell %actor.name% You Don't have enough gold for that. else %damage% %actor% -%actor.maxhitp% %force% %actor% give %hitcost% coin healer end elseif %word% == rman eval manacost (%actor.maxmana% - %actor.mana%) * 100 if %actor.gold% < %manacost% tell %actor.name% You Don't have enough gold for that. else eval number %actor.maxmana% - %actor.mana% nop %actor.mana(%number%)% %force% %actor% give %manacost% coin healer end elseif %word% == rmov eval movecost (%actor.maxmove% - %actor.move%) * 100 if %actor.gold% < %movecost% tell %actor.name% You Don't have enough gold for that. else eval number %actor.maxmove% - %actor.move% nop %actor.move(%number%)% %force% %actor% give %movecost% coin healer end elseif %word% == astr eval strcost 1000 * (%actor.str% - 1) if %actor.gold% < %strcost% tell %actor.name% You Don't have enough gold for that. else nop %actor.str(+1)% %force% %actor% give %strcost% coin healer end elseif %word% == sadd if %actor.str% < 18   tell %actor.name% Your strength must be 18 to add exceptional strength. halt end eval straddcost 1000 * (100 - %actor.stradd%) if %actor.gold% < %straddcost% tell %actor.name% You Don't have enough gold for that. else nop %actor.stradd(+10)% %force% %actor% give %straddcost$ coin healer end elseif %word% == acon eval concost 1000 * (%actor.con% - 1) if %actor.gold% < %concost% tell %actor.name% You Don't have enough gold for that. else nop %actor.con(+1)% %force% %actor% give %concost% coin healer end elseif %word% == adex eval dexcost 1000 * (%actor.dex% - 1) if %actor.gold% < %dexcost% tell %actor.name% You Don't have enough gold for that. else nop %actor.dex(+1)% %force% %actor% give %dexcost% coin healer end elseif %word% == aint eval intcost 1000 * (%actor.int% - 1) if %actor.gold% < %intcost% tell %actor.name% You Don't have enough gold for that. else nop %actor.int(+1)% %force% %actor% give %intcost% coin healer end elseif %word% == awis eval wiscost 1000 * (%actor.wis% - 1) if %actor.gold% < %wiscost% tell %actor.name% You Don't have enough gold for that. else nop %actor.wis(+1)% %force% %actor% give %wizcost% coin healer end elseif %word% == acha eval chacost 1000 * (%actor.cha% - 1) if %actor.gold% < %chacost% tell %actor.name% You Don't have enough gold for that. else nop %actor.cha(+1)% %force% %actor% give %chacost% coin healer end else    tell %actor.name% Invalid command. Say 'list' to see options. end eval word %rest.car% eval rest %rest.cdr% done

It has some spells I did, some stuff from dgscripts and the rest. 

Thanks
From a curmudgeon who doesn't want to run a mud anymore except for himself.

Just a guy coding a mud at home for no reason but the challenge.
The following user(s) said Thank You: thomas

Please Log in or Create an account to join the conversation.

More
28 Aug 2025 01:13 #10878 by wlessard1
BTW Prices and products may vary based on corporate stores or franchises and locations. Hours may vary.

Just a guy coding a mud at home for no reason but the challenge.

Please Log in or Create an account to join the conversation.

Time to create page: 0.201 seconds