Jump to content
  • 0

help-me with guild point


stiflerxx

Question


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   0
  • Joined:  01/17/14
  • Last Seen:  

type'm trying to create an automatic point guild ta put the script just reading the 1st rank of the 2 ° and 3 ° it ta not reading what I'm doing wrong? 

- script Verificar#MapGuild -1,{
OnPCLoadMapEvent:
if(getgmlevel() < 1){
query_sql "SELECT `id`,`name`,`ratio` FROM `pvpm_data` where `type` = '2' ORDER BY `ratio` DESC LIMIT 1",.@Guild1,.@Name1$,.@ratio1;
set .@1Lugar,.@ratio1;
if( strcharinfo(3) == "louyang" && strcharinfo(2) != getguildname(.@Guild1) ){
mes "[^FF8000Point Clã WOE^000000]";
mes "Para entra nesse mapa você precisa ser do clã ^FF8000"+.@Name1$+"^000000";
mes "Então você será teleportado para prontera!!";
close2;
warp "prontera",150,150;
end;
}
}

if(getgmlevel() < 1){
query_sql "SELECT `id`,`name`,`ratio` FROM `pvpm_data` where `type` = '2' ORDER BY `ratio` < '"+.@1Lugar+"' DESC LIMIT 1",.@Guild2,.@Name2$,.@ratio2;
set .@2Lugar,.@ratio2;
if( strcharinfo(3) == "job_wiz" && strcharinfo(2) != getguildname(.@Guild2) ){
mes "[^FF8000Point Clã WOE^000000]";
mes "Para entra nesse mapa você precisa ser do clã ^FF8000"+.@Name2$+"^000000";
mes "Então você será teleportado para prontera!!";
close2;
warp "prontera",150,150;
end;
}
}

if(getgmlevel() < 1){
query_sql "SELECT `id`,`name`,`ratio` FROM `pvpm_data` where `type` = '2' ORDER BY `ratio` < '"+.@2Lugar+"' DESC LIMIT 1",.@Guild3,.@Name3$,.@ratio3;
set .@3Lugar,.@ratio3;
if( strcharinfo(3) == "kh_kiehl02" && strcharinfo(2) != getguildname(.@Guild3) ){
mes "[^FF8000Point Clã WOE^000000]";
mes "Para entra nesse mapa você precisa ser do clã ^FF8000"+.@Name3$+"^000000";
mes "Então você será teleportado para prontera!!";
close2;
warp "prontera",150,150;
end;
}
}
}

kh_kiehl02 mapflag loadevent
louyang mapflag loadevent
job_wiz mapflag loadevent

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   616
  • Joined:  07/05/12
  • Last Seen:  

SELECT `id`,`name`,`ratio` FROM `pvpm_data` where `type` = '2' ORDER BY `ratio` < '"+.@1Lugar+"' DESC LIMIT 1

wrong query

it should be

SELECT `id`,`name`,`ratio` FROM `pvpm_data` where `type` = '2' and `ratio` < "+.@1Lugar+" ORDER BY `ratio` DESC LIMIT 1

btw why don't you use the array in the query?

if ( getgmlevel() < 1 && compare( "louyang|job_wiz|kh_kiehl02",strcharinfo(3) ){// is on one of theses maps
	query_sql "SELECT `id`,`name` FROM `pvpm_data` where `type` = '2' ORDER BY `ratio` DESC LIMIT 3",.@Guild,.@Name$;
	setarray .@map$, "louyang", "job_wiz", "kh_kiehl02";
	for ( .@i = 0; .@i < 3; .@i++ ) {
		if( strcharinfo(3) == .@map$[.@i] && strcharinfo(2) != getguildname(.@Guild[.@i]) ){
			mes "[^FF8000Point Clã WOE^000000]";
			mes "Para entra nesse mapa você precisa ser do clã ^FF8000"+.@Name$[.@i]+"^000000";
			mes "Então você será teleportado para prontera!!";
			close2;
			warp "prontera",150,150;
			end;
		}
	}
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   0
  • Joined:  01/17/14
  • Last Seen:  

Good work thanks for the help and I'm still learning ^ ^ anyway thanks ^ ^

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