Advertisement
Emistry

[RO] Rent POD using Coin

May 1st, 2017
360
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. // https://rathena.org/board/topic/110791-premium-rental-misc-item/
  2.  
  3. prontera,155,181,5 script Sample#rent_pod 4_F_KAFRA1,{
  4. function func_Rental;
  5.  
  6. mes "Rent "+getitemname( .item_id )+" with "+getitemname( .required_item )+" ?";
  7. .@i = select( .menu$ ) - 1;
  8. if ( countitem( .required_item ) >= .cost[.@i] ) {
  9. delitem .required_item, .cost[.@i];
  10. rentitem .item_id,.second[.@i];
  11. mes "Done";
  12. }
  13. close;
  14.  
  15.  
  16. OnInit:
  17. .item_id = 7179;
  18. .required_item = 674;
  19.  
  20. // func_Rental( "<title>", <seconds>, <cost> );
  21. func_Rental( "7 Days", ( 7 * 24 * 3600 ), 1000 );
  22. func_Rental( "30 Days", ( 30 * 24 * 3600 ), 3000 );
  23. end;
  24.  
  25. function func_Rental {
  26. .second[.rental_size] = getarg( 1,60 );
  27. .cost[.rental_size] = getarg( 2,0 );
  28. .menu$ = .menu$ + getarg( 0, "" ) + " - "+.cost[.rental_size]+"x "+getitemname( .required_item ) + ":";
  29. .rental_size++;
  30. return;
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement