I'm using a custom instance of Alanye and I'm wondering if it's possible to set the reward function to not be given to characters outside of the instance maps?
Right now, party members not in the map get the same reward as party members in it. As you can imagine this is quite troublesome because they can just hoard the coins with double clients.
What should I be changing? Here are the reward scripts.
Thank you! Help would be much appreciated!
OnFinished:
instance_announce instance_id(), "Congratulation! You have completed the challenge!",bc_map,"0x00ff99";
sleep2 2000;
instance_announce instance_id(), "You'll soon be warped to Valhalla",bc_map,"0x00ff99";
sleep2 2000;
instance_destroy AA_INSTANCE_ID;
getpartymember getcharid(1),2;
copyarray .@partymemberaid, $@partymemberaid, $@partymembercount;
detachrid;
for ( set .@i, 0; .@i < $@partymembercount; set .@i, .@i +1 ) {
if (attachrid(.@partymemberaid[.@i]))
{
callfunc("AddPointsFixed", getcharid(3), 1 * $difficulty_level);
set AARENA, AARENA + 1;
warp "valkyrie",49,48;
}
}
getpartymember getcharid(1),2;
for( set .@i, 0; .@i < $@partymembercount; set .@i, .@i+1 )
if( attachrid( $@partymemberaid[.@i] ) && AA_INSTANCE_ID > 0){
set AA_INSTANCE_ID, -1;
}
}
function script AddPointsFixed {
if(instance_mapname(strcharinfo(3)) != instance_mapname("1@va") ){end;}
set .@accountID, getarg(0);
set .@amount, getarg(1);
getitem 677, 3;
message rid2name(.@accountID), "[ Instance ] : You've obtained 3 Coin(s) for completing instance!";
return;
}
Question
Mistique
Hi all!
I'm using a custom instance of Alanye and I'm wondering if it's possible to set the reward function to not be given to characters outside of the instance maps?
Right now, party members not in the map get the same reward as party members in it. As you can imagine this is quite troublesome because they can just hoard the coins with double clients.
What should I be changing? Here are the reward scripts.
Thank you! Help would be much appreciated!
OnFinished: instance_announce instance_id(), "Congratulation! You have completed the challenge!",bc_map,"0x00ff99"; sleep2 2000; instance_announce instance_id(), "You'll soon be warped to Valhalla",bc_map,"0x00ff99"; sleep2 2000; instance_destroy AA_INSTANCE_ID; getpartymember getcharid(1),2; copyarray .@partymemberaid, $@partymemberaid, $@partymembercount; detachrid; for ( set .@i, 0; .@i < $@partymembercount; set .@i, .@i +1 ) { if (attachrid(.@partymemberaid[.@i])) { callfunc("AddPointsFixed", getcharid(3), 1 * $difficulty_level); set AARENA, AARENA + 1; warp "valkyrie",49,48; } } getpartymember getcharid(1),2; for( set .@i, 0; .@i < $@partymembercount; set .@i, .@i+1 ) if( attachrid( $@partymemberaid[.@i] ) && AA_INSTANCE_ID > 0){ set AA_INSTANCE_ID, -1; } }
function script AddPointsFixed { if(instance_mapname(strcharinfo(3)) != instance_mapname("1@va") ){end;} set .@accountID, getarg(0); set .@amount, getarg(1); getitem 677, 3; message rid2name(.@accountID), "[ Instance ] : You've obtained 3 Coin(s) for completing instance!"; return; }
Link to comment
Share on other sites
4 answers 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.