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 06-14-2003, 08:38 AM
DarkDragoon_Lloyd DarkDragoon_Lloyd is offline
Registered User
Join Date: Aug 2002
Posts: 157
DarkDragoon_Lloyd is on a distinguished road
Send a message via AIM to DarkDragoon_Lloyd
Actionplayeronline substitute?

OK, well I was working on a script, and it required actionplayeronline, but apparently it doesn't check if someone gets onto RC...
Is there some way I could substitute a script for actionplayeronline?

I was thinking something that sees if allplayerscount has increased from the previous ammount, and that might work(although, it could be flawed if a player logged off around the same time a player logged on)...
\=
Any suggestions?
__________________
Quote:
Originally posted by protagonist
YES OF COURSE I AM SO MISTAKEN LOLOL I SUCK AT THE INTERNET!
Quote:
Originally posted by unixmad
Rome have not been build in 1 day !
Reply With Quote
  #2  
Old 06-14-2003, 09:18 AM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 will become famous soon enough
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
something along the lines of this mabey?
if (actionplayeronline) {
for (i=0; i<allplayerscount; i++) {
with (allplayers[i]) {
commands...
}
}
}
__________________
Reply With Quote
  #3  
Old 06-14-2003, 01:31 PM
Neoreno Neoreno is offline
Cerebrate
Neoreno's Avatar
Join Date: Aug 2001
Location: England
Posts: 1,663
Neoreno is on a distinguished road
Send a message via AIM to Neoreno
If a player logs on, use a for loop and check if the player that logged on has a levelname of "". That'll generally be an RC.
__________________

Quote:
Exitus Acta Probat: The Outcome Justifies the Deed.
Reply With Quote
  #4  
Old 06-14-2003, 03:39 PM
CheeToS2 CheeToS2 is offline
That Guy
CheeToS2's Avatar
Join Date: Dec 2001
Location: Seattle, WA
Posts: 2,528
CheeToS2 will become famous soon enough
Send a message via AIM to CheeToS2
Quote:
Originally posted by Neoreno
If a player logs on, use a for loop and check if the player that logged on has a levelname of "". That'll generally be an RC.
actionplayeronline isn't triggered when an RC logs on at all
__________________

Reply With Quote
  #5  
Old 06-14-2003, 04:41 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
NPC Code:

if(actionplayeronline){
for(i=0;i<allplayerscount;i++){
with(allplayers[i]){
if(strlen(#F)<=0){
}
}
}
}



well,wouldnt this detect when a RC logged on?!
also,i think you cant replace actionplayeronline for checking when a player enters on the playerworld. (I may be wrong)
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #6  
Old 06-14-2003, 04:43 PM
CheeToS2 CheeToS2 is offline
That Guy
CheeToS2's Avatar
Join Date: Dec 2001
Location: Seattle, WA
Posts: 2,528
CheeToS2 will become famous soon enough
Send a message via AIM to CheeToS2
Quote:
Originally posted by osrs
NPC Code:

if(actionplayeronline){
for(i=0; i<allplayerscount; i++){
with(allplayers[i]){
if(strlen(#F)<=0){
}
}
}
}



well,wouldnt this detect when a RC logged on?!
no, that would make it so when a player logs on, it executes that script on whatever RCs are already logged on

you could make two strings comparing the RCs that were online last time the script checked, but still, it would depend on when a player logs on, which could be hours. You could just make it a timeout too, instead of actionplayeronline.. but it would take up more resources
__________________

Reply With Quote
  #7  
Old 06-14-2003, 04:50 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally posted by CheeToS2

no, that would make it so when a player logs on, it executes that script on whatever RCs are already logged on
Hmm,i read the script again and you are completely right.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #8  
Old 06-15-2003, 05:01 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Quote:
Originally posted by CheeToS2

actionplayeronline isn't triggered when an RC logs on at all
Was I the only one that read this?

If it's true, then the scripts that you guys have produced doesn't matter.

Hell, you could have several RCs log on before another player does.
__________________
[signature]insert here[/signature]
Reply With Quote
  #9  
Old 06-16-2003, 03:42 AM
Falados Falados is offline
Cucumber NPC
Falados's Avatar
Join Date: Jan 2003
Posts: 141
Falados is on a distinguished road
Send a message via ICQ to Falados Send a message via AIM to Falados
You could have a looping NPC that checks the RCs that are currently online and stores a list of their accounts in a string, then every loop, check the new list of RC accounts to the old list to see if some RC logged off or logged on, and act accordingly. Although I dont recommend server-side loops for something unimportant like a staff-tool or something.
__________________

subliminal message: 1+1=3
Reply With Quote
  #10  
Old 06-16-2003, 04:46 AM
CheeToS2 CheeToS2 is offline
That Guy
CheeToS2's Avatar
Join Date: Dec 2001
Location: Seattle, WA
Posts: 2,528
CheeToS2 will become famous soon enough
Send a message via AIM to CheeToS2
Quote:
Originally posted by Falados
You could have a looping NPC that checks the RCs that are currently online and stores a list of their accounts in a string, then every loop, check the new list of RC accounts to the old list to see if some RC logged off or logged on, and act accordingly. Although I dont recommend server-side loops for something unimportant like a staff-tool or something.
You just said the same thing I did, with different words ;-;
__________________

Reply With Quote
  #11  
Old 06-17-2003, 05:15 PM
Falados Falados is offline
Cucumber NPC
Falados's Avatar
Join Date: Jan 2003
Posts: 141
Falados is on a distinguished road
Send a message via ICQ to Falados Send a message via AIM to Falados
Oops, I wasn't reading replys, I was just giving a suggestion.
__________________

subliminal message: 1+1=3
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 02:28 PM.


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