Hello guys. I am creating a selection scripts and I would like to know how to remove duplicate results from the list.
prontera,154,150,5 script SampleTest 123,{
.@bonus0 = 1; // Reflect 10% Short-Range Damage
.@bonus1 = 3; // Reduce 10% Aftercast Delay
.@bonus2 = 0;
.@bonus3 = 0;
setarray .@ItemBonus$[0],
"Reflect 10% Short-Range Damage",1100000,7561,690,1063,730,
"8 Mdef",1500000,7118,275,7162,700,
"Reduce 10% Aftercast Delay",1700000,7567,500,1036,800,
"Full HP/SP on Resurrection",2000000,951,730,7149,750,
"10% Damage more with Shield Chain",2000000,7194,580,7215,890,
"10% Increase Healing Power",1400000,6032,400,1096,790,
"Uninterruptable Cast",1400000,7125,400,7263,480,
"Increase Holy and Grand Cross Damage by 20%",2000000,7223,300,7215,900,
"Indestructible",1400000,6023,380,7197,800;
mes "Sample";
for (.@i=0; .@i<getarraysize(.@ItemBonus$); .@i=.@i+6){
for (.@k=0; .@k<4; .@k++){
if (getd(".@bonus"+ .@k)){
if (.@ItemBonus$[(getd(".@bonus"+ .@k)-1)*6] != .@ItemBonus$[.@i]){
if (getd(".@dup"+ (.@i/6) +"$") != .@ItemBonus$[.@i]){
mes "~ "+ .@ItemBonus$[.@i];
}
}
setd(".@dup"+ (.@i/6) +"$", .@ItemBonus$[.@i]);
}
}
}
close;
}
If I run this script the bonus 1 will be remove from the list but when the selection continue the bonus 2 is still showing up from the list. Its like to bonus 2 onwards is not being recognize by this script. I want the bonus 1 and 2 not appear from the list.
Question
Reborn
Hello guys. I am creating a selection scripts and I would like to know how to remove duplicate results from the list.
prontera,154,150,5 script SampleTest 123,{ .@bonus0 = 1; // Reflect 10% Short-Range Damage .@bonus1 = 3; // Reduce 10% Aftercast Delay .@bonus2 = 0; .@bonus3 = 0; setarray .@ItemBonus$[0], "Reflect 10% Short-Range Damage",1100000,7561,690,1063,730, "8 Mdef",1500000,7118,275,7162,700, "Reduce 10% Aftercast Delay",1700000,7567,500,1036,800, "Full HP/SP on Resurrection",2000000,951,730,7149,750, "10% Damage more with Shield Chain",2000000,7194,580,7215,890, "10% Increase Healing Power",1400000,6032,400,1096,790, "Uninterruptable Cast",1400000,7125,400,7263,480, "Increase Holy and Grand Cross Damage by 20%",2000000,7223,300,7215,900, "Indestructible",1400000,6023,380,7197,800; mes "Sample"; for (.@i=0; .@i<getarraysize(.@ItemBonus$); .@i=.@i+6){ for (.@k=0; .@k<4; .@k++){ if (getd(".@bonus"+ .@k)){ if (.@ItemBonus$[(getd(".@bonus"+ .@k)-1)*6] != .@ItemBonus$[.@i]){ if (getd(".@dup"+ (.@i/6) +"$") != .@ItemBonus$[.@i]){ mes "~ "+ .@ItemBonus$[.@i]; } } setd(".@dup"+ (.@i/6) +"$", .@ItemBonus$[.@i]); } } } close; }
If I run this script the bonus 1 will be remove from the list but when the selection continue the bonus 2 is still showing up from the list. Its like to bonus 2 onwards is not being recognize by this script. I want the bonus 1 and 2 not appear from the list.
Its like removing the duplicate result.
Thanks in advance.
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.