Jump to content
  • 0
LunaticMinka

Bard healing npc.

Question

Posted (edited)

Hello everyone, I'm trying to make a npc that creates a rest zone on maps iv set up for party leveling. Right now the bard npc heals for 3%hp&sp every 3 seconds in a 7x7.

I'm trying have the npc continually display the visual effect of song of lutie in the 5x5 but I'm not sure how. Thanks for your help in advance for any help.

prontera,150,180,4	script	bard	100,{
	end;
OnInit:
OnTimer3000:
	initnpctimer;
	getmapxy([email protected]$,[email protected],[email protected],BL_NPC);
	areapercentheal [email protected]$,[email protected],[email protected],[email protected]+5,[email protected]+5,3,3;
	end;
}
Edited by LunaticMinka

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0
Posted (edited)
prontera,150,180,4	script	Bard	51,{
	end;
	
OnInit:
	.range = 7;
	.hp_healing_rate = 3;
	.sp_healing_rate = 3;
	getmapxy(.npc_map$, .npc_x, .npc_y, BL_NPC);
	initnpctimer;
	end;

OnTimer3000:
	initnpctimer;
	areapercentheal .npc_map$,(.npc_x - .range),(.npc_x - .range),(.npc_x + .range),(.npc_x + .range), .hp_healing_rate, .sp_healing_rate;
	addrid(4, 0, (.npc_x - .range),(.npc_x - .range),(.npc_x + .range),(.npc_x + .range));
	playBGM "57"; // Don't Cry Baby
	end;
}

or

prontera,150,180,4	script	Bard	51,{
	end;
	
OnInit:
	.range = 7;
	.hp_healing_rate = 3;
	.sp_healing_rate = 3;
	getmapxy(.npc_map$, .npc_x, .npc_y, BL_NPC);
	initnpctimer;
	end;

OnTimer3000:
	initnpctimer;
	areapercentheal .npc_map$,(.npc_x - .range),(.npc_x - .range),(.npc_x + .range),(.npc_x + .range), .hp_healing_rate, .sp_healing_rate;
	playBGMall "57",.npc_map$,(.npc_x - .range),(.npc_x - .range),(.npc_x + .range),(.npc_x + .range); // Don't Cry Baby
	end;
}

 

Edited by Emistry

Share this post


Link to post
Share on other sites
  • 0

Neither of these seems to be working, no healing effect or visual, just a stand alone npc.

Capture.PNG

@Emistry ok figured out why yours wasn't working your cords were set to x1,x1 x2,x2 instead of x1,y1 x2,y2. 

I like how you set your script to be so easy to edit/change and I should emulate that more. 

This attaches a song to the area, I only want the Apple of idun visual effect. Got any ideas on how to make the visuals works in an area? I can only get it to do the apples in the single NPC cell with "npcskilleffect". Thanks for your help again!

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)

the skill required a source target that use the skill, I dont think the NPC can actually cast the skill for you to display the effect.

However, you can still create a similar result by duplicating some NPC which will display and hold the effect, since the effect required a immobile npc object to stick to it.

prontera,150,180,4	script	Bard	51,14,14,{
	end;
	
OnInit:
	.range = 5;
	.hp_healing_rate = 3;
	.sp_healing_rate = 3;
	getmapxy(.npc_map$, .npc_x, .npc_y, BL_NPC);
	initnpctimer;
	
	[email protected]_count = 0;
	for ([email protected] = (.npc_x - .range); [email protected] <= (.npc_x + .range); [email protected] += 2) {
		for ([email protected] = (.npc_y - .range); [email protected] <= (.npc_y + .range); [email protected] += 2) {
			[email protected]_count++;
			movenpc "Bard#effect_" + [email protected]_count, [email protected], [email protected];
		}
	}
	end;

OnTouch_:
	donpcevent "::OnIdunActivate";
	playBGMall "57",.npc_map$,(.npc_x - .range),(.npc_y - .range),(.npc_x + .range),(.npc_y + .range); // Don't Cry Baby
	end;

OnTimer3000:
	initnpctimer;
	areapercentheal .npc_map$,(.npc_x - .range),(.npc_y - .range),(.npc_x + .range),(.npc_y + .range), .hp_healing_rate, .sp_healing_rate;
	addrid(4, 0, (.npc_x - .range),(.npc_y - .range),(.npc_x + .range),(.npc_y + .range));
	[email protected] = ((MaxHp * 100) / .hp_healing_rate);
	skilleffect "AL_HEAL", [email protected];
	end;
}


