summaryrefslogtreecommitdiff
path: root/world/map/npc/items
diff options
context:
space:
mode:
authorwushin <pasekei@gmail.com>2013-10-25 12:22:53 -0500
committerwushin <pasekei@gmail.com>2013-10-25 12:22:53 -0500
commitb55a4543d92a804473cb639193aaa9b6a83edcce (patch)
treefe4ca9fbd41b504148228b29c2a7e50894219f3e /world/map/npc/items
parentc3912f6f0ebdc0de532d0a5190d4c652993e054b (diff)
downloadserverdata-b55a4543d92a804473cb639193aaa9b6a83edcce.tar.gz
serverdata-b55a4543d92a804473cb639193aaa9b6a83edcce.tar.bz2
serverdata-b55a4543d92a804473cb639193aaa9b6a83edcce.tar.xz
serverdata-b55a4543d92a804473cb639193aaa9b6a83edcce.zip
Multiple Ammo Types
Added Item SlingShot Added Item SlingBullet Added Const AMMO_NONE, AMMO_BOW, AMMO_SLING Added Function CheckAmmo Added Trigger OnQuequipAmmo to Unequipcb Added Var @AmmoType to Ammo Added Var @LauncherType to Launchers Added File launcher_ammo.txt to scripts Needs TMWA-server commit equip-arrow to work (equip_arrow)
Diffstat (limited to 'world/map/npc/items')
-rw-r--r--world/map/npc/items/launcher_ammo.txt36
1 files changed, 36 insertions, 0 deletions
diff --git a/world/map/npc/items/launcher_ammo.txt b/world/map/npc/items/launcher_ammo.txt
new file mode 100644
index 00000000..3b0b21f8
--- /dev/null
+++ b/world/map/npc/items/launcher_ammo.txt
@@ -0,0 +1,36 @@
+// ------------------------------------------------------------
+// Ammo Needs to know Launcher and vice versa.
+//
+// Behavior:
+// Ammo is always unequipped
+//
+// Variables passed to this script:
+//
+// @LauncherType, @AmmoType
+//
+// ------------------------------------------------------------
+
+function|script|CheckLauncher|,
+{
+ set @AmmoEquip, (getequipid(equip_arrow) + 1);
+ if (@AmmoEquip)
+ goto L_Return;
+
+L_NoAmmoEquip:
+ set @LauncherType, 0;
+
+L_Return:
+ return;
+}
+
+function|script|CheckAmmo|,
+{
+ if ((@LauncherType == @AmmoType) || (!@LauncherType))
+ goto L_Return;
+
+L_Unequip:
+ callfunc "UnequipLater";
+
+L_Return:
+ return;
+}