![]() |
Login Alert for Idle RCs
Considering how many people, including me, have suggested that they want some sort of way to prevent missing people while RC is minimized, I thought I would script up something. All servers are welcome to use this. Just stick it in your NPC server. To activate it, just type /npclogins in your rc chat.
NPC Code: |
Congradulations, a new way to help lag the control-npc. :rolleyes:
|
Once a second isn't too bad, and all it does is check one variable - nothing too laggy at all. If you are really concerned about lag change the timeout to every 5, or even 10 seconds.
|
You should NEVER have a timeout in the control-npc, ESPECIALLY a never-ending one.
|
Quote:
|
I would appreciate if someone would explain why instead of just saying don't do it. My CPU time on the control npc is less than a twentieth of a second.
|
Jagen said why.
And I personally don't like it when the Control-NPC is even in the top 10. |
He said it was bad, that is a little vague.
Additionally, if timeout is so bad for the control npc, why isn't it just disabled? |
Quote:
|
Lots of people say lots of things are bad, it doesn't mean they 100% right 100% of the time. I do not think it is unreasonable to ask for the reasoning behind dubbing timeout "bad" for the control npc.
|
Quote:
And never said I was 100% right 100% of the time...simply said it's a bad idea. Jagen is a damn good scripter, I'm a pretty good scripter....both of us are saying it's a bad idea. You should think about that... |
But how does being part of the NPCServer have anything to do with it?
|
Two points.
1) Nobody has actually answered Giltwist's question. Yes, it's an integral part of the NPC Server. So? 2) Giltwist is a pretty darn good scripter too. In this case, you can't pull the 'I am better than you so just listen to me' card. |
Quote:
2) I never said I was a better scripter than he, I simply said Jagen is a good scripter, and I'm a pretty good scripter, and that when two people who are both pretty good at something, especially Jagen, is most likely correct, since he was basically saying we were wrong with this 100% thing. |
Quote:
|
If your so concerned with lagging stuff, stick the script in another npc? heh
Just change the rc chat part. |
Quote:
No more scripts! I bet you believe in santa claus. |
Quote:
If you noticed, I made a point about the control-npc being a vital part of the npc server.... Oh, and I do believe in Santa Clause...In fact, he's my dad. :) |
Quote:
So just because its a vital part of the server then doing anything with it is bad? That says absolutly nothing other than you think something is bad because some one else told you but yet you have no idea why. |
Quote:
Quote:
Does that mean we're automatically right? Any competent scripter's doubts should be treated with respect, not dismissed without thought. |
Just becuase the run time isn't big, doesn't mean it isn't lagging the server technically, setting serverr strings a lot WILL lag the server, not because of a high run time, but because the strings need to be sent to every player/npc everytime it's set, which will cause server lag, not lag on that particular npc, and why shouldn't you run a timeout loop? Because the Control-NPC already gets a ton of actions, everytime a projectile lands it gets an event, for an example I mean, why but unneeded stuff on it, it's just distracting the NPC from doing other functions, also, everytime the control-npc is called with a trigger, it 'warps' to the point that called the trigger, so again, why put unneeded stuff there
|
There are no serverr.variables in that script....
|
dude, I was just saying it as an example x_X not as if it was actually that way
|
Quote:
Quote:
Quote:
2) The 'warping' isn't processor-intensive. 3) Giltwist's script doesn't involve triggering the server. |
Quote:
Quote:
---Shifter |
I made an RC Login system myself. I made a seperate database NPC for it, RC Login System. It runs on a timeout of 1 (I did use a timeout of 5, but timeout of 1 creates SLIGHTLY more lag, and it's microseconds). Just every timeout loop, have it check this.newrcs to this.oldrcs and make sure the strings are the same (strequals). If they are, then just ignore it and have it reset the timeout. BUT if it is different, check the strings to find what is new. I have my automatically PM Updates and personal messages to them. /npc messages new 'account' 'message' is how I'm using it to send messages. It just stores a string and sends to the RC when he gets on.
BTW, using a timeout on the Control-NPC is just something that isn't done. The reasons are limitless as to WHY you shouldn't use them, but it's just kind of one of those things. It's just like telling people to not use a .1 timeout serverside if they don't have to, or not to run pointless timeouts in every NPC. It is just something that scripters should know (no offense, everyone has to learn some time or another). If you have the RC chat do a with(getnpc(RC Login Sys)) and have it set a string, then just transferring and a small edit of the script would make it work just fine, and would also help reduce lag (should be one of the greatest concerns when coding). ---Shifter |
But then it doesn't blink the tray icon which was the whole idea of using sendpm. I run my RC minimized while working on other things, I need a way to not miss people.
|
Quote:
|
Quote:
Quote:
Quote:
Quote:
Quote:
|
Quote:
zega + jagen > kaimetsu + giltwist in the area of serverside scripting, I'm not saying you can't or couldn't, I'm just saying both of you without a doubt have the potential to, but gilt is still learning most of it, and I've never really seen you script much serverside-wise, but then again, I'm just stating my opinion, so I could be wrong |
Quote:
|
Actually valid reasons have been given you're just too stuborn to accept them.
|
Quote:
|
Quote:
I have to say that Zega + Jag > Kai + Gil on this matter... I've only given a little input so I don't count there :P But you're mistaken my friend, the Control-NPC IS the NPC Server essentially, and therefore it DOES run about everything serverside... The CNPC does have a presence, it's omnipotent(?). It's kind of like the theory of god and santa clause, everywhere at once (Santa is for one night ;))! It's like a car, if you put in something to bog down the engine, the entire car gets slower, but if you just have bad tires, then it doesn't slow down as much. Bogging down the Control-NPC or making it work more than it needs to puts more stress on the entire system and causes more problems, it's a basic fact. Stefan got really pissed at ChrisZ because he had a timeout in the CNPC I believe. ---Shifter |
Quote:
|
Quote:
But if we're right... let's not mention it ever again kkz? Just learn that we're not out to tell ppl that they're stupid and that just because they're not right doesn't mean it's the end of the world? (I had to learn this the hard way! :p) ---Shifter |
Quote:
Quote:
Quote:
Quote:
NOTE: I'm not saying you people are wrong about this, I'm just saying I need a logical reason before I believe it. If Stefan is the only person who can provide that reason then I guess we'll have to wait for him. |
Quote:
Quote:
Quote:
Quote:
---Shifter |
...Yeah Kai, the Control-NPC is in fact a vital necessity of the NPC Server....it's not just a NPC...
|
Quote:
|
| All times are GMT +2. The time now is 06:34 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.