*Theory* Guild Member has come online

smoochy boys on tour

Demix

LOMCN Veteran
Veteran
Apr 13, 2005
255
0
63
Watford, England
Well after designing the whole system in my head and then trying to implament it i have only encountered 1 small.. ok well 1 reasonably large problem.. is there a way to have a script running realtime? like a VB Timer... as i've made it so every new guild which is created gets a guild variable set for it, each new guild the variable is 1 more than the last.. so an example...

#IF
CheckVar GUILD Online = 1
#SAY
Your in Guild1
#IF
CheckVar GUILD Online = 2
#SAY
Your in Guild2

etc


ive made it so that on login it displays "guild member %s has come online" but only the person logging in sees it.. i need a way to be able to send a message to a certain group when someone logs in... such as a script running for everyone which is triggered by the login and checks if they are the same variable as them and if so the message would appear to them as well when the other person logs in.. any ideas on this? if i get it done i will release it.. at the moment each guild has its seperate variable so i just need a way to send a message to every1 with this variable when someone logs in.. thanks for any input i get from this.. i know its not a big deal but hey.. if i can do it then why not?


EDIT:


Thinking about it... in QFunction their is a

[@PlayDie]

and

[@KillPlay]

command so im assuming theres 1 for login as well.. i wonder if its the same as the QManage.. i will check it out but i still need feedback here hehe
 
Last edited:

Demix

LOMCN Veteran
Veteran
Apr 13, 2005
255
0
63
Watford, England
that was an example, and like i said i cant get the message to display to everyone.. i need to find some sort of npc command or header or something to activate a command when someone else logs in rather than them.
 
Upvote 0

Liandrin2

Golden Oldie
Golden Oldie
Loyal Member
Jan 14, 2004
890
6
125
You would need to use it through qmanage like you are however you would need a global shout that works for guild only...

I don't think there is one currently but it is possible as I seem to remember nick coding it into the old Diamond files.
 
Upvote 0

Demix

LOMCN Veteran
Veteran
Apr 13, 2005
255
0
63
Watford, England
doh.. well that was a waste of like 3 hours coding..spose it can be used for some things though, shame theres no way to activate a script for someoneelse when someone logs in lol =\ *ps. i dont mean using GManage as that would only activate the command for the 1 person*

oo brain wave.. maybe i could try and use robot_def.. although it may not be 100% accurate it should get what i want done O.o - will report back with what i find
 
Upvote 0

Fire

Golden Oldie
Golden Oldie
Apr 15, 2003
1,302
1
195
the robot system to my knowledge doesnt let you interact with players, it only lets you deal with global factors
 
Upvote 0

Demix

LOMCN Veteran
Veteran
Apr 13, 2005
255
0
63
Watford, England
checking something on login is a global factor, :P exactly what i want - i think im making progress here btw, if i can stop my variables giving me errors then the system should work lol, heres the basis of it.. you log in it activates a variable which does +1, the robot def sees this +1 and sends the guild msg to every1 in *a different variable 1* then does a -1 for the variable set upon login.. this stops the robot def from spamming the message :P good theory eh? let me see if i can get it working now
 
Upvote 0

Fire

Golden Oldie
Golden Oldie
Apr 15, 2003
1,302
1
195
and how are you going to get it to send a message to the correct guild, im not talking about checking. but actually sending it

if you can work that out then your theory has a good chance of working (cant tell how much lag the robot_def script will cause having to run so repeatedly)
 
Upvote 0

Liandrin2

Golden Oldie
Golden Oldie
Loyal Member
Jan 14, 2004
890
6
125
That should work with a bit of intelligence :)

But just seems a lot of work for something so simple. I rather enjoyed the logging on and saying hello :) (or the ability to not let people know I'm on when I don't want hassle).
 
Upvote 0

Demix

LOMCN Veteran
Veteran
Apr 13, 2005
255
0
63
Watford, England
Well so far it doesnt seem like its lagging the server at all hehe, think of a VB Timer looping 1000 times a sec, this is only doing 1 time a sec so it shouldnt be bad :P only problem is im spamming my m2server with this error atm:

20/09/2006 21:58:51 [½Å±¾²ÎÊý²»ÕýÈ·] Cmd:CHECKVAR NPCÃNameRobotManage µØͼ:0 ×ù±ê:0:0 pram1:GUILD pram2:CheckOn pram3:= pram4:1 pram5:

lol damn variables :P should fix that soon, usually just moving the way things start around fix those kinda variable errors

edit: and for those thinking "why the hells he going to so much trouble for something so small?" because i have a few hours to burn up and im bored lol :P

edit2: sigh still got this damn error.. seems my robot def doesnt like variables.. i will MAKE it like variables 1 way or another

edit3: hmm i added the code im using to shout the msg when the var is set to 1 on a npc and it works fine.. why isnt robot liking it =(
 
Last edited:
Upvote 0

Demix

LOMCN Veteran
Veteran
Apr 13, 2005
255
0
63
Watford, England
mine does which is lucky for me hehe, also im still having problems with robot_def.. if anyone knows more about this or wants to try and give me a hand to get this fully working then send me a pm or add me on msn -

[email protected]
 
Upvote 0

Senture

LOMCN VIP
VIP
Feb 8, 2004
1,529
1
184
If you try to load an already loaded global vairable on login, it will throw up errors. The one exception being human vairables, because each human has its own record.
 
Upvote 0