diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-05-27 14:35:14 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-05-27 14:35:14 -0300 |
commit | 06f41ac92f33fd957d33695d63a7e4f82288d94c (patch) | |
tree | 268947bb349320fe89c76910d1700ff315e204e0 | |
parent | df44b94ac3bfa7392f7f16daa027d1ad0db6af1b (diff) | |
parent | fb2453e136a2c8a1da5e13ee7f7e2de0522006d9 (diff) | |
download | serverdata-06f41ac92f33fd957d33695d63a7e4f82288d94c.tar.gz serverdata-06f41ac92f33fd957d33695d63a7e4f82288d94c.tar.bz2 serverdata-06f41ac92f33fd957d33695d63a7e4f82288d94c.tar.xz serverdata-06f41ac92f33fd957d33695d63a7e4f82288d94c.zip |
Merge branch 'master' into jesusalva/serena
134 files changed, 2542 insertions, 541 deletions
diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..bbb4a20d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# treat script files as C (for highlighting in merge requests) +npc/**/*.txt linguist-language=C gitlab-language=c diff --git a/conf/map/maps.conf b/conf/map/maps.conf index c075dedd..531fd8fc 100644 --- a/conf/map/maps.conf +++ b/conf/map/maps.conf @@ -49,6 +49,7 @@ map_list: ( "001-2-40", "001-2-41", "001-2-42", + "001-2-43", "001-2-5", "001-2-6", "001-2-7", @@ -95,7 +96,11 @@ map_list: ( "008-2-9", "008-3-0", "008-3-1", - "008-4-1", + "008-3-2", + "008-3-3", + "008-3-4", + "008-3-5", + "008-3-6", "012-1", "012-2-1", "012-2-2", @@ -104,6 +109,9 @@ map_list: ( "012-2-5", "012-2-6", "012-2-7", + "012-3-1", + "012-3-2", + "012-3-3", "sec_pri", "test", "testbg", diff --git a/db/constants.conf b/db/constants.conf index 6cce7c25..192fb7fa 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -4061,6 +4061,9 @@ constants_db: { NPC_AAHNA: 206 NPC_HASAN: 207 NPC_CRASMANDE: 208 + NPC_MANATREE: 210 + NPC_HENRY: 211 + NPC_NUNIA: 212 NPC_CONFUSED_TREE: 400 NPC_ALIGE: 401 @@ -4127,6 +4130,9 @@ constants_db: { NPC_FLAG_L: 464 NPC_FLAG_R: 465 NPC_TOICHI: 466 + NPC_SEWER_GATE: 467 + NPC_SEWER_WHEEL: 468 + NPC_TREASURE: 469 NPC_TEST1: 800 NPC_PLAYER: 801 @@ -4238,5 +4244,8 @@ constants_db: { LANG_ON_SEA: 1 LANG_IN_SHIP: 2 + comment__: "Misc settings" + CHEST_WAITTIME: 900 // 15 minutes + @include "conf/import/constants.conf" } diff --git a/db/map_index.txt b/db/map_index.txt index a692781d..ca1ca981 100644 --- a/db/map_index.txt +++ b/db/map_index.txt @@ -46,61 +46,69 @@ 001-2-40 46 001-2-41 47 001-2-42 48 -001-2-5 49 -001-2-6 50 -001-2-7 51 -001-2-8 52 -001-2-9 53 -001-3-0 54 -001-3-1 55 -001-3-2 56 -008-1-1 57 -008-1-2 58 -008-1 59 -008-2-0 60 -008-2-1 61 -008-2-10 62 -008-2-11 63 -008-2-12 64 -008-2-13 65 -008-2-14 66 -008-2-15 67 -008-2-16 68 -008-2-17 69 -008-2-18 70 -008-2-19 71 -008-2-2 72 -008-2-20 73 -008-2-21 74 -008-2-22 75 -008-2-23 76 -008-2-24 77 -008-2-25 78 -008-2-26 79 -008-2-27 80 -008-2-28 81 -008-2-29 82 -008-2-3 83 -008-2-30 84 -008-2-31 85 -008-2-32 86 -008-2-4 87 -008-2-5 88 -008-2-6 89 -008-2-7 90 -008-2-8 91 -008-2-9 92 -008-3-0 93 -008-3-1 94 -008-4-1 95 -012-1 96 -012-2-1 97 -012-2-2 98 -012-2-3 99 -012-2-4 100 -012-2-5 101 -012-2-6 102 -012-2-7 103 -sec_pri 104 -test 105 -testbg 106 +001-2-43 49 +001-2-5 50 +001-2-6 51 +001-2-7 52 +001-2-8 53 +001-2-9 54 +001-3-0 55 +001-3-1 56 +001-3-2 57 +008-1-1 58 +008-1-2 59 +008-1 60 +008-2-0 61 +008-2-1 62 +008-2-10 63 +008-2-11 64 +008-2-12 65 +008-2-13 66 +008-2-14 67 +008-2-15 68 +008-2-16 69 +008-2-17 70 +008-2-18 71 +008-2-19 72 +008-2-2 73 +008-2-20 74 +008-2-21 75 +008-2-22 76 +008-2-23 77 +008-2-24 78 +008-2-25 79 +008-2-26 80 +008-2-27 81 +008-2-28 82 +008-2-29 83 +008-2-3 84 +008-2-30 85 +008-2-31 86 +008-2-32 87 +008-2-4 88 +008-2-5 89 +008-2-6 90 +008-2-7 91 +008-2-8 92 +008-2-9 93 +008-3-0 94 +008-3-1 95 +008-3-2 96 +008-3-3 97 +008-3-4 98 +008-3-5 99 +008-3-6 100 +012-1 101 +012-2-1 102 +012-2-2 103 +012-2-3 104 +012-2-4 105 +012-2-5 106 +012-2-6 107 +012-2-7 108 +012-3-1 109 +012-3-2 110 +012-3-3 111 +sec_pri 112 +test 113 +testbg 114 diff --git a/db/quest_db.conf b/db/quest_db.conf index 5f0b27ab..990c76cb 100644 --- a/db/quest_db.conf +++ b/db/quest_db.conf @@ -24,7 +24,7 @@ quest_db: ( ) }, ******************************************************************************/ - +// Drasil Island Quests (0~19) { Id: 0 Name: "ShipQuests_Julia" @@ -101,34 +101,29 @@ quest_db: ( Id: 18 Name: "General_Cookies" }, -{ - Id: 19 - Name: "ArtisQuests_LazyBrother" -}, + +// Artis Quests (20~49) { Id: 20 - Name: "ArtisQuests_Urchin" + Name: "ArtisQuests_LazyBrother" }, { Id: 21 - Name: "ArtisQuests_CatchPiou" + Name: "ArtisQuests_Urchin" }, { Id: 22 - Name: "ArtisQuests_Fishman" + Name: "ArtisQuests_CatchPiou" }, { Id: 23 - Name: "ArtisQuests_QOnan" + Name: "ArtisQuests_Fishman" }, { Id: 24 - Name: "Halloween_VisitArtis" -}, -{ - Id: 25 - Name: "Halloween_BarrelQuest" + Name: "ArtisQuests_QOnan" }, +// ID 25 IS FREE { Id: 26 Name: "General_Rumly" @@ -137,10 +132,7 @@ quest_db: ( Id: 27 Name: "ArtisQuests_Enora" }, -{ - Id: 28 - Name: "General_Narrator" -}, +// ID 28 IS FREE { Id: 29 Name: "ArtisQuests_Fexil" @@ -164,35 +156,58 @@ quest_db: ( { Id: 34 Name: "ArtisQuests_TrainingLegion" - }, +}, { - Id: 36 + Id: 35 + Name: "ThiefQuests_Artis" +}, + +// Argaes Quests (50~99) +{ + Id: 50 Name: "HurnscaldQuests_Hinnak" }, { - Id: 37 + Id: 51 Name: "HurnscaldQuests_Soup" }, { - Id: 38 + Id: 52 Name: "HurnscaldQuests_Inspector" }, { - Id: 39 + Id: 53 Name: "HurnscaldQuests_ForestBow" }, { - Id: 40 + Id: 54 Name: "HurnscaldQuests_WoodenShield" }, { - Id: 41 + Id: 55 Name: "General_Cooking" }, { - Id: 42 + Id: 56 Name: "General_Brotherhood" }, +// 57 reserved Kfahr + +// Event and General Quests (100~149) +{ + Id: 100 + Name: "General_Narrator" +}, +{ + Id: 101 + Name: "Halloween_VisitArtis" +}, +{ + Id: 102 + Name: "Halloween_BarrelQuest" +}, + +// Test Quests, Debug Quests, etc. (1000+) { Id: 1000 Name: "Test_testing1" diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 1a5ce55c..5594ee93 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -1184,6 +1184,24 @@ item_db: ( sc_start SC_INCHITRATE, 80000, 300; "> }, +{ + Id: 615 + AegisName: "TreasureMap" + Name: "Treasure Map" + Type: "IT_USABLE" + Buy: 45000 + Sell: 300 + Weight: 14 + KeepAfterUse: true + Refine: false + Script: <" + // ShovelQuests_Assigned<MAP$,X,Y> → Coordinates for Treasure Map + if (!ShovelQuests_AssignedX) { + callfunc "shovel_genrandtreasure"; + } + dispbottom l("A treasure is burried in @@, (@@, @@)", ShovelQuests_AssignedMAP$, ShovelQuests_AssignedX, ShovelQuests_AssignedY); + "> +}, // Generic { @@ -1736,6 +1754,51 @@ item_db: ( Weight: 25 }, { + Id: 758 + AegisName: "SmallMushroom" + Name: "Small Mushroom" + Type: "IT_ETC" + Buy: 500 + Sell: 80 + Weight: 75 +}, +{ + Id: 759 + AegisName: "BlackScorpionStinger" + Name: "Black Scorpion Stinger" + Type: "IT_ETC" + Buy: 1000 + Sell: 100 + Weight: 200 +}, +{ + Id: 760 + AegisName: "GoldenScorpionStinger" + Name: "Golden Scorpion Stinger" + Type: "IT_ETC" + Buy: 25000 + Sell: 8500 + Weight: 500 +}, +{ + Id: 761 + AegisName: "Gearwheel" + Name: "Gearwheel" + Type: "IT_ETC" + Buy: 2500 + Sell: 650 + Weight: 500 +}, +{ + Id: 762 + AegisName: "Lockpicks" + Name: "Lockpicks" + Type: "IT_ETC" + Buy: 5000 + Sell: 400 + Weight: 50 +}, +{ Id: 800 AegisName: "DiamondShard" Name: "Diamond Shard" @@ -1822,6 +1885,16 @@ item_db: ( nogstorage: true } }, +{ + Id: 808 + AegisName: "TreasureKey" + Name: "Treasure Key" + Type: "IT_ETC" + Buy: 500 + Sell: 110 + Weight: 2 + Refine: false +}, // Necklaces { Id: 1000 @@ -3451,9 +3524,6 @@ item_db: ( Sell: 50 Weight: 15 Atk: 120 - Matk: 0 - Range: 0 - Slots: 0 Loc: "EQP_HAND_R" WeaponLv: 1 EquipLv: 1 @@ -3461,6 +3531,23 @@ item_db: ( Subtype: "W_DAGGER" BindOnEquip: false }, +{ + Id: 3516 + AegisName: "BoneKnife" + Name: "Bone Knife" + Type: "IT_WEAPON" + Buy: 20000 + Sell: 4000 + Weight: 250 + Atk: 125 + Loc: "EQP_HAND_R" + WeaponLv: 1 + EquipLv: 15 + Refine: false + Subtype: "W_DAGGER" + ViewSprite: 1 + BindOnEquip: false +}, // Pet Eggs { Id: 4000 diff --git a/db/re/mob_db.conf b/db/re/mob_db.conf index 3b36b838..056fd8eb 100644 --- a/db/re/mob_db.conf +++ b/db/re/mob_db.conf @@ -1058,8 +1058,9 @@ mob_db: ( DamageMotion: 1026 Drops: { MaggotSlime: 800 - HalfEggshell: 200 Moss: 400 + HalfEggshell: 200 + TreasureKey: 100 } }, { @@ -2097,6 +2098,7 @@ mob_db: ( DamageMotion: 600 Drops: { HardSpike: 1000 + SmallMushroom: 800 } }, { @@ -2646,8 +2648,9 @@ mob_db: ( AttackMotion: 672 DamageMotion: 900 Drops: { - BottleOfWater: 250 CoinBag: 500 + BottleOfWater: 250 + TreasureKey: 200 Dagger: 90 BanditTrousers: 1 BanditHood: 1 @@ -2691,11 +2694,12 @@ mob_db: ( AttackMotion: 672 DamageMotion: 900 Drops: { - EmptyBottle: 500 - CoinBag: 500 TrainingArrow: 5000 TrainingArrow: 1000 TrainingArrow: 500 + EmptyBottle: 500 + CoinBag: 500 + TreasureKey: 200 BanditTrousers: 1 BanditHood: 1 BanditGloves: 1 @@ -2740,6 +2744,7 @@ mob_db: ( AttackMotion: 672 DamageMotion: 900 Drops: { + TreasureKey: 2000 CoinBag: 750 Dagger: 150 BanditShawl: 10 @@ -3014,6 +3019,212 @@ mob_db: ( } }, { + Id: 1072 + SpriteName: "Moubi" + Name: "Moubi" + Lv: 26 + Hp: 3600 + Sp: 0 + Exp: 69 + JExp: 0 + AttackRange: 2 + Attack: [690, 960] + Def: 96 + Mdef: 69 + Stats: { + Str: 29 + Agi: 9 + Vit: 9 + Int: 6 + Dex: 9 + Luk: 69 + } + ViewRange: 6 + ChaseRange: 9 + Size: 0 + Race: 2 + Element: (1, 1) + Mode: { + CanMove: true + CanAttack: true + CastSensorChase: true + ChangeChase: true + } + MoveSpeed: 300 + AttackDelay: 3200 + AttackMotion: 1400 + DamageMotion: 1200 + Drops: { + Pearl: 10 + MagicFeather: 10 + CopperNecklace: 1 + } +}, +{ + Id: 1073 + SpriteName: "YellowSlime" + Name: "Yellow Slime" + Lv: 10 + Hp: 1050 + Sp: 0 + Exp: 15 + JExp: 0 + AttackRange: 1 + Attack: [90, 100] + Def: 19 + Mdef: 3 + Stats: { + Str: 5 + Agi: 15 + Vit: 20 + Int: 1 + Dex: 35 + Luk: 10 + } + ViewRange: 8 + ChaseRange: 8 + Size: 0 + Race: 2 + Element: (1, 1) + Mode: { + CanMove: true + CanAttack: false + Looter: true + } + MoveSpeed: 330 + AttackDelay: 2462 + AttackMotion: 864 + DamageMotion: 1026 + Drops: { + MaggotSlime: 800 + Moss: 400 + TopazShard: 200 + GoldNuggets: 10 + } +}, +{ + Id: 1074 + SpriteName: "RedSlime" + Name: "Red Slime" + Lv: 15 + Hp: 1650 + Sp: 0 + Exp: 15 + JExp: 0 + AttackRange: 1 + Attack: [90, 100] + Def: 19 + Mdef: 3 + Stats: { + Str: 15 + Agi: 15 + Vit: 30 + Int: 1 + Dex: 35 + Luk: 10 + } + ViewRange: 8 + ChaseRange: 8 + Size: 0 + Race: 2 + Element: (1, 1) + Mode: { + CanMove: true + CanAttack: false + } + MoveSpeed: 320 + AttackDelay: 2262 + AttackMotion: 764 + DamageMotion: 826 + Drops: { + MaggotSlime: 800 + Moss: 400 + RubyShard: 200 + CoinBag: 10 + } +}, +{ + Id: 1075 + SpriteName: "Snake" + Name: "Snake" + Lv: 25 + Hp: 2640 + Sp: 0 + Exp: 45 + JExp: 5 + AttackRange: 1 + Attack: [150, 225] + Def: 55 + Mdef: 10 + Stats: { + Str: 25 + Agi: 35 + Vit: 25 + Int: 5 + Dex: 50 + Luk: 20 + } + ViewRange: 1 + ChaseRange: 15 + Size: 0 + Race: 2 + Element: (1, 1) + Mode: { + CanMove: true + CanAttack: true + CastSensorChase: true + ChangeChase: true + } + MoveSpeed: 260 + AttackDelay: 1000 + AttackMotion: 750 + DamageMotion: 1120 + Drops: { + } +}, +{ + Id: 1076 + SpriteName: "GiantMaggot" + Name: "Giant Maggot" + Lv: 20 + Hp: 2407 + Sp: 0 + Exp: 63 + JExp: 5 + AttackRange: 1 + Attack: [300, 450] + Def: 23 + Mdef: 145 + Stats: { + Str: 10 + Agi: 30 + Vit: 35 + Int: 1 + Dex: 30 + Luk: 20 + } + ChaseRange: 12 + Race: 2 + Element: (0, 2) + Mode: { + CanMove: true + CanAttack: true + CastSensorChase: true + ChangeChase: true + } + MoveSpeed: 1900 + AttackDelay: 2700 + AttackMotion: 672 + DamaeMotion: 480 + Drops: { + BugLeg: 3500 + Carrot: 1000 + Moss: 900 + CommonCarp: 100 + Pearl: 1 + } +}, +{ Id: 1100 SpriteName: "PoisonSkull" Name: "Poison Skull" @@ -3216,6 +3427,7 @@ mob_db: ( AttackMotion: 800 DamageMotion: 500 Drops: { + BlackScorpionStinger: 750 } }, { @@ -3380,6 +3592,49 @@ mob_db: ( } }, { + Id: 1110 + SpriteName: "GoldenScorpion" + Name: "Golden Scorpion" + Lv: 40 + Hp: 18000 + Sp: 0 + Exp: 1600 + JExp: 200 + AttackRange: 2 + Attack: [470, 520] + Def: 90 + Mdef: 50 + Stats: { + Str: 30 + Agi: 30 + Vit: 50 + Int: 5 + Dex: 40 + Luk: 20 + } + ViewRange: 7 + ChaseRange: 12 + Size: 0 + Race: 2 + Element: (1, 1) + Mode: { + CanMove: true + CanAttack: true + ChangeChase: true + ChangeTargetMelee: true + CastSensorChase: true + Boss: true + } + MoveSpeed: 300 + AttackDelay: 872 + AttackMotion: 672 + DamageMotion: 480 + Drops: { + BugLeg: 4000 + GoldenScorpionStinger: 1500 + } +}, +{ Id: 1120 SpriteName: "Tengu" Name: "Tengu" @@ -3421,4 +3676,46 @@ mob_db: ( Drops: { } }, +{ + Id: 1121 + SpriteName: "Golem" + Name: "Golem" + Lv: 80 + Hp: 12500 + Sp: 0 + Exp: 5000 + JExp: 100 + AttackRange: 2 + Attack: [470, 500] + Def: 320 + Mdef: 40 + Stats: { + Str: 70 + Agi: 20 + Vit: 40 + Int: 10 + Dex: 80 + Luk: 20 + } + ViewRange: 6 + ChaseRange: 12 + Size: 1 + Race: 2 + Element: (5, 1) + Mode: { + CanMove: true + CanAttack: true + CastSensorChase: true + ChangeChase: true + Boss: false + Angry: true + Aggressive: true + } + MoveSpeed: 320 + AttackDelay: 4000 + AttackMotion: 2000 + DamageMotion: 2000 + Drops: { + } +}, ) diff --git a/db/re/mob_skill_db.conf b/db/re/mob_skill_db.conf index 0f45087c..7e4c18e8 100644 --- a/db/re/mob_skill_db.conf +++ b/db/re/mob_skill_db.conf @@ -571,6 +571,29 @@ SKILL_COND2 = { val0: 1029 } } + /**********************************************************************/ + GoldenScorpion: { + SM_BASH: { + SkillState: "MSS_BERSERK" + SkillLevel: 6 + Rate: 1800 + Delay: 20000 + Cancelable: true + SkillTarget: "MST_TARGET" + CastCondition: "MSC_ATTACKPCGE" + ConditionData: 2 + } + NPC_SILENCEATTACK: { + SkillState: "MSS_BERSERK" + SkillLevel: 2 + Rate: 9800 + Delay: 40000 + CastTime: 700 + Cancelable: true + SkillTarget: "MST_TARGET" + CastCondition: "MSC_LONGRANGEATTACKED" + } + } } ) diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index 6d11918d..30cc7466 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -1984,16 +1984,16 @@ skill_db: ( AttackType: "Weapon" Element: "Ele_Poison" SkillData2: { - Lv1: 15000 - Lv2: 20000 - Lv3: 25000 - Lv4: 30000 - Lv5: 35000 - Lv6: 40000 - Lv7: 45000 - Lv8: 50000 - Lv9: 55000 - Lv10: 60000 + Lv1: 20000 + Lv2: 40000 + Lv3: 60000 + Lv4: 80000 + Lv5: 100000 + Lv6: 120000 + Lv7: 140000 + Lv8: 160000 + Lv9: 180000 + Lv10: 200000 } FixedCastTime: 0 Requirements: { diff --git a/maps/re/000-0-0.mcache b/maps/re/000-0-0.mcache Binary files differindex d348c332..418a095a 100644 --- a/maps/re/000-0-0.mcache +++ b/maps/re/000-0-0.mcache diff --git a/maps/re/000-0-1.mcache b/maps/re/000-0-1.mcache Binary files differindex d348c332..f3a038bf 100644 --- a/maps/re/000-0-1.mcache +++ b/maps/re/000-0-1.mcache diff --git a/maps/re/000-0.mcache b/maps/re/000-0.mcache Binary files differindex 1455bac0..b9e0f22c 100644 --- a/maps/re/000-0.mcache +++ b/maps/re/000-0.mcache diff --git a/maps/re/000-2-0.mcache b/maps/re/000-2-0.mcache Binary files differindex afe5fed7..c9bd157c 100644 --- a/maps/re/000-2-0.mcache +++ b/maps/re/000-2-0.mcache diff --git a/maps/re/000-2-3.mcache b/maps/re/000-2-3.mcache Binary files differindex 6334b725..266d86a9 100644 --- a/maps/re/000-2-3.mcache +++ b/maps/re/000-2-3.mcache diff --git a/maps/re/001-2-21.mcache b/maps/re/001-2-21.mcache Binary files differindex e50658f5..94cf1389 100644 --- a/maps/re/001-2-21.mcache +++ b/maps/re/001-2-21.mcache diff --git a/maps/re/001-2-24.mcache b/maps/re/001-2-24.mcache Binary files differindex 836070f8..780e27ae 100644 --- a/maps/re/001-2-24.mcache +++ b/maps/re/001-2-24.mcache diff --git a/maps/re/001-2-32.mcache b/maps/re/001-2-32.mcache Binary files differindex 1839ae32..5978a046 100644 --- a/maps/re/001-2-32.mcache +++ b/maps/re/001-2-32.mcache diff --git a/maps/re/001-2-34.mcache b/maps/re/001-2-34.mcache Binary files differindex 2e7199ab..84ee170b 100644 --- a/maps/re/001-2-34.mcache +++ b/maps/re/001-2-34.mcache diff --git a/maps/re/001-2-40.mcache b/maps/re/001-2-40.mcache Binary files differindex aa7a507f..d8ec82c0 100644 --- a/maps/re/001-2-40.mcache +++ b/maps/re/001-2-40.mcache diff --git a/maps/re/001-2-43.mcache b/maps/re/001-2-43.mcache Binary files differnew file mode 100644 index 00000000..6a4b463f --- /dev/null +++ b/maps/re/001-2-43.mcache diff --git a/maps/re/008-2-0.mcache b/maps/re/008-2-0.mcache Binary files differindex bdb96896..308926b2 100644 --- a/maps/re/008-2-0.mcache +++ b/maps/re/008-2-0.mcache diff --git a/maps/re/008-2-19.mcache b/maps/re/008-2-19.mcache Binary files differindex ee05da2b..5e085f99 100644 --- a/maps/re/008-2-19.mcache +++ b/maps/re/008-2-19.mcache diff --git a/maps/re/008-2-20.mcache b/maps/re/008-2-20.mcache Binary files differindex 06a0ade4..e4fb60ff 100644 --- a/maps/re/008-2-20.mcache +++ b/maps/re/008-2-20.mcache diff --git a/maps/re/008-2-21.mcache b/maps/re/008-2-21.mcache Binary files differindex 0455bd4a..d2ab2b36 100644 --- a/maps/re/008-2-21.mcache +++ b/maps/re/008-2-21.mcache diff --git a/maps/re/008-2-28.mcache b/maps/re/008-2-28.mcache Binary files differindex 453e9876..673f2699 100644 --- a/maps/re/008-2-28.mcache +++ b/maps/re/008-2-28.mcache diff --git a/maps/re/008-2-29.mcache b/maps/re/008-2-29.mcache Binary files differindex 8bbde76d..560f31a5 100644 --- a/maps/re/008-2-29.mcache +++ b/maps/re/008-2-29.mcache diff --git a/maps/re/008-2-5.mcache b/maps/re/008-2-5.mcache Binary files differindex 1ac9bbcf..08cbec2b 100644 --- a/maps/re/008-2-5.mcache +++ b/maps/re/008-2-5.mcache diff --git a/maps/re/008-3-2.mcache b/maps/re/008-3-2.mcache Binary files differnew file mode 100644 index 00000000..9b2e1471 --- /dev/null +++ b/maps/re/008-3-2.mcache diff --git a/maps/re/008-3-3.mcache b/maps/re/008-3-3.mcache Binary files differnew file mode 100644 index 00000000..39f60ad7 --- /dev/null +++ b/maps/re/008-3-3.mcache diff --git a/maps/re/008-3-4.mcache b/maps/re/008-3-4.mcache Binary files differnew file mode 100644 index 00000000..45d5c879 --- /dev/null +++ b/maps/re/008-3-4.mcache diff --git a/maps/re/008-3-5.mcache b/maps/re/008-3-5.mcache Binary files differnew file mode 100644 index 00000000..3269fc1e --- /dev/null +++ b/maps/re/008-3-5.mcache diff --git a/maps/re/008-3-6.mcache b/maps/re/008-3-6.mcache Binary files differnew file mode 100644 index 00000000..7a2fa6b9 --- /dev/null +++ b/maps/re/008-3-6.mcache diff --git a/maps/re/008-4-1.mcache b/maps/re/008-4-1.mcache Binary files differdeleted file mode 100644 index c64a3c80..00000000 --- a/maps/re/008-4-1.mcache +++ /dev/null diff --git a/maps/re/012-3-1.mcache b/maps/re/012-3-1.mcache Binary files differnew file mode 100644 index 00000000..6f95cae1 --- /dev/null +++ b/maps/re/012-3-1.mcache diff --git a/maps/re/012-3-2.mcache b/maps/re/012-3-2.mcache Binary files differnew file mode 100644 index 00000000..704f3d67 --- /dev/null +++ b/maps/re/012-3-2.mcache diff --git a/maps/re/012-3-3.mcache b/maps/re/012-3-3.mcache Binary files differnew file mode 100644 index 00000000..d5f82746 --- /dev/null +++ b/maps/re/012-3-3.mcache diff --git a/maps/re/testbg.mcache b/maps/re/testbg.mcache Binary files differindex 29654108..c6885c5f 100644 --- a/maps/re/testbg.mcache +++ b/maps/re/testbg.mcache diff --git a/npc/000-2-1/dan.txt b/npc/000-2-1/dan.txt index a60c88f1..31591734 100644 --- a/npc/000-2-1/dan.txt +++ b/npc/000-2-1/dan.txt @@ -63,7 +63,7 @@ L_QuestStory: L_She: mes ""; mesn; - mesq l("She is a good friend of mine... We wanted to marry a few weeks before her accident but..."); + mesq l("She is a good friend of mine... We wanted to move together a few weeks before her accident but..."); next; goto L_Quit2; diff --git a/npc/001-1/_warps.txt b/npc/001-1/_warps.txt index 90a7dc1f..c084792b 100644 --- a/npc/001-1/_warps.txt +++ b/npc/001-1/_warps.txt @@ -121,7 +121,7 @@ OnInit: 001-1,134,83,0 warp #001-1_134_83 0,0,001-2-28,60,31 001-1,118,88,0 script #001-1_118_88_h NPC_HIDDEN,0,0,{ OnTouch: - warp "001-2-28", 29, 42; + warp "001-2-28", 29, 41; close; OnUnTouch: diff --git a/npc/001-1/enora.txt b/npc/001-1/enora.txt index e2e4064b..140f51b0 100644 --- a/npc/001-1/enora.txt +++ b/npc/001-1/enora.txt @@ -300,6 +300,8 @@ l("Only one more Fluffy to kill and it's done!"); return; + } else if (getq(ArtisQuests_Enora) == 10) { + inventoryplace TreasureKey, 1; } speech S_FIRST_BLANK_LINE | S_LAST_NEXT, @@ -314,6 +316,10 @@ { setq ArtisQuests_Enora, 11; enora_reward(140, 500); + getitem TreasureKey, 1; + mesn; + mesq l("Also, here is a %s. If you find a Treasure Chest somewhere, you can open it with this!", getitemlink(TreasureKey)); + next; } return; diff --git a/npc/001-1/qonan.txt b/npc/001-1/qonan.txt index 48b0c3f8..6805356a 100644 --- a/npc/001-1/qonan.txt +++ b/npc/001-1/qonan.txt @@ -60,6 +60,9 @@ l("You should check on the highest part of the cliff, I was hiding there."), l("I hope to see you soon."); getitem IronShovel, 1; + // For questlog + setq2 ArtisQuests_QOnan, .move__rand_x+any(-1,1); + setq3 ArtisQuests_QOnan, .move__rand_y+any(-1,1); close; case 2: speech S_FIRST_BLANK_LINE | S_LAST_BLANK_LINE, @@ -101,7 +104,7 @@ OnInit: } function script QOnanFoundItem { - setq ArtisQuests_QOnan, 2; + setq ArtisQuests_QOnan, 2, 0, 0; // getitem SmallChest, 1; narrator S_FIRST_BLANK_LINE, l("You found a small chest, surprisingly heavy for it's size."), diff --git a/npc/001-1/sophialla.txt b/npc/001-1/sophialla.txt index 846b7690..0671307b 100644 --- a/npc/001-1/sophialla.txt +++ b/npc/001-1/sophialla.txt @@ -26,6 +26,7 @@ mes ""; if (@menu == 2) { + // TODO: Tell to look for Henry TODO: Change curious eye conditional speech l("If you visit the sewers again... You'll find secret passages..."), l("Look for the hideout, but tell no one about this. Then, say the password again."); diff --git a/npc/001-2-11/mona.txt b/npc/001-2-11/mona.txt index 3d5b4584..2f4e3da0 100644 --- a/npc/001-2-11/mona.txt +++ b/npc/001-2-11/mona.txt @@ -127,14 +127,14 @@ { if (!MONA_REPEAT) { - inventoryplace WoodenBow, 1; + inventoryplace WoodenSword, 1; speech 0x0, l("Daddy finally came back home! He grabbed a snack and said he would be returning to the sewers."), lg("He did say that I should give you this @@ as a gift. He says you are very skilled and will make good use of his old weapon.", "He did say that I should give you this @@ as a gift. He says you are very skilled and will make good use of his old weapon.", - getitemlink(WoodenBow)), + getitemlink(WoodenSword)), l("He has never been the same since mommy went away..."); - getitem WoodenBow, 1; + getitem WoodenSword, 1; } else if (MONA_REPEAT == 10) { diff --git a/npc/001-2-31/_import.txt b/npc/001-2-31/_import.txt index a599f2ae..ef587396 100644 --- a/npc/001-2-31/_import.txt +++ b/npc/001-2-31/_import.txt @@ -1,4 +1,4 @@ -// Map 001-2-31: unnamed +// Map 001-2-31: West Commercial Building // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/001-2-31/_warps.txt", "npc/001-2-31/mapflags.txt", diff --git a/npc/001-2-31/_warps.txt b/npc/001-2-31/_warps.txt index b25ab888..2dfa6c99 100644 --- a/npc/001-2-31/_warps.txt +++ b/npc/001-2-31/_warps.txt @@ -1,4 +1,4 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-31: unnamed warps +// Map 001-2-31: West Commercial Building warps 001-2-31,32,40,0 warp #001-2-31_32_40 0,0,001-1,49,97 001-2-31,36,32,0 warp #001-2-31_36_32 0,0,001-2-41,25,32 diff --git a/npc/001-2-39/qanon.txt b/npc/001-2-39/qanon.txt index 3a917ba9..427a97ca 100644 --- a/npc/001-2-39/qanon.txt +++ b/npc/001-2-39/qanon.txt @@ -23,6 +23,12 @@ if (.@q < 5) notaMember(); + // Faction report + mesc l("Your current standing with the Legion: %s", faction_standing("LEGION", false)); + if (LEGION_RANK) + mesc l("You are a Legion's %s", legionrank()); + + // Main Menu select rif(.@q == 5, l("Lozerk told me to talk to you and join the legion.")), l("Thanks, sir Q'Anon."); diff --git a/npc/001-2-40/_warps.txt b/npc/001-2-40/_warps.txt index 89c5c721..ab895c3a 100644 --- a/npc/001-2-40/_warps.txt +++ b/npc/001-2-40/_warps.txt @@ -2,3 +2,4 @@ // Map 001-2-40: unnamed warps 001-2-40,45,44,0 warp #001-2-40_45_44 2,0,001-2-33,43,39 001-2-40,27,44,0 warp #001-2-40_27_44 2,0,001-2-33,25,39 +001-2-40,56,41,0 warp #001-2-40_56_41 0,0,001-3-0,56,44 diff --git a/npc/001-2-41/_import.txt b/npc/001-2-41/_import.txt index a8eee726..1584e4d6 100644 --- a/npc/001-2-41/_import.txt +++ b/npc/001-2-41/_import.txt @@ -1,4 +1,4 @@ -// Map 001-2-41: unnamed +// Map 001-2-41: Barber // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/001-2-41/_warps.txt", "npc/001-2-41/edouard.txt", diff --git a/npc/001-2-41/_warps.txt b/npc/001-2-41/_warps.txt index 7a10c00d..76251c2a 100644 --- a/npc/001-2-41/_warps.txt +++ b/npc/001-2-41/_warps.txt @@ -1,3 +1,3 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 001-2-41: unnamed warps +// Map 001-2-41: Barber warps 001-2-41,24,32,0 warp #001-2-41_24_32 0,0,001-2-31,35,32 diff --git a/npc/001-2-41/edouard.txt b/npc/001-2-41/edouard.txt index f93d2042..2a3fd4cc 100644 --- a/npc/001-2-41/edouard.txt +++ b/npc/001-2-41/edouard.txt @@ -131,6 +131,7 @@ OnChair: l("What is my current hairstyle and hair color?"), l("I'd like to get a different style."), l("Can you do something with my color?"), + l("How about changing my gender?"), l("What's your story again?"), l("I'm fine for now, thank you."); @@ -142,19 +143,25 @@ OnChair: case 2: BarberChangeStyle; speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Enjoy your new style."); + l("Enjoy your new style."), l("Anything else?"); break; case 3: BarberChangeColor; speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("I hope you like this color."); + l("I hope you like this color."), l("Anything else?"); break; case 4: - tellStory; + BarberChangeGender(); + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("You look fantastic."), + l("Anything else?"); break; case 5: + tellStory; + break; + case 6: speech S_FIRST_BLANK_LINE | S_LAST_NEXT, l("Feel free to come visit me another time."); diff --git a/npc/008-4-1/_import.txt b/npc/001-2-43/_import.txt index 0f706bbc..ed7173e0 100644 --- a/npc/008-4-1/_import.txt +++ b/npc/001-2-43/_import.txt @@ -1,5 +1,5 @@ -// Map 008-4-1: Cave Of Trials +// Map 001-2-43: Archive // This file is generated automatically. All manually added changes will be removed when running the Converter. -"npc/008-4-1/_mobs.txt", -"npc/008-4-1/_warps.txt", -"npc/008-4-1/boss.txt", +"npc/001-2-43/_warps.txt", +"npc/001-2-43/core.txt", +"npc/001-2-43/mapflags.txt", diff --git a/npc/008-4-1/_warps.txt b/npc/001-2-43/_warps.txt index b1a26ad0..2a53a67d 100644 --- a/npc/008-4-1/_warps.txt +++ b/npc/001-2-43/_warps.txt @@ -1,3 +1,3 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-4-1: Cave Of Trials warps -008-4-1,175,18,0 warp #008-4-1_175_18 2,0,008-1,165,170 +// Map 001-2-43: Archive warps +001-2-43,51,35,0 warp #001-2-43_51_35 2,0,001-3-0,90,62 diff --git a/npc/001-2-43/core.txt b/npc/001-2-43/core.txt new file mode 100644 index 00000000..9f541b54 --- /dev/null +++ b/npc/001-2-43/core.txt @@ -0,0 +1,146 @@ +// Evol scripts. +// Author: +// Micksha, Jesusalva +// Description: +// Core of Henry's Quest + +001-2-43,25,24,0 script #ArtisThiefBook_1 NPC_NO_SPRITE,{ + .@q=getq(ThiefQuests_Artis); + .@q3=getq3(ThiefQuests_Artis); + + // Add a forced delay to prevent abuse + if (.@q != 1) end; + getmapxy(.@m$, @x, @y, 0); // Save in @x/@y + dispbottom l("Sec, lemme look this."); + addtimer 1000, .name$+"::OnRead"; + end; + +OnRead: + // Prepare the Quest Variables + .@q=getq(ThiefQuests_Artis); + .@q3=getq3(ThiefQuests_Artis); + + // You must not have moved + getmapxy(.@m$, .@x, .@y, 0); + if (.@x != @x || .@y != @y || .@q != 1) { + dispbottom l("I'm so busy, I can look there later."); + end; + } + + // Clear temporary variables + @x=@y=0; + + // Extract the quest ID from name (or fail trying) + explode(.@ni$, .name$, "_"); + .@id=atoi(.@ni$[1]); + + // Check if the file was here + if (.@q3 == .@id) { + // TODO: Dialog: How will you deal with the file? + // .@t$=faction_addrep("Legion", 50) + // .@t$=faction_addrep("Thief", 50) + // mesc .@t$; + mes l("This is it - Henry's files!"); + mes l("I need to decide swiftly what I'll do with them before I'm caught."); + next; + select + l("Hide the file below the pots"), + l("[Legion+] [Thieves-] Highlight the file"), + l("[Legion-] [Thieves+] Destroy the file"); + mes ""; + switch (@menu) { + case 2: + .@t$=faction_addrep("Legion", 50); + mesc .@t$; + .@t$=faction_addrep("Thief", -50); + mesc .@t$; + next; + break; + case 3: + .@t$=faction_addrep("Legion", -50); + mesc .@t$; + .@t$=faction_addrep("Thief", 50); + mesc .@t$; + next; + break; + } + dispbottom l("You notice by chance that the file does not have any picture on it."); + setq ThiefQuests_Artis, 2, 0, 0; + closeclientdialog; + } else { + dispbottom l("Not here, lets look elsewhere!"); + } + end; + +OnInit: + .distance=1; + end; +} + +// Duplicate the town files +001-2-43,24,28,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_2 NPC_NO_SPRITE +001-2-43,25,32,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_4 NPC_NO_SPRITE +001-2-43,29,28,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_8 NPC_NO_SPRITE +001-2-43,34,32,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_16 NPC_NO_SPRITE +001-2-43,38,32,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_32 NPC_NO_SPRITE +001-2-43,44,32,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_64 NPC_NO_SPRITE +001-2-43,48,32,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_128 NPC_NO_SPRITE +001-2-43,48,28,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_256 NPC_NO_SPRITE +001-2-43,43,28,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_512 NPC_NO_SPRITE +001-2-43,38,28,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_1024 NPC_NO_SPRITE +001-2-43,33,28,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_2048 NPC_NO_SPRITE +001-2-43,53,24,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_4096 NPC_NO_SPRITE +001-2-43,44,24,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_8192 NPC_NO_SPRITE +001-2-43,29,24,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_16384 NPC_NO_SPRITE +001-2-43,39,24,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_32768 NPC_NO_SPRITE +001-2-43,49,24,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_65536 NPC_NO_SPRITE +// Fail-safe; Henry's record should not be here +001-2-43,34,24,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_131072 NPC_NO_SPRITE +//001-2-43,29,31,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_131072 NPC_NO_SPRITE +//001-2-43,24,26,0 duplicate(#ArtisThiefBook_1) #ArtisThiefBook_262144 NPC_NO_SPRITE + + +// Logical Handler +001-2-43,0,0,0 script #ArtisThiefBook_0 NPC_HIDDEN,{ + end; +OnBust1: + if (getmap() != .map$) + end; + dispbottom col(l("90 seconds remaining."), 1); + addtimer 30000, "#ArtisThiefBook_0::OnBust2"; + end; + +OnBust2: + if (getmap() != .map$) + end; + dispbottom col(l("60 seconds remaining."), 1); + addtimer 30000, "#ArtisThiefBook_0::OnBust3"; + end; + +OnBust3: + if (getmap() != .map$) + end; + dispbottom col(l("30 seconds remaining."), 1); + addtimer 30000, "#ArtisThiefBook_0::OnBust4"; + end; + +OnBust4: + if (getmap() == .map$) { + // Warp you elsewhere before actually arresting + // Otherwise, you would return at Archives without this timer =/ + warp "001-1", 90, 55; + sleep2(10); + + // Check if you'll be caught + if (ArrestedChances()) { + mesc l("Arrested!"); + mesc l("You'll now spend a few minutes on the jail to reflect on your actions."); + ArrestPlayer(5); + } else { + mesc l("You're almost found out, but manage to make a quick escape!"); + warp "001-1", 90, 55; + } + } + close; +} + diff --git a/npc/001-2-43/mapflags.txt b/npc/001-2-43/mapflags.txt new file mode 100644 index 00000000..d32035bb --- /dev/null +++ b/npc/001-2-43/mapflags.txt @@ -0,0 +1 @@ +001-2-43 mapflag nosave 001-1,89,67 diff --git a/npc/001-2-8/_import.txt b/npc/001-2-8/_import.txt index 93b064fe..17bbd2dc 100644 --- a/npc/001-2-8/_import.txt +++ b/npc/001-2-8/_import.txt @@ -1,4 +1,5 @@ // Map 001-2-8: Left Wing // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/001-2-8/_warps.txt", +"npc/001-2-8/doors.txt", "npc/001-2-8/mapflags.txt", diff --git a/npc/001-2-8/doors.txt b/npc/001-2-8/doors.txt new file mode 100644 index 00000000..7b34c4da --- /dev/null +++ b/npc/001-2-8/doors.txt @@ -0,0 +1,59 @@ +// Evol scripts. +// Author: +// Jesusalva +// Description: +// The Door for Town Archives + +001-2-8,38,30,0 script #ArtisArchiveGate NPC_NO_SPRITE,0,0,{ + function breakIn; + function notToday; + + .@q=getq(ThiefQuests_Artis); + mes l("The door is locked and you don't have the key."); + next; + mes l("This is probably where the town files are kept."); + if (.@q > 1) notToday(); + if (.@q == 1) breakIn(); + close; + +function notToday { + mesc l("I have nothing else to do down there."); + return; +} + +function breakIn { + mesc l("Should we break in? We'll be in a bad situation if we're found out."); + next; + // Better to not use only a pine! + if (LockPicking(2, 3, false)) { + // Delete previous timers. + deltimer("#ArtisThiefBook_0::OnBust1"); + deltimer("#ArtisThiefBook_0::OnBust2"); + deltimer("#ArtisThiefBook_0::OnBust3"); + deltimer("#ArtisThiefBook_0::OnBust4"); + // Begin the catch timer (addtimer) + addtimer 30000, "#ArtisThiefBook_0::OnBust1"; + warp "001-2-43", 27, 34; + } else { + if (ArrestedChances()) { + mesc l("Arrested!"); + mesc l("You'll now spend a few minutes on the jail to reflect on your actions."); + ArrestPlayer(5); + } else { + mesc l("You're almost found out, but manage to make a quick escape!"); + warp "001-1", 90, 55; + } + + } + return; +} + +OnTouch: + npctalkonce l("Dang! It is locked."); + end; + +OnInit: + .distance=1; + end; +} + diff --git a/npc/001-3-0/_import.txt b/npc/001-3-0/_import.txt index 5ead6439..502507be 100644 --- a/npc/001-3-0/_import.txt +++ b/npc/001-3-0/_import.txt @@ -2,4 +2,5 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/001-3-0/_mobs.txt", "npc/001-3-0/_warps.txt", +"npc/001-3-0/gates.txt", "npc/001-3-0/mundane.txt", diff --git a/npc/001-3-0/_mobs.txt b/npc/001-3-0/_mobs.txt index cfae2cf4..49443d5a 100644 --- a/npc/001-3-0/_mobs.txt +++ b/npc/001-3-0/_mobs.txt @@ -26,7 +26,7 @@ 001-3-0,86,131,4,2 monster Little Green Slime 1025,3,500,2000 001-3-0,175,31,4,2 monster Little Green Slime 1025,2,500,2000 001-3-0,147,67,4,2 monster Little Green Slime 1025,2,500,2000 -001-3-0,54,53,5,3 monster Poison Skull 1100,1,35000,60000 +001-3-0,55,50,5,3 monster Giant Maggot 1076,1,25000,20000,Henry#001-3-2::OnGiantMaggot 001-3-0,117,60,5,0 monster Cave Maggot 1027,25,500,2000 001-3-0,156,43,5,2 monster Crafty 1018,3,12000,20000 001-3-0,178,76,5,1 monster Crafty 1018,3,12000,20000 @@ -36,3 +36,4 @@ 001-3-0,54,85,5,0 monster Tortuga 1004,1,35000,300000 001-3-0,114,62,5,0 monster Tortuga 1004,1,35000,300000 001-3-0,167,100,6,1 monster Tortuga 1004,1,35000,300000 +001-3-0,41,104,2,3 monster Giant Maggot 1076,1,15000,15000,Henry#001-3-2::OnGiantMaggot diff --git a/npc/001-3-0/gates.txt b/npc/001-3-0/gates.txt new file mode 100644 index 00000000..e8accc96 --- /dev/null +++ b/npc/001-3-0/gates.txt @@ -0,0 +1,201 @@ +// Evol scripts. +// Author: +// Micksha +// Description: +// The Sewer Gates, and Wheels. + +001-3-0,90,62,0 script #ArtisThiefGate_1 NPC_SEWER_GATE,0,0,{ + // Extract the quest ID from name (or fail trying) + explode(.@ni$, .name$, "_"); + .@id=atoi(.@ni$[1]); + + .@q=getq(ThiefQuests_Artis); + .@q2=getq2(ThiefQuests_Artis); + + // Check what you can do with the gate + if (.@q != .@id) { + mes l("This gate is closed."); + mesc l("No need to go through here, so lets not bother with it now."); + } else if (.@q2 != 2) { + mes l("This gate is closed."); + mesc l("It seems that it can be open using the mechanism on the side."); + } else { + mes l("This gate is open."); + mesc l("I should still be careful to don't get caught."); + } + close; + +OnTouch: + updateSpotlight(true); + end; + +OnOpenSesame: + // Opening + if (!.busy) { + .dir=2; + .busy=true; + initnpctimer; + } + end; + +// Open +OnTimer2200: + .dir=4; + end; + +// Closing +OnTimer8000: + .dir=6; + end; + +// Closed +OnTimer10400: + .dir=0; + end; + +// Don't reply immediately, wait a tiny bit +OnTimer11000: + .busy = false; + stopnpctimer; + +OnInit: + .busy = false; + .distance = 1; + end; +} + + + +001-3-0,92,61,0 script #ArtisThiefWheel_1 NPC_SEWER_WHEEL,{ + // Extract the quest ID from name (or fail trying) + explode(.@ni$, .name$, "_"); + .@id=atoi(.@ni$[1]); + + .@q=getq(ThiefQuests_Artis); + .@q2=getq2(ThiefQuests_Artis); + + if (.@q != .@id) { + speech + l("This wheel seems to be connected to the locked gate on the side."), + l("Having to reason to tinker with it, you don't."); + close; + } + speech + l("You try to move this wheel, but it is stuck. Something seems to be missing."), + l("Maybe some monster ate it, but what would be big enough to do that?!"); + + // Switch gearwheel status: 1(looted) 2(unlooted) + switch (.@q2) { + case 1: + // Looted but lost? D: + if (!countitem(Gearwheel)) { + mesc l("If we only had a %s.", getitemlink(Gearwheel)); + close; + } + + // Prompt player + mesc l("Should we install the %s and move it?", getitemlink(Gearwheel)), 1; + if (askyesno() == ASK_NO) + break; + + delitem Gearwheel, 1; + setq2 ThiefQuests_Artis, 2; + // FALLTHROUGH + case 2: + mesc l("With the %s in place, it only takes a bit more effort to make it budge.", getitemlink(Gearwheel)); + next; + closeclientdialog; + // Spin the wheel + if (!.busy) { + .dir = 4; + .busy = true; + initnpctimer; + } + // Open the gate + addtimer 500, "#ArtisThiefGate_"+.@id+"::OnOpenSesame"; + break; + default: + } + close; + +// Done spinning? +OnTimer4000: + .dir = 0; + .busy = false; + stopnpctimer; + +OnInit: + .busy = false; + .distance = 2; + end; +} + + + +// We're missing a gate! +001-3-0,56,44,0 duplicate(#ArtisThiefGate_1) #ArtisThiefGate_4 NPC_SEWER_GATE,2,2 +001-3-0,58,43,0 duplicate(#ArtisThiefWheel_1) #ArtisThiefWheel_4 NPC_SEWER_WHEEL + + +/////////////////////////// +// The controlled warps +001-3-0,90,61,0 script #001-3-0_90_61 NPC_HIDDEN,0,0,{ + end; + +OnTouch: + // No enter except when q1 and q2 matches + .@q=getq(ThiefQuests_Artis); + .@q2=getq2(ThiefQuests_Artis); + if (.@q != 1 || .@q2 != 2) + end; + + // Delete previous timers. Makes easier to cheat but more reliable (FIXME) + deltimer("#ArtisThiefBook_0::OnBust1"); + deltimer("#ArtisThiefBook_0::OnBust2"); + deltimer("#ArtisThiefBook_0::OnBust3"); + deltimer("#ArtisThiefBook_0::OnBust4"); + + // Archives: Begin + addtimer 30000, "#ArtisThiefBook_0::OnBust1"; + warp "001-2-43", 51, 34; + end; +} + +001-3-0,56,43,0 script #001-3-0_56_43 NPC_HIDDEN,0,0,{ + end; + +OnTouch: + // No enter except when quest state allows you to + // I thought in letting you use this passage and get busted anytime... + // ...........Better not. Animation will not like it, anyway. + .@q=getq(ThiefQuests_Artis); + .@q2=getq2(ThiefQuests_Artis); + if (.@q != 4 || .@q2 != 2) + end; + + warp "001-2-40", 56, 40; + addtimer2(rand2(3000, 7000), .name$+"::OnBusted"); + end; + +// Henry said to you don't use the gate, because you are not discrete enough. +// Poor player, this is what happens for not paying attention to Henry's advise. +OnBusted: + if (getmap() != "001-2-40") + end; + + mesn l("Legion Officer"); + mes l("HEY! How you got here!?"); + next; + // Check if you'll be caught + if (ArrestedChances()) { + mesc l("Arrested!"); + mesc l("You'll now spend a few minutes on the jail to reflect on your actions."); + ArrestPlayer(5); + } else { + mesc l("You're almost found out, but manage to make a quick escape!"); + warp "001-1", 41, 36; + } + close; +} + + diff --git a/npc/001-3-1/_import.txt b/npc/001-3-1/_import.txt index 1d0a0c00..3462861c 100644 --- a/npc/001-3-1/_import.txt +++ b/npc/001-3-1/_import.txt @@ -2,3 +2,4 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/001-3-1/_mobs.txt", "npc/001-3-1/_warps.txt", +"npc/001-3-1/gates.txt", diff --git a/npc/001-3-1/_warps.txt b/npc/001-3-1/_warps.txt index 4f79c590..f0c3d747 100644 --- a/npc/001-3-1/_warps.txt +++ b/npc/001-3-1/_warps.txt @@ -2,4 +2,3 @@ // Map 001-3-1: Rivercave warps 001-3-1,24,58,0 warp #001-3-1_24_58 1,0,001-3-0,162,41 001-3-1,35,59,0 warp #001-3-1_35_59 1,0,001-3-0,172,42 -001-3-1,30,19,0 warp #001-3-1_30_19 0,0,001-3-2,30,116 diff --git a/npc/001-3-1/gates.txt b/npc/001-3-1/gates.txt new file mode 100644 index 00000000..f3c1a038 --- /dev/null +++ b/npc/001-3-1/gates.txt @@ -0,0 +1,66 @@ +// Evol scripts. +// Author: +// Micksha, Jesusalva +// Description: +// The Sewer Gates, and Wheels. + +// Brotherhood hideout, the door opens by itself if player +// can now talk to Sopiahalla. +001-3-1,30,19,0 script #001-3-1_30_19 NPC_HIDDEN,0,0,{ + end; + +OnTouch: + .@q=getq(General_Brotherhood); + updateSpotlight(true); + if (.@q) + warp "001-3-2", 30, 116; + end; +} + +// The gate itself +001-3-1,30,20,0 script #Gate3 NPC_SEWER_GATE,2,2,{ + .@q=getq(General_Brotherhood); + if (.@q) + mes l("This gate opens on its own for you... Should we go inside?"); + else + mes l("This gate is closed."); + close; + +OnTouch: + .@q=getq(General_Brotherhood); + updateSpotlight(true); + // Opening + if (!.busy && .@q) { + .dir=2; + .busy=true; + initnpctimer; + } + end; + +// Open +OnTimer2200: + .dir=4; + end; + +// Closing +OnTimer8000: + .dir=6; + end; + +// Closed +OnTimer10400: + .dir=0; + end; + +// Don't reopen immediately, wait a tiny bit +OnTimer11000: + .busy=false; + stopnpctimer; + +// Initial configuration +OnInit: + .busy=false; + .distance = 2; + end; +} + diff --git a/npc/001-3-2/_import.txt b/npc/001-3-2/_import.txt index d427b6ed..d70ece30 100644 --- a/npc/001-3-2/_import.txt +++ b/npc/001-3-2/_import.txt @@ -1,3 +1,4 @@ // Map 001-3-2: Hideout // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/001-3-2/_warps.txt", +"npc/001-3-2/henry.txt", diff --git a/npc/001-3-2/henry.txt b/npc/001-3-2/henry.txt new file mode 100644 index 00000000..f3ab598a --- /dev/null +++ b/npc/001-3-2/henry.txt @@ -0,0 +1,356 @@ +// Evol scripts. +// Author: +// Micksha +// Jesusalva +// Description: +// Henry, a Brotherhood member managing the Hideout in Artis. +// TODO: Koga-related functions (possibly in another NPC) + +001-3-2,24,51,0 script Henry#001-3-2 NPC_HENRY,{ + function proposeFirstQuest; + function reportFirstQuest; + function proposeSecondQuest; + function reportSecondQuest; + function proposeThirdQuest; + function reportThirdQuest; + function completedHenry; + + .@q=getq(ThiefQuests_Artis); + switch (.@q) { + case 0: + proposeFirstQuest(); + break; + case 1: + case 2: + reportFirstQuest(); + break; + case 3: + proposeSecondQuest(); + break; + case 4: + case 5: + reportSecondQuest(); + break; + case 6: + proposeThirdQuest(); + break; + case 7: + case 8: + reportThirdQuest(); + break; + default: + completedHenry(); + break; + } + close; + +/////////////////////////////////////////////////////// +function proposeFirstQuest { + speech + l("Stop! Who's there?"), + l("Ah, its you. Sophialla already informed me. I can help you to go to Woodland, but you also could do me a favor."), + l("The Legion has been on my tail for a while. They're a bit annoying, you know."), + l("I mean, what's wrong with smuggling goods?! The town markets would have way less stuff otherwise. You can understand me, right? Don't answer."), + l("Anyway, you want to get on my smuggling ship, right? So you better help me out!"), + b(l("In Artis Townhall Archives,"))+" "+l("there is an entry about me."), + l("If they somehow catch me again, they'll use this entry as evidence to get me on a harsher punishment..."), + l("So please find my file on the archives and, I don't know, deal with it?"), + l("I am smart, I'll know if you lie. Anyway, just don't get caught inside the archives."); + //l("After messing with the Major and the Legion here, I can teach you lockpicking. Ah, and you may try to find my friend Nunia in Woodland, once you go there. She seems to be disappeared."), + //l("Call for Micksha and Jesusalva to implement all this, please."); + next; + mesc l("Accept this quest?"), 3; + if (askyesno() == ASK_YES) { + mesn; + mesq l("Great! Then I'll be counting on you!"); + setq ThiefQuests_Artis, 1, 0, 2**rand2(17); + } + return; +} + +function reportFirstQuest { + .@q=getq(ThiefQuests_Artis); + mesn; + mesq l("Have you already did what I asked you to?"); + select + l("Not yet, but I'll be back."), + l("What was I supposed to do, again?"), + l("Yes, the file has been dealt with."); + mes ""; + switch (@menu) { + case 1: + mesn; + mesq l("I'm not in hurry if you're not in hurry..."); + break; + case 2: + speech + l("You should invade the townhall archives - I don't care how."), + l("There'll be a file about an... incident... with me. Deal with the file - I also don't care how."), + l("Try to don't get too much attention, or they'll arrest you as well."); + break; + case 3: + mesn; + mesq l("Hm... Then tell me, what was I wearing on the file picture?"); + next; + select + l("A fancy hat."), + l("A shemagh or a shawl."), + l("Sunglasses."), + l("A santa hat."), + l("A top hat."), + l("A legion armor."), + l("An eye patch."), + l("A bandit hood."), + rif(.@q == 2, l("There was no picture on the file.")); + mes ""; + if (@menu != 9) { + mesc l("%s lunges at you!", strnpcinfo(1)); + mesc l("You've been stabbed!"), 1; + mes ""; + mesn; + mesq l("Now I know you're lying; Go find my file and deal with it!"); + percentheal -15, 0; + close; + } else { + // WUT How did this even happen?! + if (.@q != 2) + atcommand("@kick "+strcharinfo(0)); + + // TODO: Reward + mesn; + mesq l("Heh... I hope you disposed of the file."); + next; + mesn; + mesq l("I'll keep my end on the bargain. The Thieves Association will bring you to the Argaes region."); + next; + mesn; + mesq l("Can't bring you directly to the town, but don't worry."); + next; + mesn; + mesq l("Anyway, here's some gold. I might have another task for you if you want."); + // Reward Reference: Lv 10 + getexp 30*BaseLevel, 30; + Zeny+=300; + setq ThiefQuests_Artis, 3; + // Previous state already wiped this: + //setq2 ThiefQuests_Artis, false; // Restart wheels + } + + } + return; +} + +/////////////////////////////////////////////////////// +function proposeSecondQuest { + speech + l("Ah, its you again. Welcome back."), + l("So, if you want to go to Hurnscald, just whistle on the beach."), // FIXME Not Koga? Talk to another NPC, though. + l("Anyway, I still could use your help! You see, I would like to play tricks on the legion members during the night."), + l("For this, I would like you to to repair the secret passage to the Legion Building."), + l("Don't use the passage, you're not skilled enough and will be busted! Just repair it, it'll be enough."); + mesc l("You suspect that he is withholding information. Do he really only wants to do pranks? But then, do you care with what he wants to do inside?"); + next; + mesc l("Accept this quest?"), 3; + if (askyesno() == ASK_YES) { + mesn; + mesq l("Great! Then I'll be counting on you!"); + setq1 ThiefQuests_Artis, 4; + close; + } + return; +} + +function reportSecondQuest { + mesn; + mesq l("Have you already did what I asked you to?"); + next; + select + l("Not yet, but I'll get to it."), + l("What was I supposed to do, again?"), + l("Yes, the deed is done."); + mes ""; + switch (@menu) { + case 1: + break; + case 2: + speech + l("In the sewers, there is a passage to the Legion basement."), + l("I want to get in there, so please do me a favor, and repair the gate. Don't try to go inside yourself, you'll be caught."), + l("Also - don't ask me why I want this. Thieves doesn't make questions. You better remember this!"); + break; + case 3: + mesn; + mesq l("Great! I'll send a scout to check. I hope you didn't blew up everything by going there, you're not very discrete."); + next; + mes "..."; + next; + .@q2=getq2(ThiefQuests_Artis); + if (.@q2 != 2) { + mesn; + mesq l("Nope, it is still sealed tight. Go do your job if you want a reward."); + break; + } + mesn; + mesq l("Alright - This will be... good. Anyway, I should give you a reward."); + next; + mesn; + mesq l("Take this %s. There is something good on it; Just use a %s.", + getitemlink(TreasureMap), getitemlink(IronShovel)); + + // Obtain the map, quest is done + inventoryplace TreasureMap, 1; + getitem TreasureMap, 1; + setq1 ThiefQuests_Artis, 6; + + // Override the treasure location, if already existing + .@m$="001-1"; + .@x=any(199, 200); + .@y=any(61,62); + + shovel_addquest(.@m$, .@x, .@y, "shovel_randomtreasure"); + ShovelQuests_AssignedMAP$=shovel_getcity(.@m$); + ShovelQuests_AssignedX=.@x; + ShovelQuests_AssignedY=.@y; + + // TODO: If we add a daily legion quest, it must be "redemption"~ish + // That is, destroy points from all other three factions + // ...Also, is *this* specific code a good idea at all? + .@t$=faction_addrep("Legion", -15); + mesc .@t$; + .@t$=faction_addrep("Thief", 15); + mesc .@t$; + next; + mesn; + mesq l("I don't know how to get a shovel, though."); + next; + mesn; + mesq l("Remember: \"Use\" the map, and use the debugger (F10) or \"/where\" in chat to check your coordinates!"); + } + return; +} + +/////////////////////////////////////////////////////// +function proposeThirdQuest { + speech + l("Thanks for the help the other day."), + l("I have a beloved friend called Nunia, who handles the Thieves' Guild branch in Hurnscald."), + l("What, you thought we wouldn't have an organization and structure? Please. We can even smuggle in a major ship route!"), + l("Anyway, I haven't heard about her from quite a while, which is concerning."), + l("Could you please go there see if she is well?"), + l("I'll give you something... useful... If you want to pursue in being a thief. I'll even put a good word about you."); + next; + mesc l("Accept this quest?"), 3; + if (askyesno() == ASK_YES) { + mesn; + mesq l("Great! Then I'll be counting on you!"); + setq1 ThiefQuests_Artis, 7; + close; + } + return; +} + +function reportThirdQuest { + mesn; + mesq l("Have you already did what I asked you to?"); + next; + select + l("Not yet, but I'll get to it."), + l("What was I supposed to do, again?"), + l("Yes, the deed is done."); + mes ""; + switch (@menu) { + case 2: + speech + l("My beloved friend Nunia in Hurnscald went missing."), + l("I mean, I do not receive any letter from her for a while, so I got worried."), + l("I would like you to check how she is doing. You know, the Brotherhood could have got her and she is in need of rescue, or something else."); + break; + case 3: + .@q=getq(ThiefQuests_Artis); + mesn; + mesq l("Before you go on any further, I wanna see the proof that you talked with her."); + next; + if (.@q != 8) { + mesc l("You don't know what sort of proof he is looking for."); + break; + } + + select + l("She has white hair, blue eyes, and always carry a big sack."), + l("She told me a passphrase."); + mes ""; + if (@menu == 2) { + mesn; + mesq l("Liar; Nunia is not creative enough to come up with a passphrase of her own!"); + next; + mesn; + mesq l("Besides, if she could give you a passphrase, then I wouldn't have sent ya."); + break; + } + + mesn; + mesq l("That's Nunia alright. So how she is doing?"); + next; + mesc l("You describe to him how Nunia is supposed to lay low for a while."); + next; + mesn; + mesq l("Of course. I'm glad she is safe. You know, we don't really care with this Legion versus Brotherhood stifle."); + next; + mesn; + mesq l("The brotherhood members here are friendly, but mostly because our interests coincide. In Hurnscald, where their main base is, we're enemies."); + next; + inventoryplace Lockpicks, 5; + mesn; + mesq l("Anyway, thanks for the report. I'll give you some %s.", getitemlink(Lockpicks)); + next; + mesn; + mesq l("Whenever you find a vault, a door, or anything of interest, you can use it to pry it open."); + next; + mesn; + mesq l("Lockpicks are not keys, they can break quite easily. Also, you don't want anyone watching you."); + next; + mesn; + mesq l("If you are caught while lockpicking, you'll be arrested. So be careful."); + // TODO: Add a lock here where player can train without being arrested. + next; + mesn; + mesq l("I have other matters to attend do, so you'll have to excuse me."); + getitem Lockpicks, 5; + setq1 ThiefQuests_Artis, 9; + break; + } + return; +} + +/////////////////////////////////////////////////////// +function completedHenry { + mesc l("He seems to ignore you."); + mesc l("Probably better not disturb him."); + return; +} + + +/////////////////////////////////////////////////////// +OnInit: + .sex = G_MALE; + .distance = 3; + end; + +OnGiantMaggot: + .@q=getq(ThiefQuests_Artis); + .@q2=getq2(ThiefQuests_Artis); + .@max=(.@q == 1 ? true : (.@q == 4 ? true : false)); + + // To drop, or not to drop...? + if (!.@q2 && .@max) { + if (rand2(10000) < 1800) { + getitem Gearwheel, 1; + setq2 ThiefQuests_Artis, true; + } + } + + // Eh, whatever, continue with what you were doing, script. + fix_mobkill(GiantMaggot); + end; +} + diff --git a/npc/008-1-1/_mobs.txt b/npc/008-1-1/_mobs.txt index e836fe97..3bd8151c 100644 --- a/npc/008-1-1/_mobs.txt +++ b/npc/008-1-1/_mobs.txt @@ -23,9 +23,10 @@ 008-1-1,163,178,2,1 monster Red Rose 1062,1,50000,10000 008-1-1,158,191,3,1 monster Yellow Rose 1060,1,20000,5000 008-1-1,166,184,1,1 monster Blue Rose 1061,1,100000,20000 -008-1-1,137,88,11,16 monster Butterfly 1032,8,10000,10000 +008-1-1,137,86,11,16 monster Butterfly 1032,8,10000,10000 008-1-1,75,41,14,4 monster Silkworm 1040,3,9000,6000 008-1-1,122,75,8,4 monster Forest Maggot 1028,3,50000,2500 008-1-1,96,45,1,0 monster Red Rose 1062,1,50000,10000 008-1-1,97,47,2,0 monster Yellow Rose 1060,1,20000,5000 008-1-1,99,45,0,0 monster Blue Rose 1061,1,100000,20000 +008-1-1,161,67,45,11 monster Moubi 1072,1,200000,1250000 diff --git a/npc/008-1/_mobs.txt b/npc/008-1/_mobs.txt index d4e6a597..11f3e52a 100644 --- a/npc/008-1/_mobs.txt +++ b/npc/008-1/_mobs.txt @@ -58,7 +58,7 @@ 008-1,244,160,31,11 monster Mana Bug 1035,7,10000,10000 008-1,232,60,17,26 monster Mana Bug 1035,7,10000,10000 008-1,275,103,1,0 monster Clover Patch 1033,1,10000,30000 -008-1,278,153,1,0 monster Clover Patch 1033,1,10000,30000 +008-1,277,152,2,1 monster Clover Patch 1033,1,10000,30000 008-1,203,130,1,0 monster Clover Patch 1033,1,10000,30000 008-1,156,149,1,0 monster Clover Patch 1033,1,10000,30000 008-1,193,113,1,0 monster Clover Patch 1033,1,10000,30000 @@ -103,3 +103,5 @@ 008-1,111,68,8,3 monster Robin Bandit 1064,2,8000,12000 008-1,126,80,8,3 monster Bandit 1063,2,5500,8000 008-1,122,44,4,7 monster Robin Bandit 1064,1,3000,8000 +008-1,89,116,7,6 monster Moubi 1072,1,10000000,1000000 +008-1,259,116,31,20 monster Maggot 1026,6,500,10000 diff --git a/npc/008-1/_warps.txt b/npc/008-1/_warps.txt index 3464da48..fad30de8 100644 --- a/npc/008-1/_warps.txt +++ b/npc/008-1/_warps.txt @@ -19,12 +19,15 @@ 008-1,151,80,0 warp #008-1_151_80 0,0,008-2-15,35,33 008-1,256,203,0 warp #008-1_256_203 0,0,008-2-20,25,31 008-1,128,138,0 warp #008-1_128_138 0,0,008-3-1,35,34 +008-1,250,23,0 warp #008-1_250_23 1,0,008-3-4,88,76 +008-1,283,26,0 warp #008-1_283_26 0,0,008-3-3,37,56 008-1,287,113,0 warp #008-1_287_113 0,0,008-2-8,26,28 008-1,252,211,0 warp #008-1_252_211 0,0,008-2-21,22,42 008-1,257,130,0 warp #008-1_257_130 0,0,008-2-28,25,31 008-1,233,131,0 warp #008-1_233_131 0,0,008-2-29,36,24 008-1,287,133,0 warp #008-1_287_133 0,0,008-2-30,52,39 008-1,20,85,0 warp #008-1_20_85 0,1,008-1-1,246,85 -008-1,165,171,0 warp #008-1_165_171 0,0,008-4-1,175,19 +008-1,165,171,0 warp #008-1_165_171 0,0,008-3-2,175,21 008-1,289,125,0 warp #008-1_289_125 0,0,008-2-31,29,25 008-1,22,216,0 warp #008-1_22_216 0,0,008-1-2,248,48 +008-1,109,82,0 warp #008-1_109_82 0,0,008-3-5,92,107 diff --git a/npc/008-3-0/_mobs.txt b/npc/008-3-0/_mobs.txt index 372c3898..06015caf 100644 --- a/npc/008-3-0/_mobs.txt +++ b/npc/008-3-0/_mobs.txt @@ -16,7 +16,7 @@ 008-3-0,68,84,3,7 monster Spider 1044,4,4000,8000 008-3-0,80,169,0,0 monster Diamond Vein 1045,1,600000,60000 008-3-0,118,96,0,0 monster Gem Veinbloc 1069,1,600000,60000 -008-3-0,131,93,0,0 monster Gem Veinbloc 1069,1,600000,60000 +008-3-0,131,93,0,0 monster Coal Veinbloc 1071,1,600000,60000 008-3-0,119,101,0,0 monster Gold Veinbloc 1070,1,600000,60000 008-3-0,113,60,23,8 monster Cave Maggot 1027,7,500,2000 008-3-0,199,68,8,9 monster Crafty 1018,5,1000,60000 @@ -54,10 +54,10 @@ 008-3-0,107,141,0,0 monster Gem Veinbloc 1069,1,600000,60000 008-3-0,77,148,0,0 monster Gem Veinbloc 1069,1,600000,60000 008-3-0,62,119,0,0 monster Gem Veinbloc 1069,1,600000,60000 -008-3-0,162,95,0,0 monster Gem Veinbloc 1069,1,600000,60000 -008-3-0,157,66,0,0 monster Gem Veinbloc 1069,1,600000,60000 -008-3-0,112,60,0,0 monster Gem Veinbloc 1069,1,600000,60000 -008-3-0,66,54,0,0 monster Gem Veinbloc 1069,1,600000,60000 +008-3-0,162,95,0,0 monster Coal Veinbloc 1071,1,600000,60000 +008-3-0,157,66,0,0 monster Coal Veinbloc 1071,1,600000,60000 +008-3-0,112,60,0,0 monster Coal Veinbloc 1071,1,600000,60000 +008-3-0,66,54,0,0 monster Coal Veinbloc 1071,1,600000,60000 008-3-0,63,91,0,0 monster Gold Veinbloc 1070,1,600000,60000 008-3-0,76,127,0,0 monster Gold Veinbloc 1070,1,600000,60000 008-3-0,111,148,0,0 monster Gold Veinbloc 1070,1,600000,60000 diff --git a/npc/008-3-1/_mobs.txt b/npc/008-3-1/_mobs.txt index 8a09426c..b741a714 100644 --- a/npc/008-3-1/_mobs.txt +++ b/npc/008-3-1/_mobs.txt @@ -1,7 +1,7 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. // Map 008-3-1: Bat Cave mobs -008-3-1,42,35,7,5 monster Crafty 1018,10,1000,120000 -008-3-1,44,54,4,2 monster Crafty 1018,5,10000,75000 +008-3-1,42,35,7,5 monster Crafty 1018,7,1000,120000 +008-3-1,44,54,4,2 monster Crafty 1018,4,10000,75000 008-3-1,43,39,5,2 monster Spider 1044,1,4000,8000 008-3-1,46,53,5,2 monster Spider 1044,2,2000,7500 008-3-1,52,31,0,0 monster Iron Vein 1047,1,600000,60000 diff --git a/npc/008-3-2/_import.txt b/npc/008-3-2/_import.txt new file mode 100644 index 00000000..580a8f40 --- /dev/null +++ b/npc/008-3-2/_import.txt @@ -0,0 +1,5 @@ +// Map 008-3-2: Calamity Dungeon +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/008-3-2/_mobs.txt", +"npc/008-3-2/_warps.txt", +"npc/008-3-2/boss.txt", diff --git a/npc/008-3-2/_mobs.txt b/npc/008-3-2/_mobs.txt new file mode 100644 index 00000000..4c0dfbd0 --- /dev/null +++ b/npc/008-3-2/_mobs.txt @@ -0,0 +1,7 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 008-3-2: Calamity Dungeon mobs +008-3-2,106,73,73,63 monster Cave Maggot 1027,80,30000,2500 +008-3-2,136,71,47,50 monster Thief Slime 1105,35,50000,2500 +008-3-2,101,83,73,30 monster AngryCrafty 1103,60,50000,2500 +008-3-2,100,79,32,31 monster Black Scorpion 1104,14,45000,2500 +008-3-2,94,98,11,9 monster Green Slime 1024,4,500,2500 diff --git a/npc/008-3-2/_warps.txt b/npc/008-3-2/_warps.txt new file mode 100644 index 00000000..e69305bc --- /dev/null +++ b/npc/008-3-2/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 008-3-2: Calamity Dungeon warps +008-3-2,175,19,0 warp #008-3-2_175_19 2,0,008-1,165,170 diff --git a/npc/008-4-1/boss.txt b/npc/008-3-2/boss.txt index fda71fff..5a296ce9 100644 --- a/npc/008-4-1/boss.txt +++ b/npc/008-3-2/boss.txt @@ -2,10 +2,10 @@ // Author: // Jesusalva // Description: -// Controls the boss on 008-4-1 and the Master Book Learning +// Controls the boss on 008-3-2 and the Master Book Learning // see npc/items/master_skillbook.txt for explanation about variables -008-4-1,0,0,0 script #BossCtrl_008-4-1 NPC_HIDDEN,{ +008-3-2,0,0,0 script #BossCtrl_008-3-2 NPC_HIDDEN,{ end; // Test server: 15 minutes only @@ -17,8 +17,8 @@ OnTimer900000: OnTimer3600000: stopnpctimer; OnInit: - $@MB_00841=0; - monster "008-4-1", 67, 30, strmobinfo(1, GameBalance), GameBalance, 1, "#BossCtrl_008-4-1::OnBossDeath"; + $@MB_00832=0; + monster "008-3-2", 67, 30, strmobinfo(1, SpiderQueen), SpiderQueen, 1, "#BossCtrl_008-3-2::OnBossDeath"; end; OnBossDeath: @@ -28,16 +28,16 @@ OnBossDeath: .@party=getcharid(1); if (.@party > 0) { - $@MB_00841=.@party; - areatimer("008-4-1", .@x-15, .@y-15, .@x+15, .@y+15, 10, "#BossCtrl_008-4-1::OnBossCheck"); - mapannounce "008-4-1", "Boss deafeated by Party: " + getpartyname(.@party), bc_all; + $@MB_00832=.@party; + areatimer("008-3-2", .@x-15, .@y-15, .@x+15, .@y+15, 10, "#BossCtrl_008-3-2::OnBossCheck"); + mapannounce "008-3-2", "Boss deafeated by Party: " + getpartyname(.@party), bc_all; } else { - $@MB_00841=-2; - areatimer("008-4-1", .@x-15, .@y-15, .@x+15, .@y+15, 10, "#BossCtrl_008-4-1::OnBossCheck"); - addtimer(20, "#BossCtrl_008-4-1::OnBegin"); - mapannounce "008-4-1", "Boss deafeated by: " + strcharinfo(0), bc_all; + $@MB_00832=-2; + areatimer("008-3-2", .@x-15, .@y-15, .@x+15, .@y+15, 10, "#BossCtrl_008-3-2::OnBossCheck"); + addtimer(20, "#BossCtrl_008-3-2::OnBegin"); + mapannounce "008-3-2", "Boss deafeated by: " + strcharinfo(0), bc_all; } end; @@ -45,14 +45,14 @@ OnBossCheck: @mb_BossId=-1; // TODO: Check if you really fought or was just lurking // Check if party is correct - if (getcharid(1) != $@MB_00841) + if (getcharid(1) != $@MB_00832) end; OnBegin: - @mb_BossId=GameBalance; - @mb_SkillId=MG_COLDBOLT; + @mb_BossId=SpiderQueen; + @mb_SkillId=TF_POISON; @mb_ItemId=MagicFeather; // Placeholder @mb_ItemAm=1; - addtimer(15000, "#BossCtrl_008-4-1::OnFinish"); + addtimer(15000, "#BossCtrl_008-3-2::OnFinish"); end; OnFinish: diff --git a/npc/008-3-3/_import.txt b/npc/008-3-3/_import.txt new file mode 100644 index 00000000..96cc09c9 --- /dev/null +++ b/npc/008-3-3/_import.txt @@ -0,0 +1,4 @@ +// Map 008-3-3: Bat Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/008-3-3/_mobs.txt", +"npc/008-3-3/_warps.txt", diff --git a/npc/008-3-3/_mobs.txt b/npc/008-3-3/_mobs.txt new file mode 100644 index 00000000..4ff0ff2d --- /dev/null +++ b/npc/008-3-3/_mobs.txt @@ -0,0 +1,9 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 008-3-3: Obelisk Cave mobs +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 008-3-3: Bat Cave mobs +008-3-3,57,36,12,7 monster Crafty 1018,5,1000,120000 +008-3-3,31,43,4,5 monster Crafty 1018,3,1000,120000 +008-3-3,49,38,20,16 monster Cave Maggot 1027,12,500,2000 +008-3-3,60,49,5,3 monster Ratto 1005,2,35000,15000 +008-3-3,53,24,5,2 monster Ratto 1005,2,35000,15000 diff --git a/npc/008-3-3/_warps.txt b/npc/008-3-3/_warps.txt new file mode 100644 index 00000000..871c897c --- /dev/null +++ b/npc/008-3-3/_warps.txt @@ -0,0 +1,5 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 008-3-3: Obelisk Cave warps +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 008-3-3: Bat Cave warps +008-3-3,37,57,0 warp #008-3-3_37_57 1,0,008-1,283,27 diff --git a/npc/008-3-4/_import.txt b/npc/008-3-4/_import.txt new file mode 100644 index 00000000..e0815f43 --- /dev/null +++ b/npc/008-3-4/_import.txt @@ -0,0 +1,4 @@ +// Map 008-3-4: North Mine +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/008-3-4/_mobs.txt", +"npc/008-3-4/_warps.txt", diff --git a/npc/008-3-4/_mobs.txt b/npc/008-3-4/_mobs.txt new file mode 100644 index 00000000..db3cc108 --- /dev/null +++ b/npc/008-3-4/_mobs.txt @@ -0,0 +1,32 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 008-3-4: North Mine mobs +008-3-4,84,55,19,25 monster Cave Maggot 1027,15,2000,20000 +008-3-4,73,100,53,17 monster Cave Maggot 1027,10,1000,15000 +008-3-4,139,58,20,21 monster Cave Maggot 1027,5,5000,25000 +008-3-4,87,78,75,12 monster Crafty 1018,12,2500,35000 +008-3-4,89,79,21,35 monster Ratto 1005,18,5000,10000 +008-3-4,133,55,16,9 monster Spider 1044,1,4000,8000 +008-3-4,49,91,29,17 monster Black Scorpion 1104,4,4000,8000 +008-3-4,138,57,16,17 monster Spider 1044,3,4000,8000 +008-3-4,54,37,16,17 monster Spider 1044,3,4000,8000 +008-3-4,85,67,49,39 monster Thief Slime 1105,3,20000,100000 +008-3-4,82,42,0,0 monster Coal Veinbloc 1071,1,600000,60000 +008-3-4,74,51,0,0 monster Coal Veinbloc 1071,1,600000,60000 +008-3-4,104,41,0,0 monster Coal Veinbloc 1071,1,600000,60000 +008-3-4,62,61,0,0 monster Coal Veinbloc 1071,1,600000,60000 +008-3-4,128,71,0,0 monster Coal Veinbloc 1071,1,600000,60000 +008-3-4,118,46,0,0 monster Coal Vein 1048,1,600000,60000 +008-3-4,108,90,0,0 monster Iron Vein 1047,1,600000,60000 +008-3-4,72,84,0,0 monster Iron Vein 1047,1,600000,60000 +008-3-4,47,98,0,0 monster Iron Vein 1047,1,600000,60000 +008-3-4,50,74,0,0 monster Iron Vein 1047,1,600000,60000 +008-3-4,135,53,0,0 monster Diamond Vein 1045,1,600000,60000 +008-3-4,43,96,0,0 monster Amethyst Vein 1055,1,600000,60000 +008-3-4,102,91,0,0 monster Topaz Vein 1054,1,600000,60000 +008-3-4,33,102,0,0 monster Gem Veinbloc 1069,1,600000,60000 +008-3-4,154,56,0,0 monster Gem Veinbloc 1069,1,600000,60000 +008-3-4,53,31,0,0 monster Gem Veinbloc 1069,1,600000,60000 +008-3-4,83,44,14,9 monster Red Slime 1074,5,10000,50000 +008-3-4,115,67,13,29 monster Red Slime 1074,4,10000,50000 +008-3-4,37,79,24,27 monster Yellow Slime 1073,4,10000,50000 +008-3-4,111,67,13,29 monster Red Slime 1074,8,20000,75000 diff --git a/npc/008-3-4/_warps.txt b/npc/008-3-4/_warps.txt new file mode 100644 index 00000000..d62d5fb5 --- /dev/null +++ b/npc/008-3-4/_warps.txt @@ -0,0 +1,5 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 008-3-4: North Mine warps +008-3-4,88,78,0 warp #008-3-4_88_78 0,0,008-1,249,24 +008-3-4,21,85,0 warp #008-3-4_21_85 0,2,008-3-5,157,72 +008-3-4,91,119,0 warp #008-3-4_91_119 3,0,008-3-6,62,22 diff --git a/npc/008-3-5/_import.txt b/npc/008-3-5/_import.txt new file mode 100644 index 00000000..5113781e --- /dev/null +++ b/npc/008-3-5/_import.txt @@ -0,0 +1,5 @@ +// Map 008-3-5: Bandit Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/008-3-5/_mobs.txt", +"npc/008-3-5/_warps.txt", +"npc/008-3-5/nunia.txt", diff --git a/npc/008-3-5/_mobs.txt b/npc/008-3-5/_mobs.txt new file mode 100644 index 00000000..de960072 --- /dev/null +++ b/npc/008-3-5/_mobs.txt @@ -0,0 +1,12 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 008-3-5: Bandit Cave mobs +008-3-5,87,83,22,16 monster Cave Maggot 1027,8,2000,20000 +008-3-5,79,68,54,12 monster Crafty 1018,12,2500,35000 +008-3-5,71,62,49,39 monster Thief Slime 1105,3,20000,100000 +008-3-5,90,70,13,29 monster Red Slime 1074,8,20000,75000 +008-3-5,79,82,21,15 monster Bandit 1063,3,2000,20000 +008-3-5,74,66,38,21 monster Snake 1075,3,10000,100000 +008-3-5,54,41,26,21 monster Robin Bandit 1064,2,2000,20000 +008-3-5,44,51,13,33 monster Cave Maggot 1027,7,2000,20000 +008-3-5,49,41,38,21 monster Bandit 1063,2,2000,20000 +008-3-5,133,72,24,9 monster Ratto 1005,6,5000,10000 diff --git a/npc/008-3-5/_warps.txt b/npc/008-3-5/_warps.txt new file mode 100644 index 00000000..be81f002 --- /dev/null +++ b/npc/008-3-5/_warps.txt @@ -0,0 +1,6 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 008-3-5: Bandit Cave warps +008-3-5,158,72,0 warp #008-3-5_158_72 0,2,008-3-4,22,85 +008-3-5,109,67,0 warp #008-3-5_109_67 0,2,008-3-5,101,68 +008-3-5,102,68,0 warp #008-3-5_102_68 0,2,008-3-5,110,67 +008-3-5,92,108,0 warp #008-3-5_92_108 0,0,008-1,109,83 diff --git a/npc/008-3-5/nunia.txt b/npc/008-3-5/nunia.txt new file mode 100644 index 00000000..f87a32d9 --- /dev/null +++ b/npc/008-3-5/nunia.txt @@ -0,0 +1,82 @@ +// Evol scripts. +// Author: +// Micksha +// Description: +// Nunia, Henry's friend and Woodland's master thief. +// THIS IS A PLACEHOLDER! + +008-3-5,50,35,0 script Nunia NPC_NUNIA,{ + function nuniaIntruder; + function nuniaHenry; + function nuniaBegin; + + // What do we have here? + .@q=getq(ThiefQuests_Artis); + switch (.@q) { + case 7: + nuniaHenry(); + break; + case 8: + case 9: + nuniaBegin(); + // TODO: Script control; Transfer quest variable authority + break; + default: + nuniaIntruder(); + break; + } + close; + +/////////////////////////////////////////////////////////////////////////////// +function nuniaIntruder { + speech + l("Who dares to enter this cave? Who are you?"), + l("At least, you look peaceful."), + lg("Let's do like this: You leave me alone, and I don't mess with you. Deal?"); + select + l("Deal."), + l("No deal, I'm going to report you to authorities!"); + mes ""; + // Some meta option/dialog to improve the immersion + if (@menu == 2) { + mesn; + mesq l("There's only one problem, you know..."); + next; + mesn; + mesq l("The dead can't speak."); + percentheal -100, -100; + } + return; +} + +function nuniaHenry { + mesn; + mesq l("Your smell... Did Henry sent you here? How cute of him!"); + next; + mesn; + mesq l("I've raised too much suspicion, so my friends told me to lay low for a while."); + next; + mesn; + mesq l("The Brotherhood is watching our movements, they already suspect who is a member and who isn't, but they don't know for sure."); + next; + mesn; + mesq l("Therefore, we had to cut off our connection with Artis. Don't want Brotherhood to find the secrets of our structure."); + setq1 ThiefQuests_Artis, 8; + return; +} + +function nuniaBegin { + speech + l("Who dares to enter this cave? Who are you?"), + l("At least, you look peaceful. And I see by your fingers that you can deal with lockpicks."), + l("I am going to teach you all what a thief needs to know, later"), + l("Call for Micksha and Jesusalva to implement all this, please."), + l("And Tezer, our president in Tulimshar, should be able to give you even more training."); + return; +} + +OnInit: + .sex = G_FEMALE; + .distance = 2; + end; +} diff --git a/npc/008-3-6/_import.txt b/npc/008-3-6/_import.txt new file mode 100644 index 00000000..41b51532 --- /dev/null +++ b/npc/008-3-6/_import.txt @@ -0,0 +1,4 @@ +// Map 008-3-6: Hurnscald Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/008-3-6/_mobs.txt", +"npc/008-3-6/_warps.txt", diff --git a/npc/008-3-6/_mobs.txt b/npc/008-3-6/_mobs.txt new file mode 100644 index 00000000..91e614fe --- /dev/null +++ b/npc/008-3-6/_mobs.txt @@ -0,0 +1,11 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 008-3-6: Hurnscald Cave mobs +008-3-6,54,73,18,19 monster Red Slime 1074,5,10000,50000 +008-3-6,67,44,35,8 monster Yellow Slime 1073,3,10000,50000 +008-3-6,86,43,23,22 monster Red Slime 1074,4,10000,50000 +008-3-6,86,76,24,13 monster Yellow Slime 1073,4,10000,50000 +008-3-6,75,65,24,27 monster Cave Maggot 1027,8,2000,20000 +008-3-6,56,62,10,7 monster Ratto 1005,3,5000,10000 +008-3-6,71,77,10,7 monster Ratto 1005,3,5000,10000 +008-3-6,96,53,15,11 monster Ratto 1005,4,5000,10000 +008-3-6,95,63,15,21 monster Black Scorpion 1104,1,4000,8000 diff --git a/npc/008-3-6/_warps.txt b/npc/008-3-6/_warps.txt new file mode 100644 index 00000000..95dd673a --- /dev/null +++ b/npc/008-3-6/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 008-3-6: Hurnscald Cave warps +008-3-6,64,21,0 warp #008-3-6_64_21 3,0,008-3-4,90,118 diff --git a/npc/008-4-1/_mobs.txt b/npc/008-4-1/_mobs.txt deleted file mode 100644 index ad992a8d..00000000 --- a/npc/008-4-1/_mobs.txt +++ /dev/null @@ -1,7 +0,0 @@ -// This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 008-4-1: Cave Of Trials mobs -008-4-1,106,73,73,63 monster Cave Maggot 1027,80,30000,2500 -008-4-1,136,71,47,50 monster Thief Slime 1105,35,50000,2500 -008-4-1,101,83,73,30 monster AngryCrafty 1103,60,50000,2500 -008-4-1,100,79,32,31 monster Black Scorpion 1104,14,45000,2500 -008-4-1,94,98,11,9 monster Green Slime 1024,4,500,2500 diff --git a/npc/012-1/_import.txt b/npc/012-1/_import.txt index 47036b7f..363a65e9 100644 --- a/npc/012-1/_import.txt +++ b/npc/012-1/_import.txt @@ -1,5 +1,6 @@ // Map 012-1: Candor Island // This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/012-1/_mobs.txt", "npc/012-1/_warps.txt", "npc/012-1/aahna.txt", "npc/012-1/aidan.txt", diff --git a/npc/012-1/_mobs.txt b/npc/012-1/_mobs.txt new file mode 100644 index 00000000..d00ebaaa --- /dev/null +++ b/npc/012-1/_mobs.txt @@ -0,0 +1,8 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 012-1: Candor Island mobs +012-1,77,78,30,25 monster Mana Bug 1035,8,10000,10000 +012-1,62,95,19,15 monster Butterfly 1032,5,100000,10000 +012-1,78,103,38,12 monster Maggot 1026,10,500,10000 +012-1,57,57,20,14 monster Grass Snake 1042,5,3000,12000 +012-1,106,42,16,7 monster Scorpion 1043,4,15000,50000 +012-1,115,123,14,7 monster Scorpion 1043,4,15000,40000 diff --git a/npc/012-1/_warps.txt b/npc/012-1/_warps.txt index ada06743..e7f8b126 100644 --- a/npc/012-1/_warps.txt +++ b/npc/012-1/_warps.txt @@ -6,3 +6,4 @@ 012-1,64,95,0 warp #012-1_64_95 0,0,012-2-3,33,36 012-1,51,93,0 warp #012-1_51_93 0,0,012-2-7,30,34 012-1,57,101,0 warp #012-1_57_101 0,0,012-2-4,31,43 +012-1,49,67,0 warp #012-1_49_67 1,0,012-3-1,37,40 diff --git a/npc/012-3-1/_import.txt b/npc/012-3-1/_import.txt new file mode 100644 index 00000000..8856cef8 --- /dev/null +++ b/npc/012-3-1/_import.txt @@ -0,0 +1,4 @@ +// Map 012-3-1: Cador Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/012-3-1/_mobs.txt", +"npc/012-3-1/_warps.txt", diff --git a/npc/012-3-1/_mobs.txt b/npc/012-3-1/_mobs.txt new file mode 100644 index 00000000..60055f77 --- /dev/null +++ b/npc/012-3-1/_mobs.txt @@ -0,0 +1,8 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 012-3-1: Cador Cave mobs +012-3-1,47,44,17,18 monster Spider 1044,5,4000,8000 +012-3-1,47,47,23,18 monster Cave Maggot 1027,8,2000,20000 +012-3-1,41,30,13,6 monster Green Slime 1024,3,20000,75000 +012-3-1,51,56,15,7 monster Black Scorpion 1104,1,4000,8000 +012-3-1,60,48,11,14 monster AngryCrafty 1103,3,50000,2500 +012-3-1,36,43,11,7 monster AngryCrafty 1103,2,50000,2500 diff --git a/npc/012-3-1/_warps.txt b/npc/012-3-1/_warps.txt new file mode 100644 index 00000000..4de4ef4a --- /dev/null +++ b/npc/012-3-1/_warps.txt @@ -0,0 +1,5 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 012-3-1: Cador Cave warps +012-3-1,43,44,0 warp #012-3-1_43_44 1,0,012-3-3,44,97 +012-3-1,68,62,0 warp #012-3-1_68_62 0,2,012-3-2,22,45 +012-3-1,37,41,0 warp #012-3-1_37_41 2,0,012-1,48,68 diff --git a/npc/012-3-2/_import.txt b/npc/012-3-2/_import.txt new file mode 100644 index 00000000..1aaa4813 --- /dev/null +++ b/npc/012-3-2/_import.txt @@ -0,0 +1,4 @@ +// Map 012-3-2: Candor Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/012-3-2/_mobs.txt", +"npc/012-3-2/_warps.txt", diff --git a/npc/012-3-2/_mobs.txt b/npc/012-3-2/_mobs.txt new file mode 100644 index 00000000..ee085d8d --- /dev/null +++ b/npc/012-3-2/_mobs.txt @@ -0,0 +1,8 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 012-3-2: Parua Cave mobs +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 012-3-2: Candor Cave mobs +012-3-2,55,39,13,14 monster Spider 1044,5,4000,8000 +012-3-2,54,41,15,12 monster Black Scorpion 1104,4,4000,8000 +012-3-2,56,41,17,10 monster AngryCrafty 1103,3,50000,2500 +012-3-2,48,40,26,6 monster Cave Maggot 1027,6,2000,20000 diff --git a/npc/012-3-2/_warps.txt b/npc/012-3-2/_warps.txt new file mode 100644 index 00000000..25b3477a --- /dev/null +++ b/npc/012-3-2/_warps.txt @@ -0,0 +1,5 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 012-3-2: Parua Cave warps +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 012-3-2: Candor Cave warps +012-3-2,21,46,0 warp #012-3-2_21_46 0,1,012-3-1,67,61 diff --git a/npc/012-3-3/_import.txt b/npc/012-3-3/_import.txt new file mode 100644 index 00000000..ee48f7ee --- /dev/null +++ b/npc/012-3-3/_import.txt @@ -0,0 +1,5 @@ +// Map 012-3-3: Mana Tree Cave +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/012-3-3/_mobs.txt", +"npc/012-3-3/_warps.txt", +"npc/012-3-3/manatree.txt", diff --git a/npc/012-3-3/_mobs.txt b/npc/012-3-3/_mobs.txt new file mode 100644 index 00000000..1d281763 --- /dev/null +++ b/npc/012-3-3/_mobs.txt @@ -0,0 +1,7 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 012-3-3: Mana Tree Cave mobs +012-3-3,40,28,13,3 monster Green Slime 1024,4,20000,75000 +012-3-3,41,53,15,31 monster Crafty 1018,7,2500,35000 +012-3-3,36,35,9,7 monster Mana Bug 1035,5,10000,10000 +012-3-3,42,39,8,12 monster Silkworm 1040,5,3000,6000 +012-3-3,42,35,7,6 monster Moubi 1072,1,500000,1000000 diff --git a/npc/012-3-3/_warps.txt b/npc/012-3-3/_warps.txt new file mode 100644 index 00000000..c0e6bf40 --- /dev/null +++ b/npc/012-3-3/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 012-3-3: Mana Tree Cave warps +012-3-3,44,98,0 warp #012-3-3_44_98 0,0,012-3-1,42,45 diff --git a/npc/012-3-3/manatree.txt b/npc/012-3-3/manatree.txt new file mode 100644 index 00000000..985ac2a8 --- /dev/null +++ b/npc/012-3-3/manatree.txt @@ -0,0 +1,20 @@ +// Evol scripts. +// Author: +// Micksha +// Description: +// The Manatree. +// THIS IS A PLACEHOLDER! + +012-3-3,39,33,0 script Manatree#012-3-3 NPC_MANATREE,{ + speech + l("Magic is all around."), + l("You just must listen to it, and feel it deep inside."), + lg("Now go, search for the unknown."); + + close; + +OnInit: + .sex = G_FEMALE; + .distance = 2; + end; +} diff --git a/npc/_import.txt b/npc/_import.txt index f982d3dd..dfe1ab2b 100644 --- a/npc/_import.txt +++ b/npc/_import.txt @@ -48,6 +48,7 @@ @include "npc/001-2-40/_import.txt" @include "npc/001-2-41/_import.txt" @include "npc/001-2-42/_import.txt" +@include "npc/001-2-43/_import.txt" @include "npc/001-2-5/_import.txt" @include "npc/001-2-6/_import.txt" @include "npc/001-2-7/_import.txt" @@ -94,7 +95,11 @@ @include "npc/008-2-9/_import.txt" @include "npc/008-3-0/_import.txt" @include "npc/008-3-1/_import.txt" -@include "npc/008-4-1/_import.txt" +@include "npc/008-3-2/_import.txt" +@include "npc/008-3-3/_import.txt" +@include "npc/008-3-4/_import.txt" +@include "npc/008-3-5/_import.txt" +@include "npc/008-3-6/_import.txt" @include "npc/012-1/_import.txt" @include "npc/012-2-1/_import.txt" @include "npc/012-2-2/_import.txt" @@ -103,6 +108,9 @@ @include "npc/012-2-5/_import.txt" @include "npc/012-2-6/_import.txt" @include "npc/012-2-7/_import.txt" +@include "npc/012-3-1/_import.txt" +@include "npc/012-3-2/_import.txt" +@include "npc/012-3-3/_import.txt" @include "npc/sec_pri/_import.txt" @include "npc/test/_import.txt" @include "npc/testbg/_import.txt" diff --git a/npc/commands/debug-look.txt b/npc/commands/debug-look.txt index 4ab9ed44..23acc4da 100644 --- a/npc/commands/debug-look.txt +++ b/npc/commands/debug-look.txt @@ -1,22 +1,19 @@ function script BarberDebug { function setGender { - //clear; - //setnpcdialogtitle l("Appearance Debug - Sex Change"); - //mes l("Please choose the desired gender:"); - //next; - //menuint - // l("Male"), G_MALE, - // l("Female"), G_FEMALE, - // l("Non-binary"), G_OTHER; + clear(); + setnpcdialogtitle(l("Appearance Debug - Gender Change")); + mes(l("Warning: changing your gender will send you back to the character selection screen.")); + mes(""); + mes(l("Please choose the desired gender:")); + next(); + menuint( + l("Male"), GENDER_MALE, + l("Female"), GENDER_FEMALE, + l("Non-binary"), GENDER_HIDDEN); - //Sex = @menuret; // FIXME: make this work like in tmwAthena - //return; - - - // ^ Future code, Doesn't work yet - closeclientdialog; - changecharsex; + Gender = @menuret; + return; } function setStyle { clear; @@ -57,7 +54,7 @@ function script BarberDebug { mes ""; mes "---"; - mes l("Gender") + ": " + Sex; + mes l("Gender") + ": " + genderToString(Gender); mes l("Hair style") + ": " + getlook(LOOK_HAIR); mes l("Hair color") + ": " + getlook(LOOK_HAIR_COLOR); mes l("Race") + ": " + Class + " (" + get_race() + ")";; diff --git a/npc/commands/debug-quest.txt b/npc/commands/debug-quest.txt index 34bdf63b..868b807c 100644 --- a/npc/commands/debug-quest.txt +++ b/npc/commands/debug-quest.txt @@ -81,7 +81,8 @@ function script GlobalQuestDebug { "Lloyd", ArtisQuests_Lloyd, l("Mona's dad"), ArtisQuests_MonaDad, l("Artis legion progress"), Artis_Legion_Progress, - l("Legion training"), ArtisQuests_TrainingLegion; + l("Legion training"), ArtisQuests_TrainingLegion, + "Henry", ThiefQuests_Artis; switch (@menuret) { diff --git a/npc/commands/gender.txt b/npc/commands/gender.txt new file mode 100644 index 00000000..b852beb0 --- /dev/null +++ b/npc/commands/gender.txt @@ -0,0 +1,35 @@ +// @gender atcommand +// changes or returns the gender + +- script @gender 32767,{ + end; + +OnCall: + if (.@atcmd_parameters$[0] == "") { + dispbottom("Your current gender is " + genderToString()); + end; + } + + .@desired = stringToGender(.@atcmd_parameters$[0]); + + if (.@desired == Gender) { + dispbottom("Your gender is already " + genderToString()); + } else { + Gender = .@desired; + dispbottom("Gender changed to " + genderToString()); + } + end; + +OnInit: + bindatcmd("gender", "@gender::OnCall", 99, 99, false); + add_group_command("gender", 40, true, false); + add_group_command("gender", 50, true, true); + add_group_command("gender", 60, true, true); + add_group_command("gender", 80, true, true); + + bindatcmd("changesex", "@gender::OnCall", 99, 99, false); + add_group_command("changesex", 40, true, false); + add_group_command("changesex", 50, true, true); + add_group_command("changesex", 60, true, true); + add_group_command("changesex", 80, true, true); +} diff --git a/npc/commands/python.txt b/npc/commands/python.txt new file mode 100644 index 00000000..e2fdc5bf --- /dev/null +++ b/npc/commands/python.txt @@ -0,0 +1,24 @@ +// The Mana World script +// Author: Gumi <gumi@themanaworld.org> +// Author: Jesusalva <jesusalva@themanaworld.org> +// +// Stomp stomp stomp (use with caution) + +- script @python 32767,{ + end; + +// Soft Resync +OnCall: + specialeffect(69, AREA, playerattached()); + addtimer 380, .name$+"::OnKill"; + end; + +OnKill: + percentheal -100, -100; + //dispbottom l("Oh look, it is Cupid!"); + end; + +OnInit: + bindatcmd "python", "@python::OnCall", 20, 20, 1; + end; +} diff --git a/npc/functions/RNGesus.txt b/npc/functions/RNGesus.txt index 6883f8f1..7224977c 100644 --- a/npc/functions/RNGesus.txt +++ b/npc/functions/RNGesus.txt @@ -1,16 +1,30 @@ // Evol functions. // Authors: // gumi +// jesusalva // Description: // Randomization helper functions. +// pseudo-fix randomness +// rand2( min, max ) +function script rand2 { + if (getargcount() == 2) { + .@min=getarg(0)*100; + .@max=getarg(1)*100+99; + } else { + .@min=0; + .@max=getarg(0)*100-1; + } + return rand(.@min, .@max)/100; +} + // any(<arg>{, ...<arg>}) // returns one argument randomly function script any { - return getarg(rand(getargcount())); + return getarg(rand2(getargcount())); } @@ -19,7 +33,7 @@ function script any { // returns any member of the array function script any_of { - return getelementofarray(getarg(0), getarrayindex(getarg(0)) + rand(getarraysize(getarg(0)) - getarrayindex(getarg(0)))); + return getelementofarray(getarg(0), getarrayindex(getarg(0)) + rand2(getarraysize(getarg(0)) - getarrayindex(getarg(0)))); } @@ -54,7 +68,7 @@ function script relative_array_random { set(getelementofarray(getarg(0), 0), .@total_prob); } - .@target_sum = rand(0, .@total_prob); + .@target_sum = rand2(0, .@total_prob); for (.@i = .@initial_index; .@sum < .@target_sum; .@i += 2) { if (.@is_str) { diff --git a/npc/functions/barber.txt b/npc/functions/barber.txt index 370285b7..1df0a307 100644 --- a/npc/functions/barber.txt +++ b/npc/functions/barber.txt @@ -108,3 +108,18 @@ function script BarberChangeColor { return; } + +function script BarberChangeGender { + mesn("Warning"); + mes(b(l("Changing your gender will send you back to the character selection screen."))); + next(); + + mes(l("Please select the desired gender:")); + menuint( + l("Female"), GENDER_FEMALE, + l("Male"), GENDER_MALE, + l("Non-binary"), GENDER_HIDDEN); + + Gender = @menuret; + return; +} diff --git a/npc/functions/faction.txt b/npc/functions/faction.txt new file mode 100644 index 00000000..19450df9 --- /dev/null +++ b/npc/functions/faction.txt @@ -0,0 +1,104 @@ +// The Mana World: rEvolt functions. +// Authors: +// Jesusalva +// Description: +// Faction utils +// Factions: +// THIEF / MAGE / LEGION / BROTHERHOOD +// Variables: +// FACTION_REP +// Your reputation with the faction (ally, friendly, cordial, enemy, ...) +// FACTION_EXP +// Your personal experience (=skill with the faction dealings) +// FACTION_RANK +// Your "level" in the faction, a mix of both above. + + +// Returns, based on a 1-5 range, the title for ranking systems (system guilds) +// legionrank() / brotherrank() / thiefrank() / magerank() +function script legionrank { + switch (LEGION_RANK) { + case 5: return l("Constable"); + case 4: return l("Tengu"); + case 3: return l("Terranite"); + case 2: return l("Fluffy"); + case 1: return l("Maggot"); + case 0: return l("Citizen"); + default: return l("Error"); + } +} +function script brotherrank { + switch (BROTHERHOOD_RANK) { + case 5: return l("Administrator"); + case 4: return l("Senior Developer"); + case 3: return l("Game Master"); + case 2: return l("Developer"); + case 1: return l("Contributor"); + case 0: return l("Citizen"); + default: return l("Error"); + } +} +function script thiefrank { + switch (THIEF_RANK) { + case 5: return l("Bandit Lord"); + case 4: return l("Assassin"); + case 3: return l("Rogue"); + case 2: return l("Bandit"); + case 1: return l("Thief"); + case 0: return l("Citizen"); + default: return l("Error"); + } +} +function script magerank { + switch (MAGE_RANK) { + case 5: return l("Elder Mage"); + case 4: return l("Great Mage"); + case 3: return l("Arch Mage"); + case 2: return l("Mage"); + case 1: return l("Initiate"); + case 0: return l("Citizen"); + default: return l("Error"); + } +} + +// faction_addrep( faction, amount ) +// Returns a dialog which can be used with mesc() or dispbottom() +function script faction_addrep { + .@fac$=strtoupper(getarg(0)); + .@old=getd(.@fac$+"_REP"); + setd(.@fac$+"_REP", .@old+getarg(1)); + if (getarg(1) > 0) + return l("Reputation with %s Faction UP (+%d)!", getarg(0), getarg(1)); + else + return l("Reputation with %s Faction DOWN (%d)!", getarg(0), getarg(1)); + + return; +} + +// Returns standing with faction (THIEF/MAGE/LEGION/BROTHERHOOD) +// An integer from 3 (ally) to -3 (enemy). Standings based on Hands of War; +// faction_standing( faction{, integer=True} ) +function script faction_standing { + .@fac$=strtoupper(getarg(0)); + .@ret=getarg(1, true); + .@rep=getd(.@fac$+"_REP"); + if (.@rep > 1000) { + return (.@ret ? 3 : "Ally"); // 1001 ~ inf. + } else if (.@rep > 500) { + return (.@ret ? 2 : "Friendly"); // 501 ~ 1000 + } else if (.@rep > 100) { + return (.@ret ? 1 : "Cordial"); // 101 ~ 500 + } else if (.@rep >= -100) { + return (.@ret ? 0 : "Neutral"); // -100 ~ +100 + } else if (.@rep > -500) { + return (.@ret ? -1 : "Unfriendly"); // -101 ~ -500 + } else if (.@rep > -1000) { + return (.@ret ? -2 : "Enemy"); // -501 ~ -1000 + } else { + return (.@ret ? -3 : "Nemesis"); // -1001 ~ inf + } + +} +// TODO: faction_checklvup() + + diff --git a/npc/functions/gender.txt b/npc/functions/gender.txt new file mode 100644 index 00000000..0f153c53 --- /dev/null +++ b/npc/functions/gender.txt @@ -0,0 +1,13 @@ +function script stringToGender { + .@short$ = strtolower(charat(getarg(0, ""), 0)); + + return .@short$ == "f" ? GENDER_FEMALE : + .@short$ == "m" ? GENDER_MALE : GENDER_HIDDEN; +} + +function script genderToString { + .@gender = getarg(0, Gender); + + return .@gender == GENDER_FEMALE ? l("female") : + .@gender == GENDER_MALE ? l("male") : l("non-binary"); +} diff --git a/npc/functions/lockpicks.txt b/npc/functions/lockpicks.txt new file mode 100644 index 00000000..6a3c55f7 --- /dev/null +++ b/npc/functions/lockpicks.txt @@ -0,0 +1,193 @@ +// TMW2/LoF Script +// Author: +// Jesusalva +// Description: +// Lockpicking core + +// Important variables: +// THIEF_EXP +// Experience on Thief Tree +// THIEF_RANK +// Position on the Thief Tree + +// LockPicking(num_pins, max_pins, min_rank=num_pins) +// Returns 0 upon failure, 1 upon success +// Closes script if an error happen or if you give up / cannot try. +// +// The 'next' is upon script responsability +// Maximum pin number is infinite. Maximum Pin Positiors range from 2~5. +// If you fail, you can end up having to start again. If you fail too much, +// you'll be caught! +function script LockPicking { + // If you don't have a LockPick, you can't do this (useless) + if (!countitem(Lockpicks)) { + mesc l("You need a @@ to try this.", getitemlink(Lockpicks)), 1; + close; + } + + .@d=getarg(0,1); + .@m=getarg(1,3); + .@minrank=getarg(2, .@d); + + // Invalid Argument (kill script) + if (.@d < 1 || .@m < 2 || .@m > 5) + end; + + // You must be rank (number of locks - 1) to try + if (THIEF_RANK+1 < .@minrank) { + mesc l("This lock is beyond your current capacity."), 1; + close; + } + + // Create @pins array (the answer) + for (.@i=0; .@i < .@d;.@i++) + @pins[.@i] = rand2(1,.@m); + + // Check if you'll try to open it. + mesc l("This lock is simple, maybe with your thief skills you can manage to pry it open. But beware, you can end up in jail!"); + mesc l("Will you try to unlock it?"); + if (askyesno() == ASK_NO) + close; + + // Setup your attempt + delitem Lockpicks, 1; + @pos=0; + @chance=min(.@d*.@m-1, THIEF_RANK+.@d); + mesc l("You insert the hook pick inside the lock, and, without applying any tension, you discover there are only @@ pins to set.", .@d); + + // You have as many attempts as pins and appliable strenghts. + // Each thief rank grants you an extra attempt. + // Each pin takes one attempt. + // It's not multiplied, so 3 pins with 3 positions: 6 chances, 9 possibilities. + // There's no penalty, but the attempt is counted working or not! + // Remember if you fail, all previous pins will be cleared (@pos) + do { + mesc l("You are trying to open the @@th pin. What will to do?", @pos+1); + + menuint + rif(.@m >= 4, l("Apply no pressure")), 4, + rif(.@m >= 2, l("Apply soft pressure")), 2, + rif(.@m >= 1, l("Apply normal pressure")), 1, + rif(.@m >= 3, l("Apply strong pressure")), 3, + rif(.@m >= 5, l("Apply very strong pressure")), 5, + l("Give up!"), 0; + + if (!@menuret) { + // 50% chance to save the lockpick + if (rand2(2) == 1) + getitem Lockpicks, 1; + else + dispbottom l("The lockpick broke."); + close; + } + + // Is your guess correct? + if (@pins[@pos] == @menuret) { + mesc l("*click*"); + @pos+=1; + } else { + mesc l("This didn't work. All pins are now unset!"); + @pos=0; + @chance-=1; + // We don't need to clear console, each successful attempt IS counted. + // Therefore, unsetting 3 pins means you must do 3 new attempts!! + // The biggie is that you're running against time, here!!! + if (@chance < .@d && rand2(0, THIEF_RANK)) + mesc l("Your thief instincts suggest you to hurry."), 1; + } + + if (@chance <= 0) + break; + + if (@pos >= .@d) { + // 33% chance to save the lockpick + if (rand2(3) == 1) + getitem Lockpicks, 1; + else + dispbottom l("The lockpick broke."); + + // Get EXP and inform the success + if (THIEF_RANK) + THIEF_EXP += max(0, .@d*.@m-THIEF_RANK); + return 1; + } + } while (true); + + // Failed + if (THIEF_RANK) + THIEF_EXP += 1; + return 0; +} + +// Script helper to say if you were arrested or not +function script ArrestedChances { + .@runaway=cap_value(readbattleparam(getcharid(3), UDT_LUK)+readbattleparam(getcharid(3), UDT_AGI), 0, 200); // 20% + .@runaway+=125; // 12.5% base chance + .@runaway+=cap_value(THIEF_RANK*15, 0, 100); // real max 7.5% + // Max runaway chance: 40% + if (rand2(1000) < .@runaway) + return false; + return true; +} + +// Script helper to actually arrest you. TODO: Arrest anyone +// ArrestPlayer ( time-in-minutes ) +function script ArrestPlayer { + .@t=getarg(0); + + // We can't do anything without a player o.o + if (!playerattached()) + return; + + // You're already jailed so we do nothing and fail silently + if (getstatus(SC_JAILED)) { + return; + } + + // Okay, we can arrest you + // TODO: Arrest player, preferably without GM commands D: + // (would then take an extra argument: map) + atcommand("@jailfor "+.@t+"mn "+strcharinfo(0)); + + // Notification + dispbottom l("You were arrested; Use %s for information about how long you will spend here.", b("@jailtime")); + return; +} + +/* +// Main script from Moubootaur Legends Vaults +// LootableVault(tier, level, variable) +function script LootableVault { + .@tier=getarg(0)+1; + .@level=getarg(1); + .@var$=getarg(2); + mesn; + mesq l("There's a shiny safe here. How much money is inside? Nobody is looking at you, great!"); + // 2*3 = 6 possibilities, 5 attempts + if (LockPicking(.@tier, .@level)) { + Zeny=Zeny+getd("$VAULT_"+.@var$); + setd("$VAULT_"+.@var$, 40); + mesn; + mesq l("Booty!"); + } else { + mesn; + .@inch=(Zeny/100); + Zeny-=.@inch; + setd("$VAULT_"+.@var$, getd("$VAULT_"+.@var$)+.@inch); + if (ArrestedChances()) { + mesc l("Arrested!"); + atcommand("@jailfor 5mn "+strcharinfo(0)); + } else { + if (is_night()) + .@p$=l("The darkness of night gives you cover."); + else + .@p$=l("Your agile legs and sheer luck allows you to outrun the cops."); + mesc l("You run as far as you could. %s", .@p$); + warp "000-1", 22, 22; + } + } + return; +} +*/ + + diff --git a/npc/functions/marriage.txt b/npc/functions/marriage.txt deleted file mode 100644 index d9e48bf5..00000000 --- a/npc/functions/marriage.txt +++ /dev/null @@ -1,293 +0,0 @@ -// Evol functions. -// Author: -// 4144 -// Description: -// Functions for marriage - -// check is player is near marriage npc -// args: -// 0 - player name -// returns: -// true if player located near npc. -function script marriagecheckname { - .@name$ = getarg(0); - if (.@name$ == "") - { - // no other registrand - return false; - } - .@id = getcharid(0, .@name$); - .@accoundId = getcharid(3, .@name$); - if (isloggedin(.@accoundId, .@id) == false) - { - // registrant not logged in - return false; - } - getmapxy(.@mapname$, .@x, .@y, 0, .@name$); - if (.@mapname$ != strnpcinfo(4)) - { - // registrant on other map - return false; - } - if (distance(.@x, .@y, .x, .y) > .distance) - { - // registrant too far - return false; - } - return true; -} - -// return player name registered with same gender like attached player -function script getmarriageregistrant { - if (Sex) - { - .@name$ = getvariableofnpc(.maleName$, strnpcinfo(3)); - } - else - { - .@name$ = getvariableofnpc(.femaleName$, strnpcinfo(3)); - } - return .@name$; -} - -// return registered marriage partner name -function script getmarriagepartner { - if (Sex) - { - .@name$ = getvariableofnpc(.femaleName$, strnpcinfo(3)); - } - else - { - .@name$ = getvariableofnpc(.maleName$, strnpcinfo(3)); - } - if (marriagecheckname(.@name$)) - return .@name$; - return ""; -} - -// register attached player as partner for marriage -function script marriageregisterself { - if (Sex) - { - set getvariableofnpc(.maleName$, strnpcinfo(3)), strcharinfo(0); - set getvariableofnpc(.maleName_partner$, strnpcinfo(3)), ""; - } - else - { - set getvariableofnpc(.femaleName$, strnpcinfo(3)), strcharinfo(0); - set getvariableofnpc(.femaleName_partner$, strnpcinfo(3)), ""; - } - return; -} - -// return player name what was accepted by partner -function script getmarriagepartneraccepted { - if (Sex) - { - .@name$ = getvariableofnpc(.femaleName_partner$, strnpcinfo(3)); - } - else - { - .@name$ = getvariableofnpc(.maleName_partner$, strnpcinfo(3)); - } - return .@name$; -} - -// return true if partner present near and partner accepted you -function script ismarriagepartneraccepted { - .@partner$ = getmarriagepartner(); - if (.@partner$ == "") - return false; - .@name$ = getmarriagepartneraccepted(); - if (.@name$ == strcharinfo(0)) - return true; - return false; -} - -// accept for attached player his/her partner -// args: -// 0 - partner name -function script marriageacceptpartner { - .@name$ = getarg(0); - if (Sex) - { - set getvariableofnpc(.maleName_partner$, strnpcinfo(3)), .@name$; - } - else - { - set getvariableofnpc(.femaleName_partner$, strnpcinfo(3)), .@name$; - } - return; -} - -function script askmarry { - speech l("Do you want to marry @@?", getarg(0)); - if (askyesno() == ASK_YES) - return true; - return false; -} - -// start marriage registration process -function script marriageregister { - .@partner$ = getmarriagepartner(); - if (.@partner$ == "") - { // no partner registered - speech l("Ok I add your name... @@...", strcharinfo(0)); - marriageregisterself(); - next; - speech lg("Now wait for your partner, then talk to me again."); - npctalk l("@@ registered for marriage. Waiting for partner...", strcharinfo(0)); - close; - } - else - { // partner already registered - if (askmarry(.@partner$) == true) - { - marriageregisterself(); - marriageacceptpartner(.@partner$); - npctalk l("@@ registered for marriage and accepted partner @@!", strcharinfo(0), .@partner$); - npctalk l("Waiting for @@...", .@partner$); - close; - } - else - { - close; - } - } - return; -} - -// remove all marriage registations -function script marriageclear { - set getvariableofnpc(.maleName$, strnpcinfo(3)), ""; - set getvariableofnpc(.femaleName$, strnpcinfo(3)), ""; - set getvariableofnpc(.maleName_partner$, strnpcinfo(3)), ""; - set getvariableofnpc(.femaleName_partner$, strnpcinfo(3)), ""; - return; -} - -// do actual marriage -function script domarriage { - .@name$ = strcharinfo(0); - .@partner$ = getarg(0); - if (marriage(.@partner$)) - { - speech l("You got married to @@!", .@partner$); - npctalk l("@@ and @@ just got married!", .@name$, .@partner$); - } - else - { - npctalk l("Marriage failed."); - } - marriageclear(); - return; -} - -// marry main code -function script marriagemarry { - .@registrant$ = getmarriageregistrant(); - if (marriagecheckname(.@registrant$) == true) - { - if (.@registrant$ == strcharinfo(0)) - { - if (ismarriagepartneraccepted()) - { - .@partner$ = getmarriagepartner(); - if (marriagecheckname(.@partner$) == false) - { - speech l("Partner not ready."); - } - else if (askmarry(.@partner$) == true) - { - domarriage(.@partner$); - } - } - else - { - speech l("You already registered. Waiting for your partner..."); - } - } - else - { - speech l("Sorry, I'm busy with other registrations."), - l("Come after a little while."); - } - close; - } - - speech l("What can I do for you?"); - switch (select(l("I want to register for marriage."), - l("Nothing"))) - { - case 1: - marriageregister; - break; - case 2: - break; - } - return; -} - -// divorce main code -function script marriagedivorce { - speech l("What can I do for you?"); - switch (select(l("I want to divorce."), - l("Nothing"))) - { - case 1: - speech lg("Are you sure?"); - if (askyesno() == ASK_YES) - { - if (divorce()) - { - speech l("You are now divorced!"), - l("Good look."); - npctalk l("@@ divorced!", strcharinfo(0)); - } - else - { - speech l("Divorce error!"); - } - } - break; - case 2: - break; - } - return; -} - -// main function for marriage -function script marriagemain { - if (Sex > 1) - { - speech l("Sorry i can't help you. Go away!"); - close; - } - - if (getpartnerid() != 0) - { // have partner - marriagedivorce(); - } - else - { // no partner - marriagemarry(); - } - - return; -} - -// check registration list by timer -function script marriagecheck { - .@name$ = getvariableofnpc(.maleName$, strnpcinfo(3)); - if (.@name$ != "" && marriagecheckname(.@name) == false) - { - set getvariableofnpc(.maleName$, strnpcinfo(3)), ""; - set getvariableofnpc(.maleName_partner$, strnpcinfo(3)), ""; - } - .@name$ = getvariableofnpc(.femaleName$, strnpcinfo(3)); - if (.@name$ != "" && marriagecheckname(.@name) == false) - { - set getvariableofnpc(.femaleName$, strnpcinfo(3)), ""; - set getvariableofnpc(.femaleName_partner$, strnpcinfo(3)), ""; - } -} diff --git a/npc/functions/quest-debug/019-ArtisQuests_LazyBrother.txt b/npc/functions/quest-debug/020-ArtisQuests_LazyBrother.txt index 41733adf..11cf3a44 100644 --- a/npc/functions/quest-debug/019-ArtisQuests_LazyBrother.txt +++ b/npc/functions/quest-debug/020-ArtisQuests_LazyBrother.txt @@ -2,7 +2,7 @@ // Author: // gumi -function script QuestDebug19 { +function script QuestDebug20 { do { clear; diff --git a/npc/functions/quest-debug/020-ArtisQuests_Urchin.txt b/npc/functions/quest-debug/021-ArtisQuests_Urchin.txt index 3a092e47..486cae18 100644 --- a/npc/functions/quest-debug/020-ArtisQuests_Urchin.txt +++ b/npc/functions/quest-debug/021-ArtisQuests_Urchin.txt @@ -2,7 +2,7 @@ // Author: // gumi -function script QuestDebug20 { +function script QuestDebug21 { do { clear; diff --git a/npc/functions/quest-debug/021-ArtisQuests_CatchPiou.txt b/npc/functions/quest-debug/022-ArtisQuests_CatchPiou.txt index f9c45339..9d5afc1c 100644 --- a/npc/functions/quest-debug/021-ArtisQuests_CatchPiou.txt +++ b/npc/functions/quest-debug/022-ArtisQuests_CatchPiou.txt @@ -2,7 +2,7 @@ // Author: // gumi -function script QuestDebug21 { +function script QuestDebug22 { do { clear; diff --git a/npc/functions/quest-debug/022-ArtisQuests_Fishman.txt b/npc/functions/quest-debug/023-ArtisQuests_Fishman.txt index 0a193e6f..e3b5ac2e 100644 --- a/npc/functions/quest-debug/022-ArtisQuests_Fishman.txt +++ b/npc/functions/quest-debug/023-ArtisQuests_Fishman.txt @@ -2,7 +2,7 @@ // Author: // gumi -function script QuestDebug22 { +function script QuestDebug23 { do { clear; diff --git a/npc/functions/quest-debug/023-ArtisQuests_QOnan.txt b/npc/functions/quest-debug/024-ArtisQuests_QOnan.txt index 02eaa8f6..702ef9be 100644 --- a/npc/functions/quest-debug/023-ArtisQuests_QOnan.txt +++ b/npc/functions/quest-debug/024-ArtisQuests_QOnan.txt @@ -2,7 +2,7 @@ // Author: // gumi -function script QuestDebug23 { +function script QuestDebug24 { do { clear; diff --git a/npc/functions/quest-debug/035-ThiefQuests_Artis.txt b/npc/functions/quest-debug/035-ThiefQuests_Artis.txt new file mode 100644 index 00000000..83f9fb9c --- /dev/null +++ b/npc/functions/quest-debug/035-ThiefQuests_Artis.txt @@ -0,0 +1,38 @@ +// Artis Thieves quest debug +// Author: +// Jesusalva +// Field 2: Internal use (gearwheels - odd: collected; even: used) +// Field 3: Internal use (Archive where the file is) + +function script QuestDebug35 { + do + { + clear; + setnpcdialogtitle l("Quest debug"); + mes "ThiefQuests_Artis"; + mes "---"; + mes l("Quest state: @@", getq(ThiefQuests_Artis)); + .@q2=getq2(ThiefQuests_Artis); + mesf ("Gearwheels: %d (%s)", .@q2/2, (.@q2 % 2 ? "found" : "not found")); + mesf ("Henry's file: %d", getq3(ThiefQuests_Artis)); + next; + + GenericQuestDebug ThiefQuests_Artis, + ("Does not have the quest"), 0, + ("Accepted Townhall Quest"), 1, + ("Townhall arc complete"), 2, + ("Reward taken"), 3, + ("Accepted Legion Quest"), 4, + ("Legion arc comlete"), 5, + ("Reward taken (2)"), 6, + ("Nunia Quest Accepted"), 7, + ("Nunia arc comlete"), 8, + ("Reward taken (3)"), 9; + + if (@menuret < 0) + { + return; + } + + } while (1); +} diff --git a/npc/functions/quest-debug/036-HurnscaldQuests_Hinnak.txt b/npc/functions/quest-debug/050-HurnscaldQuests_Hinnak.txt index 61dc294e..31183eb8 100644 --- a/npc/functions/quest-debug/036-HurnscaldQuests_Hinnak.txt +++ b/npc/functions/quest-debug/050-HurnscaldQuests_Hinnak.txt @@ -2,7 +2,7 @@ // Author: // gumi -function script QuestDebug36 { +function script QuestDebug50 { do { clear; diff --git a/npc/functions/quest-debug/037-HurnscaldQuests_Soup.txt b/npc/functions/quest-debug/051-HurnscaldQuests_Soup.txt index 43eba0d6..44694f06 100644 --- a/npc/functions/quest-debug/037-HurnscaldQuests_Soup.txt +++ b/npc/functions/quest-debug/051-HurnscaldQuests_Soup.txt @@ -2,7 +2,7 @@ // Author: // gumi -function script QuestDebug37 { +function script QuestDebug51 { do { clear; diff --git a/npc/functions/quest-debug/038-HurnscaldQuests_Inspector.txt b/npc/functions/quest-debug/052-HurnscaldQuests_Inspector.txt index 053f085e..72d99242 100644 --- a/npc/functions/quest-debug/038-HurnscaldQuests_Inspector.txt +++ b/npc/functions/quest-debug/052-HurnscaldQuests_Inspector.txt @@ -2,7 +2,7 @@ // Author: // gumi -function script QuestDebug38 { +function script QuestDebug52 { do { clear; diff --git a/npc/functions/quest-debug/039-HurnscaldQuests_ForestBow.txt b/npc/functions/quest-debug/053-HurnscaldQuests_ForestBow.txt index c6a61a1b..2a0993e3 100644 --- a/npc/functions/quest-debug/039-HurnscaldQuests_ForestBow.txt +++ b/npc/functions/quest-debug/053-HurnscaldQuests_ForestBow.txt @@ -2,7 +2,7 @@ // Author: // gumi -function script QuestDebug39 { +function script QuestDebug53 { do { clear; diff --git a/npc/functions/quest-debug/040-HurnscaldQuests_WoodenShield.txt b/npc/functions/quest-debug/054-HurnscaldQuests_WoodenShield.txt index 05d08130..0cb3ee9d 100644 --- a/npc/functions/quest-debug/040-HurnscaldQuests_WoodenShield.txt +++ b/npc/functions/quest-debug/054-HurnscaldQuests_WoodenShield.txt @@ -2,7 +2,7 @@ // Author: // gumi -function script QuestDebug40 { +function script QuestDebug54 { do { clear; diff --git a/npc/functions/quest-debug/041-General_Cooking.txt b/npc/functions/quest-debug/055-General_Cooking.txt index 592df547..ed9fb685 100644 --- a/npc/functions/quest-debug/041-General_Cooking.txt +++ b/npc/functions/quest-debug/055-General_Cooking.txt @@ -2,7 +2,7 @@ // Author: // Jesusalva -function script QuestDebug41 { +function script QuestDebug55 { do { clear; diff --git a/npc/functions/quest-debug/042-General_Brotherhood.txt b/npc/functions/quest-debug/056-General_Brotherhood.txt index 3eb3683b..07fe568f 100644 --- a/npc/functions/quest-debug/042-General_Brotherhood.txt +++ b/npc/functions/quest-debug/056-General_Brotherhood.txt @@ -4,7 +4,7 @@ // monwarez // jesusalva -function script QuestDebug42 { +function script QuestDebug56 { do { clear; diff --git a/npc/functions/quest-debug/028-General_Narrator.txt b/npc/functions/quest-debug/100-General_Narrator.txt index 408668b7..22737c90 100644 --- a/npc/functions/quest-debug/028-General_Narrator.txt +++ b/npc/functions/quest-debug/100-General_Narrator.txt @@ -2,7 +2,7 @@ // Author: // gumi -function script QuestDebug28 { +function script QuestDebug100 { do { clear; diff --git a/npc/functions/spotlight.txt b/npc/functions/spotlight.txt index 11ca565a..219d3a31 100644 --- a/npc/functions/spotlight.txt +++ b/npc/functions/spotlight.txt @@ -76,7 +76,7 @@ OnTouch: // npc/001-3-1/_warps.txt 001-3-1,24,58,0 duplicate(#SpotlightMaster) #SPOT001-3-1_24_58 NPC_HIDDEN,2,2 001-3-1,35,59,0 duplicate(#SpotlightMaster) #SPOT001-3-1_35_59 NPC_HIDDEN,2,2 -001-3-1,30,19,0 duplicate(#SpotlightMaster) #SPOT001-3-1_30_19 NPC_HIDDEN,2,2 +//001-3-1,30,19,0 duplicate(#SpotlightMaster) #SPOT001-3-1_30_19 NPC_HIDDEN,2,2 // npc/001-3-2/_warps.txt 001-3-2,30,117,0 duplicate(#SpotlightMaster) #SPOT001-3-2_30_117 NPC_HIDDEN,2,2 @@ -87,6 +87,6 @@ OnTouch: // npc/008-3-1/_warps.txt 008-3-1,34,34,0 duplicate(#SpotlightMaster) #SPOT008-3-1_34_34 NPC_HIDDEN,2,2 -// npc/008-4-1/_warps.txt -008-4-1,175,18,0 duplicate(#SpotlightMaster) #SPOT008-4-1_175_18 NPC_HIDDEN,2,2 +// npc/008-3-2/_warps.txt +008-3-2,175,18,0 duplicate(#SpotlightMaster) #SPOT008-3-2_175_18 NPC_HIDDEN,2,2 diff --git a/npc/functions/timer.txt b/npc/functions/timer.txt index e79070f3..fbfec3fd 100644 --- a/npc/functions/timer.txt +++ b/npc/functions/timer.txt @@ -1,3 +1,10 @@ +// addtimer2(<tick>, "<npc>::<event>") +function script addtimer2 { + deltimer(getarg(1)); + addtimer(getarg(0), getarg(1)); + return; +} + // areatimer("<map>", <x1>, <y1>, <x2>, <y2>, <tick>, "<npc>::<event>") function script areatimer { .@c = getunits(BL_PC, .@players, false, getarg(0), getarg(1), getarg(2), getarg(3), getarg(4)); diff --git a/npc/functions/treasure.txt b/npc/functions/treasure.txt new file mode 100644 index 00000000..785dd4a0 --- /dev/null +++ b/npc/functions/treasure.txt @@ -0,0 +1,134 @@ +// Moubootaur Legends functions. +// Author: +// Jesusalva +// Description: +// Random Treasure Box Utils + +function script TreasureBox { + .@id=getnpcid(); + if (RNGTREASURE_DATE[.@id] > gettimetick(2)) { + mesc l("The chest is unlocked and empty."); + close; + } + + mesc l("Open the chest?"); + mesc l("Cost: 1 %s", getitemlink(TreasureKey)), 1; + if (!countitem(TreasureKey)) + close; + next; + if (askyesno() == ASK_NO) + close; + + delitem TreasureKey, 1; + mesc l("You open the chest!"); + RNGTREASURE_DATE[.@id]=gettimetick(2)+CHEST_WAITTIME; // Minimum 15 minutes + + .@empty=getvariableofnpc(.empty, strnpcinfo(0)); + if (!.@empty) { + TREASURE_OPEN=TREASURE_OPEN+1; + .@t=TREASURE_OPEN; + .@r=rand(0,10000)-(readbattleparam(getcharid(3), UDT_LUK)*2); + + // Select treasure list + // You're warranted a rare (5%) every 25 open chests + // There's also uncommons (20%) and commons (75%) + if (.@t == 1) + .@loot=WoodenBow; + else if (.@t % 25 == 0 || .@r < 500) // Rare: 5% + .@loot=any(AtroposMixture, ElixirOfLife, BigHealing, BigMana, DeathPotion, MagicFeather); + else if (.@r < 2500) // Uncommon: 20% + .@loot=any(FatesPotion, ClothoLiquor, LachesisBrew, RedPlushWine, TreasureMap, MediumHealing, MediumMana); + else // Common: 75% + .@loot=any(Bread, Fungus, Cheese, Aquada, Croconut, PiberriesInfusion, Carrot, SmallHealing, SmallMana); + + + inventoryplace .@loot, 1; + mesc l("You find %s inside!", getitemlink(.@loot)); + getitem .@loot, 1; + } else { + mesc l("You find %s inside!", l("nothing")); + } + return; +} + +// Animation code by Evol Team +// 4144, gumi, Hal9000, Reid +// (Random) Treasure Chest +// Authored by Jesusalva +// Regenerates every 6 hours +001-3-0,0,0,0 script #chest_001-3-0 NPC_CHEST,{ + /* + // Extract the map name - Seems unused + explode(.@ni$, .name$, "_"); + .@map$=.@ni$[1]; + //if (.@map$ == "") debugmes "Error"; + */ + + // Conditionals + if (!.busy) { + TreasureBox(); + + specialeffect(.dir == 0 ? 24 : 25, AREA, getnpcid()); // closed ? opening : closing + .dir = .dir == 0 ? 2 : 6; // closed ? opening : closing + .busy = true; // lock until available again + initnpctimer; + } else { + mesc l("Someone looted this treasure box already..."); + } + close; + +OnTimer160: + .dir = .dir == 6 ? 0 : 4; // closing ? closed : open + end; + +OnTimer500: + // It's closed: Make available and stop timer + if (.dir == 0) { + .busy = false; + stopnpctimer; + } + end; + +// Autoclose +OnTimer60000: + .dir = 6; // closing + specialeffect(25, AREA, getnpcid()); // closing + setnpctimer 0; + end; + +OnInit: + .busy = false; + .distance = 2; + +OnClock0156: +OnClock0756: +OnClock1356: +OnClock1956: + // Try to warp randomly to a walkable spot, up to 20 attempts + // Otherwise, it'll stay where it already is (but will close and refill). + .@e=0; .@x=0; .@y=0; + while (!checkcell(.map$, .@x, .@y, cell_chkpass)) + { + if (.@e == 20) { + .@x=.x; + .@y=.y; + break; + } + // Remember the +20 -20 margin adjustment + .@x = rand2(20, getmapinfo(MAPINFO_SIZE_X, .map$)-20); + .@y = rand2(20, getmapinfo(MAPINFO_SIZE_X, .map$)-20); + ++.@e; + } + .busy=false; + movenpc .name$, .@x, .@y, 0; + end; +} + +// Lets bring some treasure to The Mana World +008-3-4,0,0,0 duplicate(#chest_001-3-0) #chest_008-3-4 NPC_TREASURE +008-3-5,0,0,0 duplicate(#chest_001-3-0) #chest_008-3-5 NPC_TREASURE +008-3-6,0,0,0 duplicate(#chest_001-3-0) #chest_008-3-6 NPC_TREASURE + +012-3-1,0,0,0 duplicate(#chest_001-3-0) #chest_012-3-1 NPC_TREASURE +012-3-3,0,0,0 duplicate(#chest_001-3-0) #chest_012-3-3 NPC_TREASURE + diff --git a/npc/items/shovel.txt b/npc/items/shovel.txt index fef4c24f..13aba25d 100644 --- a/npc/items/shovel.txt +++ b/npc/items/shovel.txt @@ -1,6 +1,7 @@ // Evol scripts. // Author: // Travolta +// Jesusalva // Description: // NPC to use shovel (dig, bury etc) @@ -9,10 +10,12 @@ function CheckDigLocation { getmapxy(.@map$, .@x, .@y, 0); - if (getunits(BL_NPC, .@units, 1, .@map$, .@x - 1, .@y, .@x + 1, .@y + 1)) - { - dispbottom(l("You cannot bury under a NPC!")); - return false; + if (.@map$ != "001-1") { + if (getunits(BL_NPC, .@units, 1, .@map$, .@x - 1, .@y, .@x + 1, .@y + 1)) + { + dispbottom(l("You cannot bury under a NPC!")); + return false; + } } // TODO: we should have a way to check for GROUNDTOP collisions too @@ -53,6 +56,13 @@ return 1; } + function AddMapDigRect { + .@m$=getarg(0); + .@x=getmapinfo(MAPINFO_SIZE_X, .@m$)-20; + .@y=getmapinfo(MAPINFO_SIZE_Y, .@m$)-20; + return AddDigRect(.@m$, 20, 20, .@x, .@y); + } + function PlayerIsTired { if (is_evtc()) return false; // event coordinators are never tired @@ -96,21 +106,28 @@ } function Bury { - narrator(S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("What would you like to bury?")); + narrator S_FIRST_BLANK_LINE | S_LAST_BLANK_LINE, l("What would you like to bury?"); + .@items$ = ""; + + mes "##B" + l("Drag and drop an item from your inventory.") + "##b"; - mes("##B" + l("Drag and drop an item from your inventory.") + "##b"); .@id = requestitem(); - // You cannot bury: Items you don't have, your shovel, Bound Items, and items which are not dropped by any mobs. - // The "item not dropped by any mob" is temporary, and should be replaced by "items with trade restrictions" later. [JESUS] - // event coordinators can always bury - if (!is_evtc() && (.@id < 1 || countitem(.@id) < 1 || - compare(getitemname(.@id), "shovel") || checkbound(.@id) || - !getiteminfo(.@id, ITEMINFO_MAXCHANCE))) - { - mesc(l("You cannot bury this item!")); - return false; + // If ID is invalid, there's not enough items, it is an Iron Shovel, it is bound = Cannot bury + // NOBODY bypass notrade check. (ITR_NONE is 0) + if (.@id < 1) close; + if (.@id < 1 || countitem(.@id) < 1 || .@id == IronShovel || checkbound(.@id) || + (!getiteminfo(.@id, ITEMINFO_TRADE)) + ) { + @ShovelLastUsed = 0; + if (.@id == IronShovel || .@id == SteelShovel || checkbound(.@id)) + mesc l("You cannot bury this item!"); + else if (!getiteminfo(.@id, ITEMINFO_TRADE)) + mesc l("This item is too precious, you cannot part with it!"); + else + mesc l("You give up."); + close; + return; } .@amount = 1; @@ -193,7 +210,18 @@ OnHour00: OnInit: .PlayerTiredTime = 20; - AddDigRect("001-1", 172, 26, 200, 48); + + // Partial maps + AddDigRect("001-1", 172, 26, 200, 48); + AddDigRect("001-1", 198, 60, 201, 63); + AddDigRect("008-1-1", 32, 42, 46, 88); + AddDigRect("008-1-2", 40, 52, 114, 146); + AddDigRect("012-1", 44, 21, 139, 47); + + // Whole maps + AddMapDigRect("008-1"); + AddMapDigRect("008-3-5"); + AddMapDigRect("012-3-1"); end; } @@ -235,3 +263,97 @@ function script shovel_adddigrect { set getvariableofnpc(.WorldDigRect_y2[.@size], strnpcinfo(3)), .@y2; return 1; } + +// [Treasure Map] functions + +function script shovel_getcity { + .@a$=getarg(0); + + // else is not required (return prevails) + if (.@a$ == "001-1") + return l("Artis East Beach"); + if (.@a$ == "008-1") + return l("East Woodlands"); + if (.@a$ == "008-1-1") + return l("West Woodland Beach"); + if (.@a$ == "008-1-2") + return l("Swamps"); + if (.@a$ == "008-3-5") + return l("Hurnscald Bandit Cave"); + if (.@a$ == "012-1") + return l("Candor North"); + if (.@a$ == "012-3-1") + return l("Candor Main Cave"); + + return .@a$; +} + +function script shovel_randomtreasure { + .@id=any(TreasureKey,CoinBag,CoinBag,CoinBag,Coal, + Diamond,Ruby,Emerald,Sapphire,Topaz,Amethyst, + MaggotSlimePotion, LargeMana, LargeHealing); + delitem TreasureMap, 1; + .@amount=any(1,1,2); + // Very Commons + if (.@id == CoinBag || .@id == MaggotSlimePotion || .@id == TreasureKey) + .@amount+=any(0,1,0,1,2); + // Super commons + if (.@id == LargeMana || .@id == LargeHealing) + .@amount+=rand2(0,8); + // Rares + if (.@id == Coal) + .@amount=1; + getitem .@id, .@amount; + ShovelQuests_AssignedMAP$=""; + ShovelQuests_AssignedX=0; + ShovelQuests_AssignedY=0; + + mesn strcharinfo(0); + mesc l("You found something!"); + mesc l("It's %d %s.", .@amount, getitemlink(.@id)); + next; + closeclientdialog; + return; +} + +function script shovel_genrandtreasure { + .@m$=any("008-1", "008-1-1", "008-1-2", "008-3-5", + "012-1", "012-3-1"); + + // Prepare good defaults + .@x1=.@y1=20; + .@x2=getmapinfo(MAPINFO_SIZE_X, .@m$)-20; + .@y2=getmapinfo(MAPINFO_SIZE_Y, .@m$)-20; + + // Default overrides + if (.@m$ == "008-1-1") { + // West Woodland Beach + .@x1=32; .@y1=42; + .@x2=46; .@y2=88; + } else if (.@m$ == "008-1-2") { + // Swamps + .@x1=40; .@y1=52; + .@x2=114; .@y2=146; + } else if (.@m$ == "012-1") { + // Candor North + .@x1=44; .@y1=139; + .@x2=21; .@y2=47; + } + + // Dangerous, but I never had issues with this + do { + .@x=rand2(.@x1, .@x2); + .@y=rand2(.@y1, .@y2); + } while (!checkcell(.@m$, .@x, .@y, cell_chkpass)); + + // Success + if (checkcell(.@m$, .@x, .@y, cell_chkpass)) { + shovel_addquest(.@m$, .@x, .@y, "shovel_randomtreasure"); + ShovelQuests_AssignedMAP$=shovel_getcity(.@m$); + ShovelQuests_AssignedX=.@x; + ShovelQuests_AssignedY=.@y; + } + return; +} + + diff --git a/npc/scripts.conf b/npc/scripts.conf index cce40899..a42bd0b5 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -12,6 +12,7 @@ "npc/functions/RNGesus.txt", "npc/functions/math.txt", "npc/functions/warp.txt", +"npc/functions/gender.txt", // Misc functions "npc/functions/main.txt", @@ -26,7 +27,6 @@ "npc/functions/hello.txt", "npc/functions/inventoryplace.txt", "npc/functions/legiontalk.txt", -"npc/functions/marriage.txt", "npc/functions/npcmove.txt", "npc/functions/masks.txt", "npc/functions/spotlight.txt", @@ -47,15 +47,20 @@ "npc/functions/riddle.txt", "npc/functions/bank.txt", "npc/functions/confused-tree-dict.txt", -"npc/functions/util.txt", +"npc/functions/treasure.txt", // May rely on custom functions and thus must be handled by last +"npc/functions/util.txt", +"npc/functions/faction.txt", "npc/functions/scoreboards.txt", "npc/functions/manhole.txt", "npc/functions/skills.txt", +"npc/functions/lockpicks.txt", // quest debug "npc/functions/quest-debug/functions.txt", + +// Drasil Island "npc/functions/quest-debug/000-ShipQuests_Julia.txt", "npc/functions/quest-debug/001-ShipQuests_Arpan.txt", "npc/functions/quest-debug/002-ShipQuests_Alige.txt", @@ -64,7 +69,7 @@ "npc/functions/quest-debug/005-ShipQuests_Knife.txt", "npc/functions/quest-debug/006-ShipQuests_ArpanMoney.txt", "npc/functions/quest-debug/007-ShipQuests_Door.txt", -// 008: ??? +"npc/functions/quest-debug/008-ShipQuests_Couwan.txt", "npc/functions/quest-debug/009-ShipQuests_TreasureChest.txt", "npc/functions/quest-debug/010-ShipQuests_Ale.txt", "npc/functions/quest-debug/011-ShipQuests_Astapolos.txt", @@ -75,30 +80,38 @@ "npc/functions/quest-debug/016-ShipQuests_Gugli.txt", "npc/functions/quest-debug/017-ShipQuests_ChefGado.txt", "npc/functions/quest-debug/018-General_Cookies.txt", -"npc/functions/quest-debug/019-ArtisQuests_LazyBrother.txt", -"npc/functions/quest-debug/020-ArtisQuests_Urchin.txt", -"npc/functions/quest-debug/021-ArtisQuests_CatchPiou.txt", -"npc/functions/quest-debug/022-ArtisQuests_Fishman.txt", -"npc/functions/quest-debug/023-ArtisQuests_QOnan.txt", -// 024: removed quest (Halloween_VisitArtis) -// 025: removed quest (Halloween_BarrelQuest) + +// Artis Town +"npc/functions/quest-debug/020-ArtisQuests_LazyBrother.txt", +"npc/functions/quest-debug/021-ArtisQuests_Urchin.txt", +"npc/functions/quest-debug/022-ArtisQuests_CatchPiou.txt", +"npc/functions/quest-debug/023-ArtisQuests_Fishman.txt", +"npc/functions/quest-debug/024-ArtisQuests_QOnan.txt", +// 025: ID AVAILABLE "npc/functions/quest-debug/026-General_Rumly.txt", "npc/functions/quest-debug/027-ArtisQuests_Enora.txt", -"npc/functions/quest-debug/028-General_Narrator.txt", +// 028: ID AVAILABLE "npc/functions/quest-debug/029-ArtisQuests_Fexil.txt", "npc/functions/quest-debug/030-ArtisQuests_Lloyd.txt", "npc/functions/quest-debug/031-General_Janus.txt", "npc/functions/quest-debug/032-ArtisQuests_MonaDad.txt", "npc/functions/quest-debug/033-Artis_Legion_Progress.txt", "npc/functions/quest-debug/034-ArtisQuests_TrainingLegion.txt", -// 035: ??? -"npc/functions/quest-debug/036-HurnscaldQuests_Hinnak.txt", -"npc/functions/quest-debug/037-HurnscaldQuests_Soup.txt", -"npc/functions/quest-debug/038-HurnscaldQuests_Inspector.txt", -"npc/functions/quest-debug/039-HurnscaldQuests_ForestBow.txt", -"npc/functions/quest-debug/040-HurnscaldQuests_WoodenShield.txt", -"npc/functions/quest-debug/041-General_Cooking.txt", -"npc/functions/quest-debug/042-General_Brotherhood.txt", +"npc/functions/quest-debug/035-ThiefQuests_Artis.txt", + +// Argaes Quests +"npc/functions/quest-debug/050-HurnscaldQuests_Hinnak.txt", +"npc/functions/quest-debug/051-HurnscaldQuests_Soup.txt", +"npc/functions/quest-debug/052-HurnscaldQuests_Inspector.txt", +"npc/functions/quest-debug/053-HurnscaldQuests_ForestBow.txt", +"npc/functions/quest-debug/054-HurnscaldQuests_WoodenShield.txt", +"npc/functions/quest-debug/055-General_Cooking.txt", +"npc/functions/quest-debug/056-General_Brotherhood.txt", + +// Event and General Quests +"npc/functions/quest-debug/100-General_Narrator.txt", +// 101: removed quest (Halloween_VisitArtis) +// 102: removed quest (Halloween_BarrelQuest) // Item functions "npc/items/cookie.txt", @@ -126,6 +139,8 @@ "npc/commands/debug.txt", "npc/commands/super-menu.txt", "npc/commands/resync.txt", +"npc/commands/python.txt", +"npc/commands/gender.txt", // config script "npc/config/hairstyle_config.txt", diff --git a/npc/sec_pri/_import.txt b/npc/sec_pri/_import.txt index eb01ab3b..e6c274dd 100644 --- a/npc/sec_pri/_import.txt +++ b/npc/sec_pri/_import.txt @@ -1,2 +1,3 @@ // Map sec_pri: Jail // This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/sec_pri/redirect.txt", diff --git a/npc/sec_pri/redirect.txt b/npc/sec_pri/redirect.txt new file mode 100644 index 00000000..bd46b987 --- /dev/null +++ b/npc/sec_pri/redirect.txt @@ -0,0 +1,12 @@ +// The Mana World Script +// Author: +// Jesusalva +// Controls additional jail cells + +sec_pri,49,75,0 script #JailIntWarp NPC_HIDDEN,0,0,{ + end; + +OnTouch: + slide any(29, 33), 75; + end; +} diff --git a/npc/test/_import.txt b/npc/test/_import.txt index 6c7f7e71..69324674 100644 --- a/npc/test/_import.txt +++ b/npc/test/_import.txt @@ -8,6 +8,5 @@ "npc/test/npc4.txt", "npc/test/npc5.txt", "npc/test/npc6.txt", -"npc/test/npcmarriage.txt", "npc/test/test1.txt", "npc/test/test2.txt", diff --git a/npc/test/npcmarriage.txt b/npc/test/npcmarriage.txt deleted file mode 100644 index 1b7497bd..00000000 --- a/npc/test/npcmarriage.txt +++ /dev/null @@ -1,19 +0,0 @@ -// Evol scripts. -// Author: -// 4144 -// Description: -// npc marriage - -test,25,14,0 script marriage1 NPC_PLAYER,{ - marriagemain(); - close; - -OnTimer30000: - marriagecheck(); - end; - -OnInit: - .sex = G_MALE; - .distance = 3; - initnpctimer; -} |