function script Fake_Func {
dispbottom "Test";
dispbottom ""+ getvariableofnpc(.tmenu$[var1],"Fake_Npc") +"";
end;
}
prontera,153,193,6 script Fake_Npc 123,{
menu ""+.tmenu$[1]+"",-,
""+.tmenu$[2]+"",T1,
"Info",T2;
var1 = 1; end;
T1: var1 = 2; end;
T2: Fake_Func;
OnInit:
setarray .tmenu$[1],"Dog","Cat";
end;
}
you can do like that if you want the function outside the npc