Jump to content
  • 0
GM Winter

H>Plagirism NPC

Question

hello i would like to ask for here regarding this Plagirism npc i want to restrict the other jobs to use it only for rogue also after the rouge copy it will be kick how can i remove the kick and refresh it without exit the server also this errors appears

[Error]: pc_checkskill: Invalid skill id 0

heres the script:

Quote

prontera,171,171,4     script     Plagiarism NPC    779,{
    set [email protected]_level,getskilllv( "RG_PLAGIARISM" );
    mes "select which skill you want to be copy, your existing one will be overwrite";
    next;
    set [email protected], select(.menu$) -1;
    if ( getskilllv(.skill$[[email protected] * 3 +1]) ) {
        mes "you already copied that skill";
        close;
    }
mes "are you sure you want to copy "+ .skill$[[email protected] * 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;
    [email protected]$ = atoi( .skill$[[email protected] * 3 +2] ) > 1 ? "-" + .skill$[[email protected] * 3 +2] : "" ;
    next;
    if ( select ( "Yes", "No" ) == 2 ) close;
    [email protected]$ = atoi( .skill$[[email protected] * 3 +2] ) > 1 ? "-" + .skill$[[email protected] * 3 +2] : "" ;
    mes "choose a level (1" + [email protected]$ + ")";
    if ( input( [email protected], 1, ( atoi( .skill$[[email protected] * 3 +2] ) > 1 ? atoi( .skill$[[email protected] * 3 +2] ) : 1 )) != 0 ) {
        mes "wrong level";
        close;
    }
    set CLONE_SKILL, atoi( .skill$[[email protected] * 3 +1] );
    set CLONE_SKILL_LV, [email protected];
    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 [email protected], getarraysize(.skill$);
    for ( set [email protected],0; [email protected] < [email protected]; set [email protected], [email protected] +3 )
        set .menu$, .menu$ + .skill$[[email protected]] +":";
OnTimer0050:
    showscript "Plagirism NPC", getnpcid(0);
    initnpctimer;
    end;
}

 

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0
	if (!getskilllv("RG_PLAGIARISM")) {
		mes "You must have Plagiarism learned.";
		close;
	}

just add this in the beginning of the code so it checks if player has Plagiarism skill. if they dont have the skill it will display  that they need the skill inorder to use the NPC

  • Upvote 1
Link to comment
Share on other sites

  • 0
56 minutes ago, Pride said:
	if (!getskilllv("RG_PLAGIARISM")) {
		mes "You must have Plagiarism learned.";
		close;
	}

just add this in the beginning of the code so it checks if player has Plagiarism skill. if they dont have the skill it will display  that they need the skill inorder to use the NPC

hello sir its now disabling other job to use this npc the next question is this error appears

"[Error]: pc_checkskill: Invalid skill id 0"

also everytime a rogue copy a skill it was kick on the server

Link to comment
Share on other sites

  • 0
19 minutes ago, GM Winter said:

hello sir its now disabling other job to use this npc the next question is this error appears

"[Error]: pc_checkskill: Invalid skill id 0"

also everytime a rogue copy a skill it was kick on the server

can u use the codebox to send ur script please will check it once

Link to comment
Share on other sites

  • 0
Just now, Pride said:

can u use the codebox to send ur script please will check it once

Quote

prontera,171,171,4     script    Plagiarism NPC    779,{
    if (!getskilllv("RG_PLAGIARISM")) {
        mes "You must have Plagiarism learned.";
        close;
    }
    set [email protected]_level,getskilllv( "RG_PLAGIARISM" );
    mes "select which skill you want to be copy, your existing one will be overwrite";
    next;
    set [email protected], select(.menu$) -1;
    if ( getskilllv(.skill$[[email protected] * 3 +1]) ) {
        mes "you already copied that skill";
        close;
    }
mes "are you sure you want to copy "+ .skill$[[email protected] * 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;
    [email protected]$ = atoi( .skill$[[email protected] * 3 +2] ) > 1 ? "-" + .skill$[[email protected] * 3 +2] : "" ;
    next;
//    if ( select ( "Yes", "No" ) == 2 ) close;
    [email protected]$ = atoi( .skill$[[email protected] * 3 +2] ) > 1 ? "-" + .skill$[[email protected] * 3 +2] : "" ;
    mes "choose a level (1" + [email protected]$ + ")";
    if ( input( [email protected], 1, ( atoi( .skill$[[email protected] * 3 +2] ) > 1 ? atoi( .skill$[[email protected] * 3 +2] ) : 1 )) != 0 ) {
        mes "wrong level";
        close;
    }
    set CLONE_SKILL, atoi( .skill$[[email protected] * 3 +1] );
    set CLONE_SKILL_LV, [email protected];
    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,
    "Bowling Bash", 62, 10,
    "Triple Attack", 263 ,10;
    set [email protected], getarraysize(.skill$);
    for ( set [email protected],0; [email protected] < [email protected]; set [email protected], [email protected] +3 )
        set .menu$, .menu$ + .skill$[[email protected]] +":";
OnTimer0050:
    showscript "Plagirism NPC", getnpcid(0);
    initnpctimer;
    end;
}

 

Link to comment
Share on other sites

  • 0
12 minutes ago, GM Winter said:

 

just delete this line 
 

    atcommand "@kick "+ strcharinfo(0);

and i think that "[Error]: pc_checkskill: Invalid skill id 0" is not related to the stalker NPC

Link to comment
Share on other sites

  • 0
Just now, Pride said:

just delete this line 
 

    atcommand "@kick "+ strcharinfo(0);

and i think that "[Error]: pc_checkskill: Invalid skill id 0" is not related to the stalker NPC

if i delete  this part the new skill copied didnt refresh

and everytime i change the skill copy that error appears 
"[Error]: pc_checkskill: Invalid skill id 0" btw thank you for your effort sir
 

Link to comment
Share on other sites

  • 0
Just now, GM Winter said:

if i delete  this part the new skill copied didnt refresh

and everytime i change the skill copy that error appears 
"[Error]: pc_checkskill: Invalid skill id 0" btw thank you for your effort sir
 

ofc it wont refresh because thats not how you copy skills to the character. If your emulator is old then maybe try to update your emulator. try refer other posts on Stalker Skill copy there is this source code that allows u to copy skill directly as you wanted. im gonna drop the link here.

also on [Error]: pc_checkskill: Invalid skill id 0

try refer Github 
 
Some sage skill provoke a error : pc_checkskill: Invalid skill id 0 · Issue #1154 · rathena/rathena · GitHub

 

  • Upvote 1
Link to comment
Share on other sites

  • 0
2 hours ago, Pride said:

ofc it wont refresh because thats not how you copy skills to the character. If your emulator is old then maybe try to update your emulator. try refer other posts on Stalker Skill copy there is this source code that allows u to copy skill directly as you wanted. im gonna drop the link here.

also on [Error]: pc_checkskill: Invalid skill id 0

try refer Github 
 
Some sage skill provoke a error : pc_checkskill: Invalid skill id 0 · Issue #1154 · rathena/rathena · GitHub

 

thankyou sir pride

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

Important Information

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