Jump to content
  • 0

Request Support For This Script ( /-__-)/ ~ _\__\_


Dolphin86

Question


  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.06
  • Content Count:  709
  • Reputation:   16
  • Joined:  01/07/12
  • Last Seen:  

Hello guys i had this script from emistry back few years ago, now i had some issue with it, the idea is that this healer npc can be rented by player for 1 month, so the owner of this npc can set the price for heal, those who use the npc had to pay the amount that had been set by the owner, now the problem is when ever i came to heal with 0 zeny or below the price that been set i will get freeze, and had to relogin again,

 

P/S : if possible could i request a new feature that the owner can see how much zeny have been collected by the npc and owner can view how much time left for his renting, plus admin can also access and disable the monthly or renew the price and view how much time left for the owner renting.

 

Thanks~  /ok

prontera,155,181,5 script Healer#rent 757,{
// item to rent NPC
.@item_id = 7539;
// rent NPC for how many days
.@rent_day = 30;

.@aid = getcharid(3);
if ( $rent_aid && $rent_duration > gettimetick(2) ) {

  if ( $rent_aid == .@aid ) {
   if ( select( "Continue","Set Healer Cost","Collect Zeny" ) == 2 ) {
    input $rental_cost;
   }
   else if ( @menu == 3 ) {
    Zeny += $rental_accumulate;
    dispbottom "Collected "+$rental_accumulate+" Zeny";
    $rental_accumulate = 0;
   }
  }
 
  if ( $rental_cost ) {
   dispbottom "Healing Cost: "+$rent_cost+" Zeny";
   if ( Zeny < $rent_cost ) close;
  
   Zeny -= $rental_cost;
   $rental_accumulate += $rental_cost;
  }
 
  percentheal 100,100;
  // your desired buff heres
 
}
else if ( countitem( .@item_id ) ) {
  mes "Rent Healer NPC ?";
  mes "Rental Cost: 1 x "+getitemname( .@item_id );
 
  if ( select( "Yes","No" ) == 1 ) {
   delitem .@item_id,1;
   $rent_aid = .@aid;
   $rent_duration = gettimetick(2) + ( .@rent_day * 86400 );
   mes "NPC belong to you.";
  }
}
else {
  mes "NPC isnt available.";
  mes "Rental Cost: 1 x "+getitemname( .@item_id );
}
close;
}
Edited by dolphincute
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

Change

if ( Zeny < $rent_cost ) close;

to

if ( Zeny < $rental_cost ) close;
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.06
  • Content Count:  709
  • Reputation:   16
  • Joined:  01/07/12
  • Last Seen:  

thanks Emistry you helped me again /ok  

i will try that now


 

same result every time i try to heal with 0 zeny it start to freeze

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.06
  • Content Count:  709
  • Reputation:   16
  • Joined:  01/07/12
  • Last Seen:  

 

Change

if ( Zeny < $rent_cost ) close;

to

if ( Zeny < $rental_cost ) close;

 

good thing thats works !  /no1

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...