for the class check change this (25 is ninjas job ID, find other classes in const.txt)
if (Class != 23 && (Class < 4008 || Class > 4022)) {
mes "This feature is not available for your class."; close; }
to
if (Class != 23 && Class != 25 && (Class < 4008 || Class > 4022)) {
mes "This feature is not available for your class."; close; }
and for the item check for despecialize change this
( set 1st .@i to your custom ring base ID and set the .@i<= to your highest ring ID )
for (set .@i,3350; .@i<=3377; set .@i,.@i+1)
if (countitem(.@i)>0) { sleep2 1000; goto Despecialize; }
to
for (set .@i,30782; .@i<=30783; set .@i,.@i+1)
if (countitem(.@i)>0) { sleep2 1000; goto Despecialize; }
and of course the part you already did looks fine,
just repeat the process for each class and item
here you are