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~
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;
}
Question
Dolphin86
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~
Edited by dolphincuteLink to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.