Welcome to the Builder Academy

Question Mob Affect Trigger Healer

More
20 Apr 2023 15:19 #10316 by soth
Hi,
Just working on a pretty simple trigger for a mob to check affected char and remove the spell if affected, however I did change it around to perform some commands inside the switch statement instead of having the echo/echoaround before the switch.  Does not seem to fire 100% of the time.  I have to go out and back in several times before it will fire.  Is this by nature?  I am assuming it is because there is a random chance 1/4 that it will pick the appropriate case, but is there a way to make it remove the spells without doing multiple if/else statements?

Here is the code.
TY!
Code:
#1005 Adept Healer~ 0 g 100 ~ * cast a random spell on players that enter, but only if they are not already affected by spell wait 1 s switch %random.4%      case 1           if %actor.affect(blind)%                say %actor.name%, You look like you need help.                %echoaround% %actor% %self.name% lays %self.hisher% hands on %actor.name% and bows %actor.hisher% head in concentration.                %send% %actor% %self.name% lays %self.hisher% hands on you and bows %actor.hisher% head in concentration.                wait 5 s                dg_cast 'cure blind' %actor%                %send% %actor% Your vision returns!           end           break      case 2           if %actor.affect(curse)%                say %actor.name%, You look like you need help.                %echoaround% %actor% %self.name% lays %self.hisher% hands on %actor.name% and bows %actor.hisher% head in concentration.                %send% %actor% %self.name% lays %self.hisher% hands on you and bows %actor.hisher% head in concentration.                wait 5 s                dg_cast 'remove curse' %actor%                %send% %actor% The curse has been lifed from you!           end           break      case 3           if %actor.affect(poison)%                say %actor.name%, You look like you need help.                %echoaround% %actor% %self.name% lays %self.hisher% hands on %actor.name% and bows %actor.hisher% head in concentration.                %send% %actor% %self.name% lays %self.hisher% hands on you and bows %actor.hisher% head in concentration.                wait 5 s                dg_cast 'remove poison' %actor%                %send% %actor% The poison suddenly leaves your body!           end           break      case 4           if %actor.affect(burning)%                say %actor.name%, You look like you need help.                %echoaround% %actor% %self.name% lays %self.hisher% hands on %actor.name% and bows %actor.hisher% head in concentration.                %send% %actor% %self.name% lays %self.hisher% hands on you and bows %actor.hisher% head in concentration.                wait 5 s                dg_cast 'cure burning' %actor%                %send% %actor% Your body is no longer burning!           end           break      default           say %actor.name%, the spell is too powerful for me to dispel.           break done ~
 

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

More
20 Apr 2023 16:03 #10317 by soth
Replied by soth on topic Mob Affect Trigger Healer
I took out the switch and random, guess I just overlooked the random part trying to work on other stuff while actually working LOL. BTW, is there an example for a mob tell to respond to instead of just "say"?

ty

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

More
20 Apr 2023 18:03 #10318 by thomas
Replied by thomas on topic Mob Affect Trigger Healer
Use %send% <actor> to communicate directly to players ;)

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

More
20 Apr 2023 18:32 #10319 by soth
Replied by soth on topic Mob Affect Trigger Healer
Thanks Thomas!

Been trying to browse the triggers of the day to get ideas :)

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

Time to create page: 0.210 seconds