Jump to content
  • 0

GM Area


Unknown

Question


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  109
  • Reputation:   1
  • Joined:  09/07/12
  • Last Seen:  

Is it possible to create a script that allows 1 player to enter a GM House only when there's at least 1 GM who's helping people?
Also, before warping the player to the GM House, a countdown of 10 seconds starts and it is displayed only to GMs and the player who's asking for help.
PS: Once a player enters the GM House, the others must wait for him/her to leave the map. (It's like a sort of queue.)

 

Link to comment
Share on other sites

11 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  109
  • Reputation:   1
  • Joined:  09/07/12
  • Last Seen:  

No one? x___X

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

Is it possible to create a script that allows 1 player to enter a GM House only when there's at least 1 GM who's helping people?

Also, before warping the player to the GM House, a countdown of 10 seconds starts and it is displayed only to GMs and the player who's asking for help.

PS: Once a player enters the GM House, the others must wait for him/her to leave the map. (It's like a sort of queue.)

 

i can do something like this:

a npc that only gms can talk to (for the part only when there is one gm to activate the npc)

the gm house will be a, lol a house, but players won't be able to get there by any way (map flaggs here)

however, the house will only be able to have 2 players (the gm supporter and anotherone player)

the countdown it's kinda wird for me, because ppl can click the npc and kinda get at the same time the countdown 

x_x sry if not helpful D:

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  109
  • Reputation:   1
  • Joined:  09/07/12
  • Last Seen:  

It would be awesome! :DDD

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

izlude_in,30,171,5	script	gm_house	139,{
end;

OnRefreshCount:
	set(.gms,0); set(.usr,0);
	deletearray .a_gms;
	addrid(1);
	if(getgmlevel()>=.gmlvl)
		set .a_gms[set(.gms,.gms+1)], getcharid(3);
	else set(.usr,.usr+1);
	end;
	
OnPlayerHelp:
	if(getgmlevel()>=.gmlvl) {
		warp .map$,.x,.y;
		end;
	}
	donpcevent "gm_house::OnRefreshCount";
	if(.gms&&!.usr&&!.que) {
		donpcevent "gm_house::OnAttachGms";
		message strcharinfo(0),"You'll be warped to the help desk in 10 seconds.";
		set(.que,1);
		showdigit -10,2;
		sleep2(10000);
		if(playerattached()) {
			showdigit 0,0;
			warp .map$,.x,.y;
		}
		set(.que,0);
	} else {
		message strcharinfo(0),"The GMs are currently busy or unavailable please try again later.";
	}
	end;
	
OnAttachGms:
	for(set(.@a,1);.@a<=.gms;set(.@a,.@a+1)) {
		attachrid(.a_gms[.@a]);
		showdigit -10,2;
		soundeffect "aster_die.wav",0;
		message strcharinfo(0),"A player is entering you have 10 seconds to prepare.";
		sleep2(10000);
		showdigit 0,0;
	}
	end;
	
OnInit:
	bindatcmd "gmhelpme","gm_house::OnPlayerHelp";
	getmapxy(.map$,.x,.y,1);
	set .gmlvl, 60;
}

prontera,155,179,5	script	gm_house	45,2,2,{ OnTouch: doevent("gm_house::OnPlayerHelp"); }

It's not pretty but anyways just move the first npc to the map you're using as the GM House or whatever you want to call it. Where you move the npc will also be the location of where the players and gms get warped in when using @gmhelpme command also I added an example of how you could use it as a warp portal.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

aw i was about to finish, just going to ask which map he wants D:

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

aw i was about to finish, just going to ask which map he wants D:

 

O_O;; I'm sorry I hadn't realized you were going to make it. /swt I'm sure you're script will be just as good or even better!

 

Their are many different ways of making this npc x.x

 

SQL and etc.

	query_sql(
		"SELECT `login`.`account_id`"+
		"FROM `login`"+
		"INNER JOIN `char`"+
		"ON `login`.`account_id`=`char`.`account_id`"+
		"WHERE `login`.`group_id`>="+.gmlvl+" AND `char`.`online`=1;",
		.aid
	);
	
	for(set(.gms,0);.gms<getarraysize(.aid);set(.gms,.gms+1)) {
		attachrid(.aid[.gms]);
		if(strcharinfo(3)!=.map$)
			deletearray .aid[.gms],1;
		set(.gms,.gms-1);
	}
	set(.gms,.gms+1);
	attachrid(.aid[0]);
	addrid(1);
	if(getgmlevel()<.gmlvl)
		set(.usr,.usr+1);
	end;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

nah nvm D: however yours pretty cool (mine was so simple xD) just keep going D:! i guess i will release it on the script release section

lol you can even use sql ;_; amazing

 

well pal Unknown you got :'D

 

Edit

nah my script wasn't even close to be that good lol

prontera,150,150,5	script	GM Support House	91,{
if(getgroupid() >= 90)
mes "Seems like you can open the support house. What would you like to do?";
switch(select("- Open the house:- Close the house:- Nothing"))
{
case 1:
next;
if($activeS){ 
mes "The Support House is open now...";
close; 
}
set $activeS,1;
announce "Support House has been opened",8;
warp "YOURMAP",Xlocation,Ylocation;
if( getmapusers("YOURMAP") >= 2 ){
mes "You have to wait until the GM ends supporting the player inside";
break;
}
else { 
dispbottom "You are now warped to the GM House";
warp "YOURMAP",Xlocation,Ylocation;
close;
}
case 2:
next;
set $activeS,0;
if(!$activeS){ 
mes "The Support House is now closed...";
close;
}
announce "The Support House has been closed!",8;
close;
case 3:
next;
mes "Allright, have a good day GM";
close;
}
else
if(!$activeS){
mes "The NPC isn't active...";
end;
OnInit:
set $activeS,0;
waitingroom "GM House " + getmapusers("YOURMAP") + " ",0;
end;
}
YOURMAP	mapflag	nowarp
YOURMAP	mapflag	nowarpto
YOURMAP	mapflag	nobranch
YOURMAP	mapflag	noicewall
YOURMAP	mapflag	nomemo
YOURMAP	mapflag	nosave	SavePoint
YOURMAP	mapflag	noskill
YOURMAP	mapflag	noteleport
YOURMAP	mapflag	novending
YOURMAP	mapflag	nowarp

made it from scratch °^°

 

PS: isn't finished D:!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  135
  • Reputation:   41
  • Joined:  02/05/14
  • Last Seen:  

nah nvm D: however yours pretty cool (mine was so simple xD) just keep going D:! i guess i will release it on the script release section

lol you can even use sql ;_; amazing

 

well pal Unknown you got :'D

 

Edit

nah my script wasn't even close to be that good lol

prontera,150,150,5	script	GM Support House	91,{
if(getgroupid() >= 90)
mes "Seems like you can open the support house. What would you like to do?";
switch(select("- Open the house:- Close the house:- Nothing"))
{
case 1:
next;
if($activeS){ 
mes "The Support House is open now...";
close; 
}
set $activeS,1;
announce "Support House has been opened",8;
warp "YOURMAP",Xlocation,Ylocation;
if( getmapusers("YOURMAP") >= 2 ){
mes "You have to wait until the GM ends supporting the player inside";
break;
}
else { 
dispbottom "You are now warped to the GM House";
warp "YOURMAP",Xlocation,Ylocation;
close;
}
case 2:
next;
set $activeS,0;
if(!$activeS){ 
mes "The Support House is now closed...";
close;
}
announce "The Support House has been closed!",8;
close;
case 3:
next;
mes "Allright, have a good day GM";
close;
}
else
if(!$activeS){
mes "The NPC isn't active...";
end;
OnInit:
set $activeS,0;
waitingroom "GM House " + getmapusers("YOURMAP") + " ",0;
end;
}
YOURMAP	mapflag	nowarp
YOURMAP	mapflag	nowarpto
YOURMAP	mapflag	nobranch
YOURMAP	mapflag	noicewall
YOURMAP	mapflag	nomemo
YOURMAP	mapflag	nosave	SavePoint
YOURMAP	mapflag	noskill
YOURMAP	mapflag	noteleport
YOURMAP	mapflag	novending
YOURMAP	mapflag	nowarp

made it from scratch °^°

 

PS: isn't finished D:!

 

Why are you using a global $ variable? The scope in which the variable ($activeS) is needed would be appropriate as an NPC . variable (.activeS).

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

 

nah nvm D: however yours pretty cool (mine was so simple xD) just keep going D:! i guess i will release it on the script release section

lol you can even use sql ;_; amazing

 

well pal Unknown you got :'D

 

Edit

nah my script wasn't even close to be that good lol

prontera,150,150,5	script	GM Support House	91,{
if(getgroupid() >= 90)
mes "Seems like you can open the support house. What would you like to do?";
switch(select("- Open the house:- Close the house:- Nothing"))
{
case 1:
next;
if($activeS){ 
mes "The Support House is open now...";
close; 
}
set $activeS,1;
announce "Support House has been opened",8;
warp "YOURMAP",Xlocation,Ylocation;
if( getmapusers("YOURMAP") >= 2 ){
mes "You have to wait until the GM ends supporting the player inside";
break;
}
else { 
dispbottom "You are now warped to the GM House";
warp "YOURMAP",Xlocation,Ylocation;
close;
}
case 2:
next;
set $activeS,0;
if(!$activeS){ 
mes "The Support House is now closed...";
close;
}
announce "The Support House has been closed!",8;
close;
case 3:
next;
mes "Allright, have a good day GM";
close;
}
else
if(!$activeS){
mes "The NPC isn't active...";
end;
OnInit:
set $activeS,0;
waitingroom "GM House " + getmapusers("YOURMAP") + " ",0;
end;
}
YOURMAP	mapflag	nowarp
YOURMAP	mapflag	nowarpto
YOURMAP	mapflag	nobranch
YOURMAP	mapflag	noicewall
YOURMAP	mapflag	nomemo
YOURMAP	mapflag	nosave	SavePoint
YOURMAP	mapflag	noskill
YOURMAP	mapflag	noteleport
YOURMAP	mapflag	novending
YOURMAP	mapflag	nowarp

made it from scratch °^°

 

PS: isn't finished D:!

 

Why are you using a global $ variable? The scope in which the variable ($activeS) is needed would be appropriate as an NPC . variable (.activeS).

 

 

weird o: i thinked that it can store when to avtive and when to desactive the npc D:!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  109
  • Reputation:   1
  • Joined:  09/07/12
  • Last Seen:  

thank you very much people! :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

you are welcome, if you ever need some help don't hesitate to ask us (:

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...