View Single Post
  #1  
Old 02-08-2011, 12:48 AM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
Post Improved Gralats

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.
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!



Last edited by Tigairius; 02-08-2011 at 01:25 AM.. Reason: Read the rules. Please use [PHP] tags around your code. Also, style. I also don't want to have to fix your scripts.
Reply With Quote