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
  #16  
Old 09-17-2003, 05:48 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
Re: Brief explanations about some new features: (NEW SCRIPT ENGINE)

Quote:
Originally posted by Python523
The new features
Mh, i really need to read the functions stuff more careful because variable passing is a bit unclear to me. Or i think XD does it work like this:

NPC Code:

if (playerenters){
a=10;
b=10;
c=7;
multiply_em(a,b,c);
}
function multiply_em(d,e,f){
g=d*e;
h=g*f;
message #v(h);
}
//very simple, lol.


i should get as outcome (10*10)*7 (=700), right...?

Also, can we do this:

Is there a way to use a "message" that uses a function? I mean like this (Javscript):
NPC Code:

alert("You have" + getcash(client.taxreturn,client.salary) "dollars!);
function getcash(x,y){
this.cash=x*y;
return this.cash;
}

__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
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 06:14 PM.


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