Jump to content
  • 0

[REQUEST]Online GM System


Drakkus

Question


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

Hello, this my 2ND REQUEST here, and i hope it will be Possible? LOL, anyways, is this Possible? for GM Online System which can be Different NPC's Appear? i mean, if GM Online the NPC will change to it's another Sprite ID. something 871 (ONLINE) for (OFFLINE) 872.

Possible for that? i would like to REQUESt the 'query_sql' and i would like to add also the 'set_array' for the GM_LIST'S.

Easily to Add more FUTURES.

Please feel free to POST here if you don't understand.

Thank you!

Regards.

Mindless

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

try this

prontera,155,181,5 script Sample 757,{
mes "There are "+.GMOnline+" GM Online now.";
close;
OnPCLoginEvent:
for( set .@i,0; .@i < getarraysize( .AccountID ); set .@i,.@i + 1 ){
if( getcharid(3) == .AccountID[.@i] ){
set .GMOnline,.GMOnline + 1;
break;
}
}
end;
OnPCLogoutEvent:
for( set .@i,0; .@i < getarraysize( .AccountID ); set .@i,.@i + 1 ){
if( getcharid(3) == .AccountID[.@i] ){
set .GMOnline,.GMOnline - 1;
break;
}
}
end;
OnInit:
setarray .AccountID,200000,200001,200002;
while( 1 ){
if( .GMOnline ) setnpcdisplay( strnpcinfo(0),871 );
else setnpcdisplay( strnpcinfo(0),872 );
sleep 1000;
}
end;
}

Add in the GM Account ID here

setarray .AccountID,200000,200001,200002;

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

You mean you are going to make alot NPC for it ? so that each NPC can represent 1 GM in the Game ? and then can show the "Online / Offline" Status of the GM ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

You mean you are going to make alot NPC for it ? so that each NPC can represent 1 GM in the Game ? and then can show the "Online / Offline" Status of the GM ?

Yes, that's what i mean, but not alot of an 'NPC' only 2 Sprite I.D's will be Implement in the Script. since it is base on OFFLINE and ONLINE.

To determine if the GM's. if the GM will ONLINE, the said Sprite I.D would be (871) and for the OFFLINE it would be (872)

NOTE: No need to Put ONLINE or OFFLINE status since, i have the SPRITE for GM NPC's. (ONLY THE SCRIPT I NEED)

I Hope someone would help me about my 'REQUEST'

Thanks for reading my Topic.

Regards,

Mindless

Edited by Mindless
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

what i mean here is....

this will only happen when your server only have 1 GM for the whole server...

Otherwise the NPC will just remain Online when there is Other GM other than your GM online.....

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

what i mean here is....

this will only happen when your server only have 1 GM for the whole server...

Otherwise the NPC will just remain Online when there is Other GM other than your GM online.....

Yes, it will REMAIN online if there's is another GM's ONLINE. if no GM's it will OFFLINE and change the Sprite I.D of the NPC.

Regards.

Mindless

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  196
  • Reputation:   20
  • Joined:  11/20/11
  • Last Seen:  

set @charname$,gmname;

query_sql "SELECT `account_id` FROM `char` WHERE `name` = '"+escape_sql(@charname$)+"'", @accountid;
if(@accountid == 0) {
mes "Please input a valid character name.";
close;
}
query_sql "SELECT `online` FROM `char` WHERE  `char_id` = "+@characters[.@x], @online;
if(@online == 1) {
disguise 871;
}
else
{
disguise,872;
}

Just an idea...You can try something like this.Embed it into a script which gets executed again and again.. or add it in a loop.

Note :Its not a workin script, juz an idea

Edited by Xtremist
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...