diff options
Diffstat (limited to 'npc')
-rw-r--r-- | npc/003-1/itka.txt | 1 | ||||
-rw-r--r-- | npc/005-1/ayasha.txt | 2 | ||||
-rw-r--r-- | npc/commands/rent.txt | 31 | ||||
-rw-r--r-- | npc/scripts.conf | 1 |
4 files changed, 33 insertions, 2 deletions
diff --git a/npc/003-1/itka.txt b/npc/003-1/itka.txt index b7d087517..2a87bae45 100644 --- a/npc/003-1/itka.txt +++ b/npc/003-1/itka.txt @@ -7,7 +7,6 @@ mesn; mesq lg("Hello, madam!", "Hello, sir!"); next; - //mesq l("The inn north of me still haven't opened, which is a shame. I guess their cassino got too expensive."); mesq l("Did you knew the casino on the inn up here was one of the most expensive on the whole world?"); next; mesq l("Anyway, I am selling Cherry Cakes to sponsor my studies. Please buy as many as you want!"); diff --git a/npc/005-1/ayasha.txt b/npc/005-1/ayasha.txt index f71f1726d..3053a1405 100644 --- a/npc/005-1/ayasha.txt +++ b/npc/005-1/ayasha.txt @@ -107,7 +107,7 @@ L_Rent: close; L_DoRent: - if (gettimetick(2) <= .RENT_TIME) mesq l("Sorry, you was taking too long to decide and I've rented my sword to somebody else."); + if (gettimetick(2) <= .RENT_TIME) mesq l("Sorry, you were taking too long to decide and I've rented my sword to somebody else."); if (gettimetick(2) <= .RENT_TIME) close; .RENT_TIME=gettimetick(2)+(15*60); set Zeny, Zeny - 300; diff --git a/npc/commands/rent.txt b/npc/commands/rent.txt new file mode 100644 index 000000000..cafe41e33 --- /dev/null +++ b/npc/commands/rent.txt @@ -0,0 +1,31 @@ +// TMW2 Script +// +// @rentitem <item> <time> +// Rents an <item> for <time> + +- script @rentitem 32767,{ + end; + +OnCall: + //.@request$ = ""; + //.@request$ += implode(.@atcmd_parameters$, " "); + + .@item=atoi(.@atcmd_parameters$[0]); + .@time=atoi(.@atcmd_parameters$[1]); + + if (!.@item || !.@time) { + dispbottom l("@rentitem <item numeric id> <time in seconds>"); + end; + } + + // Limiting to 365 days max + .@time=limit(15, .@time, 31536000); + + rentitem(.@item, .@time); + end; + +OnInit: + bindatcmd "rentitem", "@rentitem::OnCall", 80, 99, 1; + end; +} + diff --git a/npc/scripts.conf b/npc/scripts.conf index 89265b69f..ac6fea326 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -111,6 +111,7 @@ "npc/commands/python.txt", "npc/commands/rate-management.txt", "npc/commands/resync.txt", +"npc/commands/rent.txt", "npc/commands/scheduled-broadcasts.txt", "npc/commands/shroom.txt", "npc/commands/super-menu.txt", |