summaryrefslogtreecommitdiff
path: root/world
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
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')
-rw-r--r--world/map/db/const.txt5
-rw-r--r--world/map/db/item_db.txt22
-rw-r--r--world/map/npc/items/launcher_ammo.txt36
-rw-r--r--world/map/npc/scripts.conf1
4 files changed, 54 insertions, 10 deletions
diff --git a/world/map/db/const.txt b/world/map/db/const.txt
index b9585433..2363a1a2 100644
--- a/world/map/db/const.txt
+++ b/world/map/db/const.txt
@@ -673,3 +673,8 @@ OPT_BANK_CLOSE 2
// Currently used by the fluffy hunt (033-1).
// starts counting with 0
MAX_HIGH_SCORES 4
+
+// Launcher/Ammo Types
+AMMO_NONE 0
+AMMO_BOW 1
+AMMO_SLING 2
diff --git a/world/map/db/item_db.txt b/world/map/db/item_db.txt
index aa47af45..2e73dea6 100644
--- a/world/map/db/item_db.txt
+++ b/world/map/db/item_db.txt
@@ -30,8 +30,8 @@
526, CoinBag, Coin Bag, 3, 1000, 500, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {}
527, Milk, Milk, 0, 300, 150, 5, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {itemheal 150, 0;}, {}
528, Boots, Boots, 5, 8000, 500, 80, 0, 2, 0, -2, 0, 2, 64, 0, 0, 0, {}, {}
-529, IronArrow, Iron Arrow, 10, 4, 2, 1, 40, 0, 0, 0, 0, 2, 32768, 0, 0, 0, {}, {}
-530, ShortBow, Short Bow, 4, 8000, 2000, 600, 50, 0, 5, 0, 0, 2, 34, 1, 4, 11, {}, {}
+529, IronArrow, Iron Arrow, 10, 4, 2, 1, 40, 0, 0, 0, 0, 2, 32768, 0, 0, 0, {}, {set @AmmoType, AMMO_BOW; callfunc "CheckAmmo";}
+530, ShortBow, Short Bow, 4, 8000, 2000, 600, 50, 0, 5, 0, 0, 2, 34, 1, 4, 11, {}, {set @LauncherType, AMMO_BOW; callfunc "CheckLauncher";}
531, MinerGloves, Miner Gloves, 5, 3000, 1000, 30, 0, 2, 0, -10, 0, 2, 4, 0, 0, 0, {}, {}
532, LeatherGloves, Leather Gloves, 5, 6000, 2000, 20, 0, 4, 0, -20, 0, 2, 4, 0, 0, 0, {}, {}
533, RoastedMaggot, Roasted Maggot, 0, 110, 55, 5, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {itemheal 150, 0;}, {}
@@ -47,7 +47,7 @@
542, BottleOfSand, Bottle of Sand, 3, 70, 35, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {}
543, StandardHeadband, Standard Headband, 5, 800, 400, 10, 0, 3, 0, -3, 0, 2, 256, 0, 0, 0, {}, {}
544, SilkHeadband, Silk Headband, 5, 5000, 2000, 10, 0, 10, 0, -10, 0, 2, 256, 0, 0, 0, {}, {}
-545, ForestBow, Forest Bow, 4, 20000, 5000, 1200, 70, 0, 5, 0, 0, 2, 34, 1, 0, 11, {}, {}
+545, ForestBow, Forest Bow, 4, 20000, 5000, 1200, 70, 0, 5, 0, 0, 2, 34, 1, 0, 11, {}, {set @LauncherType, AMMO_BOW; callfunc "CheckLauncher";}
546, DesertShirt, Desert Shirt, 5, 2000, 1000, 20, 0, 6, 0, -18, 0, 2, 512, 0, 0, 0, {}, {}
547, Bardiche, Bardiche, 4, 20, 10, 10, 0, 100, 1, -200, 0, 2, 2, 0, 0, 1, {}, {callfunc "UnreleasedItem";}
548, Halberd, Halberd, 4, 20, 10, 1400, 100, 0, 1, 0, 0, 2, 2, 1, 0, 1, {}, {callfunc "UnreleasedItem";}
@@ -78,9 +78,9 @@
572, Scimitar, Scimitar, 4, 8000, 4000, 200, 100, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {callfunc "UnreleasedItem";}
573, Falchion, Falchion, 4, 8000, 4000, 300, 100, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {callfunc "UnreleasedItem";}
574, Scorpion, Scorpion, 4, 8000, 4000, 600, 100, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {callfunc "UnreleasedItem";}
-575, DesertBow, Desert Bow, 4, 8000, 4000, 1200, 100, 0, 1, 0, 0, 2, 34, 1, 1, 11, {}, {callfunc "UnreleasedItem";}
+575, DesertBow, Desert Bow, 4, 8000, 4000, 1200, 100, 0, 1, 0, 0, 2, 34, 1, 1, 11, {}, {callfunc "UnreleasedItem";set @LauncherType, AMMO_BOW; callfunc "CheckLauncher";}
576, Beheader, Beheader, 4, 8000, 4000, 2000, 100, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {callfunc "UnreleasedItem";}
-577, BoneDarts, Bone Darts, 4, 8000, 4000, 300, 100, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {callfunc "UnreleasedItem";}
+577, BoneDarts, Bone Darts, 4, 8000, 4000, 300, 100, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {callfunc "UnreleasedItem"; }
578, SandCutter, Sand Cutter, 4, 8000, 4000, 1500, 100, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {callfunc "UnreleasedItem";}
579, RockKnife, Rock Knife, 4, 15000, 7500, 500, 110, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {bonus bVit, 3;}
//ID, Name___________________, Label__________________, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, {UseScript}, {EquipScript}
@@ -274,7 +274,7 @@
//759, PaladinsHelmet, Paladin's Helmet, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {}
//760, OverlordsHelmet, Overlord's Helmet, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {}
//761, DesertHelmet, Desert Helmet, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {}
-762, TerraniteArrow, Terranite Arrow, 10, 80, 20, 1, 50, 0, 0, 0, 0, 2, 32768, 0, 0, 0, {}, {bonus bCritical, 10;}
+762, TerraniteArrow, Terranite Arrow, 10, 80, 20, 1, 50, 0, 0, 0, 0, 2, 32768, 0, 0, 0, {}, {bonus bCritical, 10;set @AmmoType, AMMO_BOW; callfunc "CheckAmmo";}
763, TerraniteOre, Terranite Ore, 3, 500, 250, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {}
//764, SailorHat, Sailor Hat, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {}
//765, CaptainsHat, Captain's Hat, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {}
@@ -393,7 +393,7 @@
875, HeartOfLazurite, Heart of Lazurite, 3, 10000, 400, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {}
876, WarlordBoots, Warlord Boots, 5, 19000, 2000, 550, 0, 5, 0, -22, 0, 2, 64, 0, 0, 0, {}, {}
877, BullHelmet, Bull Helmet, 5, 90000, 60000, 1300, 0, 19, 0, -52, 0, 2, 256, 0, 90, 0, {}, {set @bStat, bStr;set @minbStatVal, 70;callfunc "RequireStat"; set @bStat, bVit;set @minbStatVal, 50;callfunc "RequireStat"; set @bStat, bLuk;set @minbStatVal, 50;callfunc "RequireStat"; bonus bAtkRange, -10; bonus bDoubleAddRate, 20; bonus bStr, 10; bonus bCritical, 15; bonus bAspdRate, 10; bonus bDef2Rate, -39; bonus bHit, -15;}
-878, BansheeBow, Banshee Bow, 4, 101000, 40000, 900, 90, 0, 6, 0, 0, 2, 34, 1, 90, 11, {}, {set @bStat, bDex;set @minbStatVal, 80;callfunc "RequireStat"; bonus2 bHPDrainRate, 100, -4; bonus bAspdRate, 20; bonus bCritical, 70; bonus bMaxHP, -150; bonus bDefRate, -40; bonus bDef2Rate, -35;}
+878, BansheeBow, Banshee Bow, 4, 101000, 40000, 900, 90, 0, 6, 0, 0, 2, 34, 1, 90, 11, {}, {set @bStat, bDex;set @minbStatVal, 80;callfunc "RequireStat"; bonus2 bHPDrainRate, 100, -4; bonus bAspdRate, 20; bonus bCritical, 70; bonus bMaxHP, -150; bonus bDefRate, -40; bonus bDef2Rate, -35;set @LauncherType, AMMO_BOW; callfunc "CheckLauncher";}
879, HeartOfIsis, Heart of Isis, 5, 70000, 35000, 40, 0, 0, 0, 0, 0, 2, 8, 0, 85, 0, {}, {bonus bMaxHPrate, 15; bonus bHPrecovRate, 65;}
880, LazuriteRobe, Lazurite Robe, 5, 92000, 52000, 30, 0, 7, 0, 60, 0, 2, 512, 0, 90, 0, {}, {set @bStat, bInt;set @minbStatVal, 70;callfunc "RequireStat"; set @bStat, bVit;set @minbStatVal, 40;callfunc "RequireStat"; bonus bSpeedAddRate, -15; bonus bDef2Rate, -40; bonus bMdef, 60; bonus bVit, -1; bonus bInt, 7; bonus bLuk, -1; bonus bDex, -1; bonus bStr, -1;}
881, RaggedShorts, Ragged Shorts, 5, 60, 1, 7, 0, 0, 0, -2, 0, 2, 1, 0, 1, 0, {}, {}
@@ -418,12 +418,14 @@
900, YellowRoseHat, Yellow Rose Hat, 5, 5000, 1000, 0, 0, 1, 0, 8, 0, 2, 256, 0, 0, 0, {}, {}
901, OrangeRoseHat, Orange Rose Hat, 5, 5000, 1000, 0, 0, 1, 0, 8, 0, 2, 256, 0, 0, 0, {}, {}
902, BlueRoseHat, Blue Rose Hat, 5, 5000, 1000, 0, 0, 1, 0, 8, 0, 2, 256, 0, 0, 0, {}, {}
+903, SlingShot, Sling Shot, 4, 500, 50, 10, 5, 0, 3, 0, 0, 2, 34, 1, 1, 11, {}, {set @LauncherType, AMMO_SLING; callfunc "CheckLauncher";}
+904, SlingBullet, Sling Bullet, 10, 1, 0, 1, 5, 0, 0, 0, 0, 2, 32768, 0, 0, 0, {}, {set @AmmoType, AMMO_SLING; callfunc "CheckAmmo";}
// Add new entries above here. For dyed entries,add to the bottom of the 2000s.
1198, JackOSoul, Jack O Soul, 3, 100000, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, {}
-1199, Arrow, Arrow, 10, 2, 1, 1, 20, 0, 0, 0, 0, 2, 32768, 0, 0, 0, {}, {}
-1200, Bow, Bow, 4, 1000, 500, 20, 20, 0, 5, 0, 0, 2, 34, 1, 4, 11, {}, {}
+1199, Arrow, Arrow, 10, 2, 1, 1, 20, 0, 0, 0, 0, 2, 32768, 0, 0, 0, {}, {set @AmmoType, AMMO_BOW; callfunc "CheckAmmo";}
+1200, Bow, Bow, 4, 1000, 500, 20, 20, 0, 5, 0, 0, 2, 34, 1, 4, 11, {}, {set @LauncherType, AMMO_BOW; callfunc "CheckLauncher";}
1201, Knife, Knife, 4, 50, 25, 120, 5, 0, 1, 0, 0, 2, 2, 1, 1, 1, {}, {}
1202, CottonShirt, Cotton Shirt, 5, 300, 5, 13, 0, 2, 0, -2, 0, 2, 512, 0, 0, 0, {}, {}
//ID, Name___________________, Label__________________, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, {UseScript}, {EquipScript}
@@ -510,7 +512,7 @@
1279, GoblinMask, Goblin Mask, 5, 1000, 500, 50, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {}, {}
1280, Scissors, Scissors, 0, 1000, 500, 120, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {callfunc "useScissors";}, {}
1281, ShockSweet, Shock Sweet, 0, 1000, 500, 5, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {callfunc "useShockSweet";}, {}
-1282, BoneArrows, Bone Arrows, 10, 50, 20, 0, 55, 0, 0, 0, 0, 2, 32768, 0, 0, 0, {}, {bonus bCritical, 1; }
+1282, BoneArrows, Bone Arrows, 10, 50, 20, 0, 55, 0, 0, 0, 0, 2, 32768, 0, 0, 0, {}, {bonus bCritical, 1;set @AmmoType, AMMO_BOW; callfunc "CheckAmmo";}
// No new additions to the 1000s please. Add to the bottom of the < 1000s for regular entries and the 2000s for dyed entries.
2050, RedCottonShirt, Red Cotton Shirt, 5, 300, 5, 20, 0, 2, 0, -4, 0, 2, 512, 0, 0, 0, {}, {}
2051, GreenCottonShirt, Green Cotton Shirt, 5, 300, 5, 20, 0, 2, 0, -4, 0, 2, 512, 0, 0, 0, {}, {}
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;
+}
diff --git a/world/map/npc/scripts.conf b/world/map/npc/scripts.conf
index 70f06098..2fff74b8 100644
--- a/world/map/npc/scripts.conf
+++ b/world/map/npc/scripts.conf
@@ -30,6 +30,7 @@ npc: npc/items/require_stat.txt
npc: npc/items/restricted_item.txt
npc: npc/items/warpTowels.txt
npc: npc/items/unequipcb.txt
+npc: npc/items/launcher_ammo.txt
import: npc/_import.txt