// https://rathena.org/board/topic/110791-premium-rental-misc-item/
prontera,155,181,5 script Sample#rent_pod 4_F_KAFRA1,{
function func_Rental;
mes "Rent "+getitemname( .item_id )+" with "+getitemname( .required_item )+" ?";
.@i = select( .menu$ ) - 1;
if ( countitem( .required_item ) >= .cost[.@i] ) {
delitem .required_item, .cost[.@i];
rentitem .item_id,.second[.@i];
mes "Done";
}
close;
OnInit:
.item_id = 7179;
.required_item = 674;
// func_Rental( "<title>", <seconds>, <cost> );
func_Rental( "7 Days", ( 7 * 24 * 3600 ), 1000 );
func_Rental( "30 Days", ( 30 * 24 * 3600 ), 3000 );
end;
function func_Rental {
.second[.rental_size] = getarg( 1,60 );
.cost[.rental_size] = getarg( 2,0 );
.menu$ = .menu$ + getarg( 0, "" ) + " - "+.cost[.rental_size]+"x "+getitemname( .required_item ) + ":";
.rental_size++;
return;
}
}
Comments
0 B
|👍
/👎