function script rent_villas {
set @t, getarg(3);
mes "^FF0000[Villas " + getarg(0) + "]^000000";
mes "The best place to rent...";
mes "" + @t + " Houses for rent.";
mes "Cost of Property: ^0000FF" + getarg(1) + " Zeny^000000";
set @j, 22;
for (set @i, 1; @i <= @t; set @i, @i + 1) {
if (getd("$house" + getarg(2) + @i + "_rent") == 1) set @j, @j - 1;
}
if (@j == 0) mes "There are no properties available.";
else mes "Properties Available: ^0000FF" + @j + "^000000.";
close;
}
//===
@Emistry thanks for reply but my main is this
->job3_war02,30,20,5 script Villas Prontera#Rb 837,{ callfunc "rent_villas","Prontera",300000,"b",27; }
->rent_mb,107,42,0 script rentbw1 45,1,1,{ callfunc "rent_entrada","b1",300000,24,6; }
//============================================================
//= Function for the npc, entrance to the Villas
//= (Number of Villa,Cost of Property,Number of Houses)
//============================================================
function s