Jump to content
  • 0

Copy Cat/Plagiarism NPC Script Error?


Vale

Question


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  46
  • Reputation:   1
  • Joined:  03/16/20
  • Last Seen:  

image.png.d22e4fa3d0e5a687f0c3543438f6f79d.png

I have here the error of my script and I don't know what is the problem hmmm....

firstcity,175,85,5	script	Copy Cat	779,{
set .@skill_level,getskilllv( "RG_PLAGIARISM" );
mes "[Copy Cat]";
mes "I provide skill to Stalker Class.";
if( !.@skill_level ){
mes "[Copy Cat]";
mes "But only who have ^FF0000Plagiarism skill^000000 can use this services.";

}else{
    mes "";
    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 "[Copy Cat]";
    mes "are you sure you want to copy "+ .skill$[.@menu * 3] +"?";
    mes "you'll need to relogin again";
    next;
    if ( select ( "Yes", "No" ) == 2 ) close;
    set CLONE_SKILL, .skill$[.@menu * 3 +1];
    set CLONE_SKILL_LV, .skill$[.@menu * 3 +2];
    atcommand "@kick "+ strcharinfo(0);
    end;
}

OnInit:
    setarray .skill$, 
        "< Remove >", 0, 0,
	"Flying Side Kick", 421, 7,
        "Fire Bolt", 19, 10,
        "Cold Bolt", 14, 10,
        "Lightning Bolt", 20, 10,
	"Jupitel Thunder", 84, 5,
	"Lord Of Vermillion", 85, 10,
	"Storm Gust", 89, 10,
	"Meteor Storm", 83, 10,
	"First Wind", 542, 5,
	"Crimson Petal", 534, 10,
	"Freezing Ice Spear", 537, 10;
    set .@skillsize, getarraysize(.skill$);
    for ( set .@i,0; .@i < .@skillsize; set .@i, .@i +3 )
        set .menu$, .menu$ + .skill$[.@i] +":";
    end;
}

This is my script and I am planning that the player doesn't need to relog please help me

Thanks !

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.02
  • Content Count:  176
  • Reputation:   60
  • Joined:  01/11/19
  • Last Seen:  

I suspect this part :

   if ( getskilllv(.skill$[.@menu * 3 +1]) ) 

This should be skipped for "<remove>".

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  46
  • Reputation:   1
  • Joined:  03/16/20
  • Last Seen:  

6 hours ago, Seravy said:

I suspect this part :


   if ( getskilllv(.skill$[.@menu * 3 +1]) ) 

This should be skipped for "<remove>".

 

should i delete it?

 

Done. Already Fixed (I deleted the <remove>, because I don't need it actually)

Edited by Vale
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...