diff options
34 files changed, 92 insertions, 53 deletions
diff --git a/world/map/data/005-3.wlk b/world/map/data/005-3.wlk Binary files differindex a1dcecee..26dc436d 100644 --- a/world/map/data/005-3.wlk +++ b/world/map/data/005-3.wlk diff --git a/world/map/data/006-1.wlk b/world/map/data/006-1.wlk Binary files differindex f2de1da0..8bfc19ee 100644 --- a/world/map/data/006-1.wlk +++ b/world/map/data/006-1.wlk diff --git a/world/map/data/011-6.wlk b/world/map/data/011-6.wlk Binary files differindex 5efeeaad..5f322060 100644 --- a/world/map/data/011-6.wlk +++ b/world/map/data/011-6.wlk diff --git a/world/map/data/031-3.wlk b/world/map/data/031-3.wlk Binary files differindex 9cca1a1f..08c10d05 100644 --- a/world/map/data/031-3.wlk +++ b/world/map/data/031-3.wlk diff --git a/world/map/data/043-4.wlk b/world/map/data/043-4.wlk Binary files differindex f88880f8..04f2c2a0 100644 --- a/world/map/data/043-4.wlk +++ b/world/map/data/043-4.wlk diff --git a/world/map/db/const.txt b/world/map/db/const.txt index 0a4b5fb0..a76f16b9 100644 --- a/world/map/db/const.txt +++ b/world/map/db/const.txt @@ -413,3 +413,15 @@ G_EVENT 50 G_GM 60 G_ADMIN 80 G_SYSOP 99 + +// Server Message Types (smsg builtin) +SMSG_DEBUG 0 +SMSG_GM 1 +SMSG_WARNING 2 +SMSG_SUCCESS 3 +SMSG_FAILURE 4 +SMSG_ERROR 5 +SMSG_LEGAL 6 +SMSG_MOTD 7 +SMSG_AUTOMATIC 8 +SMSG_EVENT 9 diff --git a/world/map/db/item_db_head.txt b/world/map/db/item_db_head.txt index 7ecec5b3..1f819e67 100644 --- a/world/map/db/item_db_head.txt +++ b/world/map/db/item_db_head.txt @@ -77,7 +77,7 @@ 1174, CashiersShade, 5, 4000, 500, 15, 0, 2, 0, -10, 0, 2, 256, 0, 0, 0, {}, {} 1175, AutumnMask, 5, 5000, 500, 10, 0, 1, 0, 4, 0, 2, 256, 0, 0, 0, {}, {} 1190, NutcrackerHat, 5, 1000, 500, 20, 0, 5, 0, 2, 0, 2, 256, 0, 0, 0, {}, {} -1196, Beret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {bonus bAgi, 2;}, {} +1196, Beret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {}, {bonus bAgi, 2;} 1203, RangerHat, 5, 1000, 500, 20, 0, 2, 0, -1, 0, 2, 256, 0, 0, 0, {}, {} 1204, AntlerHat, 5, 1000, 500, 15, 0, 4, 0, 2, 0, 2, 256, 0, 0, 0, {}, {} 1205, ChristmasTreeHat, 5, 2000, 1000, 20, 0, 2, 0, 4, 0, 2, 256, 0, 0, 0, {}, {} @@ -159,16 +159,16 @@ 2237, OrangeBowlerHatBrown, 5, 2500, 1250, 30, 0, 10, 0, 2, 0, 2, 256, 0, 0, 0, {}, {} 2238, PurpleBowlerHatBrown, 5, 2500, 1250, 30, 0, 10, 0, 2, 0, 2, 256, 0, 0, 0, {}, {} 2239, DarkGreenBowlerHatBrown, 5, 2500, 1250, 30, 0, 10, 0, 2, 0, 2, 256, 0, 0, 0, {}, {} -2260, RedBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {bonus bAgi, 2;}, {} -2261, GreenBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {bonus bAgi, 2;}, {} -2262, DarkBlueBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {bonus bAgi, 2;}, {} -2263, YellowBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {bonus bAgi, 2;}, {} -2264, LightBlueBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {bonus bAgi, 2;}, {} -2265, PinkBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {bonus bAgi, 2;}, {} -2266, BlackBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {bonus bAgi, 2;}, {} -2267, OrangeBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {bonus bAgi, 2;}, {} -2268, PurpleBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {bonus bAgi, 2;}, {} -2269, DarkGreenBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {bonus bAgi, 2;}, {} +2260, RedBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {}, {bonus bAgi, 2;} +2261, GreenBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {}, {bonus bAgi, 2;} +2262, DarkBlueBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {}, {bonus bAgi, 2;} +2263, YellowBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {}, {bonus bAgi, 2;} +2264, LightBlueBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {}, {bonus bAgi, 2;} +2265, PinkBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {}, {bonus bAgi, 2;} +2266, BlackBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {}, {bonus bAgi, 2;} +2267, OrangeBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {}, {bonus bAgi, 2;} +2268, PurpleBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {}, {bonus bAgi, 2;} +2269, DarkGreenBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {}, {bonus bAgi, 2;} //ID, Name___________________, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, {UseScript}, {EquipScript} 4020, CandleHelmet, 5, 20000, 2000, 450, 0, 16, 0, -25, 0, 2, 256, 0, 0, 0, {}, {bonus bInt, 1;bonus bAgi, -1;} 4027, YetiMask, 5, 6000, 3000, 10, 0, 4, 0, -10, 0, 2, 256, 0, 0, 0, {}, {} diff --git a/world/map/db/params.txt b/world/map/db/params.txt index 2bf45896..66a5f1bb 100644 --- a/world/map/db/params.txt +++ b/world/map/db/params.txt @@ -52,3 +52,5 @@ PVP_CHANNEL 1076 1 BL_ID 1077 1 BL_TYPE 1078 1 CHAR_ID 1079 1 +INVISIBLE 1080 1 +HIDDEN 1081 1 diff --git a/world/map/npc/001-2/_nodes.txt b/world/map/npc/001-2/_nodes.txt index 5a5cdeac..9d4b5dab 100644 --- a/world/map/npc/001-2/_nodes.txt +++ b/world/map/npc/001-2/_nodes.txt @@ -6,8 +6,8 @@ end; OnInit: setarray .m$, "_N-Alchemy", "001-2", "001-2", "001-2", "001-2"; - setarray .x1, "_N-Alchemy", 98, 92, 98, 92; - setarray .y1, "_N-Alchemy", 76, 76, 89, 89; + setarray .x1, "_N-Alchemy", 92, 98, 92, 98; + setarray .y1, "_N-Alchemy", 76, 89, 89, 76; setarray .x2, "_N-Alchemy", 0, 0, 0, 0; setarray .y2, "_N-Alchemy", 0, 0, 0, 0; setarray .id, "_N-Alchemy", 0, 0, 0, 0; diff --git a/world/map/npc/002-1/_warps.txt b/world/map/npc/002-1/_warps.txt index 4350dc94..55271d57 100644 --- a/world/map/npc/002-1/_warps.txt +++ b/world/map/npc/002-1/_warps.txt @@ -14,6 +14,6 @@ 002-1,73,35|warp|-1,-1,002-2,44,33 002-1,57,35|warp|-1,-1,002-2,120,94 002-1,67,29|warp|-1,-1,002-2,23,109 -002-1,113,107|warp|-1,-1,005-3,52,35 +002-1,113,107|warp|-1,-1,005-3,52,37 002-1,49,20|warp|-1,-1,004-3,24,94 002-1,57,26|warp|-1,-1,002-2,119,131 diff --git a/world/map/npc/005-3/_mobs.txt b/world/map/npc/005-3/_mobs.txt index 79168aba..2bcda8e6 100644 --- a/world/map/npc/005-3/_mobs.txt +++ b/world/map/npc/005-3/_mobs.txt @@ -1,6 +1,8 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. // Snake Pit mobs -005-3,58,57,62,57|monster|Snake|1010,50,100000ms,30000ms -005-3,58,57,62,57|monster|BlackScorpion|1009,15,100000ms,30000ms -005-3,58,57,62,57|monster|GiantMaggot|1006,20,100000ms,30000ms +005-3,59,63,48,57|monster|Snake|1010,50,100000ms,30000ms +005-3,56,64,53,49|monster|BlackScorpion|1009,15,100000ms,30000ms +005-3,59,68,58,42|monster|GiantMaggot|1006,20,100000ms,30000ms +005-3,95,52,10,61|monster|Troll|1054,7,100000ms,30000ms +005-3,53,26,64,12|monster|Troll|1054,5,100000ms,30000ms diff --git a/world/map/npc/005-3/_warps.txt b/world/map/npc/005-3/_warps.txt index 02894dc8..c1877197 100644 --- a/world/map/npc/005-3/_warps.txt +++ b/world/map/npc/005-3/_warps.txt @@ -1,10 +1,14 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. // Snake Pit warps -005-3,52,33|warp|-1,-1,002-1,113,109 -005-3,63,46|warp|-1,-1,006-3,89,45 -005-3,85,49|warp|-1,-1,006-3,125,65 -005-3,86,30|warp|-1,-1,006-1,55,47 -005-3,73,60|warp|-1,-1,006-1,51,69 -005-3,78,88|warp|-1,-1,043-3,116,37 -005-3,33,82|warp|-1,-1,043-3,31,35 +005-3,52,35|warp|-1,-1,002-1,113,109 +005-3,63,48|warp|-1,-1,006-3,89,45 +005-3,85,51|warp|-1,-1,006-3,125,65 +005-3,86,32|warp|-1,-1,006-1,55,47 +005-3,73,62|warp|-1,-1,006-1,51,69 +005-3,78,90|warp|-1,-1,043-3,116,37 +005-3,33,84|warp|-1,-1,043-3,31,35 +005-3,107,102|warp|-1,-1,006-1,64,78 +005-3,27,41|warp|-1,-1,043-5,126,27 +005-3,101,30|warp|-1,-1,005-3,101,35 +005-3,110,79|warp|-1,-1,005-3,110,75 diff --git a/world/map/npc/006-1/_warps.txt b/world/map/npc/006-1/_warps.txt index c1d32cc9..1a2b0169 100644 --- a/world/map/npc/006-1/_warps.txt +++ b/world/map/npc/006-1/_warps.txt @@ -27,6 +27,7 @@ 006-1,21,108|warp|-1,-1,006-2,65,72 006-1,37,26|warp|-1,-1,006-1,37,23 006-1,37,24|warp|-1,-1,006-1,37,27 -006-1,55,46|warp|-1,-1,005-3,86,31 +006-1,55,46|warp|-1,-1,005-3,86,33 006-1,20,48|warp|-1,0,002-1,118,95 -006-1,51,68|warp|-1,-1,005-3,73,59 +006-1,51,68|warp|-1,-1,005-3,73,61 +006-1,64,77|warp|-1,-1,005-3,107,101 diff --git a/world/map/npc/006-3/_warps.txt b/world/map/npc/006-3/_warps.txt index 67c33574..7ecb5a5b 100644 --- a/world/map/npc/006-3/_warps.txt +++ b/world/map/npc/006-3/_warps.txt @@ -19,5 +19,5 @@ 006-3,51,90|warp|-1,-1,006-1,51,92 006-3,38,121|warp|-1,-1,006-1,38,123 006-3,79,120|warp|-1,-1,006-1,83,119 -006-3,125,66|warp|-1,-1,005-3,85,50 -006-3,89,46|warp|-1,-1,005-3,63,47 +006-3,125,66|warp|-1,-1,005-3,85,52 +006-3,89,46|warp|-1,-1,005-3,63,49 diff --git a/world/map/npc/009-2/nurse.txt b/world/map/npc/009-2/nurse.txt index 8a5b3862..efad521a 100644 --- a/world/map/npc/009-2/nurse.txt +++ b/world/map/npc/009-2/nurse.txt @@ -240,7 +240,6 @@ L_Exp_Game: "Alright.", L_Game; L_Game: - set @Q_poison, @Q_poison + 1; callsub S_Update_Var; // healing, venom, stabilizer callsub L_Load_Need; @@ -331,6 +330,8 @@ L_choosePut: mes "You lift the glass to your lips and drink it all at once."; next; + set @Q_poison, @Q_poison + 1; + if ( (@hlPut > @hlNeed) && (@vnPut > @vnNeed) ) goto L_m_hl_m_vn; if ( (@hlPut > @hlNeed) && (@vnPut <= @vnNeed) ) diff --git a/world/map/npc/043-3/_warps.txt b/world/map/npc/043-3/_warps.txt index bb55583c..da8eed49 100644 --- a/world/map/npc/043-3/_warps.txt +++ b/world/map/npc/043-3/_warps.txt @@ -4,4 +4,4 @@ 043-3,31,26|warp|-1,-1,002-3,22,86 043-3,77,30|warp|-1,-1,043-4,47,67 043-3,116,36|warp|-1,-1,005-3,78,87 -043-3,32,37|warp|0,-1,005-3,33,83 +043-3,32,37|warp|0,-1,005-3,33,85 diff --git a/world/map/npc/043-4/_import.txt b/world/map/npc/043-4/_import.txt index 83403eaf..4f3ccd45 100644 --- a/world/map/npc/043-4/_import.txt +++ b/world/map/npc/043-4/_import.txt @@ -1,4 +1,4 @@ -// Map 043-4: Sandy Dungeon Level 2 +// Map 043-4: Troll Cave // This file is generated automatically. All manually added changes will be removed when running the Converter. map: 043-4 npc: npc/043-4/_mobs.txt diff --git a/world/map/npc/043-4/_mobs.txt b/world/map/npc/043-4/_mobs.txt index ae7678e6..2d410126 100644 --- a/world/map/npc/043-4/_mobs.txt +++ b/world/map/npc/043-4/_mobs.txt @@ -1,5 +1,5 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. -// Sandy Dungeon Level 2 mobs +// Troll Cave mobs 043-4,139,163,7,6|monster|Terranite|1062,2,240000ms,120000ms 043-4,133,45,14,16|monster|UndeadTroll|1117,4,100000ms,50000ms diff --git a/world/map/npc/043-4/_nodes.txt b/world/map/npc/043-4/_nodes.txt index f334a483..2e89bc1e 100644 --- a/world/map/npc/043-4/_nodes.txt +++ b/world/map/npc/043-4/_nodes.txt @@ -1,4 +1,4 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. -// Sandy Dungeon Level 2 nodes +// Troll Cave nodes // (no nodes) diff --git a/world/map/npc/043-4/_warps.txt b/world/map/npc/043-4/_warps.txt index e10f3bfb..27f75e1c 100644 --- a/world/map/npc/043-4/_warps.txt +++ b/world/map/npc/043-4/_warps.txt @@ -1,6 +1,7 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. -// Sandy Dungeon Level 2 warps +// Troll Cave warps 043-4,47,68|warp|-1,-1,043-3,77,31 043-4,153,27|warp|-1,-1,043-4,193,32 043-4,193,33|warp|-1,-1,043-4,153,28 +043-4,194,24|warp|-1,-1,043-5,30,107 diff --git a/world/map/npc/055-1/_nodes.txt b/world/map/npc/055-1/_nodes.txt index e6da33ea..4abefb02 100644 --- a/world/map/npc/055-1/_nodes.txt +++ b/world/map/npc/055-1/_nodes.txt @@ -6,10 +6,10 @@ end; OnInit: setarray .m$, "_N-Pumpkin", "055-1", "055-1", "055-1"; - setarray .x1, "_N-Pumpkin", 129, 133, 41; - setarray .y1, "_N-Pumpkin", 23, 27, 22; - setarray .x2, "_N-Pumpkin", 135, 139, 47; - setarray .y2, "_N-Pumpkin", 26, 33, 30; + setarray .x1, "_N-Pumpkin", 129, 41, 133; + setarray .y1, "_N-Pumpkin", 23, 22, 27; + setarray .x2, "_N-Pumpkin", 135, 47, 139; + setarray .y2, "_N-Pumpkin", 26, 30, 33; setarray .id, "_N-Pumpkin", 0, 0, 0; donpcevent "_N-Pumpkin::OnMaybeStart"; destroy; diff --git a/world/map/npc/functions/DyeConfig.txt b/world/map/npc/functions/DyeConfig.txt index e2d9640e..999f6722 100644 --- a/world/map/npc/functions/DyeConfig.txt +++ b/world/map/npc/functions/DyeConfig.txt @@ -8,8 +8,8 @@ OnInit: setarray $@DYE_color_names$, "Red", "Green", "Dark Blue", "Yellow", "Light blue", "Pink", "Black", "Orange", "Purple", "Dark Green"; setarray $@DYE_colors$, "Red", "Green", "DarkBlue", "Yellow", "LightBlue", "Pink", "Black", "Orange", "Purple", "DarkGreen"; - setarray $@DYE_items$, "CottonShirt", "CottonCloth", "VNeckSweater", "Turtleneck", "CottonShorts", "CottonTrousers", "CottonSkirt", "Miniskirt", "TankTop", "ShortTankTop", "SilkRobe", "CottonHeadband", "DesertHat", "CottonBoots", "CottonGloves", "RabbitEars", "WizardHat", "BowlerHat", "BowlerHatBrown", "FineDress", "Contributor", "SorcererRed", "SorcererGreen", "SorcererDBlue", "SorcererYellow", "SorcererLBlue", "SorcererPink", "SorcererBlack", "SorcererOrange", "SorcererPurple", "SorcererDGreen", "SorcererWhite"; - setarray $@DYE_item_names$, "Cotton Shirt", "Cotton Cloth", "V-Neck Sweater", "Turtleneck Sweater", "Cotton Shorts", "Cotton Trousers", "Cotton Skirt", "Miniskirt", "Tank Top", "Short Tank Top", "Silk Robe", "Cotton Headband", "Desert Hat", "Cotton Boots", "Cotton Gloves", "Rabbit Ears", "Wizard Hat", "Bowler Hat", "Bowler Hat (brown)", "Fine Dress", "Contributor Shirt", "Sorcerer Robe (Red)", "Sorcerer Robe (Green)", "Sorcerer Robe (Dark Blue)", "Sorcerer Robe (Yellow)", "Sorcerer Robe (Light Blue)", "Sorcerer Robe (Pink)", "Sorcerer Robe (Black)", "Sorcerer Robe (Orange)", "Sorcerer Robe (Purple)", "Sorcerer Robe (Dark Green)", "Sorcerer Robe (White)"; + setarray $@DYE_items$, "Beret", "CottonShirt", "CottonCloth", "VNeckSweater", "Turtleneck", "CottonShorts", "CottonTrousers", "CottonSkirt", "Miniskirt", "TankTop", "ShortTankTop", "SilkRobe", "CottonHeadband", "DesertHat", "CottonBoots", "CottonGloves", "RabbitEars", "WizardHat", "BowlerHat", "BowlerHatBrown", "FineDress", "Contributor", "SorcererRed", "SorcererGreen", "SorcererDBlue", "SorcererYellow", "SorcererLBlue", "SorcererPink", "SorcererBlack", "SorcererOrange", "SorcererPurple", "SorcererDGreen", "SorcererWhite"; + setarray $@DYE_item_names$, "Beret", "Cotton Shirt", "Cotton Cloth", "V-Neck Sweater", "Turtleneck Sweater", "Cotton Shorts", "Cotton Trousers", "Cotton Skirt", "Miniskirt", "Tank Top", "Short Tank Top", "Silk Robe", "Cotton Headband", "Desert Hat", "Cotton Boots", "Cotton Gloves", "Rabbit Ears", "Wizard Hat", "Bowler Hat", "Bowler Hat (brown)", "Fine Dress", "Contributor Shirt", "Sorcerer Robe (Red)", "Sorcerer Robe (Green)", "Sorcerer Robe (Dark Blue)", "Sorcerer Robe (Yellow)", "Sorcerer Robe (Light Blue)", "Sorcerer Robe (Pink)", "Sorcerer Robe (Black)", "Sorcerer Robe (Orange)", "Sorcerer Robe (Purple)", "Sorcerer Robe (Dark Green)", "Sorcerer Robe (White)"; /****************************** Config Ends Here ******************************/ diff --git a/world/map/npc/functions/global_event_handler.txt b/world/map/npc/functions/global_event_handler.txt index 4d453c83..ad1ba65c 100644 --- a/world/map/npc/functions/global_event_handler.txt +++ b/world/map/npc/functions/global_event_handler.txt @@ -13,6 +13,7 @@ OnPCLoginEvent: callfunc "ClearVariables"; // removes / converts old variables callfunc "DisplayMOTD"; // send the motd to the client, if enabled callfunc "getBroadcast"; // get the scheduled broadcast, if any + addtimer 0, "Magic Timer::OnLogin"; // prevent cast rate abuse // add more here set @login_event, 2; end; @@ -29,7 +30,7 @@ OnPCDieEvent: callfunc "fightclub_GoBack"; // this used by the battle master //callfunc "fightclub_event_die"; // this is used by the 1v1 arena set @necromancer, 0; - set @_M_BLOCK, 0; // reset magic block on death + addtimer 0, "Magic Timer::OnClear"; // reset magic block on death set @killerrid, 0; // reset killer rid end; diff --git a/world/map/npc/magic/_procedures.txt b/world/map/npc/magic/_procedures.txt index 466d8ca8..b53aaa7c 100644 --- a/world/map/npc/magic/_procedures.txt +++ b/world/map/npc/magic/_procedures.txt @@ -12,6 +12,12 @@ function|script|magic_register -|script|Magic Timer|32767 { end; + +OnLogin: + set @_M_BLOCK, 1; + addtimer 10000, "Magic Timer::OnClear"; + end; + OnClear: set @_M_BLOCK, 0; end; @@ -21,9 +27,11 @@ OnClear: function|script|magic_checks { set .@r, 0; - if(getpvpflag(1)) set .@r, 1; // FIXME: make HIDDEN into a param + if(HIDDEN) set .@r, 1; // can not cast with @hide if(@_M_BLOCK) set .@r, 2; // check if last debuff ended if(Hp < 1) set .@r, 3; // can not cast when dead + if (.@r) + smsg SMSG_FAILURE, "Magic: Impossible to cast right now."; return .@r; } diff --git a/world/map/npc/magic/level1-lesser-heal.txt b/world/map/npc/magic/level1-lesser-heal.txt index fcd9897a..d03031d6 100644 --- a/world/map/npc/magic/level1-lesser-heal.txt +++ b/world/map/npc/magic/level1-lesser-heal.txt @@ -4,7 +4,8 @@ if (Sp < 6) end; if (getskilllv(SKILL_MAGIC) < .level) end; set @target_id, getcharid(3, @args$); - if (@target_id < 1 || !(isloggedin(@target_id))) set @target_id, BL_ID; // fallback to self + if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id) == 1) + set @target_id, BL_ID; // fallback to self if (@args$ == "Mouboo" || @args$ == "mouboo") set @target_id, getnpcid("Mouboo"); set .@range, (((MATK1 + getskilllv(SKILL_MAGIC) + getskilllv(.school) + 10) / 100) + 2); if (distance(BL_ID, @target_id) >= .@range) end; diff --git a/world/map/npc/magic/level1-sense-spouse.txt b/world/map/npc/magic/level1-sense-spouse.txt index 1766276c..fe95c094 100644 --- a/world/map/npc/magic/level1-sense-spouse.txt +++ b/world/map/npc/magic/level1-sense-spouse.txt @@ -5,7 +5,7 @@ goto L_NotMarried; if (isloggedin(.@m) < 1) goto L_NotOnline; - if (sc_check(SC_HIDE, .@m) || getpvpflag(1, .@m)) + if (sc_check(SC_HIDE, .@m) || getpvpflag(1, .@m) || get(INVISIBLE, .@m)) goto L_NotOnline; message strcharinfo(0), "Spouse : Your spouse is... somewhere."; end; diff --git a/world/map/npc/magic/level2-barrier.txt b/world/map/npc/magic/level2-barrier.txt index 3f78677b..9afd4f38 100644 --- a/world/map/npc/magic/level2-barrier.txt +++ b/world/map/npc/magic/level2-barrier.txt @@ -8,7 +8,8 @@ if (.@level <= 3 && countitem("SmallMushroom") >= 1) delitem "SmallMushroom", 1; elif (.@level <= 3) end; set @target_id, getcharid(3, @args$); - if (@target_id < 1 || !(isloggedin(@target_id))) set @target_id, BL_ID; // fallback to self + if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id) == 1) + set @target_id, BL_ID; // fallback to self set @asorm_caster, BL_ID, @target_id; if (attachrid(@target_id) != 1) end; diff --git a/world/map/npc/magic/level2-detect-players.txt b/world/map/npc/magic/level2-detect-players.txt index 9867b700..7335770c 100644 --- a/world/map/npc/magic/level2-detect-players.txt +++ b/world/map/npc/magic/level2-detect-players.txt @@ -18,7 +18,8 @@ OnPC: if (@target_id == BL_ID) end; // do not count the caster if (sc_check(SC_HIDE, @target_id)) end; // do not count players with anwiltyp - if (getpvpflag(1, @target_id)) end; // do not count invisible players + if (getpvpflag(1, @target_id)) end; // do not count hidden GMs + if (get(INVISIBLE, @target_id) == 1) end; // do not count invisible GMs if (@inwilt$ != "") set @inwilt$, @inwilt$ + ", "; set @inwilt$, @inwilt$ + strcharinfo(0, @target_id) + if_then_else(@spellpower > 99, "("+get(BaseLevel, @target_id)+")", ""); end; diff --git a/world/map/npc/magic/level2-flying-backpack.txt b/world/map/npc/magic/level2-flying-backpack.txt index b87fba02..5e19468e 100644 --- a/world/map/npc/magic/level2-flying-backpack.txt +++ b/world/map/npc/magic/level2-flying-backpack.txt @@ -14,7 +14,8 @@ misceffect FX_MAGIC_GREEN, strcharinfo(0); callfunc "magic_exp"; set @target_id, getcharid(3, @args$); - if (@target_id < 1 || !(isloggedin(@target_id))) set @target_id, BL_ID; // fallback to self + if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id) == 1) + set @target_id, BL_ID; // fallback to self if (distance(BL_ID, @target_id) >= (@spellpower/30)+2) set @target_id, BL_ID; if (BL_ID != @target_id) misceffect FX_MAGIC_GENERIC, @args$; if (BL_ID == @target_id) set @args$, strcharinfo(0); diff --git a/world/map/npc/magic/level2-happy-curse.txt b/world/map/npc/magic/level2-happy-curse.txt index 190c7d23..dbfea17a 100644 --- a/world/map/npc/magic/level2-happy-curse.txt +++ b/world/map/npc/magic/level2-happy-curse.txt @@ -1,6 +1,6 @@ -|script|happy-curse|32767 { - if(call("magic_checks")) end; + if(call("magic_checks")) end; if (Sp < 13) end; set .@level, getskilllv(.school); if (.@level < .level) end; @@ -8,7 +8,8 @@ if (.@level <= 3 && countitem("GingerBreadMan") >= 1) delitem "GingerBreadMan", 1; elif (.@level <= 3) end; set @target_id, getcharid(3, @args$); - if (@target_id < 1 || !(isloggedin(@target_id))) set @target_id, BL_ID; // fallback to self + if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id)) + set @target_id, BL_ID; // fallback to self set @_M_BLOCK, 1; // block casting, until the timer clears it addtimer 1000, "Magic Timer::OnClear"; // set the new debuff diff --git a/world/map/npc/magic/level2-hide.txt b/world/map/npc/magic/level2-hide.txt index 1895cff1..ff67e6a5 100644 --- a/world/map/npc/magic/level2-hide.txt +++ b/world/map/npc/magic/level2-hide.txt @@ -8,7 +8,8 @@ if (.@level <= 3 && countitem("CottonCloth") >= 1) delitem "CottonCloth", 1; elif (.@level <= 3) end; set @target_id, getcharid(3, @args$); - if (@target_id < 1 || !(isloggedin(@target_id))) set @target_id, BL_ID; // fallback to self + if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id)) + set @target_id, BL_ID; // fallback to self set @_M_BLOCK, 1; // block casting, until the timer clears it addtimer 1000, "Magic Timer::OnClear"; // set the new debuff diff --git a/world/map/npc/magic/level2-lay-on-hands.txt b/world/map/npc/magic/level2-lay-on-hands.txt index 4e3a1e9c..60c2fc12 100644 --- a/world/map/npc/magic/level2-lay-on-hands.txt +++ b/world/map/npc/magic/level2-lay-on-hands.txt @@ -6,7 +6,7 @@ if (getskilllv(SKILL_MAGIC) < .level) end; if (@args$ == "Mouboo" || @args$ == "mouboo") goto L_Mouboo; set @target_id, getcharid(3, @args$); - if (@target_id < 1 || !(isloggedin(@target_id))) end; + if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id)) end; if (Hp <= get(MaxHp, @target_id) / 20) end; // hp needs to be > 1/20 * target hp callfunc "adjust_spellpower"; if (distance(BL_ID, @target_id) >= (((sqrt(@spellpower)*12)+@spellpower)/100)+2) end; diff --git a/world/map/npc/magic/level2-protect.txt b/world/map/npc/magic/level2-protect.txt index e66aab3a..a3096ad7 100644 --- a/world/map/npc/magic/level2-protect.txt +++ b/world/map/npc/magic/level2-protect.txt @@ -8,7 +8,8 @@ if (.@level <= 3 && countitem("HardSpike") >= 1) delitem "HardSpike", 1; elif (.@level <= 3) end; set @target_id, getcharid(3, @args$); - if (@target_id < 1 || !(isloggedin(@target_id))) set @target_id, BL_ID; // fallback to self + if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id)) + set @target_id, BL_ID; // fallback to self set @betsanc_caster, BL_ID, @target_id; if (attachrid(@target_id) != 1) end; diff --git a/world/map/npc/magic/level3-necromancy.txt b/world/map/npc/magic/level3-necromancy.txt index ef2d761f..57f5a6cc 100644 --- a/world/map/npc/magic/level3-necromancy.txt +++ b/world/map/npc/magic/level3-necromancy.txt @@ -7,7 +7,7 @@ if (getskilllv(.school) < .level) end; if (getskilllv(SKILL_MAGIC) < .level) end; set @target_id, getcharid(3, @args$); - if (@target_id < 1 || !(isloggedin(@target_id))) end; + if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id)) end; if (get(Hp, @target_id) > 0) end; if (Hp < (get(MaxHp, @target_id) / 3)) end; // hp must be at least a third of the max hp of the target callfunc "adjust_spellpower"; |