Mobile Buffing

For builders to discuss and ask building questions.
Post Reply
Nearraba
Sword Grand Master
Sword Grand Master
Posts: 341
Joined: Wed Jul 14, 2004 7:41 pm
Location: The High Forest

Mobile Buffing

Post by Nearraba » Sat Oct 11, 2014 4:57 am

Apologies in advance if this is silly. I've looked through the lessons and searched quite a few pages on the forums, but cannot find how to go about getting a mobile to spell-buff itself, automatically. The resistances listed for mobiles, does not include a RIS_DEATH, so my main objective is learning how to get the mob itself to buff up with a death ward. Could someone explain this or point me towards the lesson that I could be over looking?
Autumn is a second spring where every leaf has its turn to be a flower.
- Albert Camus
Althasizor
Sword Grand Master
Sword Grand Master
Posts: 585
Joined: Sun May 22, 2011 6:05 am
Location: Ba Sing Se
Contact:

Re: Mobile Buffing

Post by Althasizor » Sat Oct 11, 2014 7:19 am

There's probably a much better solution, but I -think- the following might work if you're just looking to keep a death ward affect active on the mobile?

Code: Select all

>rand_prog 100~
if isaffected($i) == Death_ward
else
  cast 'death ward' self
endif
~
What are you talking about? What, that guy?
That was like that when I got here.
User avatar
Harroghty
Staff
Staff
Posts: 9695
Joined: Tue Jul 27, 2004 5:38 pm

Re: Mobile Buffing

Post by Harroghty » Sat Oct 11, 2014 2:18 pm

The mobile will automatically "buff" itself if it is a spell caster (priest, wizard, or one of the subordinate guilds). You've seen NPCs cast a series of spells from time to time. The trouble with this is that it is kind of disruptive to programs so another solution is to make the mobile unique and add affect flags from the outset; this will perpetually affect the mobile with something like death ward without any interruptions to anything else you want the NPC to accomplish.

Your AFF line would look like this:

Code: Select all

0 AFFTWO_DEATH_WARD
"A man may die yet still endure if his work enters the greater work, for time is carried upon a current of forgotten deeds, and events of great moment are but the culmination of a single carefully placed thought." - Chime of Eons
Nearraba
Sword Grand Master
Sword Grand Master
Posts: 341
Joined: Wed Jul 14, 2004 7:41 pm
Location: The High Forest

Re: Mobile Buffing

Post by Nearraba » Sun Oct 12, 2014 5:50 pm

Wonderful. Thank you. I did not see death ward on the affect flags available. Is it safe to assume that almost all defensive spells are available to be added to a mobile with an aff flag, even if it is not among the list in the lesson?
Autumn is a second spring where every leaf has its turn to be a flower.
- Albert Camus
User avatar
Harroghty
Staff
Staff
Posts: 9695
Joined: Tue Jul 27, 2004 5:38 pm

Re: Mobile Buffing

Post by Harroghty » Sun Oct 12, 2014 6:23 pm

The lesson list is incomplete. We don't update that because: it would be huge, it changes from time to time, and it's something that's easy to adjust later on during the building process. If it is something you want to address at this stage of your project then you can post here, but it can probably wait until you are on the test port and -at that point- one of us can help you out with it. No worries either way.
"A man may die yet still endure if his work enters the greater work, for time is carried upon a current of forgotten deeds, and events of great moment are but the culmination of a single carefully placed thought." - Chime of Eons
Post Reply