summaryrefslogtreecommitdiff
path: root/npc/commands
diff options
context:
space:
mode:
Diffstat (limited to 'npc/commands')
-rw-r--r--npc/commands/rent.txt31
1 files changed, 31 insertions, 0 deletions
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;
+}
+