Jump to content
  • 0

How to add on zeny require in Plagiarism Npc? URGENT!


ahloi007

Question


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  78
  • Reputation:   1
  • Joined:  10/15/12
  • Last Seen:  

Hi rAthena!

Can guide me the way to add on zeny require in Plagiarism Npc?

Example: if you wanna copy a skill, you have to pay 15,000 zeny for the process to skill copy. If no zeny, please come back again with enough of Zeny.

I'm new to this and still learning on it.

I'm using this script that found on rathena : -

prontera,208,227,4	script	Plagiarism NPC	779,{
	mes "select which skill you want to be copy, your existing one will be overwrite";
	next;
	set .@menu, select(.menu$) -1;
	if ( getskilllv(.skill$[.@menu * 3 +1]) ) {
		mes "you already copied that skill";
		close;
	}
	mes "are you sure you want to copy "+ .skill$[.@menu * 3] +"?";
	mes "you'll need to pay ^ff000015,000 Zeny^000000 and relogin again";
	next;
	if ( select ( "Yes", "No" ) == 2 ) close;
	.@text$ = atoi( .skill$[.@menu * 3 +2] ) > 1 ? "-" + .skill$[.@menu * 3 +2] : "" ;
	mes "choose a level (1" + .@text$ + ")";
	if ( input( .@input, 1, ( atoi( .skill$[.@menu * 3 +2] ) > 1 ? atoi( .skill$[.@menu * 3 +2] ) : 1 )) != 0 ) {
		mes "wrong level";
		close;
	}
	set CLONE_SKILL, atoi( .skill$[.@menu * 3 +1] );
	set CLONE_SKILL_LV, .@input;
	atcommand "@kick "+ strcharinfo(0);
	end;

OnInit:
    setarray .skill$,
    "Fire Bolt", 19, 10,
    "Cold Bolt", 14, 10,
    "Lightning Bolt", 20, 10,
	"Jupitel Thunder", 84, 10,
	"Lord Of Vermillion", 85, 10,
	"Storm Gust", 89, 10,
	"Meteor Storm", 83, 10,
	"Spear of Ice", 537, 10,
	"Raging Fire Dragon", 536, 5,
	"Triple Attack", 263 ,10;
    set .@skillsize, getarraysize(.skill$);
    for ( set .@i,0; .@i < .@skillsize; set .@i, .@i +3 )
        set .menu$, .menu$ + .skill$[.@i] +":";
    end;
}

Waiting for your reply. ?

Edited by ahloi007
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.01
  • Content Count:  81
  • Reputation:   17
  • Joined:  07/18/16
  • Last Seen:  

mes "are you sure you want to copy "+ .skill$[.@menu * 3] +"?";
	mes "you'll need to pay ^ff000015,000 Zeny^000000 and relogin again";
	next;
	if ( select ( "Yes", "No" ) == 2 ) close;
	if ( Zeny < 15000 ) {
	mes "You dont have enough zeny";
	mes "Please come back later";
    close; }
	Set Zeny, Zeny - 15000;
	.@text$ = atoi( .skill$[.@menu * 3 +2] ) > 1 ? "-" + .skill$[.@menu * 3 +2] : "" ;

sleepy rn but you can try this

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  78
  • Reputation:   1
  • Joined:  10/15/12
  • Last Seen:  

18 hours ago, kodkodkub said:

mes "are you sure you want to copy "+ .skill$[.@menu * 3] +"?";
	mes "you'll need to pay ^ff000015,000 Zeny^000000 and relogin again";
	next;
	if ( select ( "Yes", "No" ) == 2 ) close;
	if ( Zeny < 15000 ) {
	mes "You dont have enough zeny";
	mes "Please come back later";
    close; }
	Set Zeny, Zeny - 15000;
	.@text$ = atoi( .skill$[.@menu * 3 +2] ) > 1 ? "-" + .skill$[.@menu * 3 +2] : "" ;

sleepy rn but you can try this

Thanks! it is working! ^-^

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  255
  • Topics Per Day:  0.06
  • Content Count:  706
  • Reputation:   16
  • Joined:  01/07/12
  • Last Seen:  

On 5/25/2020 at 3:46 AM, kodkodkub said:
mes "are you sure you want to copy "+ .skill$[.@menu * 3] +"?";
	mes "you'll need to pay ^ff000015,000 Zeny^000000 and relogin again";
	next;
	if ( select ( "Yes", "No" ) == 2 ) close;
	if ( Zeny < 15000 ) {
	mes "You dont have enough zeny";
	mes "Please come back later";
    close; }
	Set Zeny, Zeny - 15000;
	.@text$ = atoi( .skill$[.@menu * 3 +2] ) > 1 ? "-" + .skill$[.@menu * 3 +2] : "" ;

sleepy rn but you can try this

can i have the full script and make it without the need of re-login please?

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