Jump to content
  • 0

Old Script


jimmyyheah

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   0
  • Joined:  12/18/13
  • Last Seen:  




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;
}

//============================================================
//= Functions of the Signboard that shows the owners and GM options
//= (id of Villa,Amount of Houses)
//============================================================

function script rent_letrero {
mes "[Rental Information]";
mes "Current Owners:";
set @t, getarg(1);
for (set @i, 1; @i <= @t; set @i, @i + 1) {
if (getd("$house" + getarg(0) + @i + "_rent") == 1) {
if (@Color$ == "^0000FF")
set @Color$, "^FF0000";
else
set @Color$, "^0000FF";
// Detalle de Casa
mes @Color$ + "House N?" + @i + " rented a " + getd("$house" + getarg(0) + @i + "_user$") + ".";
if (getgmlevel())
mes "Accessed " + getd("$house" + getarg(0) + @i + "_accesos") + " time from last reset";
mes "Final: " + getd("$house" + getarg(0) + @i + "_buy_day") + "-" + getd("$house" + getarg(0) + @i + "_buy_month") + "-" + getd("$house" + getarg(0) + @i + "_buy_year") + ".^000000";
}
}
if (getgmlevel()) goto L_GMmenu;
close;

L_GMmenu:
next;
menu "Release a house",L_Liberar,"Clean Accounts",L_Limpiar,"Cancel",-;

L_Salir:
mes "^FF0000[Rental Information]^000000";
mes "Level of administrative access";
mes "Goodbye...";
close;

L_Limpiar:
mes "^FF0000[Rental Information]^000000";
for (set @i, 1; @i <= @t; set @i, @i + 1) {
setd "$house" + getarg(0) + @i + "_access", 0;
}
mes "Logs in accessing the house has been reseted.";
close;

L_Liberar:
mes "^FF0000[Rental Information]^000000";
mes "You want to release a house?(1 - " + @t + ")";
mes "Enter the number of the house you want to release. (0 o mayor que " + @t + " para cancelar).";
next;
input @house;
if (@house < 1) goto L_Salir;
if (@house > @t) goto L_Salir;

if (getd("$house" + getarg(0) + @house + "_rent") == 1) {
mes "^FF0000[Information on Rents]^000000";
setd "$house" + getarg(0) + @house + "_rent", 0;
mes "The house " + @house + " has been released.";
killmonsterall "rentin" + getarg(0) + @house + ".gat"; // Kills the small monsters
} else {
mes "^FF0000[Rental Information]^000000";
mes "I'm sorry, but this house doesn't have an owner right now!";
mes "Please try again with a different number.";
}
close;
}

==================================================================================================

//============================================================
//= NPCs (Proprietor, Kafra, signboard)
//============================================================

prt_fild06,51,296,5 script Villas Prontera#Rb 837,{ callfunc "rent_villas","Prontera",300000,"b",27; }
rent_mb,128,44,5 script Signboard#Rb 835,{ callfunc "rent_letrero","b",27; }
rent_mb,137,120,4 script Kafra Villas#Rb 721,{ callfunc "rent_kafra"; }
rent_mb,130,120,5 script Proprietor#Rb 833,{ callfunc "rent_propietario","b",300000,27; }

//============================================================
//= Access to Properties
//============================================================

rent_mb,107,42,0 script rentbw1 45,1,1,{ callfunc "rent_entrada","b1",300000,24,6; }
rent_mb,79,42,0 script rentbw2 45,1,1,{ callfunc "rent_entrada","b2",300000,24,6; }
rent_mb,161,42,0 script rentbw3 45,1,1,{ callfunc "rent_entrada","b3",300000,24,6; }
rent_mb,189,42,0 script rentbw4 45,1,1,{ callfunc "rent_entrada","b4",300000,24,6; }
rent_mb,40,48,0 script rentbw5 45,1,1,{ callfunc "rent_entrada","b5",300000,24,6; }
rent_mb,40,76,0 script rentbw6 45,1,1,{ callfunc "rent_entrada","b6",300000,24,6; }
rent_mb,40,104,0 script rentbw7 45,1,1,{ callfunc "rent_entrada","b7",300000,24,6; }
rent_mb,40,132,0 script rentbw8 45,1,1,{ callfunc "rent_entrada","b8",300000,24,6; }
rent_mb,40,160,0 script rentbw9 45,1,1,{ callfunc "rent_entrada","b9",300000,24,6; }
rent_mb,40,188,0 script rentbw10 45,1,1,{ callfunc "rent_entrada","b10",300000,24,6; }
rent_mb,225,48,0 script rentbw11 45,1,1,{ callfunc "rent_entrada","b11",300000,24,6; }
rent_mb,225,76,0 script rentbw12 45,1,1,{ callfunc "rent_entrada","b12",300000,24,6; }
rent_mb,225,104,0 script rentbw13 45,1,1,{ callfunc "rent_entrada","b13",300000,24,6; }
rent_mb,225,132,0 script rentbw14 45,1,1,{ callfunc "rent_entrada","b14",300000,24,6; }
rent_mb,225,160,0 script rentbw15 45,1,1,{ callfunc "rent_entrada","b15",300000,24,6; }
rent_mb,225,188,0 script rentbw16 45,1,1,{ callfunc "rent_entrada","b16",300000,24,6; }
rent_mb,48,225,0 script rentbw17 45,1,1,{ callfunc "rent_entrada","b17",300000,24,6; }
rent_mb,76,225,0 script rentbw18 45,1,1,{ callfunc "rent_entrada","b18",300000,24,6; }
rent_mb,104,225,0 script rentbw19 45,1,1,{ callfunc "rent_entrada","b19",300000,24,6; }
rent_mb,132,225,0 script rentbw20 45,1,1,{ callfunc "rent_entrada","b20",300000,24,6; }
rent_mb,160,225,0 script rentbw21 45,1,1,{ callfunc "rent_entrada","b21",300000,24,6; }
rent_mb,188,225,0 script rentbw22 45,1,1,{ callfunc "rent_entrada","b22",300000,24,6; }
rent_mb,216,225,0 script rentbw23 45,1,1,{ callfunc "rent_entrada","b23",300000,24,6; }
rent_mb,108,108,0 script rentbw24 45,1,1,{ callfunc "rent_entrada","b24",300000,24,6; }
rent_mb,108,159,0 script rentbw25 45,1,1,{ callfunc "rent_entrada","b25",300000,24,6; }
rent_mb,159,108,0 script rentbw26 45,1,1,{ callfunc "rent_entrada","b26",300000,24,6; }
rent_mb,159,159,0 script rentbw27 45,1,1,{ callfunc "rent_entrada","b27",300000,24,6; }



 

