Jump to content
  • 0
Sign in to follow this  
hadiesyafiq

how to make script when step get buff?

Question

hi all how to make script when we step on certain coordinate we will get buff?

example

we walk and step to prontera 159 160 automatic we will get increase agility and blessing

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
On 2/5/2020 at 2:25 PM, Quazi said:

prontera,156,187,4 script Nurse 4_F_NURSE,7,7,{ OnTouch: .@cooldown = 5; // how many seconds before the player can heal again if ( @heal_cooldown + .@cooldown > gettimetick(2) ) { dispbottom "You need wait for " + ( @heal_cooldown + .@cooldown - gettimetick(2) ) + " seconds."; end; } // disable negative buffs ... I out from RO scene for about 4 years, so this is my only known negative buffs sc_end SC_STONE; sc_end SC_FREEZE; sc_end SC_STUN; sc_end SC_SLEEP; sc_end SC_POISON; sc_end SC_CURSE; sc_end SC_SILENCE; sc_end SC_CONFUSION; sc_end SC_BLIND; sc_end SC_BLOODING; sc_end SC_DPOISON; sc_end SC_FEAR; sc_end SC_COLD; sc_end SC_BURNING; sc_end SC_DEEP_SLEEP; sc_end SC_DEC_AGI; sc_end SC_BROKENARMOR; sc_end SC_BROKENWEAPON; sc_end SC_PROPERTYUNDEAD; sc_end SC_ORCISH; sc_end SC_SKE; sc_end SC_SWOO; sc_end SC_SKA; // give players buff ... don't give too much otherwise player wanna spam .@time = 3600000; // the buff will last for 1 hour sc_start SC_INC_AGI, .@time, 10; sc_start SC_BLESSING, .@time, 10; // sc_start SC_CONCENTRATION, .@time, 10; // sc_start SC_IMPOSITIO, .@time, 5; // sc_start SC_SUFFRAGIUM, .@time, 3; // sc_start SC_KYRIE, .@time, 10; // sc_start SC_MAGNIFICAT, .@time, 5; // sc_start SC_GLORIA, .@time, 5; // sc_start SC_WINDWALK, .@time, 5; // sc_start SC_ANGELUS, .@time, 10; // give player's soul link if ( .@spirit = .spirit[BaseJob] ); else if ( Upper & 1 && BaseLevel < 70 ) .@spirit = SL_HIGH; if ( .@spirit ) { sc_start4 SC_SOULLINK, .@time, 1, .@spirit,0,0; skilleffect .@spirit, 1; } // automatically turn all oridecon and elunium stone into pure stone to reduce player's weight .@ori = countitem(Oridecon_Stone); if ( .@ori >= 5 ) { delitem Oridecon_Stone, .@ori / 5 * 5; getitem Oridecon, .@ori / 5; message strcharinfo(0), "Refined "+ ( .@ori / 5 * 5 ) +" Oridecon Stones, got "+ ( .@ori / 5 ) +" Oridecons."; } .@elu = countitem(Elunium_Stone); if ( .@elu >= 5 ) { delitem Elunium_Stone, .@elu / 5 * 5; getitem Elunium, .@elu / 5; message strcharinfo(0), "Refined "+ ( .@elu / 5 * 5 ) +" Elunium Stones, got "+ ( .@elu / 5 ) +" Eluniums."; } // repair all player's broken eqiupments repairall; // identify all player's equipments getinventorylist; for( .@i = 0; .@i < @inventorylist_count; .@i++ ) { if ( @inventorylist_identify[.@i] == 1 ) continue; else if ( getskilllv(MC_IDENTIFY) == 1 && Sp >= 10 ) heal 0,0; // lol... this is supposed to reduce their SP by 10, whatever else if ( countitem(Spectacles) ) delitem Spectacles,1; else if ( getskilllv(RG_COMPULSION) && Zeny >= ( 100 - ( 5 + 4 * getskilllv(RG_COMPULSION) ) )* 2/5 ) Zeny -= ( 100 - ( 5 + 4 * getskilllv(RG_COMPULSION) ) )* 2/5; else if ( getskilllv(MC_DISCOUNT) && Zeny >= ( 100 - ( 5 + 2 * getskilllv(MC_DISCOUNT) ) )* 2/5 ) Zeny -= ( 100 - ( 5 + 2 * getskilllv(MC_DISCOUNT) ) )* 2/5; else if ( Zeny >= 40 ) Zeny -= 40; else break; delitem2 @inventorylist_id[.@i],1,0,0,0,0,0,0,0; getitem @inventorylist_id[.@i],1; .@icount++; } if ( .@icount ) message strcharinfo(0), "Identified "+ .@icount +" Items."; // and last, give players heal percentheal 100,100; skilleffect AL_HEAL, MaxHp; skilleffect MG_SRECOVERY, MaxSp; emotion e_oops; @heal_cooldown = gettimetick(2); end; }


prontera,156,187,4	script	Nurse	4_F_NURSE,7,7,{

OnTouch:
	.@cooldown = 5; // how many seconds before the player can heal again

	if ( @heal_cooldown + .@cooldown > gettimetick(2) ) {
		dispbottom "You need wait for " + ( @heal_cooldown + .@cooldown - gettimetick(2) ) + " seconds.";
		end;
	}

//	disable negative buffs ... I out from RO scene for about 4 years, so this is my only known negative buffs
	sc_end SC_STONE;
	sc_end SC_FREEZE;
	sc_end SC_STUN;
	sc_end SC_SLEEP;
	sc_end SC_POISON;
	sc_end SC_CURSE;
	sc_end SC_SILENCE;
	sc_end SC_CONFUSION;
	sc_end SC_BLIND;
	sc_end SC_BLOODING;
	sc_end SC_DPOISON;
	sc_end SC_FEAR;
	sc_end SC_COLD;
	sc_end SC_BURNING;
	sc_end SC_DEEP_SLEEP;
	sc_end SC_DEC_AGI;
	sc_end SC_BROKENARMOR;
	sc_end SC_BROKENWEAPON;
	sc_end SC_PROPERTYUNDEAD;
	sc_end SC_ORCISH;
	sc_end SC_SKE;
	sc_end SC_SWOO;
	sc_end SC_SKA;

//	give players buff ... don't give too much otherwise player wanna spam
	.@time = 3600000; // the buff will last for 1 hour
	sc_start SC_INC_AGI, .@time, 10;
	sc_start SC_BLESSING, .@time, 10;
//	sc_start SC_CONCENTRATION, .@time, 10;
//	sc_start SC_IMPOSITIO, .@time, 5;
//	sc_start SC_SUFFRAGIUM, .@time, 3;
//	sc_start SC_KYRIE, .@time, 10;
//	sc_start SC_MAGNIFICAT, .@time, 5;
//	sc_start SC_GLORIA, .@time, 5;
//	sc_start SC_WINDWALK, .@time, 5;
//	sc_start SC_ANGELUS, .@time, 10;

//	give player's soul link
	if ( .@spirit = .spirit[BaseJob] );
	else if ( Upper & 1 && BaseLevel < 70 )
		.@spirit = SL_HIGH;
	if ( .@spirit ) {
		sc_start4 SC_SOULLINK, .@time, 1, .@spirit,0,0;
		skilleffect .@spirit, 1;
	}

//	automatically turn all oridecon and elunium stone into pure stone to reduce player's weight
	.@ori = countitem(Oridecon_Stone);
	if ( .@ori >= 5 ) {
		delitem Oridecon_Stone, .@ori / 5 * 5;
		getitem Oridecon, .@ori / 5;
		message strcharinfo(0), "Refined "+ ( .@ori / 5 * 5 ) +" Oridecon Stones, got "+ ( .@ori / 5 ) +" Oridecons.";
	}
	.@elu = countitem(Elunium_Stone);
	if ( .@elu >= 5 ) {
		delitem Elunium_Stone, .@elu / 5 * 5;
		getitem Elunium, .@elu / 5;
		message strcharinfo(0), "Refined "+ ( .@elu / 5 * 5 ) +" Elunium Stones, got "+ ( .@elu / 5 ) +" Eluniums.";
	}

//	repair all player's broken eqiupments
	repairall;

//	identify all player's equipments
	getinventorylist;
	for( .@i = 0; .@i < @inventorylist_count; .@i++ ) {
		if ( @inventorylist_identify[.@i] == 1 )
			continue;
		else if ( getskilllv(MC_IDENTIFY) == 1 && Sp >= 10 )
			heal 0,0; // lol... this is supposed to reduce their SP by 10, whatever
		else if ( countitem(Spectacles) )
			delitem Spectacles,1;
		else if ( getskilllv(RG_COMPULSION) && Zeny >= ( 100 - ( 5 + 4 * getskilllv(RG_COMPULSION) ) )* 2/5 )
			Zeny -= ( 100 - ( 5 + 4 * getskilllv(RG_COMPULSION) ) )* 2/5;
		else if ( getskilllv(MC_DISCOUNT) && Zeny >= ( 100 - ( 5 + 2 * getskilllv(MC_DISCOUNT) ) )* 2/5 )
			Zeny -= ( 100 - ( 5 + 2 * getskilllv(MC_DISCOUNT) ) )* 2/5;
		else if ( Zeny >= 40 )
			Zeny -= 40;
		else
			break;
		delitem2 @inventorylist_id[.@i],1,0,0,0,0,0,0,0;
		getitem @inventorylist_id[.@i],1;
		.@icount++;
	}
	if ( .@icount )
		message strcharinfo(0), "Identified "+ .@icount +" Items.";

//	and last, give players heal
	percentheal 100,100;
	skilleffect AL_HEAL, MaxHp;
	skilleffect MG_SRECOVERY, MaxSp;

	emotion e_oops;
	@heal_cooldown = gettimetick(2);
	end;

}

 

This is really nice, 

 

How do I add +10 food buffs as well? and make them pay for each heal?

 

Share this post


Link to post
Share on other sites
  • 0
4 hours ago, unrestricted said:

This is really nice, 

 

How do I add +10 food buffs as well? and make them pay for each heal?

 

 

prontera,156,187,4	script	Nurse	4_F_NURSE,7,7,{

OnTouch:
	.@cooldown = 5; // how many seconds before the player can heal again
	
	.@payment = 5000;	//zeny payment
	
	if ( ( @hcd + .@cooldown ) > gettimetick(2) ) {
		dispbottom "You need wait for " + ( @hcd + .@cooldown - gettimetick(2) ) + " seconds.";
		end;
	}
	
	if (Zeny < .@payment) {
		dispbottom "Sorry you need "+.@payment+" Zeny.";
		end;
	}
	Zeny -= .@payment;

//	disable negative buffs ... I out from RO scene for about 4 years, so this is my only known negative buffs
	sc_end SC_STONE;
	sc_end SC_FREEZE;
	sc_end SC_STUN;
	sc_end SC_SLEEP;
	sc_end SC_POISON;
	sc_end SC_CURSE;
	sc_end SC_SILENCE;
	sc_end SC_CONFUSION;
	sc_end SC_BLIND;
	sc_end SC_BLOODING;
	sc_end SC_DPOISON;
	sc_end SC_FEAR;
	sc_end SC_COLD;
	sc_end SC_BURNING;
	sc_end SC_DEEP_SLEEP;
	sc_end SC_DEC_AGI;
	sc_end SC_BROKENARMOR;
	sc_end SC_BROKENWEAPON;
	sc_end SC_PROPERTYUNDEAD;
	sc_end SC_ORCISH;
	sc_end SC_SKE;
	sc_end SC_SWOO;
	sc_end SC_SKA;

//	give players buff ... don't give too much otherwise player wanna spam
	.@time = 3600000; // the buff will last for 1 hour
	sc_start SC_INC_AGI, .@time, 10;
	sc_start SC_BLESSING, .@time, 10;
	sc_start SC_FOOD_STR, .@time, 10;
	sc_start SC_FOOD_AGI, .@time, 10;
	sc_start SC_FOOD_VIT, .@time, 10;
	sc_start SC_FOOD_INT, .@time, 10;
	sc_start SC_FOOD_DEX, .@time, 10;
	sc_start SC_FOOD_LUK, .@time, 10;
//	sc_start SC_CONCENTRATION, .@time, 10;
//	sc_start SC_IMPOSITIO, .@time, 5;
//	sc_start SC_SUFFRAGIUM, .@time, 3;
//	sc_start SC_KYRIE, .@time, 10;
//	sc_start SC_MAGNIFICAT, .@time, 5;
//	sc_start SC_GLORIA, .@time, 5;
//	sc_start SC_WINDWALK, .@time, 5;
//	sc_start SC_ANGELUS, .@time, 10;

//	give player's soul link
	if ( .@spirit = .spirit[BaseJob] );
	else if ( Upper & 1 && BaseLevel < 70 )
		.@spirit = SL_HIGH;
	if ( .@spirit ) {
		sc_start4 SC_SOULLINK, .@time, 1, .@spirit,0,0;
		skilleffect .@spirit, 1;
	}

//	automatically turn all oridecon and elunium stone into pure stone to reduce player's weight
	.@ori = countitem(Oridecon_Stone);
	if ( .@ori >= 5 ) {
		delitem Oridecon_Stone, .@ori / 5 * 5;
		getitem Oridecon, .@ori / 5;
		message strcharinfo(0), "Refined "+ ( .@ori / 5 * 5 ) +" Oridecon Stones, got "+ ( .@ori / 5 ) +" Oridecons.";
	}
	.@elu = countitem(Elunium_Stone);
	if ( .@elu >= 5 ) {
		delitem Elunium_Stone, .@elu / 5 * 5;
		getitem Elunium, .@elu / 5;
		message strcharinfo(0), "Refined "+ ( .@elu / 5 * 5 ) +" Elunium Stones, got "+ ( .@elu / 5 ) +" Eluniums.";
	}

//	repair all player's broken eqiupments
	repairall;

//	identify all player's equipments
	getinventorylist;
	for( .@i = 0; .@i < @inventorylist_count; .@i++ ) {
		if ( @inventorylist_identify[.@i] == 1 )
			continue;
		else if ( getskilllv(MC_IDENTIFY) == 1 && Sp >= 10 )
			heal 0,0; // lol... this is supposed to reduce their SP by 10, whatever
		else if ( countitem(Spectacles) )
			delitem Spectacles,1;
		else if ( getskilllv(RG_COMPULSION) && Zeny >= ( 100 - ( 5 + 4 * getskilllv(RG_COMPULSION) ) )* 2/5 )
			Zeny -= ( 100 - ( 5 + 4 * getskilllv(RG_COMPULSION) ) )* 2/5;
		else if ( getskilllv(MC_DISCOUNT) && Zeny >= ( 100 - ( 5 + 2 * getskilllv(MC_DISCOUNT) ) )* 2/5 )
			Zeny -= ( 100 - ( 5 + 2 * getskilllv(MC_DISCOUNT) ) )* 2/5;
		else if ( Zeny >= 40 )
			Zeny -= 40;
		else
			break;
		delitem2 @inventorylist_id[.@i],1,0,0,0,0,0,0,0;
		getitem @inventorylist_id[.@i],1;
		.@icount++;
	}
	if ( .@icount )
		message strcharinfo(0), "Identified "+ .@icount +" Items.";

//	and last, give players heal
	percentheal 100,100;
	skilleffect AL_HEAL, MaxHp;
	skilleffect MG_SRECOVERY, MaxSp;

	emotion e_oops;
	@hcd = gettimetick(2);
	end;

}

 

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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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