- script sample_main -1,{
OnPCDieEvent:
if (getmapflag(strnpcinfo(3), mf_pvp)) {
getmapxy(@map$, @x, @y, BL_PC);
callsub(L_DropItem, 969);
callsub(L_DropItem, 724);
callsub(L_DropItem, 7049);
}
end;
L_DropItem:
.@item_id = getarg(0, 0);
if (.@item_id) {
.@countitem = countitem(.@item_id);
delitem .@item_id, .@countitem;
makeitem .@item_id, .@countitem, @map$, @x, @y;
}
return;
}
prontera,159,159,4 script Normal Crystal 1288,{
if (countitem(6010)) {
.@rate = rand(100);
if (.@rate < 1) {
.@item_id = 969;
}
else if (.@rate < 25) {
.@item_id = 724;
}
else if (.@rate < 90) {
.@item_id = 7049;
}
else {
// nothing
}
if (.@item_id) {
while(1){
if(.mine == .minemax){
movenpc strnpcinfo(3), rand(300), rand(300), rand(8);
end;
}
progressbar "GREEN",5;
getitem .@item_id, 1;
.mine++;
}
}
}
end;
OnInit:
.minemax = 2;
while(1){
delwaitingroom;
waitingroom "Mined ["+.mine+"/"+.minemax+"]",1;
sleep 1000;
}
}
prontera,165,159,4 script Normal Crystal#1 1288,{
if (countitem(6010)) {
.@rate = rand(100);
if (.@rate < 1) {
.@item_id = 969;
}
else if (.@rate < 25) {
.@item_id = 724;
}
else if (.@rate < 90) {
.@item_id = 7049;
}
else {
// nothing
}
if (.@item_id) {
while(1){
if(.mine == .minemax){
movenpc strnpcinfo(3), rand(300), rand(300), rand(8);
end;
}
progressbar "GREEN",5;
getitem .@item_id, 1;
.mine++;
}
}
}
end;
OnInit:
.minemax = 2;
while(1){
delwaitingroom;
waitingroom "Mined ["+.mine+"/"+.minemax+"]",1;
sleep 1000;
}
}
//prontera,1,1,4 duplicate(Normal Crystal) Normal Crystal#2 1288
//prontera,1,1,4 duplicate(Normal Crystal) Normal Crystal#3 1288