Jump to content
  • 0

Question

Posted

can i request a script that a GM will automatically disconnect during WOE time, or they cannot login because im not on my server every WOE time and i saw that some of my GM uses there GM powers during WOE, please help me with this

 

i saw it at the CPANEL

22 answers to this question

Recommended Posts

Posted

-	script	WOE_BLOCK	-1,{

OnPCLoginEvent:

// When a GM logs in during WOE, kick them.

if ((agitcheck() || agitcheck2()) && getgmlevel())

atcommand "@kick "+strcharinfo(0);

end;

OnAgitStart:

OnAgitStart2:

// When WOE starts, kick all GMs.

addrid(0);

if (getgmlevel())

atcommand "@kick "+strcharinfo(0);

end;

}

Posted (edited)

 

Where do u set the level of the gms?

 

Edit this line with 

 

if (getgmlevel())

 

How ? example

 

 

 

-	script	WOE_BLOCK	-1,{
OnPCLoginEvent:
	// When a GM logs in during WOE, kick them.
	if ((agitcheck() || agitcheck2()) && getgmlevel())
		atcommand "@kick "+strcharinfo(0);
	end;
OnAgitStart:
OnAgitStart2:
	// When WOE starts, kick all GMs.
	addrid(0);
	if (getgmlevel(60))
		atcommand "@kick "+strcharinfo(0);
	end;
}
Edited by Myth
Posted

What does >60 mean, gm below 60

 

 

 

Where do u set the level of the gms?

 

Edit this line with 

 

if (getgmlevel())
 

How ? example

 

 

 

-	script	WOE_BLOCK	-1,{
OnPCLoginEvent:
	// When a GM logs in during WOE, kick them.
	if ((agitcheck() || agitcheck2()) && getgmlevel())
		atcommand "@kick "+strcharinfo(0);
	end;
OnAgitStart:
OnAgitStart2:
	// When WOE starts, kick all GMs.
	addrid(0);
	if (getgmlevel(60))
		atcommand "@kick "+strcharinfo(0);
	end;
}

 

 

if( getgmlevel() >= 60 )

affect GM with level 60 or above..

What does >60 mean is it, all the GM below lvl 60 will get disconnected?

Posted

@Myth

if (getgmlevel(60))

Wrong syntax, getgmlevel doesn't support any arguments for now

 

 

What does >60 mean is it, all the GM below lvl 60 will get disconnected?

No, all gm lvl above 60 will be kicked.

Posted

Yeah

-	script	WOE_BLOCK	-1,{
OnAgitStart:
OnAgitStart2:
	// When WOE starts, kick all GMs.
	addrid(0);

OnPCLoadMapEvent:
	if ( getgmlevel() > 60 && ( agitcheck() || agitcheck2() ) && compare( strcharinfo(3),"g_cas0" ) ) {
		dispbottom "You can't warp in a castle during woe.";
		warp "prontera",0,0;
	}
	end;
}
aldeg_cas01	mapflag	loadevent
aldeg_cas02	mapflag	loadevent
aldeg_cas03	mapflag	loadevent
// etc... add your castle map

warp the gm above 60 to prontera of they try to enter in a castle

Posted

It warp all GM with a level above 60.

 

In the last script, don't forget to add the mapflag for your castle map

aldeg_cas03	mapflag	loadevent
// etc... add your castle map
Posted

i want all gm lvl's cant enter the castle because in my server we are 2 lvl 99 gm and lv 80 and 2 police 2 event gm so please as much as possible all gm's cant enter

Replace the line

