prontera,150,150,0 script Sample 100,{
.@point = getd( .point_name$ );
if ( .@point >= 0 ) end;
mes "I can remove your negative points by exchanging "+getitemname( .item_id )+" ("+.amount+") per negative points";
mes "Currently you have " +.@point+ " negative points";
next;
if( select( "Yes, i want to remove the negative points", "No, thanks!" ) == 1 ){
.@amount = ( .amount * ( 0 - .point_name ) );
if( countitem( .item_id ) < .@amount ){
mes "You don't have enough "+getitemname( .item_id );
mes "You need : "+.@amount+"x "+getitemname( .item_id );
}else{
delitem .item_id, .@amount;
setd( .point_name$ ) = 0;
mes "Done!";
}
}
close;
OnInit:
.item_id = 7227;
.amount = 10;
.point_name$ = "#POGIPOINTS";
end;
}