This is an improved gralats class, some may like. Some may not.
-----------------------------------------------
PHP Code:
gralat.admins = {
"Graal749201"
};
function onCreated() {
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 (player.account == this.owner || this.owner == NULL) {
player.rupees += rupees;
dontblock();
rupees = 0;
destroy();
}
if (player.account != this.owner) {
player.chat = "I don't own this!";
}
}
function onActionLeftMouse() {
this.chat = rupees;
sleep(3);
this.chat = "";
}
function onActionRightMouse() {
if (this.owner != NULL) {
this.chat = this.owner;
sleep(3);
this.chat = "";
}
if (this.owner == NULL) {
this.owner = player.account;
player.chat = "I now own the gralat!";
}
}
function onPlayerChats() {
if (player.account in gralat.admins) {
if (player.chat == "/killgralats") {
destroy();
rupees = 0;
}
}
if (player.chat == "/viewowners") {
this.chat = this.owner;
sleep(3);
this.chat = "";
}
}
----------------------------------------------------
Q: What does it do?
A: It lets people own gralats so one person can keep the gralat while nobody steals it, and it lets people view the gralat amount the gralat is worth!
Q: How does it work?
A: Clicking on the gralat lets the player view the amount it is worth. Right clicking on it, lets you own the gralat if it isn't currently occupied
Q: Are there other mini features?
A: Yes, chatting "/viewowners" shows all gralat owners nearby. And if your account is in the array at the top you can remove the levels gralats by saying "/killgralats"!
Hopefully this will be useful to people who like Gralats and want improvements on how the system works!
Updates will appear later in this thread.
