Jump to content
  • 0

loadevent mapflag event its not listed on the map list


AinsLord

Question


  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

why the script i found is including payon for loadevent

here is the scrip

//===== Gogcel Ro Scripts ================================== 
//= No double login in one map
//===== By: ================================================== 
//= Tauro
//===== Current Version: =====================================
//= 1.00
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
//= Avoid double login in 1 designated map and has unique_id
//= by gepard
//===== Comments: ============================================
//= Edit line 26 to use gepard authenticator or ip
//=	Edit line 64 if you use the system by ip
//=	Edit loadevent maps in line 86
//===== Contact Info: ========================================
//= [Tauro] 
//= Email: [email protected]
//= Discord: Trinity#7962
//============================================================
-	script	dl_map	-1,{
	end;

OnInit:
	// 1= if you have gepard 0=if you do not use gepard
	set .Gepard,1;
	end;
	
OnPCLoadMapEvent:
	if (.Gepard == 1) {
		getmapxy(.@map$,.@mapx,.@mapy,0);
		query_sql("SELECT last_unique_id FROM `login` WHERE account_id = "+getcharid(3)+"", .@UniqueId$);
		query_sql("SELECT account_id FROM `login` WHERE last_unique_id = '"+.@UniqueId$+"'", .@CuentaId);
		set .@error,getcharid(3,strcharinfo(0));
		for(set .@i ,0;.@i<getarraysize(.@CuentaId);set .@i,.@i+1) {
			if(attachrid(.@CuentaId[.@i])) {
				if (.@CuentaId == 2000001||.@CuentaId == 2000000) {
					set .@j,0;
				} else {
					getmapxy(.@map2$,.@mapx2,.@mapy2,0);
					if (.@map2$ == .@map$){
						set .@j,.@j+1;
					}
				}
			}	
		}
		detachrid;
	
	attachrid .@error;
	if(.@j > 1) {
		dispbottom "Double Login is not allowed on this map.";
		warp "prontera",156,183;
	}

	end;
	} else {
		getmapxy(.@map$,.@mapx,.@mapy,0);
		query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", .@UltimaIp$);
		query_sql("SELECT account_id FROM `login` WHERE last_ip = '"+.@UltimaIp$+"'", .@CuentaId);
		set .@error,getcharid(3,strcharinfo(0));
		for(set .@i ,0;.@i<getarraysize(.@CuentaId);set .@i,.@i+1) {
			if(attachrid(.@CuentaId[.@i])) {
//if .Gepard is 0 add id of accounts to which the system will not affect, brothers, couple, gms, etc ... .@CuentaId == accountId
				if (.@CuentaId == 2000001) {
					set .@j,0;
				} else {
					getmapxy(.@map2$,.@mapx2,.@mapy2,0);
					if (.@map2$ == .@map$){
						set .@j,.@j+1;
					}
				}
			}	
		}
		detachrid;
	
	attachrid .@error;
	if(.@j > 1) {
		dispbottom "Double Login is not allowed on this map.";
		warp "prontera",156,183;
	}

	end;
	}
}

//loadevents
guild_vs2	mapflag	loadevent
guild_vs1	mapflag	loadevent
//guild_vs3	mapflag	loadevent
//guild_vs4	mapflag	loadevent
//guild_vs5	mapflag	loadevent
quiz_02	mapflag	loadevent
quiz_01	mapflag	loadevent
06guild_01	mapflag	loadevent

thanks again in advance

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

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

you have other NPC script that added the loadevent mapflag at payon map.

all OnPCLoadMapEvent script should add extra map checking to avoid it trigger unnecessary event which come from other NPC scripts.

It is a global event which will trigger all NPC that has this event label.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1535
  • Reputation:   237
  • Joined:  08/03/12
  • Last Seen:  

53 minutes ago, AinsLord said:

why the script i found is including payon for loadevent

here is the scrip


//===== Gogcel Ro Scripts ================================== 
//= No double login in one map
//===== By: ================================================== 
//= Tauro
//===== Current Version: =====================================
//= 1.00
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
//= Avoid double login in 1 designated map and has unique_id
//= by gepard
//===== Comments: ============================================
//= Edit line 26 to use gepard authenticator or ip
//=	Edit line 64 if you use the system by ip
//=	Edit loadevent maps in line 86
//===== Contact Info: ========================================
//= [Tauro] 
//= Email: [email protected]
//= Discord: Trinity#7962
//============================================================
-	script	dl_map	-1,{
	end;

OnInit:
	// 1= if you have gepard 0=if you do not use gepard
	set .Gepard,1;
	end;
	
OnPCLoadMapEvent:
	if (.Gepard == 1) {
		getmapxy(.@map$,.@mapx,.@mapy,0);
		query_sql("SELECT last_unique_id FROM `login` WHERE account_id = "+getcharid(3)+"", .@UniqueId$);
		query_sql("SELECT account_id FROM `login` WHERE last_unique_id = '"+.@UniqueId$+"'", .@CuentaId);
		set .@error,getcharid(3,strcharinfo(0));
		for(set .@i ,0;.@i<getarraysize(.@CuentaId);set .@i,.@i+1) {
			if(attachrid(.@CuentaId[.@i])) {
				if (.@CuentaId == 2000001||.@CuentaId == 2000000) {
					set .@j,0;
				} else {
					getmapxy(.@map2$,.@mapx2,.@mapy2,0);
					if (.@map2$ == .@map$){
						set .@j,.@j+1;
					}
				}
			}	
		}
		detachrid;
	
	attachrid .@error;
	if(.@j > 1) {
		dispbottom "Double Login is not allowed on this map.";
		warp "prontera",156,183;
	}

	end;
	} else {
		getmapxy(.@map$,.@mapx,.@mapy,0);
		query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", .@UltimaIp$);
		query_sql("SELECT account_id FROM `login` WHERE last_ip = '"+.@UltimaIp$+"'", .@CuentaId);
		set .@error,getcharid(3,strcharinfo(0));
		for(set .@i ,0;.@i<getarraysize(.@CuentaId);set .@i,.@i+1) {
			if(attachrid(.@CuentaId[.@i])) {
//if .Gepard is 0 add id of accounts to which the system will not affect, brothers, couple, gms, etc ... .@CuentaId == accountId
				if (.@CuentaId == 2000001) {
					set .@j,0;
				} else {
					getmapxy(.@map2$,.@mapx2,.@mapy2,0);
					if (.@map2$ == .@map$){
						set .@j,.@j+1;
					}
				}
			}	
		}
		detachrid;
	
	attachrid .@error;
	if(.@j > 1) {
		dispbottom "Double Login is not allowed on this map.";
		warp "prontera",156,183;
	}

	end;
	}
}

//loadevents
guild_vs2	mapflag	loadevent
guild_vs1	mapflag	loadevent
//guild_vs3	mapflag	loadevent
//guild_vs4	mapflag	loadevent
//guild_vs5	mapflag	loadevent
quiz_02	mapflag	loadevent
quiz_01	mapflag	loadevent
06guild_01	mapflag	loadevent

thanks again in advance

i didnt found any 'payon' words there. 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

22 hours ago, Chaos92 said:

i didnt found any 'payon' words there. 

yea thats what i notice too but on my mapflags on payon there is like loadevent

after i manually remove it via command everyone can enter payon with dual dunno why

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

thnx for this info @Emistry imma look for it on some NPC script have

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