Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Improved Gralats (https://forums.graalonline.com/forums/showthread.php?t=134262010)

Astram 02-08-2011 12:48 AM

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. :D

codecub 02-08-2011 12:53 AM

http://www.gogaminggiant.com/wp-cont...7/facepalm.jpg

Astram 02-08-2011 01:13 AM

Quote:

Originally Posted by codecub (Post 1629039)

Don't like it? Well, its not for everyone.

fowlplay4 02-08-2011 01:16 AM

Place your code in [PHP] tags.


All times are GMT +2. The time now is 04:59 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.