Jump to content
  • 0

R > Buffs Command Script


shockwar14

Question


  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  67
  • Reputation:   0
  • Joined:  04/19/13
  • Last Seen:  

Hi Team,

 

Can I please request a simple script wherein players will be buffed using @buffs command?

Details of the script:

1. A message will prompt once you type @buffs command and will ask you if you want to be buffed or not.

2. Everytime you want to be buffed it will automatically deduct 1m zeny from you.

3. This command will only work outside PVP / GVG / WOE area.

 

Thank you so much.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

-	script	buff_cmd	-1,{
OnInit:
	bindatcmd "buff", strnpcinfo(0)+"::OnCommand";
	end;

OnCommand:
	.@price = 1000000; // 1m per buff
	if ( getmapflag(strcharinfo(3),MF_PVP) || getmapflag(strcharinfo(3),MF_BATTLEGROUND) ||  getmapflag(strcharinfo(3),MF_GVG) ) {
		mes "Doesnt work on PVP/BG/WOE maps";
		close;
	}
	if ( Zeny < .@price ) {
		mes "You need "+F_InsertComma(.@price)+"z.";
		close;
	}
	if ( select("Buff Me!","Dont buff me!")==2 ) {
		mes "Ok";
		close;
	}
	Zeny -= .@price;

	// This will bestow the effect of Level 10 Blessing.
	sc_start SC_BLESSING,240000,10;

	mes "done!";
	close'
}

Untested.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  67
  • Reputation:   0
  • Joined:  04/19/13
  • Last Seen:  

8 hours ago, pajodex said:
-	script	buff_cmd	-1,{
OnInit:
	bindatcmd "buff", strnpcinfo(0)+"::OnCommand";
	end;

OnCommand:
	.@price = 1000000; // 1m per buff
	if ( getmapflag(strcharinfo(3),MF_PVP) || getmapflag(strcharinfo(3),MF_BATTLEGROUND) ||  getmapflag(strcharinfo(3),MF_GVG) ) {
		mes "Doesnt work on PVP/BG/WOE maps";
		close;
	}
	if ( Zeny < .@price ) {
		mes "You need "+F_InsertComma(.@price)+"z.";
		close;
	}
	if ( select("Buff Me!","Dont buff me!")==2 ) {
		mes "Ok";
		close;
	}
	Zeny -= .@price;

	// This will bestow the effect of Level 10 Blessing.
	sc_start SC_BLESSING,240000,10;

	mes "done!";
	close'
}

Untested.

Hey Man.. I will try this out and will let you know the outcome. Thank you!

Edited by shockwar14
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  67
  • Reputation:   0
  • Joined:  04/19/13
  • Last Seen:  

Hi @pajodex I tested your script and it's working perfectly as it should!. Now, is there a way that I can limit the use of @buff command say once every hour?

Thank you!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

you can check the default custom healer npc in rathena. Apply the delay to the script.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  67
  • Reputation:   0
  • Joined:  04/19/13
  • Last Seen:  

8 hours ago, pajodex said:

you can check the default custom healer npc in rathena. Apply the delay to the script.

Oh yeah right, thanks @pajodex!

Link to comment
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...