Page 1 of 1

i got error

Posted: Sun May 22, 2022 11:57 am
by devrimist
Hello everyone. As long as the bot doesn't take damage, the party heals properly. but whenever the helaer gets damaged it gives the following error. Does anyone have an idea on how I can fix it. Or is there anyone who can share a party helaer profile that works without problems? :roll: :?
err.png

Re: i got error

Posted: Mon May 23, 2022 9:09 am
by Administrator
I was not able to reproduce the issue but I made a minor fix that might help you out. Please update your scripts and try again.

Re: i got error

Posted: Mon May 23, 2022 9:24 am
by devrimist

Code: Select all

<onSkillCast>
		-- Additional Lua code to execute when casting a skill
		-- Note: arg1 contains the skill being used.
		-- i.e. arg1.Name will be the name of the skill being cast
		-- e.g.:
		if( 15 > player.HP/player.MaxHP*100 ) then
		    player:cast("PRIEST_SOUL_SOURCE");
		elseif( 25 > player.HP/player.MaxHP*100 ) then
		    player:cast("PRIEST_HOLY_AURA");
		    player:cast("PRIEST_URGENT_HEAL");
		    player:cast("PRIEST_URGENT_HEAL");
	</onSkillCast>
I'm trying to use it like this, but I'm having trouble. Below is the profile file I'm trying to use, if you have time, could you review it and tell me where I made a mistake.
How can I get the priest to use heal skills for himself?

Re: i got error

Posted: Mon May 23, 2022 9:34 am
by Administrator
You are missing an 'end' statement there. All 'if' statements need to finish with an 'end'.

Code: Select all

		if( 15 > player.HP/player.MaxHP*100 ) then
		    player:cast("PRIEST_SOUL_SOURCE");
		elseif( 25 > player.HP/player.MaxHP*100 ) then
		    player:cast("PRIEST_HOLY_AURA");
		    player:cast("PRIEST_URGENT_HEAL");
		    player:cast("PRIEST_URGENT_HEAL");
		end		    

Re: i got error

Posted: Mon May 23, 2022 10:32 am
by devrimist
Was it just because of an end?. Programming is not fair at all :D .. :shock: For now, it didn't give an error on startup. Anyway, I'll try it tonight, let's see if the bot stop problem will continue. Thank you for your interest. :ugeek:

Re: i got error

Posted: Mon May 23, 2022 12:26 pm
by devrimist
yes, the bot doesn't stop anymore. Now it's time to perfect the profile... I'll look into how to use Buff Foods and Drinks.