Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 04-30-2009, 09:35 PM
Raelyn Raelyn is offline
the Professional.
Raelyn's Avatar
Join Date: Sep 2003
Location: Zormite
Posts: 964
Raelyn will become famous soon enough
Quote:
Originally Posted by Chompy View Post
You'd have to join that class to use it's content.

Lets say this is a class called fibonacci:

PHP Code:
function fib(n) {
  return (((
1+5^0.5)/2)^- ((1-5^0.5)/2)^n)/(5^0.5)


To use that function, I would have to do:

PHP Code:
function onCreated() {
  
join("fibonacci");

  echo(
fib(7)); // 13

Ok, so if I take all my functions from my base system script, and make the classes all functions, I can just go through and replace all the functions listed in the script with:

PHP Code:
function onCreated() {
join("class_name");

Is that right? What is the echo? And will GS1 and GS2 mix? It seems like they mix, but only that GS2 doesn't work offline.. is that right?
__________________
*Don't let the door hit you on the way out.*
Reply With Quote
 


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:18 PM.


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