if ( getgmlevel() > 60 && ( agitcheck() || agitcheck2() ) && compare( strcharinfo(3),"g_cas0" ) ) {

by

if ( getgmlevel() > 0 && ( agitcheck() || agitcheck2() ) && compare( strcharinfo(3),"g_cas0" ) ) {
Posted (edited)

tnx capuche
 

y the script its not working still i can enter the castle

-    script    WOE_BLOCK    -1,{
OnAgitStart:
OnAgitStart2:
    // When WOE starts, kick all GMs.
    addrid(0);
OnPCLoadMapEvent:
    if ( getgmlevel() > 0 && ( agitcheck() || agitcheck2() ) && compare( strcharinfo(3),"g_cas0" ) ) {
        dispbottom "You can't warp in a castle during woe.";
        warp "prontera",0,0;
    }
    end;
}
aldeg_cas01    mapflag    loadevent
aldeg_cas02    mapflag    loadevent
aldeg_cas03    mapflag    loadevent
aldeg_cas04    mapflag    loadevent
aldeg_cas05    mapflag    loadevent
payg_cas01    mapflag    loadevent
payg_cas02    mapflag    loadevent
payg_cas03    mapflag    loadevent
payg_cas04    mapflag    loadevent
payg_cas05    mapflag    loadevent
prtg_cas01    mapflag    loadevent
prtg_cas02    mapflag    loadevent
prtg_cas03    mapflag    loadevent
prtg_cas04    mapflag    loadevent
prtg_cas05    mapflag    loadevent
gefg_cas01    mapflag    loadevent
gefg_cas02    mapflag    loadevent
gefg_cas03    mapflag    loadevent
gefg_cas04    mapflag    loadevent
gefg_cas05    mapflag    loadevent
Edited by Capuche
Thanks to use BBCode
Posted

Reply anyone its not working

 

-	script	WOE_BLOCK	-1,{
OnAgitStart:
OnAgitStart2:
	// When WOE starts, kick all GMs.
	addrid(0);

OnPCLoadMapEvent:
	if ( getgmlevel() > 0 && ( agitcheck() || agitcheck2() ) && compare( strcharinfo(3),"g_cas0" ) ) {
		dispbottom "You can't warp in a castle during woe.";
		warp "prontera",0,0;
	}
	end;
)

aldeg_cas01    mapflag    loadevent
aldeg_cas02    mapflag    loadevent
aldeg_cas03    mapflag    loadevent
aldeg_cas04    mapflag    loadevent
aldeg_cas05    mapflag    loadevent
payg_cas01    mapflag    loadevent
payg_cas02    mapflag    loadevent
payg_cas03    mapflag    loadevent
payg_cas04    mapflag    loadevent
payg_cas05    mapflag    loadevent
prtg_cas01    mapflag    loadevent
prtg_cas02    mapflag    loadevent
prtg_cas03    mapflag    loadevent
prtg_cas04    mapflag    loadevent
prtg_cas05    mapflag    loadevent
gefg_cas01    mapflag    loadevent
gefg_cas02    mapflag    loadevent
gefg_cas03    mapflag    loadevent
gefg_cas04    mapflag    loadevent
gefg_cas05    mapflag    loadevent
Posted

In your last reply there is a typo

OnPCLoadMapEvent:
	if ( getgmlevel() > 0 && ( agitcheck() || agitcheck2() ) && compare( strcharinfo(3),"g_cas0" ) ) {
		dispbottom "You can't warp in a castle during woe.";
		warp "prontera",0,0;
	}
	end;
)// <------- must be }

 

This script is working on my test server. What is your emulator? the version? do you have any errors on your console?

Posted

In your last reply there is a typo

OnPCLoadMapEvent:
	if ( getgmlevel() > 0 && ( agitcheck() || agitcheck2() ) && compare( strcharinfo(3),"g_cas0" ) ) {
		dispbottom "You can't warp in a castle during woe.";
		warp "prontera",0,0;
	}
	end;
)// <------- must be }

 

This script is working on my test server. What is your emulator? the version? do you have any errors on your console?

its telling error in line 3

i fix the error now in line 3 its showing 

 

Missing 1 right curlys at file " ,,,,,,, " in line 34

Posted


- script WOE_BLOCK -1,{

OnAgitStart:

OnAgitStart2:

// When WOE starts, kick all GMs.

addrid(0);

OnPCLoadMapEvent:

if ( getgmlevel() > 60 && ( agitcheck() || agitcheck2() ) && compare( strcharinfo(3),"g_cas0" ) ) {

dispbottom "You can't warp in a castle during woe.";

warp "prontera",0,0;

}

end;

}

aldeg_cas01 mapflag loadevent

aldeg_cas02 mapflag loadevent

aldeg_cas03 mapflag loadevent

aldeg_cas04 mapflag loadevent

aldeg_cas05 mapflag loadevent

payg_cas01 mapflag loadevent

payg_cas02 mapflag loadevent

payg_cas03 mapflag loadevent

payg_cas04 mapflag loadevent

payg_cas05 mapflag loadevent

prtg_cas01 mapflag loadevent

prtg_cas02 mapflag loadevent

prtg_cas03 mapflag loadevent

prtg_cas04 mapflag loadevent

prtg_cas05 mapflag loadevent

gefg_cas01 mapflag loadevent

gefg_cas02 mapflag loadevent

gefg_cas03 mapflag loadevent

gefg_cas04 mapflag loadevent

gefg_cas05 mapflag loadevent

  1. Try this version

Post a screenshot of your mapserv error (if you have one)

Tell us what is your emulator (rathena?) and the version. For example addrid is a new command in rathena, other emu and old version doesn't support this script.

  • Upvote 1

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...