=========================================================================================================


 

 

How to change the Zeny to another item like PORING COINS? Any Pro can help? i have no idea on it -_-ll

Edited by Emistry
use codebox
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  177
  • Reputation:   21
  • Joined:  01/31/12
  • Last Seen:  

This script isn't complete. It calls a function "rent_entrada" that is not defined in the paste you have posted above.

 

From what you have posted, the script only informs the user of the rent at line 6. Please post the rest of the script, if you have it.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   0
  • Joined:  12/18/13
  • Last Seen:  

 

here the scirpt 

Rent_Engine.txt

Rent_Functions.txt

Rent_Prontera.txt

Edited by jimmyyheah
Link to comment
Share on other sites


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

in Rent_Functions.txt

find all

if (Zeny < 2000) {

change to

if ( countitem( 512 ) < 2000 ) {  // 2000 apple.

then...

find all

set Zeny, Zeny - 2000;

change to

delitem 512,2000;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  22
  • Reputation:   0
  • Joined:  12/18/13
  • Last Seen:  

@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 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;
}

//============================================================ 
//= Functions of the Signboard that shows the owners and GM options
//= (id of Villa,Amount of Houses)
//============================================================ 

function script rent_letrero {
mes "[Rental Information]";
mes "Current Owners:";
set @t, getarg(1);
for (set @i, 1; @i <= @t; set @i, @i + 1) {
if (getd("$house" + getarg(0) + @i + "_rent") == 1) {
if (@Color$ == "^0000FF")
set @Color$, "^FF0000";
else
set @Color$, "^0000FF";
// Detalle de Casa
mes @Color$ + "House N?" + @i + " rented a " + getd("$house" + getarg(0) + @i + "_user$") + ".";
if (getgmlevel())
mes "Accessed " + getd("$house" + getarg(0) + @i + "_accesos") + " time from last reset";
mes "Final: " + getd("$house" + getarg(0) + @i + "_buy_day") + "-" + getd("$house" + getarg(0) + @i + "_buy_month") + "-" + getd("$house" + getarg(0) + @i + "_buy_year") + ".^000000";
}
}
if (getgmlevel()) goto L_GMmenu;
close;

L_GMmenu:
next;
menu "Release a house",L_Liberar,"Clean Accounts",L_Limpiar,"Cancel",-;

L_Salir:
mes "^FF0000[Rental Information]^000000";
mes "Level of administrative access";
mes "Goodbye...";
close;

L_Limpiar:
mes "^FF0000[Rental Information]^000000";
for (set @i, 1; @i <= @t; set @i, @i + 1) {
setd "$house" + getarg(0) + @i + "_access", 0;
}
mes "Logs in accessing the house has been reseted.";
close;

L_Liberar:
mes "^FF0000[Rental Information]^000000";
mes "You want to release a house?(1 - " + @t + ")";
mes "Enter the number of the house you want to release. (0 o mayor que " + @t + " para cancelar).";
next;
input @house;
if (@house < 1) goto L_Salir;
if (@house > @t) goto L_Salir;

if (getd("$house" + getarg(0) + @house + "_rent") == 1) {
mes "^FF0000[Information on Rents]^000000";
setd "$house" + getarg(0) + @house + "_rent", 0;
mes "The house " + @house + " has been released.";
killmonsterall "rentin" + getarg(0) + @house + ".gat"; // Kills the small monsters
} else {
mes "^FF0000[Rental Information]^000000";
mes "I'm sorry, but this house doesn't have an owner right now!";
mes "Please try again with a different number.";
}
close;
}
Edited by Emistry
use codebox
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...