-	script	Bard#effect	-1,{
	end;

	OnIdunActivate:
		misceffect EF_BOTTOM_APPLEIDUN;
		end;
}

// add more if you enlarge the effect area.
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_1	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_2	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_3	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_4	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_5	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_6	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_7	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_8	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_9	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_10	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_11	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_12	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_13	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_14	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_15	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_16	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_17	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_18	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_19	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_20	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_21	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_22	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_23	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_24	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_25	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_26	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_27	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_28	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_29	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_30	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_31	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_32	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_33	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_34	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_35	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_36	139

https://imgur.com/aWiDtTb

aWiDtTb.gif

Edited by Emistry
  • Upvote 1
  • Love 2
  • MVP 1

Share this post


Link to post
Share on other sites
  • 0
7 hours ago, Emistry said:

the skill required a source target that use the skill, I dont think the NPC can actually cast the skill for you to display the effect.

However, you can still create a similar result by duplicating some NPC which will display and hold the effect, since the effect required a immobile npc object to stick to it.

prontera,150,180,4	script	Bard	51,14,14,{
	end;
	
OnInit:
	.range = 5;
	.hp_healing_rate = 3;
	.sp_healing_rate = 3;
	getmapxy(.npc_map$, .npc_x, .npc_y, BL_NPC);
	initnpctimer;
	
	[email protected]_count = 0;
	for ([email protected] = (.npc_x - .range); [email protected] <= (.npc_x + .range); [email protected] += 2) {
		for ([email protected] = (.npc_y - .range); [email protected] <= (.npc_y + .range); [email protected] += 2) {
			[email protected]_count++;
			movenpc "Bard#effect_" + [email protected]_count, [email protected], [email protected];
		}
	}
	end;

OnTouch_:
	donpcevent "::OnIdunActivate";
	playBGMall "57",.npc_map$,(.npc_x - .range),(.npc_y - .range),(.npc_x + .range),(.npc_y + .range); // Don't Cry Baby
	end;

OnTimer3000:
	initnpctimer;
	areapercentheal .npc_map$,(.npc_x - .range),(.npc_y - .range),(.npc_x + .range),(.npc_y + .range), .hp_healing_rate, .sp_healing_rate;
	addrid(4, 0, (.npc_x - .range),(.npc_y - .range),(.npc_x + .range),(.npc_y + .range));
	[email protected] = ((MaxHp * 100) / .hp_healing_rate);
	skilleffect "AL_HEAL", [email protected];
	end;
}


-	script	Bard#effect	-1,{
	end;

	OnIdunActivate:
		misceffect EF_BOTTOM_APPLEIDUN;
		end;
}

// add more if you enlarge the effect area.
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_1	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_2	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_3	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_4	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_5	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_6	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_7	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_8	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_9	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_10	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_11	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_12	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_13	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_14	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_15	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_16	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_17	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_18	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_19	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_20	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_21	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_22	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_23	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_24	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_25	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_26	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_27	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_28	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_29	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_30	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_31	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_32	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_33	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_34	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_35	139
prontera,1,1,4	duplicate(Bard#effect)	Bard#effect_36	139

aWiDtTb.gif

I tested it here and the character even with full HP is still showing healing effect, it would be good to add a check if the HP is full so that the effect doesn't appear anymore.
And another thing is the percentage of cure quoted does not show the exact number with the healing effect.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.