Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Screwed With Gralat Class... Need Help! (https://forums.graalonline.com/forums/showthread.php?t=134261965)

Astram 02-05-2011 05:25 PM

Screwed With Gralat Class... Need Help!
 
I was trying to improve the gralat class, which I did... But, then when I was making another improvement, gralats started FAILING! Ever gralat was worth 0 rupees and of course in that case, green gralats. So, what I am asking is if someone can post the working gralat class!
Thanks!:cry:

Gothika 02-05-2011 05:34 PM

I assume you have a back up of the one you made before making the "other improvement"?

Fulg0reSama 02-05-2011 05:51 PM

Quote:

Originally Posted by Gothika (Post 1628214)
I assume you have a back up of the one you made before making the "other improvement"?

Clearly not or he wouldn't be here would he? :rolleyes:

Crow 02-05-2011 06:19 PM

PHP Code:

if (created) {
  
showcharacter;
  
updategani(); 
}

if (
updategani)
  
updategani();

function 
updategani() {
  
this.type 1;
  if (
rupees>=100this.type 4;
  else if (
rupees>=30this.type 3;
  else if (
rupees>=5this.type 2;

  
setcharani gralats,#v(this.type);
}

if (
playertouchsme) {
  
playerrupees += rupees;
  
rupees 0
  
destroy;



irock1 09-12-2011 12:31 PM

Hi I have have also messed it up, however i tired Crow's fixed one but it didnt acutally work. The problem is that I can't pick up the Gralats

-irock1

Crow 09-12-2011 12:36 PM

Quote:

Originally Posted by irock1 (Post 1667919)
Hi I have have also messed it up, however i tired Crow's fixed one but it didnt acutally work. The problem is that I can't pick up the Gralats

-irock1

That's not a fixed one, it's the default one.

scriptless 09-12-2011 09:14 PM

Quote:

Originally Posted by Crow (Post 1628233)
PHP Code:

if (created) {
  
showcharacter;
  
updategani(); 
}

if (
updategani)
  
updategani();

function 
updategani() {
  
this.type 1;
  if (
rupees>=100this.type 4;
  else if (
rupees>=30this.type 3;
  else if (
rupees>=5this.type 2;

  
setcharani gralats,#v(this.type);
}

if (
playertouchsme) {
  
playerrupees += rupees;
  
rupees 0
  
destroy;



Wait, by default is is GS1, not GS2?

fowlplay4 09-12-2011 09:28 PM

The default is probably a decade old now. Here's it in GS2 though:

PHP Code:

function onCreated() {
  
showcharacter();
  
updateGani();
}

function 
onPlayerEnters() {
  
updateGani();
}

function 
updateGani() {
  
temp.gralat 1;
  if (
this.rupees >= 100temp.gralat 4;
  else if (
this.rupees >= 30temp.gralat 3;
  else if (
this.rupees >= 5temp.gralat 2;
  
setcharani("gralats"temp.gralat);
}

function 
onPlayerTouchsMe() {
  
player.rupees += this.rupees;
  
this.rupees 0;
  
destroy();




All times are GMT +2. The time now is 12:19 AM.

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