Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-03-2009, 06:22 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Raelyn View Post
Solved myself with

PHP Code:


this
.inv_shown 1;

if (
keypressed) {
   if (
strequals(#p(1),I)){
      
Inventory();
   }


function 
Inventory(){

  if (
this.inv_shown == 0){

    
// inventory pane
    
showimg 209;
    
this.inv_shown 1;

  } else {

    
hideimg 209;
    
this.inv_shown 0;
  }

Be sure to convert that to GS2...
Quote:
I have another question though, I am trying to change profilevars in server options, and I have

PHP Code:
profilevars=Level:=#v(clientr.level), 
You don't need #v, just (for example):
PHP Code:
profilevars=Level:=clientr.level,HP:=clientr.hp 
Quote:
Originally Posted by Raelyn View Post
Mmm, ok thanks. I was just having someone test me script, and I have it calling replaceani in clientside, so his client is not downloading the ganis from the server. But if I put the replaceani in serverside, the RC reports an error that the server doesn't know that command... So, what command does it understand to get new ganis for the player?
What do you mean, like download them? Just displaying the animations will download them, but if you really want you can use update packages.
__________________
Reply With Quote
  #2  
Old 05-03-2009, 07:08 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 cbk1994 View Post
Be sure to convert that to GS2...

You don't need #v, just (for example):
PHP Code:
profilevars=Level:=clientr.level,HP:=clientr.hp 

What do you mean, like download them? Just displaying the animations will download them, but if you really want you can use update packages.
Ok, well, my script is clientside, so that means the server can't GET my clientr.level, right? I need to find some way for for the server to read my clientside variables..

If I join a class to a clientside script, does everything in that class become clientside as if it waste pasted into the class? I am trying to think of another way to split this script so I can maintain my clientside timeouts but have my variables accessible by the server...

Also, I have another problem that is whenever more than one person is on my server, (having the -Player weapon), ONE part of my interface is duplicated in the center of the screen... it's only the one part, and everything else works as intended..
__________________
*Don't let the door hit you on the way out.*
Reply With Quote
  #3  
Old 05-04-2009, 02:48 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by Raelyn View Post
Ok, well, my script is clientside, so that means the server can't GET my clientr.level, right? I need to find some way for for the server to read my clientside variables..
Pass them to the server with
PHP Code:
//#CLIENTSIDE
function onEvent() {
triggerServer("gui","WeaponName","Equal",this.bar,temp.foo);

then on the serverside u could do something like this:
PHP Code:
function onActionServerSide(){
  if (
params[0] == "Equal") {
    
this.thing params[1];
    
this.var = params[2];
  }

then u can use this.bar and temp.foo at serverside.
but they will be named this.thing and this.var ofc
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you

Last edited by Deas_Voice; 05-04-2009 at 02:49 PM.. Reason: forgot a ; :O
Reply With Quote
Reply


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 05:43 PM.


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