From 62a866fb025efa73994ce11fa0638125953f224d Mon Sep 17 00:00:00 2001 From: HoraK-FDF Date: Sat, 1 Jun 2024 11:20:10 +0200 Subject: KeepAfterUse + DontUseAmmo --- world/map/npc/items/maps.txt | 9 +++++++++ world/map/npc/items/rubber_bat.txt | 1 - world/map/npc/items/rubber_duck.txt | 5 ++--- world/map/npc/items/scissors.txt | 1 - world/map/npc/items/shovel.txt | 5 +++++ world/map/npc/items/silver_bell.txt | 4 +--- world/map/npc/items/warpTowels.txt | 15 +++++++-------- 7 files changed, 24 insertions(+), 16 deletions(-) create mode 100644 world/map/npc/items/maps.txt create mode 100644 world/map/npc/items/shovel.txt (limited to 'world/map/npc/items') diff --git a/world/map/npc/items/maps.txt b/world/map/npc/items/maps.txt new file mode 100644 index 00000000..29d54e7d --- /dev/null +++ b/world/map/npc/items/maps.txt @@ -0,0 +1,9 @@ +function|script|readMap +{ + message strcharinfo(0), "You have no clue how to use this item yet."; + goto L_Return; + +L_Return: + set @MapName$, ""; + return; +} diff --git a/world/map/npc/items/rubber_bat.txt b/world/map/npc/items/rubber_bat.txt index 0bf80ede..a849b40d 100644 --- a/world/map/npc/items/rubber_bat.txt +++ b/world/map/npc/items/rubber_bat.txt @@ -6,7 +6,6 @@ function|script|rubberBat goto L_Return; L_Return: - getitem "RubberBat", 1; // debugmes "Check"; if ($DOOMSDAY == 3) addtimer 10, "#TMWFinalExam::OnRubberBat"; diff --git a/world/map/npc/items/rubber_duck.txt b/world/map/npc/items/rubber_duck.txt index 3f591c15..3dba2368 100644 --- a/world/map/npc/items/rubber_duck.txt +++ b/world/map/npc/items/rubber_duck.txt @@ -1,11 +1,10 @@ function|script|rubberDuck { - if (gettimetick(2) - @lastbat < 2) goto L_Return; + if (gettimetick(2) - @lastduck < 3) goto L_Return; misceffect 406; - set @lastbat, gettimetick(2); + set @lastduck, gettimetick(2); goto L_Return; L_Return: - getitem "RubberDucky", 1; return; } diff --git a/world/map/npc/items/scissors.txt b/world/map/npc/items/scissors.txt index fbf3b344..2e12c6b1 100644 --- a/world/map/npc/items/scissors.txt +++ b/world/map/npc/items/scissors.txt @@ -1,6 +1,5 @@ function|script|useScissors { - getitem "Scissors", 1; if (rand(3)) goto L_Change; message strcharinfo(0), "Whoops!"; diff --git a/world/map/npc/items/shovel.txt b/world/map/npc/items/shovel.txt new file mode 100644 index 00000000..b706f1fe --- /dev/null +++ b/world/map/npc/items/shovel.txt @@ -0,0 +1,5 @@ +function|script|useShovel +{ + message strcharinfo(0), "You have no clue how to use this item yet."; + return; +} diff --git a/world/map/npc/items/silver_bell.txt b/world/map/npc/items/silver_bell.txt index 8a791bff..c1ea2e50 100644 --- a/world/map/npc/items/silver_bell.txt +++ b/world/map/npc/items/silver_bell.txt @@ -1,12 +1,10 @@ function|script|SilverBellSound { - if (gettimetick(2) - @lastsilverbell < 20) goto L_Return; + if (gettimetick(2) - @lastsilverbell < 3) goto L_Return; misceffect 404; set @lastsilverbell, gettimetick(2); goto L_Return; L_Return: - getitem "SilverBell", 1; -// debugmes "Check"; return; } diff --git a/world/map/npc/items/warpTowels.txt b/world/map/npc/items/warpTowels.txt index 77a405b5..7ea7ec17 100644 --- a/world/map/npc/items/warpTowels.txt +++ b/world/map/npc/items/warpTowels.txt @@ -117,26 +117,25 @@ L_WarpPlayer: goto L_BreakChance; L_BreakChance: - if (rand(15)) - goto L_Keep; - getitem "HitchhikersTowel", 1; + if (@warpTowelName$ != "HitchhikersTowel" && rand(15) < 1) + goto L_Break; goto L_End; L_Forbid: message strcharinfo(0), "Towel : This area is protected by a force that doesn't tolerate the power of the Towel."; - goto L_Keep; + goto L_End; L_Prison: message strcharinfo(0), "Towel : You must be warped by a GM to leave the botcheck area."; - goto L_Keep; + goto L_End; L_DontPanic: callfunc "HumanTime"; message strcharinfo(0), "Towel : Your towel is still too low on power to jump again. Try again in ##B"+ @time$ + "##b."; - goto L_Keep; + goto L_End; -L_Keep: - getitem @warpTowelName$, 1; +L_Break: + delitem @warpTowelName$, 1; goto L_End; L_End: -- cgit v1.2.3-70-g09d2 From db180cfca543cddda1af5078f217e4deb913636a Mon Sep 17 00:00:00 2001 From: HoraK-FDF Date: Sat, 1 Jun 2024 22:30:13 +0200 Subject: use same sound timer --- world/map/npc/items/rubber_bat.txt | 4 ++-- world/map/npc/items/rubber_duck.txt | 4 ++-- world/map/npc/items/silver_bell.txt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'world/map/npc/items') diff --git a/world/map/npc/items/rubber_bat.txt b/world/map/npc/items/rubber_bat.txt index a849b40d..ea569a22 100644 --- a/world/map/npc/items/rubber_bat.txt +++ b/world/map/npc/items/rubber_bat.txt @@ -1,8 +1,8 @@ function|script|rubberBat { - if (gettimetick(2) - @lastbat < 2) goto L_Return; + if (gettimetick(2) - @lastsound < 2) goto L_Return; misceffect 403; - set @lastbat, gettimetick(2); + set @lastsound, gettimetick(2); goto L_Return; L_Return: diff --git a/world/map/npc/items/rubber_duck.txt b/world/map/npc/items/rubber_duck.txt index 3dba2368..8a822752 100644 --- a/world/map/npc/items/rubber_duck.txt +++ b/world/map/npc/items/rubber_duck.txt @@ -1,8 +1,8 @@ function|script|rubberDuck { - if (gettimetick(2) - @lastduck < 3) goto L_Return; + if (gettimetick(2) - @lastsound < 2) goto L_Return; misceffect 406; - set @lastduck, gettimetick(2); + set @lastsound, gettimetick(2); goto L_Return; L_Return: diff --git a/world/map/npc/items/silver_bell.txt b/world/map/npc/items/silver_bell.txt index c1ea2e50..07623426 100644 --- a/world/map/npc/items/silver_bell.txt +++ b/world/map/npc/items/silver_bell.txt @@ -1,8 +1,8 @@ function|script|SilverBellSound { - if (gettimetick(2) - @lastsilverbell < 3) goto L_Return; + if (gettimetick(2) - @lastsound < 2) goto L_Return; misceffect 404; - set @lastsilverbell, gettimetick(2); + set @lastsound, gettimetick(2); goto L_Return; L_Return: -- cgit v1.2.3-70-g09d2 From 81436cff429e0b05c04d640be122b2ad0daeca90 Mon Sep 17 00:00:00 2001 From: HoraK-FDF Date: Mon, 1 Jul 2024 22:15:30 +0200 Subject: stones and crystals --- world/map/db/const-aegis.txt | 8 +++ world/map/db/item_db.conf | 94 ++++++++++++++++++++++++++++++++++++ world/map/db/item_db_generic.txt | 4 ++ world/map/db/item_db_use.txt | 3 ++ world/map/npc/items/anchor_stone.txt | 56 +++++++++++++++++++++ world/map/npc/mobs/mob_points.txt | 4 +- world/map/npc/scripts.conf | 1 + 7 files changed, 169 insertions(+), 1 deletion(-) create mode 100644 world/map/npc/items/anchor_stone.txt (limited to 'world/map/npc/items') diff --git a/world/map/db/const-aegis.txt b/world/map/db/const-aegis.txt index 3676decc..6ce13f20 100644 --- a/world/map/db/const-aegis.txt +++ b/world/map/db/const-aegis.txt @@ -387,6 +387,10 @@ JunglefowlFeather 5375 KingChonkyBirbFeather 5376 Honeycomb 5377 Beeswax 5378 +Stone 5380 +Brick 5381 +MountainCrystal 5384 +BlackQuarz 5385 LeatherShirt 523 DesertShirt 546 Turtleneck 564 @@ -1003,6 +1007,8 @@ ButterButterfly 5364 JunglefowlEgg 5373 KingChonkyBirbEgg 5374 Sauerkraut 5379 +AnchorStone 5382 +AnchoredAnchorStone 5383 CottonShorts 586 JeansShorts 610 CottonSkirt 632 @@ -1297,3 +1303,5 @@ SmallRubyBif 1221 SmallSapphireBif 1222 SmallTopazBif 1223 CoalGolem 1224 +StoneSlime 1225 +StoneGolem 1226 diff --git a/world/map/db/item_db.conf b/world/map/db/item_db.conf index 277b033e..644a9a9e 100644 --- a/world/map/db/item_db.conf +++ b/world/map/db/item_db.conf @@ -5860,6 +5860,50 @@ item_db: ( Refine: false ViewSprite: 5378 }, +{ + Id: 5380 + AegisName: "Stone" + Name: "Stone" + Type: "IT_ETC" + Buy: 1000 + Sell: 500 + Weight: 60 + Refine: false + ViewSprite: 5380 +}, +{ + Id: 5381 + AegisName: "Brick" + Name: "Brick" + Type: "IT_ETC" + Buy: 2000 + Sell: 1000 + Weight: 40 + Refine: false + ViewSprite: 5381 +}, +{ + Id: 5384 + AegisName: "MountainCrystal" + Name: "MountainCrystal" + Type: "IT_ETC" + Buy: 20000 + Sell: 10000 + Weight: 20 + Refine: false + ViewSprite: 5384 +}, +{ + Id: 5385 + AegisName: "BlackQuarz" + Name: "BlackQuarz" + Type: "IT_ETC" + Buy: 20000 + Sell: 10000 + Weight: 20 + Refine: false + ViewSprite: 5385 +}, /* Chest Armor */ { Id: 523 @@ -16670,6 +16714,56 @@ item_db: ( callfunc "itheal", 500, 0; "> }, +{ + Id: 5382 + AegisName: "AnchorStone" + Name: "AnchorStone" + Type: "IT_USABLE" + Buy: 90000 + Sell: 45000 + Weight: 40 + Refine: false + ViewSprite: 5382 + KeepAfterUse: true + Trade: { + notrade: true + nodrop: true + nocart: true + nomail: true + noauction: true + noselltonpc: true + Script: <" + set @StoneName$, "AnchorStone"; + callfunc "useAnchorStone"; + "> + } +}, +{ + Id: 5383 + AegisName: "AnchoredAnchorStone" + Name: "AnchoredAnchorStone" + Type: "IT_USABLE" + Buy: 0 + Sell: 0 + Weight: 40 + Refine: false + ViewSprite: 5383 + KeepAfterUse: true + Trade: { + notrade: true + nodrop: true + nocart: true + nomail: true + noauction: true + noselltonpc: true + nostorage: true + nogstorage: true + Script: <" + set @StoneName$, "AnchoredAnchorStone"; + callfunc "useAnchorStone"; + "> + } +}, /* Legs Armor */ { Id: 586 diff --git a/world/map/db/item_db_generic.txt b/world/map/db/item_db_generic.txt index e7802111..731a2d33 100644 --- a/world/map/db/item_db_generic.txt +++ b/world/map/db/item_db_generic.txt @@ -304,3 +304,7 @@ 5376, KingChonkyBirbFeather, 3, 6000, 3000, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, {}, {} 5377, Honeycomb, 3, 200, 100, 11, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, {}, {} 5378, Beeswax, 3, 2000, 1000, 10, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, {}, {} +5380, Stone, 3, 1000, 500, 60, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, {}, {} +5381, Brick, 3, 2000, 1000, 40, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, {}, {} +5384, MountainCrystal, 3, 20000, 10000, 20, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, {}, {} +5385, BlackQuarz, 3, 20000, 10000, 20, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, {}, {} diff --git a/world/map/db/item_db_use.txt b/world/map/db/item_db_use.txt index e4783e41..2e7c33ca 100644 --- a/world/map/db/item_db_use.txt +++ b/world/map/db/item_db_use.txt @@ -147,3 +147,6 @@ 5373, JunglefowlEgg, 0, 400, 200, 4, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, {heal 300, 0, 1;}, {} 5374, KingChonkyBirbEgg, 0, 1500, 750, 22, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, {heal 800, 0, 1;}, {} 5379, Sauerkraut, 0, 250, 125, 10, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, {heal 500, 0, 1;}, {} +5382, AnchorStone, 0, 90000, 45000, 40, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 23, {set @StoneName$, "AnchorStone"; callfunc "useAnchorStone";}, {} +//ID, Name, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, Mode, {UseScript}, {EquipScript} +5383, AnchoredAnchorStone, 0, 0, 0, 40, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 31, {set @StoneName$, "AnchoredAnchorStone"; callfunc "useAnchorStone";}, {} diff --git a/world/map/npc/items/anchor_stone.txt b/world/map/npc/items/anchor_stone.txt new file mode 100644 index 00000000..52c688f4 --- /dev/null +++ b/world/map/npc/items/anchor_stone.txt @@ -0,0 +1,56 @@ +function|script|useAnchorStone +{ + addtimer 0, "AS_Core::OnUse"; + return; +} + +-|script|AS_Core|32767 +{ + end; + +OnUse: + if ( @StoneName$ == "AnchorStone" ) goto L_AnchorStone; + if ( @StoneName$ == "AnchoredAnchorStone" ) goto L_AnchoredAnchorStone; + goto L_Close; + +L_AnchorStone: + mes "\"You really want to bind the [@@" + AnchorStone + "|@@] to this place?\""; + menu + "No", L_Close, + "Yes", L_AS_Yes; + +L_AS_Yes: + set AnchorStoneDest, getmaphash(getmap()); // since a hash could be negative I take a seperate variable for that since shifting would destroy the sign bit and create a different hash + set AnchorStoneDestCoord, gety() << AS_Y_SHIFT | getx() << AS_X_SHIFT; + + delitem AnchorStone, 1; + getitem AnchoredAnchorStone, 1; + close; + +L_AnchoredAnchorStone: + if ((AnchorStoneDest < 1) && (AnchorStoneDest > -1)) goto L_AAS_Error; + mes "\"You want to recall to the place the [@@" + AnchoredAnchorStone + "|@@] is bond to?\""; + menu + "No", L_Close, + "Yes", L_AAS_Yes; + +L_AAS_Yes: + warp getmapnamefromhash(AnchorStoneDest), (AnchorStoneDestCoord & AS_X_MASK >> AS_X_SHIFT), (AnchorStoneDestCoord & AS_Y_MASK >> AS_Y_SHIFT); + + goto L_AAStoAS; + +L_AAS_Error: + mes "\"Something went wrong the [@@" + AnchoredAnchorStone + "|@@] lost its destination and turns back to normal.\""; + goto L_AAStoAS; + +L_AAStoAS: + set AnchorStoneDest, 0; + set AnchorStoneDestCoord, 0; + + delitem AnchoredAnchorStone, 1; + getitem AnchorStone, 1; + close; + +L_Close: + close; +} diff --git a/world/map/npc/mobs/mob_points.txt b/world/map/npc/mobs/mob_points.txt index d0ede2f1..2589f1eb 100644 --- a/world/map/npc/mobs/mob_points.txt +++ b/world/map/npc/mobs/mob_points.txt @@ -232,7 +232,9 @@ function|script|MobPoints 1, // 1221 SmallRubyBif 1, // 1222 SmallSapphireBif 1, // 1223 SmallTopazBif - 200 // 1224 CoalGolem + 200, // 1224 CoalGolem + 25, // 1225 StoneSlime + 200 // 1226 StoneGolem ; // END // the following mobs where replaced by other mobs: diff --git a/world/map/npc/scripts.conf b/world/map/npc/scripts.conf index 17045566..b0a5f0c2 100644 --- a/world/map/npc/scripts.conf +++ b/world/map/npc/scripts.conf @@ -64,6 +64,7 @@ npc: npc/items/underworld_troll.txt npc: npc/items/silver_bell.txt npc: npc/items/shovel.txt npc: npc/items/maps.txt +npc: npc/items/anchor_stone.txt // Mob Functions npc: npc/mobs/miner_mania.txt -- cgit v1.2.3-70-g09d2 From fbeca50439ba543e22f3251e0cd5d186d54c06b5 Mon Sep 17 00:00:00 2001 From: HoraK-FDF Date: Wed, 3 Jul 2024 22:00:01 +0200 Subject: typo fix --- world/map/npc/items/anchor_stone.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'world/map/npc/items') diff --git a/world/map/npc/items/anchor_stone.txt b/world/map/npc/items/anchor_stone.txt index 52c688f4..d63632af 100644 --- a/world/map/npc/items/anchor_stone.txt +++ b/world/map/npc/items/anchor_stone.txt @@ -29,7 +29,7 @@ L_AS_Yes: L_AnchoredAnchorStone: if ((AnchorStoneDest < 1) && (AnchorStoneDest > -1)) goto L_AAS_Error; - mes "\"You want to recall to the place the [@@" + AnchoredAnchorStone + "|@@] is bond to?\""; + mes "\"You want to recall to the place the [@@" + AnchoredAnchorStone + "|@@] is bound to?\""; menu "No", L_Close, "Yes", L_AAS_Yes; -- cgit v1.2.3-70-g09d2 From a213cfb2cea5b26f1dbb9577bed57eedd380a10b Mon Sep 17 00:00:00 2001 From: HoraK-FDF Date: Wed, 3 Jul 2024 22:19:19 +0200 Subject: typo fix comment --- world/map/npc/items/anchor_stone.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'world/map/npc/items') diff --git a/world/map/npc/items/anchor_stone.txt b/world/map/npc/items/anchor_stone.txt index d63632af..c1ea722b 100644 --- a/world/map/npc/items/anchor_stone.txt +++ b/world/map/npc/items/anchor_stone.txt @@ -20,7 +20,7 @@ L_AnchorStone: "Yes", L_AS_Yes; L_AS_Yes: - set AnchorStoneDest, getmaphash(getmap()); // since a hash could be negative I take a seperate variable for that since shifting would destroy the sign bit and create a different hash + set AnchorStoneDest, getmaphash(getmap()); // since a hash could be negative I take a separate variable for that since shifting would destroy the sign bit and create a different hash set AnchorStoneDestCoord, gety() << AS_Y_SHIFT | getx() << AS_X_SHIFT; delitem AnchorStone, 1; -- cgit v1.2.3-70-g09d2