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 07-11-2011, 07:00 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Onlineseconds Restricted Npc?

could someone please tell me how i would restrict a door to players with certain onlinetime?
iv tried
PHP Code:
if(player.onlineseconds >=100); 
with no luck :/
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #2  
Old 07-11-2011, 09:48 AM
TSAdmin TSAdmin is offline
Forum Moderator
TSAdmin's Avatar
Join Date: Aug 2006
Location: Australia
Posts: 1,980
TSAdmin has much to be proud ofTSAdmin has much to be proud ofTSAdmin has much to be proud ofTSAdmin has much to be proud ofTSAdmin has much to be proud ofTSAdmin has much to be proud of
I believe the variable is actually "onlinetime" rather than "onlineseconds"

Source: http://wiki.graal.net/index.php/Crea...ns:_NPC_Server
__________________
⇒ TSAdmin (Forum Moderator)
⇒ Welcome to the Official GraalOnline Forums! Where sharing an opinion may be seen as a declaration of war!
------------------------
· User Agreement · Code of Conduct · Forum Rules ·
· Graal Support · Administrative Contacts ·
Reply With Quote
  #3  
Old 07-11-2011, 10:27 AM
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 TSAdmin View Post
I believe the variable is actually "onlinetime" rather than "onlineseconds"
It is.
Reply With Quote
  #4  
Old 07-11-2011, 01:04 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
I believe this can only be read serverside aswell.
Reply With Quote
  #5  
Old 07-11-2011, 02:59 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
In the future you can use the /scripthelp <term> command on RC to find the name of a variable.

Quote:
Originally Posted by /scripthelp online
Script help for 'online':
TServerPlayer.onlinetime - integer - total time the player has played on the server, in seconds
Your statement is wrong. From a post I made in another of your threads:

Quote:
Originally Posted by cbk1994 View Post
The first line is of an if-statement does not need a semicolon as it is not a command, it's a condition.

If you'd read the guide linked to you, you'd see that the proper syntax for an if-else statement is:

PHP Code:
if (condition) {
  
// do something
} else {
  
// do something else
} 
It's frustrating and severely trying my patience to have to give you the same advice multiple times. It's becoming more and more apparent that you're not interested in learning, only in getting your scripts to work. If you keep this up, eventually nobody will respond to your threads as they'll know you don't really want to be able to script.
__________________
Reply With Quote
  #6  
Old 07-11-2011, 03:50 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
i do want to be able to script :/
@the /scripthelp in rc...
wow.. i cent believe i never knew of that 0_0
i learn by studying others scripts, i will try to learn the proper way.
sorry cbk1994
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #7  
Old 07-11-2011, 04:33 PM
callimuc callimuc is offline
ジ
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by Gunderak View Post
i do want to be able to script :/
@the /scripthelp in rc...
wow.. i cent believe i never knew of that 0_0
i learn by studying others scripts, i will try to learn the proper way.
sorry cbk1994
Quote:
Originally Posted by ffcmike View Post
It would be much better to take time to learn the simple things first, before delving into more complex things like GP tools, which you don't really need anyway.

Once you get a grasp of the basic syntax, how variables and objects work, serverside/clientside differences and communication, not only would you be able to avoid such problems as you have, but you might then be able to think of ways to execute the purpose of the script better.

Scripting isn't really about piecing together functions for the sake of working.
I just agree to that
__________________
MEEP!
Reply With Quote
  #8  
Old 07-11-2011, 05:37 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
yeah i agree too....
i have been biting off more than i can chew..
thanks thor.
il try to stick to easier things for now =D
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
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:42 PM.


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