Uhm... For a quest? Sticking to the grounds of your original request and adding in the party leader requirement...
prontera,150,150,5 script package_test 100,{
if(Quest_Variable==1) end; Quest_Variable++;
if(getcharid(0)!=getpartyleader(getcharid(1),2)) end; addrid(2);
set .@a, callfunc("package_func",501,10,50,
502,1,10,
503,12,10,
504,6,100);
while(.@i++-1<.@a)
dispbottom "You got "+@package_amount[.@i-1]+" "+getitemname(@package_item[.@i-1]);
disablenpc "package_test";
end;
}
/// callfunc("package_func",<itemid>,<amount>,<chance>{,<itemid>,<amount>,<chance>{,<itemid>,<amount>,<chance>{,...}}})
function script package_func {
set .@len, getargcount();
while(set(.@i,.@i+3)-3<.@len)
if(rand(101)<=getarg(.@i-1))
getitem(set(@package_item[.@a++-1],getarg(.@i-3)),set(@package_amount[.@a-1],getarg(.@i-2)));
return .@a;
}
If you wanted to activate this prize npc from the original quest npc you would use...
enablenpc "package_test";
If you're just asking for a party prize giver you could still use this function.
if(getcharid(0)!=getpartyleader(getcharid(1),2)) end; addrid(2);
callfunc("package_func",501,10,50,502,1,10,503,12,10,504,6,100);
disablenpc "NPCNAME";
end;
Otherwise you have to provide me with more information.
Addrid is a newer command so you might not have it if you're using an outdated rAthena.
hmmmm more info?
here is my script it's a lil hard to explain xD
I want to make only the party leader can distribute the prize after they finish the tier...