I liked Classic iPhones gralat locking system so much that I made my own.
Anyway here is mine.
It allows you to lock gralats if you're in a level that starts with house_account, you may want to restrict it to a level, if so leave that in.
The only difference is that even if you're the owner they WON'T pick up if they're locked, that was the only thing I hate about Classic iPhone in that regards.
PHP Code:
function onCreated() {
this.setshape(0,32,32);
dontblock();
showcharacter();
updategani();
}
function onUpdategani() {
updategani();
}
function updategani() {
temp.type = 1;
if (rupees>=100) temp.type = 4;
else if (rupees>=30) temp.type = 3;
else if (rupees>=5) temp.type = 2;
setcharani("gralats", temp.type);
}
function onPlayerTouchsMe() {
if(this.locked == 0){
player.rupees += rupees;
rupees = 0;
destroy();
}else{
this.chat = "(Locked)";
sleep(2);
this.chat = "";
}
}
function onActionLeftMouse(){
if(this.locked == 1){
this.chat = rupees@" (Locked)";
sleep(2);
this.chat = "";
}else{
this.chat = rupees;
sleep(2);
this.chat = "";
}
}
function onActionDoubleMouse(){
temp.lname = player.level.name.substring(6);
temp.lname = lname.substring(0, lname.pos(".nw").trim());
//had to use it twice, I tried player.level.name.substring(6, lname.pos(".nw").trim()); with no luck.
if(player.account == lname){
this.locked = !this.locked;
if(this.locked == 1){
this.chat = "Locked!";
sleep(2);
this.chat = "";
}
if(this.locked == 0){
this.chat = "Unlocked!";
sleep(2);
this.chat = "";
}
}
}