Jump to content
  • 0

can anyone help me pls? (Euphy MvP Ladder/Reward Script)


Saemonz

Question


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   2
  • Joined:  02/22/15
  • Last Seen:  

Hello, i need help on this script, 

 

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *

      * ~~~~~~~~  Euphy's MVP Ladder v1.3  ~~~~~~~~ *

      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

 

prontera,144,174,4 script [Rank] Quadro Mvp 857,{

mes "[Rank MVP]";

mes "Olá.";

mes "O que veio fazer aqui?";

next;

switch(select("Checar Ranking.:Meus pontos.:Nada...")) {

case 1:

mes "[Rank MVP]";

query_sql("SELECT char_id,CAST(`value` AS SIGNED) FROM `global_reg_value` WHERE `str` = 'MVP_Rank' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT 20",.@cid,.@value);

for(set .@i,0; .@i<getarraysize(.@cid); set .@i,.@i+1) {

query_sql("SELECT `name` FROM `char` WHERE char_id = "+.@cid[.@i]+";",.@j$);

set .@name$[.@i], .@j$;

}

if (!getarraysize(.@cid))

mes "Os Rankings estão vazios.";

else for(set .@i,0; .@i<getarraysize(.@cid); set .@i,.@i+1)

mes "["+(.@i+1)+"] "+.@name$[.@i]+" ~ "+.@value[.@i]+" kills";

close;

case 2:

mes "[Rank MVP]";

mes "Você matou "+((MVP_Rank)?"^0055FF"+MVP_Rank:"no")+"^000000 MVP"+((MVP_Rank == 1)?".":"s.");

close;

case 3:

close;

}

 

OnNPCKillEvent:

if (getmonsterinfo(killedrid,22)) {

set MVP_Rank, MVP_Rank+1;

if (MVP_Rank == 1)

query_sql("INSERT INTO `global_reg_value` (`char_id`,`str`,`value`,`type`,`account_id`) VALUES ("+getcharid(0)+",'MVP_Rank','1',3,0)");

else

query_sql("UPDATE `global_reg_value` SET `value` = '"+MVP_Rank+"' WHERE char_id = "+getcharid(0)+" AND `str` ='MVP_Rank'");

dispbottom "~ Você matou "+MVP_Rank+" MVP"+((MVP_Rank == 1)?"":"s")+". ~";

dispbottom " ~ Recompensa: Cash +15 ~ ";

set #CASHPOINTS, #CASHPOINTS + 15;

specialeffect2 313;

}

end;

}

I adapted a script from Euphy , and would like to make the rewards were distributed to all members of the party on the screen, but I do not know how .

.sorry bad English ~  /no1

Edited by Saemonz
  • Upvote 1
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  163
  • Topics Per Day:  0.04
  • Content Count:  319
  • Reputation:   8
  • Joined:  02/05/12
  • Last Seen:  

I have the same problem...
How can we distribute the rewards to all members in a partY?

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

Hello, i need help on this script, 

 

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *

      * ~~~~~~~~  Euphy's MVP Ladder v1.3  ~~~~~~~~ *

      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

 

prontera,144,174,4 script [Rank] Quadro Mvp 857,{

mes "[Rank MVP]";

mes "Olá.";

mes "O que veio fazer aqui?";

next;

switch(select("Checar Ranking.:Meus pontos.:Nada...")) {

case 1:

mes "[Rank MVP]";

query_sql("SELECT char_id,CAST(`value` AS SIGNED) FROM `global_reg_value` WHERE `str` = 'MVP_Rank' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT 20",.@cid,.@value);

for(set .@i,0; .@i<getarraysize(.@cid); set .@i,.@i+1) {

query_sql("SELECT `name` FROM `char` WHERE char_id = "+.@cid[.@i]+";",.@j$);

set .@name$[.@i], .@j$;

}

if (!getarraysize(.@cid))

mes "Os Rankings estão vazios.";

else for(set .@i,0; .@i<getarraysize(.@cid); set .@i,.@i+1)

mes "["+(.@i+1)+"] "+.@name$[.@i]+" ~ "+.@value[.@i]+" kills";

close;

case 2:

mes "[Rank MVP]";

mes "Você matou "+((MVP_Rank)?"^0055FF"+MVP_Rank:"no")+"^000000 MVP"+((MVP_Rank == 1)?".":"s.");

close;

case 3:

close;

}

 

OnNPCKillEvent:

if (getmonsterinfo(killedrid,22)) {

set MVP_Rank, MVP_Rank+1;

if (MVP_Rank == 1)

query_sql("INSERT INTO `global_reg_value` (`char_id`,`str`,`value`,`type`,`account_id`) VALUES ("+getcharid(0)+",'MVP_Rank','1',3,0)");

else

query_sql("UPDATE `global_reg_value` SET `value` = '"+MVP_Rank+"' WHERE char_id = "+getcharid(0)+" AND `str` ='MVP_Rank'");

dispbottom "~ Você matou "+MVP_Rank+" MVP"+((MVP_Rank == 1)?"":"s")+". ~";

dispbottom " ~ Recompensa: Cash +15 ~ ";

set #CASHPOINTS, #CASHPOINTS + 15;

specialeffect2 313;

}

end;

}

I adapted a script from Euphy , and would like to make the rewards were distributed to all members of the party on the screen, but I do not know how .

.sorry bad English ~  /no1

 

Exchange this:

OnNPCKillEvent:
if (getmonsterinfo(killedrid,22)) {
	set MVP_Rank, MVP_Rank+1;
	if (MVP_Rank == 1)
		query_sql("INSERT INTO `global_reg_value` (`char_id`,`str`,`value`,`type`,`account_id`) VALUES ("+getcharid(0)+",'MVP_Rank','1',3,0)");
	else
		query_sql("UPDATE `global_reg_value` SET `value` = '"+MVP_Rank+"' WHERE char_id = "+getcharid(0)+" AND `str` ='MVP_Rank'");
	dispbottom "~ Você matou "+MVP_Rank+" MVP"+((MVP_Rank == 1)?"":"s")+". ~";
	dispbottom " ~ Recompensa: Cash +15 ~ ";
	set #CASHPOINTS, #CASHPOINTS + 15;
	specialeffect2 313;
}

with this:

OnNPCKillEvent:
if (getmonsterinfo(killedrid,22)) {
	getpartymember(getcharid(1),1);
	getpartymember(getcharid(1),2);
	for ( set .@l,0; .@l < $@partymembercount; set .@l,.@l + 1) {
		detachrid;
		attachrid($@partymemberaid[.@l]);
		set MVP_Rank, MVP_Rank+1;
		query_sql("INSERT INTO `global_reg_value` (`char_id`,`str`,`value`,`type`,`account_id`) VALUES ("+$@partymembercid[.@l]+",'MVP_Rank','1',3,0)");
			else
		query_sql("UPDATE `global_reg_value` SET `value` = '"+MVP_Rank+"' WHERE char_id = "+$@partymembercid[.@l]+" AND `str` ='MVP_Rank'");
		dispbottom "~ Você matou "+MVP_Rank+" MVP"+((MVP_Rank == 1)?"":"s")+". ~";
		dispbottom " ~ Recompensa: Cash +15 ~ ";
		set #CASHPOINTS, #CASHPOINTS + 15;
		specialeffect2 313;
	}
} 

This way every party member gets the points at once.

I didn't test it, just took part of one of my projects which kinda does the same thing.

 

Regards,

Chris

Edited by llchrisll
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   2
  • Joined:  02/22/15
  • Last Seen:  

I will test it, thank you !

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