Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-05-2011, 05:25 PM
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
Question 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!
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!


Reply With Quote
  #2  
Old 02-05-2011, 05:34 PM
Gothika Gothika is offline
Global News Team
Gothika's Avatar
Join Date: Mar 2006
Location: Newcastle, England
Posts: 2,425
Gothika is a splendid one to beholdGothika is a splendid one to beholdGothika is a splendid one to beholdGothika is a splendid one to beholdGothika is a splendid one to behold
I assume you have a back up of the one you made before making the "other improvement"?
__________________


Reply With Quote
  #3  
Old 02-05-2011, 05:51 PM
Fulg0reSama Fulg0reSama is offline
Extrinsical Anomaly
Fulg0reSama's Avatar
Join Date: Sep 2009
Location: Ohio
Posts: 3,049
Fulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant future
Quote:
Originally Posted by Gothika View Post
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?
__________________

Careful, thoughts and opinions here scare people.
Reply With Quote
  #4  
Old 02-05-2011, 06:19 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
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;

__________________
Reply With Quote
  #5  
Old 09-12-2011, 12:31 PM
irock1 irock1 is offline
Registered User
Join Date: Aug 2011
Posts: 20
irock1 can only hope to improve
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
__________________
YOUR A
Reply With Quote
  #6  
Old 09-12-2011, 12:36 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by irock1 View Post
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.
__________________
Reply With Quote
  #7  
Old 09-12-2011, 09:14 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by Crow View Post
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?
Reply With Quote
  #8  
Old 09-12-2011, 09:28 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
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();

__________________
Quote:
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:06 AM.


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