uhh, isn't the role of this part, to show the name of the player? if yes,
couldn't you just delete this part,
set .n$,"["+strcharinfo(0)+"]"; // NPC Name
And
you could edit this part
mes .n$;
to this
mes ""+strcharinfo(0)+",";
Please correct me if I'm wrong. Thank you.
Well that was an typo on my side:
set .n$,"["+strcharinfo(0)+"]"; // NPC Name
I requested the char name of the attached player, which wouldn't work since it was requesting it on server start when no player is attached yet.
Should have been:
set .n$,"["+strnpcinfo(1)+"]"; // NPC Name
Also @reloadscript won't initiate "OnInit" either > Server Restart.
Other possiblity is to use that at the beginning, so after the header:
if(.n$ == "") donpcevent strnpcinfo(3)+"::OnInit";
This is the result:
prontera,156,167,3 script Champion 100,{
if(.n$ == "") donpcevent strnpcinfo(3)+"::OnInit";
mes .n$;
if(Class != .class) {
mes "I'm sorry, but only "+jobname(.class)+"s are allowed to join this PvP Room.";
close;
}
mes "Do you want to go to the PvP Room?";
if(select("- Yes:- No") - 1) close;
close2;
warp "pvp_y_2-2",0,0;
end;
OnInit:
set .n$,"["+strnpcinfo(1)+"]"; // NPC Name
set .class,4016; // Allowed Class
end;
}
After the test you can remove the "if(.n$ == "") donpcevent strnpcinfo(3)+"::OnInit";". Since it's not required anymore ;O.
Regards,
Chris