Allrightyho I'll make the whole system for now...
NPC Code:
//Gralat system thing which should probably be put in a system NPC if you don't have a pay server
//I'm not sure if the save[9][this.i thing works though.
if (playerenters||timeout) {
if (isleader) {
for (this.i=0;this.i<itemscount;this.i++) {
for (this.j=0;this.j<npsccount;this.j++) {
if (!(items[this.i].x in |npcs[this.i].x-2,npcs[this.i].x+3|&&items[this.i].x in |npcs[this.i].y-2,npcs[this.i].y+3&&save[9][this.i]==100)) {
if (items[this.i].type==0) level.gralatlaid=1;
else if (items[this.i].type==1) level.gralatlaid=5;
else if (items[this.i].type==2) level.gralatlaid=30;
else if (items[this.i].type==19) level.gralatlaid=100;
}
}
}
}
timeout=0.05;
timereverywhere;
}
//Under here the NPC for the gralat.txt file.
//I'm not sure if that in array thing works for this one but I think it does.
if (created) {
rupees=level.gralatlaid;
level.gralatlaid=0;
save[9]=100;
this.takeitems={0,1,2,19};
}
if (playerenters||timeout) {
for (this.i=0;this.i<itemscount;this.i++) {
if (items[this.i].x in |npcs[this.i].x-2,npcs[this.i].x+3|&&items[this.i].x in |npcs[this.i].y-2,npcs[this.i].y+3&&items[this.i].type in this.takeitems) take2 this.i;
}
if (rupees<5) setani gralats,0;
else if (rupees<30) setani gralats,1;
else if (rupees<100) setani gralats,2;
else setani gralats,3;
timeout=0.05;
timereverywhere;
}
if (playertouchsme) {
playerrupees+=rupees;
destroy;
}
I've scripted this from the top of my head and haven't tested it so there's a pretty big chance that it doesn't work.