diff --git a/data/scripts/lib/register_spells.lua b/data/scripts/lib/register_spells.lua new file mode 100644 index 000000000..fc9b0c490 --- /dev/null +++ b/data/scripts/lib/register_spells.lua @@ -0,0 +1,507 @@ +--Pre-made areas + +--Waves +AREA_SHORTWAVE3 = { + {1, 1, 1}, + {1, 1, 1}, + {0, 3, 0} + } + + AREA_WAVE10 = { + {1, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 0, 0}, + {0, 0, 0, 3, 0, 0, 0} + } + + AREA_WAVE11 = { + {1, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 0, 0, 0}, + {0, 0, 0, 3, 0, 0, 0} + } + + AREA_WAVE12 = { + {0, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 0, 0, 0}, + {0, 0, 0, 3, 0, 0, 0} + } + + AREA_WAVE13 = { + {1, 1, 1, 1, 1, 1, 1}, + {1, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 0, 0, 0}, + {0, 0, 0, 3, 0, 0, 0} + } + + AREA_WAVE4 = { + {1, 1, 1, 1, 1}, + {0, 1, 1, 1, 0}, + {0, 1, 1, 1, 0}, + {0, 0, 3, 0, 0} + } + + AREA_WAVE5 = { + {1, 1, 1, 1, 1}, + {0, 1, 1, 1, 0}, + {0, 1, 1, 1, 0}, + {0, 1, 1, 1, 0}, + {0, 0, 1, 0, 0}, + {0, 0, 3, 0, 0} + } + + AREA_WAVE6 = { + {0, 0, 0, 0, 0}, + {0, 1, 3, 1, 0}, + {0, 0, 0, 0, 0} + } + + AREA_WAVE7 = { + {1, 1, 1, 1, 1}, + {1, 1, 1, 1, 1}, + {0, 1, 1, 1, 0}, + {0, 1, 1, 1, 0}, + {0, 0, 3, 0, 0} + } + + AREA_SQUAREWAVE5 = { + {1, 1, 1}, + {1, 1, 1}, + {1, 1, 1}, + {0, 1, 0}, + {0, 3, 0} + } + + AREA_SQUAREWAVE6 = { + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + + AREA_SQUAREWAVE7 = { + {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + + --Diagonal waves + AREADIAGONAL_WAVE4 = { + {0, 0, 0, 0, 1, 0}, + {0, 0, 0, 1, 1, 0}, + {0, 0, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 0}, + {0, 0, 0, 0, 0, 3} + } + + AREADIAGONAL_SQUAREWAVE5 = { + {1, 1, 1, 0, 0}, + {1, 1, 1, 0, 0}, + {1, 1, 1, 0, 0}, + {0, 0, 0, 1, 0}, + {0, 0, 0, 0, 3} + } + + AREADIAGONAL_WAVE6 = { + {0, 0, 1}, + {0, 3, 0}, + {1, 0, 0} + } + + AREADIAGONAL_WAVE7 = { + {0, 0, 0, 0, 0, 1, 0}, + {0, 0, 0, 0, 1, 1, 0}, + {0, 0, 0, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 0}, + {0, 0, 0, 0, 0, 0, 3} + } + + --Beams + AREA_BEAM1 = { + {3} + } + + AREA_BEAM5 = { + {1}, + {1}, + {1}, + {1}, + {3} + } + + AREA_BEAM7 = { + {1}, + {1}, + {1}, + {1}, + {1}, + {1}, + {3} + } + + AREA_BEAM8 = { + {1}, + {1}, + {1}, + {1}, + {1}, + {1}, + {1}, + {3} + } + + --Diagonal Beams + AREADIAGONAL_BEAM5 = { + {1, 0, 0, 0, 0}, + {0, 1, 0, 0, 0}, + {0, 0, 1, 0, 0}, + {0, 0, 0, 1, 0}, + {0, 0, 0, 0, 3} + } + + AREADIAGONAL_BEAM7 = { + {1, 0, 0, 0, 0, 0, 0}, + {0, 1, 0, 0, 0, 0, 0}, + {0, 0, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 0, 0}, + {0, 0, 0, 0, 0, 1, 0}, + {0, 0, 0, 0, 0, 0, 3} + } + + --Circles + AREA_CIRCLE2X2 = { + {0, 1, 1, 1, 0}, + {1, 1, 1, 1, 1}, + {1, 1, 3, 1, 1}, + {1, 1, 1, 1, 1}, + {0, 1, 1, 1, 0} + } + + AREA_CIRCLE3X3 = { + {0, 0, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 1}, + {1, 1, 1, 3, 1, 1, 1}, + {1, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 0, 0} + } + + AREA_CIRCLE3X32 = { + {1, 1, 1, 1, 1, 1, 1}, + {1, 1, 1, 1, 1, 1, 1}, + {1, 1, 1, 1, 1, 1, 1}, + {1, 1, 1, 3, 1, 1, 1}, + {1, 1, 1, 1, 1, 1, 1}, + {1, 1, 1, 1, 1, 1, 1}, + {1, 1, 1, 1, 1, 1, 1} + } + + AREA_CIRCLE3X33 = { + {1, 1, 1, 1, 1, 1, 1}, + {1, 1, 1, 1, 1, 1, 1}, + {1, 1, 0, 0, 1, 1, 1}, + {1, 1, 0, 3, 1, 1, 1}, + {1, 1, 0, 1, 1, 1, 1}, + {1, 1, 1, 1, 1, 1, 1}, + {1, 1, 1, 1, 1, 1, 1} + } + + -- Crosses + AREA_CIRCLE1X1 = { + {0, 1, 0}, + {1, 3, 1}, + {0, 1, 0} + } + + AREA_CIRCLE5X5 = { + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0} + } + + AREA_CIRCLE5X5V2 = { + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} + } + + AREA_CIRCLE6X6 = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0} + } + + --Squares + AREA_SQUARE1X1 = { + {1, 1, 1}, + {1, 3, 1}, + {1, 1, 1} + } + + -- Walls + AREA_WALLFIELD = { + {1, 1, 3, 1, 1} + } + + AREADIAGONAL_WALLFIELD = { + {0, 0, 0, 0, 1}, + {0, 0, 0, 1, 1}, + {0, 1, 3, 1, 0}, + {1, 1, 0, 0, 0}, + {1, 0, 0, 0, 0}, + } + + -- Walls Energy + AREA_WALLFIELD_ENERGY = { + {1, 1, 1, 3, 1, 1, 1} + } + + AREADIAGONAL_WALLFIELD_ENERGY = { + {0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 1, 1}, + {0, 0, 0, 0, 1, 1, 0}, + {0, 0, 1, 3, 1, 0, 0}, + {0, 1, 1, 0, 0, 0, 0}, + {0, 1, 0, 0, 0, 0, 0}, + {1, 0, 0, 0, 0, 0, 0}, + } + + -- Spells-only arrays + + --This HUGE array contains all corpses of the game, until protocol 8.0 + -- It is used on animate dead rune and on undead legion spell. No unmoveable corpses are there. + CORPSES = { + 2806,2807,2808,2809,2810,2811,2812,2813,2814,2815,2816,2817,2818,2819,2820,2821,2822,2823, + 2824,2825,2826,2827,2828,2829,2830,2831,2832,2833,2834,2835,2836,2837,2838,2839,2840,2841, + 2842,2843,2844,2845,2846,2847,2848,2849,2850,2851,2852,2853,2854,2855,2856,2857,2858,2859, + 2879,2880,2881,2882,2883,2884,2885,2886,2887,2888,2889,2890,2891,2892,2893,2894,2895,2896, + 2897,2898,2899,2900,2901,2902,2903,2904,2905,2906,2907,2908,2909,2910,2911,2912,2913,2914, + 2915,2916,2917,2918,2919,2920,2921,2922,2923,2924,2925,2926,2927,2928,2929,2930,2931,2932, + 2933,2934,2935,2936,2937,2938,2939,2940,2941,2942,2943,2944,2945,2946,2947,2948,2949,2950, + 2951,2952,2953,2954,2955,2956,2957,2958,2959,2960,2961,2962,2963,2964,2965,2966,2967,2968, + 2969,2970,2971,2972,2973,2974,2975,2976,2977,2978,2979,2980,2981,2982,2983,2984,2985,2986, + 2987,2988,2989,2990,2991,2992,2993,2994,2995,2996,2997,2998,2999,3000,3001,3002,3003,3004, + 3005,3006,3007,3008,3009,3010,3011,3012,3013,3014,3015,3016,3017,3018,3019,3020,3021,3022, + 3023,3024,3025,3026,3027,3028,3029,3030,3031,3032,3033,3034,3035,3036,3037,3038,3039,3040, + 3041,3042,3043,3044,3045,3046,3047,3048,3049,3050,3051,3052,3053,3054,3055,3056,3057,3058, + 3059,3060,3061,3062,3063,3064,3065,3066,3067,3068,3069,3070,3071,3072,3073,3074,3075,3076, + 3077,3078,3079,3080,3081,3082,3083,3084,3085,3086,3087,3088,3089,3090,3091,3092,3093,3094, + 3095,3096,3097,3098,3099,3100,3101,3102,3103,3104,3105,3106,3107,3108,3109,3110,3111,3112, + 3113,3114,3115,3116,3117,3118,3119,3120,3121,3128,3129,3130,3131,3132,3133,3134,4252,4253, + 4254,4255,4256,4257,4258,4259,4260,4261,4262,4263,4264,4265,4266,4267,4268,4269,4270,4271, + 4272,4273,4274,4275,4276,4277,4278,4279,4280,4281,4282,4283,4284,4285,4286,4287,4288,4289, + 4290,4291,4292,4293,4294,4295,4296,4297,4298,4299,4300,4301,4302,4303,4304,4305,4306,4307, + 4308,4309,4310,4311,4312,4313,4314,4315,4316,4317,4318,4319,4320,4321,4322,4323,4324,4325, + 4326,4327,5522,5523,5524,5525,5526,5527,5528,5529,5530,5531,5532,5533,5534,5535,5536,5537, + 5538,5540,5541,5542,5565,5566,5567,5568,5625,5626,5627,5628,5629,5630,5666,5667,5668,5688, + 5689,5690,5727,5728,5729,5762,5765,5766,5767,5931,5932,5933,5934,5935,5936,5965,6022,6082, + 6083,6084,6303,6304,6305,6307,6308,6309,6310,6313,6314,6315,6317,6318,6319,6321,6322,6323, + 6325,6326,6327,6328,6329,6330,6333,6334,6335,6337,6338,6339,6341,6342,6343,6345,6346,6347, + 6349,6350,6351,6355,6365,6366,6367,6520,6521,6522,6560,7092,7093,7094,7256,7257,7258,7283, + 7284,7285,7317,7318,7319,7321,7322,7323,7325,7326,7328,7329,7331,7332,7333,7335,7336,7337, + 7339,7340,7341,7345,7346,7347,7623,7624,7625,7626,7627,7629,7630,7631,7638,7639,7640,7741, + 7742,7743,7848,7849,7908,7927,7928,7929,7931,7970,7971,8272} + + -- This array contains all destroyable field items + FIELDS = {1487,1488,1489,1490,1491,1492,1493,1494,1495,1496,1500,1501,1502,1503,1504} + + -- The numbered-keys represents the damage values, and their table + -- contains the minimum and maximum number of rounds of those damage values. + RANGE = { + [1] = {19, 20}, [2] = {10, 10}, [3] = {6, 7}, [4] = {4, 5}, [5] = {3, 4}, + [6] = {3, 4}, [7] = {2, 3}, [8] = {2, 3}, [9] = {2, 3}, [10] = {1, 2}, + [11] = {1, 2}, [12] = {1, 2}, [13] = {1, 2}, [14] = {1, 2}, [15] = {1, 2}, + [16] = {1, 2}, [17] = {1, 2}, [18] = {1, 2}, [19] = {1, 2} + } + + function Creature:addDamageCondition(target, conditionType, listType, damage, time, rounds) + if target:isImmune(conditionType) then + return false + end + + local condition = Condition(conditionType) + condition:setParameter(CONDITION_PARAM_OWNER, self:getId()) + condition:setParameter(CONDITION_PARAM_DELAYED, true) + + if listType == 0 then + local exponent, value = -10, 0 + while value < damage do + value = math.floor(10 * math.pow(1.2, exponent) + 0.5) + condition:addDamage(1, time or 4000, -value) + + if value >= damage then + local permille = math.random(10, 1200) / 1000 + condition:addDamage(1, time or 4000, -math.max(1, math.floor(value * permille + 0.5))) + else + exponent = exponent + 1 + end + end + elseif listType == 1 then + rounds = rounds or RANGE + if rounds[damage] then + condition:addDamage(math.random(1, rounds[damage][2]), time or 4000, -damage) + damage = damage - 1 + end + + while damage > 0 do + condition:addDamage(rounds[damage] and math.random(rounds[damage][1], rounds[damage][2]) or 1, time or 4000, -damage) + damage = damage - (damage > 21 and math.floor(damage / 20) + math.random(0, 1) or 1) + end + elseif listType == 2 then + for _ = 1, rounds do + condition:addDamage(1, math.random(time[1], time[2]) * 1000, -damage) + end + end + + target:addCondition(condition) + return true + end + + function Player:addPartyCondition(combat, variant, condition, baseMana) + local party = self:getParty() + if not party then + self:sendCancelMessage(RETURNVALUE_NOPARTYMEMBERSINRANGE) + self:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + local members = party:getMembers() + members[#members + 1] = party:getLeader() + + local position = self:getPosition() + local affectedMembers = {} + for _, member in ipairs(members) do + if member:getPosition():getDistance(position) <= 36 then + affectedMembers[#affectedMembers + 1] = member + end + end + + if #affectedMembers <= 1 then + self:sendCancelMessage(RETURNVALUE_NOPARTYMEMBERSINRANGE) + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + local mana = math.ceil(math.pow(0.9, #affectedMembers - 1) * baseMana * #affectedMembers) + if self:getMana() < mana then + self:sendCancelMessage(RETURNVALUE_NOTENOUGHMANA) + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + if not combat:execute(self, variant) then + self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + self:addMana(baseMana - mana, false) + self:addManaSpent(mana - baseMana) + + for _, member in ipairs(affectedMembers) do + member:addCondition(condition) + end + return true + end + + function Player:conjureItem(reagentId, conjureId, conjureCount, effect) + if not conjureCount and conjureId ~= 0 then + local itemType = ItemType(conjureId) + if itemType:getId() == 0 then + return false + end + + local charges = itemType:getCharges() + if charges ~= 0 then + conjureCount = charges + end + end + + if reagentId ~= 0 and not self:removeItem(reagentId, 1, -1) then + self:sendCancelMessage(RETURNVALUE_YOUNEEDAMAGICITEMTOCASTSPELL) + self:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + local item = self:addItem(conjureId, conjureCount) + if not item then + self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + self:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + if item:hasAttribute(ITEM_ATTRIBUTE_DURATION) then + item:decay() + end + + self:getPosition():sendMagicEffect(item:getType():isRune() and CONST_ME_MAGIC_RED or effect) + return true + end + \ No newline at end of file diff --git a/data/scripts/runes/#example.lua b/data/scripts/spells/#example.lua similarity index 92% rename from data/scripts/runes/#example.lua rename to data/scripts/spells/#example.lua index 9ba6a17b8..f4b886171 100644 --- a/data/scripts/runes/#example.lua +++ b/data/scripts/spells/#example.lua @@ -28,7 +28,7 @@ spell:needTarget(true) spell:isAggressive(false) spell:allowFarUse(true) spell:charges(25) -spell:vocation("sorcerer;true", "master sorcerer") +spell:vocation("sorcerer;true", "master sorcerer;true") spell:register() local conjureRune = Spell(SPELL_INSTANT) @@ -48,5 +48,5 @@ conjureRune:isAggressive(false) conjureRune:cooldown(2000) conjureRune:groupCooldown(2000) conjureRune:needLearn(false) -conjureRune:vocation("sorcerer", "master sorcerer") +conjureRune:vocation("sorcerer", "master sorcerer;true") conjureRune:register() diff --git a/data/scripts/spells/attack/annihilation.lua b/data/scripts/spells/attack/annihilation.lua new file mode 100644 index 000000000..1ec147df4 --- /dev/null +++ b/data/scripts/spells/attack/annihilation.lua @@ -0,0 +1,37 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE) +combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) +combat:setParameter(COMBAT_PARAM_USECHARGES, 1) + +function onGetFormulaValues(player, skill, attack, factor) + local skillTotal = skill * attack + local levelTotal = player:getLevel() / 5 + return -(((skillTotal * 0.17) + 13) + (levelTotal)) * 1.28, -(((skillTotal * 0.20) + 34) + (levelTotal)) * 1.28 -- TODO : Use New Real Formula instead of an % +end + +combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(62) +spell:name("Annihilation") +spell:words("exori gran ico") +spell:level(110) +spell:mana(300) +spell:isPremium(true) +spell:range(1) +spell:needTarget(true) +spell:blockWalls(true) +spell:needWeapon(true) +spell:cooldown(30 * 1000) +spell:groupCooldown(4 * 1000) +spell:needLearn(false) +spell:vocation("knight;true", "elite knight;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/apprentice's_strike.lua b/data/scripts/spells/attack/apprentice's_strike.lua new file mode 100644 index 000000000..4390af6eb --- /dev/null +++ b/data/scripts/spells/attack/apprentice's_strike.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 0.4) + 3 + local max = (level / 5) + (maglevel * 0.7) + 5 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(169) +spell:name("Apprentice's Strike") +spell:words("exori min flam") +spell:level(8) +spell:mana(6) +spell:isPremium(false) +spell:range(3) +spell:needCasterTargetOrDirection(true) +spell:blockWalls(true) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/berserk.lua b/data/scripts/spells/attack/berserk.lua new file mode 100644 index 000000000..e7a816559 --- /dev/null +++ b/data/scripts/spells/attack/berserk.lua @@ -0,0 +1,37 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) +combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) +combat:setParameter(COMBAT_PARAM_USECHARGES, 1) +combat:setArea(createCombatArea(AREA_SQUARE1X1)) + +function onGetFormulaValues(player, skill, attack, factor) + local level = player:getLevel() + + local min = (level / 5) + (skill + attack) * 0.5 + local max = (level / 5) + (skill + attack) * 1.5 + + return -min * 1.1, -max * 1.1 -- TODO : Use New Real Formula instead of an % +end + +combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(80) +spell:name("Berserk") +spell:words("exori") +spell:level(35) +spell:mana(115) +spell:isPremium(true) +spell:needWeapon(true) +spell:cooldown(4 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("knight;true", "elite knight;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/brutal_strike.lua b/data/scripts/spells/attack/brutal_strike.lua new file mode 100644 index 000000000..715e17666 --- /dev/null +++ b/data/scripts/spells/attack/brutal_strike.lua @@ -0,0 +1,37 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE) +combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) +combat:setParameter(COMBAT_PARAM_USECHARGES, 1) + +function onGetFormulaValues(player, skill, attack, factor) + local skillTotal = skill * attack + local levelTotal = player:getLevel() / 5 + return -(((skillTotal * 0.02) + 4) + (levelTotal)) * 1.28, -(((skillTotal * 0.04) + 9) + (levelTotal)) * 1.28 -- TODO : Use New Real Formula instead of an % +end + +combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(61) +spell:name("Brutal Strike") +spell:words("exori ico") +spell:level(16) +spell:mana(30) +spell:isPremium(false) +spell:range(1) +spell:needTarget(true) +spell:blockWalls(true) +spell:needWeapon(true) +spell:cooldown(6 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("knight;true", "elite knight;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/buzz.lua b/data/scripts/spells/attack/buzz.lua new file mode 100644 index 000000000..9c0944a65 --- /dev/null +++ b/data/scripts/spells/attack/buzz.lua @@ -0,0 +1,35 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 0.4) + 3 + local max = (level / 5) + (maglevel * 0.7) + 5 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(177) +spell:name("Buzz") +spell:words("exori infir vis") +spell:level(1) +spell:mana(6) +spell:isAggressive(true) +spell:isPremium(false) +spell:range(3) +spell:needCasterTargetOrDirection(true) +spell:blockWalls(true) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/chill_out.lua b/data/scripts/spells/attack/chill_out.lua new file mode 100644 index 000000000..928dcb7e9 --- /dev/null +++ b/data/scripts/spells/attack/chill_out.lua @@ -0,0 +1,33 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) +combat:setArea(createCombatArea(AREA_WAVE4, AREADIAGONAL_WAVE4)) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 0.3) + 2 + local max = (level / 5) + (maglevel * 0.6) + 4 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(173) +spell:name("Chill Out") +spell:words("exevo infir frigo hur") +spell:level(1) +spell:mana(8) +spell:isPremium(false) +spell:range(1) +spell:needDirection(true) +spell:cooldown(4 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("druid;true", "elder druid;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/curse.lua b/data/scripts/spells/attack/curse.lua new file mode 100644 index 000000000..ee5416d4d --- /dev/null +++ b/data/scripts/spells/attack/curse.lua @@ -0,0 +1,48 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) + +local condition = Condition(CONDITION_CURSED) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) + +condition:addDamage(1, 3000, -45) +condition:addDamage(1, 3000, -40) +condition:addDamage(1, 3000, -35) +condition:addDamage(1, 3000, -34) +condition:addDamage(2, 3000, -33) +condition:addDamage(2, 3000, -32) +condition:addDamage(2, 3000, -31) +condition:addDamage(2, 3000, -30) +condition:addDamage(3, 3000, -29) +condition:addDamage(3, 3000, -25) +condition:addDamage(3, 3000, -24) +condition:addDamage(4, 3000, -23) +condition:addDamage(4, 3000, -20) +condition:addDamage(5, 3000, -19) +condition:addDamage(5, 3000, -15) +condition:addDamage(6, 3000, -10) +condition:addDamage(10, 3000, -5) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(139) +spell:name("Curse") +spell:words("utori mort") +spell:level(75) +spell:mana(30) +spell:isAggressive(true) +spell:range(3) +spell:needTarget(true) +spell:blockWalls(true) +spell:cooldown(40 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:register() diff --git a/data/scripts/spells/attack/death_strike.lua b/data/scripts/spells/attack/death_strike.lua new file mode 100644 index 000000000..a663e1f90 --- /dev/null +++ b/data/scripts/spells/attack/death_strike.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 1.403) + 8 + local max = (level / 5) + (maglevel * 2.203) + 13 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(87) +spell:name("Death Strike") +spell:words("exori mort") +spell:level(16) +spell:mana(20) +spell:isPremium(true) +spell:range(3) +spell:needCasterTargetOrDirection(true) +spell:blockWalls(true) +spell:cooldown(1 * 1000) +spell:groupCooldown(1 * 1000) +spell:needLearn(false) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/divine_caldera.lua b/data/scripts/spells/attack/divine_caldera.lua new file mode 100644 index 000000000..46958ca37 --- /dev/null +++ b/data/scripts/spells/attack/divine_caldera.lua @@ -0,0 +1,32 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA) +combat:setArea(createCombatArea(AREA_CIRCLE3X3)) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 4) + local max = (level / 5) + (maglevel * 6) + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(124) +spell:name("Divine Caldera") +spell:words("exevo mas san") +spell:level(50) +spell:mana(160) +spell:isPremium(true) +spell:isSelfTarget(true) +spell:cooldown(4 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("paladin;true", "royal paladin;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/divine_missile.lua b/data/scripts/spells/attack/divine_missile.lua new file mode 100644 index 000000000..32a038bbc --- /dev/null +++ b/data/scripts/spells/attack/divine_missile.lua @@ -0,0 +1,33 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 1.79) + 11 + local max = (level / 5) + (maglevel * 3) + 18 + return -min, -max +end +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(122) +spell:name("Divine Missile") +spell:words("exori san") +spell:level(40) +spell:mana(20) +spell:isPremium(true) +spell:range(4) +spell:needCasterTargetOrDirection(true) +spell:blockWalls(true) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("paladin;true", "royal paladin;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/electrify.lua b/data/scripts/spells/attack/electrify.lua new file mode 100644 index 000000000..b370ce15e --- /dev/null +++ b/data/scripts/spells/attack/electrify.lua @@ -0,0 +1,31 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + +local condition = Condition(CONDITION_ENERGY) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(25, 3000, -45) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(140) +spell:name("Electrify") +spell:words("utori vis") +spell:level(34) +spell:mana(30) +spell:isAggressive(true) +spell:range(3) +spell:needTarget(true) +spell:blockWalls(true) +spell:cooldown(30 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/energy_beam.lua b/data/scripts/spells/attack/energy_beam.lua new file mode 100644 index 000000000..ebad87cb6 --- /dev/null +++ b/data/scripts/spells/attack/energy_beam.lua @@ -0,0 +1,33 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) +combat:setArea(createCombatArea(AREA_BEAM5, AREADIAGONAL_BEAM5)) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 1.8) + 11 + local max = (level / 5) + (maglevel * 3) + 19 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(22) +spell:name("Energy Beam") +spell:words("exevo vis lux") +spell:level(23) +spell:mana(40) +spell:isPremium(false) +spell:needDirection(true) +spell:blockWalls(true) +spell:cooldown(4 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/energy_strike.lua b/data/scripts/spells/attack/energy_strike.lua new file mode 100644 index 000000000..b8ee30912 --- /dev/null +++ b/data/scripts/spells/attack/energy_strike.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 1.403) + 8 + local max = (level / 5) + (maglevel * 2.203) + 13 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(88) +spell:name("Energy Strike") +spell:words("exori vis") +spell:level(12) +spell:mana(20) +spell:range(3) +spell:isPremium(true) +spell:needCasterTargetOrDirection(true) +spell:blockWalls(true) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:register() diff --git a/data/scripts/spells/attack/energy_wave.lua b/data/scripts/spells/attack/energy_wave.lua new file mode 100644 index 000000000..7431a5da3 --- /dev/null +++ b/data/scripts/spells/attack/energy_wave.lua @@ -0,0 +1,32 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) +combat:setArea(createCombatArea(AREA_SQUAREWAVE5, AREADIAGONAL_SQUAREWAVE5)) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 4.5) + local max = (level / 5) + (maglevel * 9) + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(13) +spell:name("Energy Wave") +spell:words("exevo vis hur") +spell:level(38) +spell:mana(170) +spell:needDirection(true) +spell:cooldown(8 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/envenom.lua b/data/scripts/spells/attack/envenom.lua new file mode 100644 index 000000000..f61d591c0 --- /dev/null +++ b/data/scripts/spells/attack/envenom.lua @@ -0,0 +1,31 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH) + +local condition = Condition(CONDITION_POISON) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(25, 3000, -45) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(142) +spell:name("Envenom") +spell:words("utori pox") +spell:level(50) +spell:mana(30) +spell:range(3) +spell:isAggressive(true) +spell:needTarget(true) +spell:blockWalls(true) +spell:cooldown(40 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("druid;true", "elder druid;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/eternal_winter.lua b/data/scripts/spells/attack/eternal_winter.lua new file mode 100644 index 000000000..c65a54767 --- /dev/null +++ b/data/scripts/spells/attack/eternal_winter.lua @@ -0,0 +1,33 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO) +combat:setArea(createCombatArea(AREA_CIRCLE5X5)) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 6) + local max = (level / 5) + (maglevel * 12) + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(118) +spell:name("Eternal Winter") +spell:words("exevo gran mas frigo") +spell:level(60) +spell:mana(1050) +spell:isPremium(true) +spell:range(5) +spell:isSelfTarget(true) +spell:cooldown(40 * 1000) +spell:groupCooldown(4 * 1000) +spell:needLearn(false) +spell:vocation("druid;true", "elder druid;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/ethereal_spear.lua b/data/scripts/spells/attack/ethereal_spear.lua new file mode 100644 index 000000000..ba0d271b3 --- /dev/null +++ b/data/scripts/spells/attack/ethereal_spear.lua @@ -0,0 +1,38 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ETHEREALSPEAR) +combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) + +function onGetFormulaValues(player, skill, attack, factor) + local level = player:getLevel() + + local min = (level / 5) + (skill + 25) / 3 + local max = (level / 5) + skill + 25 + + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(111) +spell:name("Ethereal Spear") +spell:words("exori con") +spell:level(23) +spell:mana(25) +spell:isPremium(true) +spell:range(7) +spell:needTarget(true) +spell:blockWalls(true) +spell:cooldown(1 * 1000) +spell:groupCooldown(1 * 1000) +spell:needLearn(false) +spell:vocation("paladin;true", "royal paladin;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/fierce_berserk.lua b/data/scripts/spells/attack/fierce_berserk.lua new file mode 100644 index 000000000..f3b3bb769 --- /dev/null +++ b/data/scripts/spells/attack/fierce_berserk.lua @@ -0,0 +1,38 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) +combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) +combat:setParameter(COMBAT_PARAM_USECHARGES, 1) +combat:setArea(createCombatArea(AREA_SQUARE1X1)) + +function onGetFormulaValues(player, skill, attack, factor) + local level = player:getLevel() + + local min = (level / 5) + (skill + 2 * attack) * 1.1 + local max = (level / 5) + (skill + 2 * attack) * 3 + + return -min * 1.1, -max * 1.1 -- TODO : Use New Real Formula instead of an % +end + + +combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(105) +spell:name("Fierce Berserk") +spell:words("exori gran") +spell:level(90) +spell:mana(340) +spell:isPremium(true) +spell:needWeapon(true) +spell:cooldown(6 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("knight;true", "elite knight;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/fire_wave.lua b/data/scripts/spells/attack/fire_wave.lua new file mode 100644 index 000000000..67066fb9e --- /dev/null +++ b/data/scripts/spells/attack/fire_wave.lua @@ -0,0 +1,33 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) + +local area = createCombatArea(AREA_WAVE4, AREADIAGONAL_WAVE4) +combat:setArea(area) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 1.25) + 4 + local max = (level / 5) + (maglevel * 2) + 12 + return -min, -max +end +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(19) +spell:name("Fire Wave") +spell:words("exevo flam hur") +spell:level(18) +spell:mana(25) +spell:isPremium(true) +spell:needDirection(true) +spell:cooldown(4 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/flame_strike.lua b/data/scripts/spells/attack/flame_strike.lua new file mode 100644 index 000000000..a542ec779 --- /dev/null +++ b/data/scripts/spells/attack/flame_strike.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 1.403) + 8 + local max = (level / 5) + (maglevel * 2.203) + 13 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(89) +spell:name("Flame Strike") +spell:words("exori flam") +spell:level(14) +spell:mana(20) +spell:isPremium(true) +spell:range(3) +spell:needCasterTargetOrDirection(true) +spell:blockWalls(true) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("sorcerer;true", "druid;true", "master sorcerer;true", "elder druid;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/front_sweep.lua b/data/scripts/spells/attack/front_sweep.lua new file mode 100644 index 000000000..7cceb9150 --- /dev/null +++ b/data/scripts/spells/attack/front_sweep.lua @@ -0,0 +1,35 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) +combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) +combat:setParameter(COMBAT_PARAM_USECHARGES, 1) +combat:setArea(createCombatArea(AREA_WAVE6, AREADIAGONAL_WAVE6)) + +function onGetFormulaValues(player, skill, attack, factor) + local skillTotal = skill * attack + local levelTotal = player:getLevel() / 5 + return -(((skillTotal * 0.04) + 31) + (levelTotal)) * 1.1, -(((skillTotal * 0.08) + 45) + (levelTotal)) * 1.1 -- TODO : Use New Real Formula instead of an % +end + +combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(59) +spell:name("Front Sweep") +spell:words("exori min") +spell:level(70) +spell:mana(200) +spell:isPremium(true) +spell:needDirection(true) +spell:needWeapon(true) +spell:cooldown(6 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("knight;true", "elite knight;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/great_energy_beam.lua b/data/scripts/spells/attack/great_energy_beam.lua new file mode 100644 index 000000000..ec43f2a11 --- /dev/null +++ b/data/scripts/spells/attack/great_energy_beam.lua @@ -0,0 +1,33 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) +combat:setArea(createCombatArea(AREA_BEAM8)) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 4) + local max = (level / 5) + (maglevel * 7) + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(23) +spell:name("Great Energy Beam") +spell:words("exevo gran vis lux") +spell:level(29) +spell:mana(110) +spell:isPremium(false) +spell:needDirection(true) +spell:blockWalls(true) +spell:cooldown(6 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:register() diff --git a/data/scripts/spells/attack/great_fire_wave.lua b/data/scripts/spells/attack/great_fire_wave.lua new file mode 100644 index 000000000..34a4d7b8d --- /dev/null +++ b/data/scripts/spells/attack/great_fire_wave.lua @@ -0,0 +1,33 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) + +local area = createCombatArea(AREA_WAVE7, AREADIAGONAL_WAVE7) +combat:setArea(area) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 2.8) + 16 + local max = (level / 5) + (maglevel * 4.4) + 28 -- TODO: Formulas (TibiaWiki says ~Strong Flame Strike but we need more acurracy) + return -min, -max +end +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(240) +spell:name("Great Fire Wave") +spell:words("exevo gran flam hur") +spell:level(38) +spell:mana(120) +spell:isPremium(true) +spell:needDirection(true) +spell:cooldown(4 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/groundshaker.lua b/data/scripts/spells/attack/groundshaker.lua new file mode 100644 index 000000000..a82cab5e0 --- /dev/null +++ b/data/scripts/spells/attack/groundshaker.lua @@ -0,0 +1,35 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER) +combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) +combat:setParameter(COMBAT_PARAM_USECHARGES, 1) +combat:setArea(createCombatArea(AREA_CIRCLE3X3)) + +function onGetFormulaValues(player, skill, attack, factor) + local level = player:getLevel() + local min = (level / 5) + (skill + attack) * 0.5 + local max = (level / 5) + (skill + attack) * 1.1 + return -min * 1.28, -max * 1.28 -- TODO : Use New Real Formula instead of an % +end + +combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(106) +spell:name("Groundshaker") +spell:words("exori mas") +spell:level(33) +spell:mana(160) +spell:isPremium(true) +spell:needWeapon(true) +spell:cooldown(8 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("knight;true", "elite knight;true") +spell:register() diff --git a/data/scripts/spells/attack/hells_core.lua b/data/scripts/spells/attack/hells_core.lua new file mode 100644 index 000000000..d3aa712de --- /dev/null +++ b/data/scripts/spells/attack/hells_core.lua @@ -0,0 +1,32 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) +combat:setArea(createCombatArea(AREA_CIRCLE5X5)) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 10) + local max = (level / 5) + (maglevel * 14) + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:group("attack") +spell:id(24) +spell:name("Hell's Core") +spell:words("exevo gran mas flam") +spell:level(60) +spell:mana(1100) +spell:isSelfTarget(true) +spell:isPremium(true) +spell:cooldown(40 * 1000) +spell:groupCooldown(4 * 1000) +spell:needLearn(false) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:register() diff --git a/data/scripts/spells/attack/holy_flash.lua b/data/scripts/spells/attack/holy_flash.lua new file mode 100644 index 000000000..c8edb441e --- /dev/null +++ b/data/scripts/spells/attack/holy_flash.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY) + +local condition = Condition(CONDITION_DAZZLED) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(math.random(7,11), 3000, -20) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(143) +spell:name("Holy Flash") +spell:words("utori san") +spell:level(70) +spell:mana(30) +spell:isAggressive(true) +spell:range(3) +spell:needTarget(true) +spell:blockWalls(true) +spell:cooldown(40 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("paladin;true", "royal paladin;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/ice_strike.lua b/data/scripts/spells/attack/ice_strike.lua new file mode 100644 index 000000000..a3a24bd17 --- /dev/null +++ b/data/scripts/spells/attack/ice_strike.lua @@ -0,0 +1,35 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLICE) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 1.403) + 8 + local max = (level / 5) + (maglevel * 2.203) + 13 + return -min, -max +end + + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(112) +spell:name("Ice Strike") +spell:words("exori frigo") +spell:level(15) +spell:mana(20) +spell:isPremium(true) +spell:range(3) +spell:needCasterTargetOrDirection(true) +spell:blockWalls(true) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("druid;true", "sorcerer;true", "elder druid;true", "master sorcerer;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/ice_wave.lua b/data/scripts/spells/attack/ice_wave.lua new file mode 100644 index 000000000..ec1857c18 --- /dev/null +++ b/data/scripts/spells/attack/ice_wave.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) +combat:setArea(createCombatArea(AREA_WAVE4, AREADIAGONAL_WAVE4)) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 0.81) + 4 + local max = (level / 5) + (maglevel * 2) + 12 + return -min, -max +end +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(121) +spell:name("Ice Wave") +spell:words("exevo frigo hur") +spell:level(18) +spell:mana(25) +spell:needDirection(true) +spell:cooldown(4 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("druid;true", "elder druid;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/ignite.lua b/data/scripts/spells/attack/ignite.lua new file mode 100644 index 000000000..7c547944b --- /dev/null +++ b/data/scripts/spells/attack/ignite.lua @@ -0,0 +1,31 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(25, 3000, -45) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(138) +spell:name("Ignite") +spell:words("utori flam") +spell:level(26) +spell:mana(30) +spell:isAggressive(true) +spell:range(3) +spell:needTarget(true) +spell:blockWalls(true) +spell:needWeapon(true) +spell:cooldown(30 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/inflict_wound.lua b/data/scripts/spells/attack/inflict_wound.lua new file mode 100644 index 000000000..de2bf961d --- /dev/null +++ b/data/scripts/spells/attack/inflict_wound.lua @@ -0,0 +1,33 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, 1) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE) +combat:setParameter(COMBATPARAM_USECHARGES, 1) + +local condition = Condition(CONDITION_BLEEDING) +condition:setParameter(CONDITION_PARAM_DELAYED, 10) +condition:addDamage(15, 2000, -50) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(141) +spell:name("Inflict Wound") +spell:words("utori kor") +spell:level(40) +spell:mana(30) +spell:isAggressive(true) +spell:range(1) +spell:needTarget(true) +spell:blockWalls(true) +spell:cooldown(30 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("knight;true", "elite knight;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/lightning.lua b/data/scripts/spells/attack/lightning.lua new file mode 100644 index 000000000..4c18300ab --- /dev/null +++ b/data/scripts/spells/attack/lightning.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 2.2) + 12 + local max = (level / 5) + (maglevel * 3.4) + 21 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(149) +spell:name("Lightning") +spell:words("exori amp vis") +spell:level(55) +spell:mana(60) +spell:isPremium(true) +spell:range(4) +spell:needCasterTargetOrDirection(true) +spell:blockWalls(true) +spell:cooldown(8 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/mud_attack.lua b/data/scripts/spells/attack/mud_attack.lua new file mode 100644 index 000000000..abc52498c --- /dev/null +++ b/data/scripts/spells/attack/mud_attack.lua @@ -0,0 +1,35 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_CARNIPHILA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLEARTH) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 0.4) + 3 + local max = (level / 5) + (maglevel * 0.7) + 5 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(174) +spell:name("Mud Attack") +spell:words("exori infir tera") +spell:level(1) +spell:mana(6) +spell:isAggressive(true) +spell:isPremium(false) +spell:range(3) +spell:needCasterTargetOrDirection(true) +spell:blockWalls(true) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("druid;true", "elder druid;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/physical_strike.lua b/data/scripts/spells/attack/physical_strike.lua new file mode 100644 index 000000000..0a192fdc3 --- /dev/null +++ b/data/scripts/spells/attack/physical_strike.lua @@ -0,0 +1,35 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EXPLOSION) +combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 1.403) + 8 + local max = (level / 5) + (maglevel * 2.203) + 13 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(148) +spell:name("Physical Strike") +spell:words("exori moe ico") +spell:level(16) +spell:mana(20) +spell:isPremium(true) +spell:range(3) +spell:needCasterTargetOrDirection(true) +spell:blockWalls(true) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("druid;true", "elder druid;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/practice_fire_wave.lua b/data/scripts/spells/attack/practice_fire_wave.lua new file mode 100644 index 000000000..f140ab220 --- /dev/null +++ b/data/scripts/spells/attack/practice_fire_wave.lua @@ -0,0 +1,28 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) +combat:setArea(createCombatArea(AREA_WAVE4, AREADIAGONAL_WAVE4)) + +function onGetFormulaValues(player, level, magicLevel) + return -11, -14 +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:group("attack") +spell:id(167) +spell:name("Practise Fire Wave") +spell:words("exevo dis flam hur") +spell:level(1) +spell:mana(5) +spell:needDirection(true) +spell:cooldown(4 * 1000) +spell:groupCooldown(2 * 1000) +spell:vocation("none") +spell:register() diff --git a/data/scripts/spells/attack/rage_of_the_skies.lua b/data/scripts/spells/attack/rage_of_the_skies.lua new file mode 100644 index 000000000..5579d519c --- /dev/null +++ b/data/scripts/spells/attack/rage_of_the_skies.lua @@ -0,0 +1,32 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BIGCLOUDS) +combat:setArea(createCombatArea(AREA_CIRCLE6X6)) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 7) + local max = (level / 5) + (maglevel * 14) + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(119) +spell:name("Rage of the Skies") +spell:words("exevo gran mas vis") +spell:level(55) +spell:mana(600) +spell:isSelfTarget(true) +spell:isPremium(true) +spell:cooldown(40 * 1000) +spell:groupCooldown(4 * 1000) +spell:needLearn(false) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/scorch.lua b/data/scripts/spells/attack/scorch.lua new file mode 100644 index 000000000..606c8f62f --- /dev/null +++ b/data/scripts/spells/attack/scorch.lua @@ -0,0 +1,33 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) +combat:setArea(createCombatArea(AREA_WAVE4, AREADIAGONAL_WAVE4)) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 0.3) + 2 + local max = (level / 5) + (maglevel * 0.6) + 4 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(178) +spell:name("Scorch") +spell:words("exevo infir flam hur") +spell:level(1) +spell:mana(8) +spell:isAggressive(true) +spell:isPremium(false) +spell:needDirection(true) +spell:cooldown(4 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/strong_energy_strike.lua b/data/scripts/spells/attack/strong_energy_strike.lua new file mode 100644 index 000000000..bdd906e25 --- /dev/null +++ b/data/scripts/spells/attack/strong_energy_strike.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 2.8) + 16 + local max = (level / 5) + (maglevel * 4.4) + 28 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(151) +spell:name("Strong Energy Strike") +spell:words("exori gran vis") +spell:level(80) +spell:mana(60) +spell:isPremium(true) +spell:range(3) +spell:needCasterTargetOrDirection(true) +spell:blockWalls(true) +spell:cooldown(8 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/strong_ethereal_spear.lua b/data/scripts/spells/attack/strong_ethereal_spear.lua new file mode 100644 index 000000000..7ecdf3d06 --- /dev/null +++ b/data/scripts/spells/attack/strong_ethereal_spear.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ETHEREALSPEAR) +combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) + +function onGetFormulaValues(player, skill, attack, factor) + local levelTotal = player:getLevel() / 5 + return -(((2 * skill + attack / 2500) * 2.30) + (levelTotal) + 7), -(((2 * skill + attack / 1875) * 3.30) + (levelTotal) + 13) +end + +combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(57) +spell:name("Strong Ethereal Spear") +spell:words("exori gran con") +spell:level(90) +spell:mana(55) +spell:isPremium(true) +spell:range(7) +spell:needTarget(true) +spell:blockWalls(true) +spell:cooldown(8 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("paladin;true", "royal paladin;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/strong_flame_strike.lua b/data/scripts/spells/attack/strong_flame_strike.lua new file mode 100644 index 000000000..35d29cd16 --- /dev/null +++ b/data/scripts/spells/attack/strong_flame_strike.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 2.8) + 16 + local max = (level / 5) + (maglevel * 4.4) + 28 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(150) +spell:name("Strong Flame Strike") +spell:words("exori gran flam") +spell:level(70) +spell:mana(60) +spell:isPremium(true) +spell:range(3) +spell:needCasterTargetOrDirection(true) +spell:blockWalls(true) +spell:cooldown(8 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/strong_ice_strike.lua b/data/scripts/spells/attack/strong_ice_strike.lua new file mode 100644 index 000000000..0650cdc66 --- /dev/null +++ b/data/scripts/spells/attack/strong_ice_strike.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLICE) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 2.8) + 16 + local max = (level / 5) + (maglevel * 4.4) + 28 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(152) +spell:name("Strong Ice Strike") +spell:words("exori gran frigo") +spell:level(80) +spell:mana(60) +spell:isPremium(true) +spell:range(3) +spell:needCasterTargetOrDirection(true) +spell:blockWalls(true) +spell:cooldown(8 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("druid;true", "elder druid;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/strong_ice_wave.lua b/data/scripts/spells/attack/strong_ice_wave.lua new file mode 100644 index 000000000..1abb20d44 --- /dev/null +++ b/data/scripts/spells/attack/strong_ice_wave.lua @@ -0,0 +1,31 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) +combat:setArea(createCombatArea(AREA_SHORTWAVE3)) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 4.5) + 20 + local max = (level / 5) + (maglevel * 7.6) + 48 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(43) +spell:name("Strong Ice Wave") +spell:words("exevo gran frigo hur") +spell:level(40) +spell:mana(170) +spell:needDirection(true) +spell:cooldown(8 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("druid;true", "elder druid;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/strong_terra_strike.lua b/data/scripts/spells/attack/strong_terra_strike.lua new file mode 100644 index 000000000..7189c2263 --- /dev/null +++ b/data/scripts/spells/attack/strong_terra_strike.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_CARNIPHILA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLEARTH) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 2.8) + 16 + local max = (level / 5) + (maglevel * 4.4) + 28 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(153) +spell:name("Strong Terra Strike") +spell:words("exori gran tera") +spell:level(70) +spell:mana(60) +spell:isPremium(true) +spell:range(3) +spell:needCasterTargetOrDirection(true) +spell:blockWalls(true) +spell:cooldown(8 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("druid;true", "elder druid;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/terra_strike.lua b/data/scripts/spells/attack/terra_strike.lua new file mode 100644 index 000000000..c37891d64 --- /dev/null +++ b/data/scripts/spells/attack/terra_strike.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_CARNIPHILA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLEARTH) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 1.403) + 8 + local max = (level / 5) + (maglevel * 2.203) + 13 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(113) +spell:name("Terra Strike") +spell:words("exori tera") +spell:level(13) +spell:mana(20) +spell:range(3) +spell:isPremium(false) +spell:needCasterTargetOrDirection(true) +spell:blockWalls(true) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:register() diff --git a/data/scripts/spells/attack/terra_wave.lua b/data/scripts/spells/attack/terra_wave.lua new file mode 100644 index 000000000..aec1eb464 --- /dev/null +++ b/data/scripts/spells/attack/terra_wave.lua @@ -0,0 +1,32 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) +combat:setArea(createCombatArea(AREA_SQUAREWAVE5, AREADIAGONAL_SQUAREWAVE5)) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 3.5) + local max = (level / 5) + (maglevel * 7) + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(120) +spell:name("Terra Wave") +spell:words("exevo tera hur") +spell:level(38) +spell:mana(170) +spell:isPremium(true) +spell:needDirection(true) +spell:cooldown(4 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("druid;true", "elder druid;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/ultimate_energy_strike.lua b/data/scripts/spells/attack/ultimate_energy_strike.lua new file mode 100644 index 000000000..e20990d61 --- /dev/null +++ b/data/scripts/spells/attack/ultimate_energy_strike.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 4.5) + 35 + local max = (level / 5) + (maglevel * 7.3) + 55 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(155) +spell:name("Ultimate Energy Strike") +spell:words("exori max vis") +spell:level(100) +spell:mana(100) +spell:isPremium(true) +spell:range(3) +spell:needCasterTargetOrDirection(true) +spell:blockWalls(true) +spell:cooldown(30 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/ultimate_flame_strike.lua b/data/scripts/spells/attack/ultimate_flame_strike.lua new file mode 100644 index 000000000..8ac899c55 --- /dev/null +++ b/data/scripts/spells/attack/ultimate_flame_strike.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 4.5) + 35 + local max = (level / 5) + (maglevel * 7.3) + 55 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(154) +spell:name("Ultimate Flame Strike") +spell:words("exori max flam") +spell:level(90) +spell:mana(100) +spell:isPremium(true) +spell:range(3) +spell:needCasterTargetOrDirection(true) +spell:blockWalls(true) +spell:cooldown(30 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/ultimate_ice_strike.lua b/data/scripts/spells/attack/ultimate_ice_strike.lua new file mode 100644 index 000000000..6de7a7011 --- /dev/null +++ b/data/scripts/spells/attack/ultimate_ice_strike.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLICE) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 4.5) + 35 + local max = (level / 5) + (maglevel * 7.3) + 55 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(156) +spell:name("Ultimate Ice Strike") +spell:words("exori max frigo") +spell:level(100) +spell:mana(100) +spell:isPremium(true) +spell:range(3) +spell:needCasterTargetOrDirection(true) +spell:blockWalls(true) +spell:cooldown(30 * 1000) +spell:groupCooldown(4 * 1000) +spell:needLearn(false) +spell:vocation("druid;true", "elder druid;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/ultimate_terra_strike.lua b/data/scripts/spells/attack/ultimate_terra_strike.lua new file mode 100644 index 000000000..921eb480f --- /dev/null +++ b/data/scripts/spells/attack/ultimate_terra_strike.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_CARNIPHILA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLEARTH) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 4.5) + 35 + local max = (level / 5) + (maglevel * 7.3) + 55 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(157) +spell:name("Ultimate Terra Strike") +spell:words("exori max tera") +spell:level(90) +spell:mana(100) +spell:isPremium(true) +spell:range(3) +spell:needCasterTargetOrDirection(true) +spell:blockWalls(true) +spell:cooldown(30 * 1000) +spell:groupCooldown(4 * 1000) +spell:needLearn(false) +spell:vocation("druid;true", "elder druid;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/whirlwind_throw.lua b/data/scripts/spells/attack/whirlwind_throw.lua new file mode 100644 index 000000000..d62119f93 --- /dev/null +++ b/data/scripts/spells/attack/whirlwind_throw.lua @@ -0,0 +1,38 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE) +combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) +combat:setParameter(COMBAT_PARAM_USECHARGES, 1) + +function onGetFormulaValues(player, skill, attack, factor) + local level = player:getLevel() + local min = (level / 5) + (skill + attack) / 3 + local max = (level / 5) + skill + attack + return -min * 1.28, -max * 1.28 -- TODO : Use New Real Formula instead of an % +end + +combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(107) +spell:name("Whirlwind Throw") +spell:words("exori hur") +spell:level(28) +spell:mana(40) +spell:isPremium(true) +spell:range(5) +spell:needTarget(true) +spell:blockWalls(true) +spell:needWeapon(true) +spell:cooldown(6 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("knight;true", "elite knight;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/attack/wrath_of_nature.lua b/data/scripts/spells/attack/wrath_of_nature.lua new file mode 100644 index 000000000..71e6cb332 --- /dev/null +++ b/data/scripts/spells/attack/wrath_of_nature.lua @@ -0,0 +1,32 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) +combat:setArea(createCombatArea(AREA_CIRCLE6X6)) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 5) + local max = (level / 5) + (maglevel * 10) + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:group("attack") +spell:id(56) +spell:name("Wrath of Nature") +spell:words("exevo gran mas tera") +spell:level(55) +spell:mana(700) +spell:isPremium(true) +spell:isSelfTarget(true) +spell:cooldown(40 * 1000) +spell:groupCooldown(4 * 1000) +spell:needLearn(false) +spell:vocation("druid;true", "elder druid;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/conjuring/Conjure_Diamond_Arrow.lua b/data/scripts/spells/conjuring/Conjure_Diamond_Arrow.lua new file mode 100644 index 000000000..bdb703813 --- /dev/null +++ b/data/scripts/spells/conjuring/Conjure_Diamond_Arrow.lua @@ -0,0 +1,21 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(0, 29057, 100, CONST_ME_MAGIC_BLUE) +end + +spell:group("support") +spell:id(192) +spell:name("Conjure Diamond Arrow") +spell:words("exevo gran con hur") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(150) +spell:mana(1000) +spell:soul(0) +spell:isPremium(true) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:vocation("paladin;true", "royal paladin;true") +spell:needLearn(false) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/conjuring/Conjure_Royal_Star.lua b/data/scripts/spells/conjuring/Conjure_Royal_Star.lua new file mode 100644 index 000000000..e7910d688 --- /dev/null +++ b/data/scripts/spells/conjuring/Conjure_Royal_Star.lua @@ -0,0 +1,21 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(0, 29059, 30, CONST_ME_MAGIC_BLUE) +end + +spell:group("support") +spell:id(191) +spell:name("Conjure Royal Star") +spell:words("exevo gran con grav") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(150) +spell:mana(1000) +spell:soul(0) +spell:isPremium(true) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:vocation("paladin;true", "royal paladin;true") +spell:needLearn(false) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/conjuring/Conjure_Spectral_Bolt.lua b/data/scripts/spells/conjuring/Conjure_Spectral_Bolt.lua new file mode 100644 index 000000000..8b0b5607e --- /dev/null +++ b/data/scripts/spells/conjuring/Conjure_Spectral_Bolt.lua @@ -0,0 +1,21 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(0, 29058, 100, CONST_ME_MAGIC_BLUE) +end + +spell:group("support") +spell:id(193) +spell:name("Conjure Spectral Bolt") +spell:words("exevo gran con vis") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(150) +spell:mana(1000) +spell:soul(0) +spell:isPremium(true) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:vocation("paladin;true", "royal paladin;true") +spell:needLearn(false) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/conjuring/Conjure_Wand_of_Darkness.lua b/data/scripts/spells/conjuring/Conjure_Wand_of_Darkness.lua new file mode 100644 index 000000000..ffa06e425 --- /dev/null +++ b/data/scripts/spells/conjuring/Conjure_Wand_of_Darkness.lua @@ -0,0 +1,21 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(0, 29060, 1, CONST_ME_MAGIC_BLUE) +end + +spell:group("support") +spell:id(92) +spell:name("Conjure Wand of Darkness") +spell:words("exevo gran mort") +spell:cooldown(90 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(41) +spell:mana(250) +spell:soul(0) +spell:isPremium(true) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:needLearn(false) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/conjuring/animate_dead_rune.lua b/data/scripts/spells/conjuring/animate_dead_rune.lua new file mode 100644 index 000000000..54493e538 --- /dev/null +++ b/data/scripts/spells/conjuring/animate_dead_rune.lua @@ -0,0 +1,19 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2316, 1) +end + +spell:name("Animate Dead Rune") +spell:words("adana mort") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(27) +spell:mana(600) +spell:soul(5) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/arrow_call.lua b/data/scripts/spells/conjuring/arrow_call.lua new file mode 100644 index 000000000..78b47a364 --- /dev/null +++ b/data/scripts/spells/conjuring/arrow_call.lua @@ -0,0 +1,20 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(0, 23839, 3, CONST_ME_MAGIC_BLUE) +end + +spell:name("Arrow Call") +spell:words("exevo infir con") +spell:group("support") +spell:vocation("paladin;true", "royal paladin;true") +spell:id(176) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(1) +spell:mana(10) +spell:soul(1) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/avalanche_rune.lua b/data/scripts/spells/conjuring/avalanche_rune.lua new file mode 100644 index 000000000..7c7a12520 --- /dev/null +++ b/data/scripts/spells/conjuring/avalanche_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2274, 4) +end + +spell:name("Avalanche Rune") +spell:words("adori mas frigo") +spell:group("support") +spell:vocation("druid;true", "elder druid;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(30) +spell:mana(530) +spell:soul(3) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/blank_rune.lua b/data/scripts/spells/conjuring/blank_rune.lua new file mode 100644 index 000000000..d301c08f3 --- /dev/null +++ b/data/scripts/spells/conjuring/blank_rune.lua @@ -0,0 +1,17 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(0, 2260, 1) +end + +spell:name("Blank Rune") +spell:words("adori blank") +spell:group("support") +spell:vocation("druid;true", "paladin;true", "sorcerer;true", "elder druid;true", "royal paladin;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(20) +spell:mana(50) +spell:soul(1) +spell:needLearn(false) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/conjuring/chameleon_rune.lua b/data/scripts/spells/conjuring/chameleon_rune.lua new file mode 100644 index 000000000..647fad3ab --- /dev/null +++ b/data/scripts/spells/conjuring/chameleon_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2291, 1) +end + +spell:name("Chameleon Rune") +spell:words("adevo ina") +spell:group("support") +spell:vocation("druid;true", "elder druid;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(27) +spell:mana(600) +spell:soul(2) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/conjure_arrow.lua b/data/scripts/spells/conjuring/conjure_arrow.lua new file mode 100644 index 000000000..79427013d --- /dev/null +++ b/data/scripts/spells/conjuring/conjure_arrow.lua @@ -0,0 +1,20 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(0, 2544, 10, CONST_ME_MAGIC_BLUE) +end + +spell:name("Conjure Arrow") +spell:words("exevo con") +spell:group("support") +spell:vocation("paladin;true", "royal paladin;true") +spell:id(51) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(13) +spell:mana(100) +spell:soul(1) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/conjure_bolt.lua b/data/scripts/spells/conjuring/conjure_bolt.lua new file mode 100644 index 000000000..677c147be --- /dev/null +++ b/data/scripts/spells/conjuring/conjure_bolt.lua @@ -0,0 +1,21 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(0, 2543, 5, CONST_ME_MAGIC_BLUE) +end + +spell:name("Conjure Bolt") +spell:words("exevo con mort") +spell:group("support") +spell:vocation("paladin;true", "royal paladin;true") +spell:id(79) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(17) +spell:mana(140) +spell:soul(2) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/conjure_explosive_arrow.lua b/data/scripts/spells/conjuring/conjure_explosive_arrow.lua new file mode 100644 index 000000000..36116f8cb --- /dev/null +++ b/data/scripts/spells/conjuring/conjure_explosive_arrow.lua @@ -0,0 +1,20 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(0, 2546, 8, CONST_ME_MAGIC_BLUE) +end + +spell:name("Conjure Explosive Arrow") +spell:words("exevo con flam") +spell:group("support") +spell:vocation("paladin;true", "royal paladin;true") +spell:id(49) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(25) +spell:mana(290) +spell:soul(3) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/conjuring/conjure_piercing_bolt.lua b/data/scripts/spells/conjuring/conjure_piercing_bolt.lua new file mode 100644 index 000000000..802c620a2 --- /dev/null +++ b/data/scripts/spells/conjuring/conjure_piercing_bolt.lua @@ -0,0 +1,20 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(0, 7363, 5, CONST_ME_MAGIC_BLUE) +end +spell:name("Conjure Piercing Bolt") +spell:words("exevo con grav") +spell:group("support") +spell:vocation("paladin;true", "royal paladin;true") +spell:id(109) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(33) +spell:mana(180) +spell:soul(3) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/conjure_poisoned_arrow.lua b/data/scripts/spells/conjuring/conjure_poisoned_arrow.lua new file mode 100644 index 000000000..9584930b0 --- /dev/null +++ b/data/scripts/spells/conjuring/conjure_poisoned_arrow.lua @@ -0,0 +1,20 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(0, 2545, 7, CONST_ME_MAGIC_BLUE) +end + +spell:name("Conjure Poisoned Arrow") +spell:words("exevo con pox") +spell:group("support") +spell:vocation("paladin;true", "royal paladin;true") +spell:id(48) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(16) +spell:mana(130) +spell:soul(2) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/conjure_power_bolt.lua b/data/scripts/spells/conjuring/conjure_power_bolt.lua new file mode 100644 index 000000000..053cc278f --- /dev/null +++ b/data/scripts/spells/conjuring/conjure_power_bolt.lua @@ -0,0 +1,21 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(0, 2547, 10, CONST_ME_MAGIC_BLUE) +end + +spell:name("Conjure Power Bolt") +spell:words("exevo con vis") +spell:group("support") +spell:vocation("royal paladin;true") +spell:id(95) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(59) +spell:mana(700) +spell:soul(4) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/conjure_sniper_arrow.lua b/data/scripts/spells/conjuring/conjure_sniper_arrow.lua new file mode 100644 index 000000000..c60911472 --- /dev/null +++ b/data/scripts/spells/conjuring/conjure_sniper_arrow.lua @@ -0,0 +1,21 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(0, 7364, 5, CONST_ME_MAGIC_BLUE) +end + +spell:name("Conjure Sniper Arrow") +spell:words("exevo con hur") +spell:group("support") +spell:vocation("paladin;true", "royal paladin;true") +spell:id(108) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(24) +spell:mana(160) +spell:soul(3) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/convince_creature_rune.lua b/data/scripts/spells/conjuring/convince_creature_rune.lua new file mode 100644 index 000000000..20e7a3c0e --- /dev/null +++ b/data/scripts/spells/conjuring/convince_creature_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2290, 1) +end + +spell:name("Convince Creature Rune") +spell:words("adeta sio") +spell:group("support") +spell:vocation("druid;true", "elder druid;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(16) +spell:mana(200) +spell:soul(3) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/cure_poison_rune.lua b/data/scripts/spells/conjuring/cure_poison_rune.lua new file mode 100644 index 000000000..c89772188 --- /dev/null +++ b/data/scripts/spells/conjuring/cure_poison_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2266, 1) +end + +spell:name("Cure Poison Rune") +spell:words("adana pox") +spell:group("support") +spell:vocation("druid;true", "elder druid;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(15) +spell:mana(200) +spell:soul(1) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/destroy_field_rune.lua b/data/scripts/spells/conjuring/destroy_field_rune.lua new file mode 100644 index 000000000..f3ae547ea --- /dev/null +++ b/data/scripts/spells/conjuring/destroy_field_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2261, 3) +end + +spell:name("Destroy Field Rune") +spell:words("adito grav") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "paladin;true", "royal paladin;true", "sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(17) +spell:mana(120) +spell:soul(2) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/disintegrate_rune.lua b/data/scripts/spells/conjuring/disintegrate_rune.lua new file mode 100644 index 000000000..4808ae78f --- /dev/null +++ b/data/scripts/spells/conjuring/disintegrate_rune.lua @@ -0,0 +1,19 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2310, 3) +end + +spell:name("Disintegrate Rune") +spell:words("adito tera") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "paladin;true", "royal paladin;true", "sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(21) +spell:mana(200) +spell:soul(3) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/enchant_spear.lua b/data/scripts/spells/conjuring/enchant_spear.lua new file mode 100644 index 000000000..7dda41d4c --- /dev/null +++ b/data/scripts/spells/conjuring/enchant_spear.lua @@ -0,0 +1,21 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2389, 7367, 1, CONST_ME_MAGIC_GREEN) +end + +spell:name("Enchant Spear") +spell:words("exeta con") +spell:group("support") +spell:vocation("paladin;true", "royal paladin;true") +spell:id(110) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(45) +spell:mana(350) +spell:soul(3) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/enchant_staff.lua b/data/scripts/spells/conjuring/enchant_staff.lua new file mode 100644 index 000000000..c1e95ab6b --- /dev/null +++ b/data/scripts/spells/conjuring/enchant_staff.lua @@ -0,0 +1,20 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2401, 2433, 1, CONST_ME_MAGIC_GREEN) +end + +spell:name("Enchant Staff") +spell:words("exeta vis") +spell:group("support") +spell:vocation("master sorcerer;true") +spell:id(92) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(41) +spell:mana(80) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/energy_bomb_rune.lua b/data/scripts/spells/conjuring/energy_bomb_rune.lua new file mode 100644 index 000000000..5e4c13bb2 --- /dev/null +++ b/data/scripts/spells/conjuring/energy_bomb_rune.lua @@ -0,0 +1,19 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2262, 2) +end + +spell:name("Energy Bomb Rune") +spell:words("adevo mas vis") +spell:group("support") +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(37) +spell:mana(880) +spell:soul(5) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/energy_field_rune.lua b/data/scripts/spells/conjuring/energy_field_rune.lua new file mode 100644 index 000000000..168ccc172 --- /dev/null +++ b/data/scripts/spells/conjuring/energy_field_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2277, 3) +end + +spell:name("Energy Field Rune") +spell:words("adevo grav vis") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(18) +spell:mana(320) +spell:soul(2) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/energy_wall_rune.lua b/data/scripts/spells/conjuring/energy_wall_rune.lua new file mode 100644 index 000000000..c750691e0 --- /dev/null +++ b/data/scripts/spells/conjuring/energy_wall_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2279, 4) +end + +spell:name("Energy Wall Rune") +spell:words("adevo mas grav vis") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(41) +spell:mana(1000) +spell:soul(5) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/explosion_rune.lua b/data/scripts/spells/conjuring/explosion_rune.lua new file mode 100644 index 000000000..b94e360f6 --- /dev/null +++ b/data/scripts/spells/conjuring/explosion_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2313, 6) +end + +spell:name("Explosion Rune") +spell:words("adevo mas hur") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(31) +spell:mana(570) +spell:soul(4) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/fire_bomb_rune.lua b/data/scripts/spells/conjuring/fire_bomb_rune.lua new file mode 100644 index 000000000..315742925 --- /dev/null +++ b/data/scripts/spells/conjuring/fire_bomb_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2305, 2) +end + +spell:name("Fire Bomb Rune") +spell:words("adevo mas flam") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(27) +spell:mana(600) +spell:soul(4) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/fire_field_rune.lua b/data/scripts/spells/conjuring/fire_field_rune.lua new file mode 100644 index 000000000..a3c50e457 --- /dev/null +++ b/data/scripts/spells/conjuring/fire_field_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2301, 3) +end + +spell:name("Fire Field Rune") +spell:words("adevo grav flam") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(15) +spell:mana(240) +spell:soul(1) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/fire_wall_rune.lua b/data/scripts/spells/conjuring/fire_wall_rune.lua new file mode 100644 index 000000000..9b912474c --- /dev/null +++ b/data/scripts/spells/conjuring/fire_wall_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2303, 4) +end + +spell:name("Fire Wall Rune") +spell:words("adevo mas grav flam") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(33) +spell:mana(780) +spell:soul(4) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/fireball_rune.lua b/data/scripts/spells/conjuring/fireball_rune.lua new file mode 100644 index 000000000..3d728f750 --- /dev/null +++ b/data/scripts/spells/conjuring/fireball_rune.lua @@ -0,0 +1,19 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2302, 5) +end + +spell:name("Fireball Rune") +spell:words("adori flam") +spell:group("support") +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(27) +spell:mana(460) +spell:soul(3) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/great_fireball_rune.lua b/data/scripts/spells/conjuring/great_fireball_rune.lua new file mode 100644 index 000000000..3936619e5 --- /dev/null +++ b/data/scripts/spells/conjuring/great_fireball_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2304, 4) +end + +spell:name("Great Fireball Rune") +spell:words("adori mas flam") +spell:group("support") +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(30) +spell:mana(530) +spell:soul(3) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/heavy_magic_missile_rune.lua b/data/scripts/spells/conjuring/heavy_magic_missile_rune.lua new file mode 100644 index 000000000..43bf49067 --- /dev/null +++ b/data/scripts/spells/conjuring/heavy_magic_missile_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2311, 10) +end + +spell:name("Heavy Magic Missile Rune") +spell:words("adori vis") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(25) +spell:mana(350) +spell:soul(2) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/holy_missile_rune.lua b/data/scripts/spells/conjuring/holy_missile_rune.lua new file mode 100644 index 000000000..5fae778e2 --- /dev/null +++ b/data/scripts/spells/conjuring/holy_missile_rune.lua @@ -0,0 +1,19 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2295, 5) +end + +spell:name("Holy Missile Rune") +spell:words("adori san") +spell:group("support") +spell:vocation("paladin;true", "royal paladin;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(27) +spell:mana(300) +spell:soul(3) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/icicle_rune.lua b/data/scripts/spells/conjuring/icicle_rune.lua new file mode 100644 index 000000000..213371d7c --- /dev/null +++ b/data/scripts/spells/conjuring/icicle_rune.lua @@ -0,0 +1,19 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2271, 5) +end + +spell:name("Icicle Rune") +spell:words("adori frigo") +spell:group("support") +spell:vocation("druid;true", "elder druid;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(28) +spell:mana(460) +spell:soul(3) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/intense_healing_rune.lua b/data/scripts/spells/conjuring/intense_healing_rune.lua new file mode 100644 index 000000000..844a36aca --- /dev/null +++ b/data/scripts/spells/conjuring/intense_healing_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2265, 1) +end + +spell:name("Intense Healing Rune") +spell:words("adura gran") +spell:group("support") +spell:vocation("druid;true", "elder druid;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(15) +spell:mana(120) +spell:soul(2) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/light_magic_missile_rune.lua b/data/scripts/spells/conjuring/light_magic_missile_rune.lua new file mode 100644 index 000000000..d255f12c5 --- /dev/null +++ b/data/scripts/spells/conjuring/light_magic_missile_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2287, 10) +end + +spell:name("Light Magic Missile Rune") +spell:words("adori min vis") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(15) +spell:mana(120) +spell:soul(1) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/light_stone_shower_rune.lua b/data/scripts/spells/conjuring/light_stone_shower_rune.lua new file mode 100644 index 000000000..26e8a3f76 --- /dev/null +++ b/data/scripts/spells/conjuring/light_stone_shower_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 23722, 4) +end + +spell:name("Light Stone Shower Rune") +spell:words("adori infir mas tera") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(1) +spell:mana(6) +spell:soul(3) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/lightest_magic_missile_rune.lua b/data/scripts/spells/conjuring/lightest_magic_missile_rune.lua new file mode 100644 index 000000000..21b0433a3 --- /dev/null +++ b/data/scripts/spells/conjuring/lightest_magic_missile_rune.lua @@ -0,0 +1,17 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2287, 10, CONST_ME_MAGIC_BLUE) +end + +spell:name("Lightest Magic Missile") +spell:words("adori dis min vis") +spell:group("support") +spell:vocation("none") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(1) +spell:mana(5) +spell:soul(0) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/lightest_missile_rune.lua b/data/scripts/spells/conjuring/lightest_missile_rune.lua new file mode 100644 index 000000000..78781c9a6 --- /dev/null +++ b/data/scripts/spells/conjuring/lightest_missile_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 23723, 10) +end + +spell:name("Lightest Missile Rune") +spell:words("adori infir vis") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(1) +spell:mana(6) +spell:soul(0) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/magic_wall_rune.lua b/data/scripts/spells/conjuring/magic_wall_rune.lua new file mode 100644 index 000000000..b1b304f6a --- /dev/null +++ b/data/scripts/spells/conjuring/magic_wall_rune.lua @@ -0,0 +1,19 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2293, 3) +end + +spell:name("Magic Wall Rune") +spell:words("adevo grav tera") +spell:group("support") +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(32) +spell:mana(750) +spell:soul(5) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/paralyze_rune.lua b/data/scripts/spells/conjuring/paralyze_rune.lua new file mode 100644 index 000000000..7df424a7a --- /dev/null +++ b/data/scripts/spells/conjuring/paralyze_rune.lua @@ -0,0 +1,19 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2278, 1) +end + +spell:name("Paralyze Rune") +spell:words("adana ani") +spell:group("support") +spell:vocation("druid;true", "elder druid;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(54) +spell:mana(1400) +spell:soul(3) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/poison_bomb_rune.lua b/data/scripts/spells/conjuring/poison_bomb_rune.lua new file mode 100644 index 000000000..0c2861d33 --- /dev/null +++ b/data/scripts/spells/conjuring/poison_bomb_rune.lua @@ -0,0 +1,19 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2286, 2) +end + +spell:name("Poison Bomb Rune") +spell:words("adevo mas pox") +spell:group("support") +spell:vocation("druid;true", "elder druid;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(25) +spell:mana(520) +spell:soul(2) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/poison_field_rune.lua b/data/scripts/spells/conjuring/poison_field_rune.lua new file mode 100644 index 000000000..a7b3f099b --- /dev/null +++ b/data/scripts/spells/conjuring/poison_field_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2285, 3) +end + +spell:name("Poison Field Rune") +spell:words("adevo grav pox") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(14) +spell:mana(200) +spell:soul(1) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/poison_wall_rune.lua b/data/scripts/spells/conjuring/poison_wall_rune.lua new file mode 100644 index 000000000..4a8010398 --- /dev/null +++ b/data/scripts/spells/conjuring/poison_wall_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2289, 4) +end + +spell:name("Poison Wall Rune") +spell:words("adevo mas grav pox") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(29) +spell:mana(640) +spell:soul(3) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/soulfire_rune.lua b/data/scripts/spells/conjuring/soulfire_rune.lua new file mode 100644 index 000000000..4275a2155 --- /dev/null +++ b/data/scripts/spells/conjuring/soulfire_rune.lua @@ -0,0 +1,19 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2308, 3) +end + +spell:name("Soulfire Rune") +spell:words("adevo res flam") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(27) +spell:mana(420) +spell:soul(3) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/stalagmite_rune.lua b/data/scripts/spells/conjuring/stalagmite_rune.lua new file mode 100644 index 000000000..7b04bba6d --- /dev/null +++ b/data/scripts/spells/conjuring/stalagmite_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2292, 10) +end + +spell:name("Stalagmite Rune") +spell:words("adori tera") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(24) +spell:mana(350) +spell:soul(2) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/stone_shower_rune.lua b/data/scripts/spells/conjuring/stone_shower_rune.lua new file mode 100644 index 000000000..129e1f439 --- /dev/null +++ b/data/scripts/spells/conjuring/stone_shower_rune.lua @@ -0,0 +1,19 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2288, 4) +end + +spell:name("Stone Shower Rune") +spell:words("adori mas tera") +spell:group("support") +spell:vocation("druid;true", "elder druid;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(28) +spell:mana(430) +spell:soul(3) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/sudden_death_rune.lua b/data/scripts/spells/conjuring/sudden_death_rune.lua new file mode 100644 index 000000000..b2b6caa84 --- /dev/null +++ b/data/scripts/spells/conjuring/sudden_death_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2268, 3) +end + +spell:name("Sudden Death Rune") +spell:words("adori gran mort") +spell:group("support") +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(45) +spell:mana(985) +spell:soul(5) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/thunderstorm_rune.lua b/data/scripts/spells/conjuring/thunderstorm_rune.lua new file mode 100644 index 000000000..af20497e5 --- /dev/null +++ b/data/scripts/spells/conjuring/thunderstorm_rune.lua @@ -0,0 +1,19 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2315, 4) +end + +spell:name("Thunderstorm Rune") +spell:words("adori mas vis") +spell:group("support") +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(28) +spell:mana(430) +spell:soul(3) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/ultimate_healing_rune.lua b/data/scripts/spells/conjuring/ultimate_healing_rune.lua new file mode 100644 index 000000000..18c7386d5 --- /dev/null +++ b/data/scripts/spells/conjuring/ultimate_healing_rune.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2273, 1) +end + +spell:name("Ultimate Healing Rune") +spell:words("adura vita") +spell:group("support") +spell:vocation("druid;true", "elder druid;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(24) +spell:mana(400) +spell:soul(3) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/conjuring/wild_growth_rune.lua b/data/scripts/spells/conjuring/wild_growth_rune.lua new file mode 100644 index 000000000..22690bb96 --- /dev/null +++ b/data/scripts/spells/conjuring/wild_growth_rune.lua @@ -0,0 +1,19 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return creature:conjureItem(2260, 2269, 2) +end + +spell:name("Wild Growth Rune") +spell:words("adevo grav vita") +spell:group("support") +spell:vocation("druid;true", "elder druid;true") +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(27) +spell:mana(600) +spell:soul(5) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/healing/bruise_bane.lua b/data/scripts/spells/healing/bruise_bane.lua new file mode 100644 index 000000000..ed4ed8674 --- /dev/null +++ b/data/scripts/spells/healing/bruise_bane.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +function onGetFormulaValues(_player, level, magicLevel) -- already compared to the official tibia | compared date: 08/03/21(m/d/y) (need more chars test accuracy) + local min = (level * 0.2 + magicLevel * 1.795) + local max = (level * 0.2 + magicLevel * 1.795) + 5 + return min, max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Bruise Bane") +spell:words("exura infir ico") +spell:group("healing") +spell:vocation("knight;true", "elite knight;true") +spell:id(170) +spell:cooldown(1000) +spell:groupCooldown(1000) +spell:level(1) +spell:mana(10) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:needLearn(false) +spell:isPremium(false) +spell:register() diff --git a/data/scripts/spells/healing/cure_bleeding.lua b/data/scripts/spells/healing/cure_bleeding.lua new file mode 100644 index 000000000..d13b1cfac --- /dev/null +++ b/data/scripts/spells/healing/cure_bleeding.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_BLEEDING) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Cure Bleeding") +spell:words("exana kor") +spell:group("healing") +spell:vocation("druid;true", "elder druid;true", "knight;true", "elite knight;true") +spell:id(144) +spell:cooldown(6000) +spell:groupCooldown(1000) +spell:level(45) +spell:mana(30) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:needLearn(false) +spell:isPremium(true) +spell:register() diff --git a/data/scripts/spells/healing/cure_burning.lua b/data/scripts/spells/healing/cure_burning.lua new file mode 100644 index 000000000..27339c355 --- /dev/null +++ b/data/scripts/spells/healing/cure_burning.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_FIRE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Cure Burning") +spell:words("exana flam") +spell:group("healing") +spell:vocation("druid;true", "elder druid;true") +spell:id(145) +spell:cooldown(6000) +spell:groupCooldown(1000) +spell:level(30) +spell:mana(30) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/healing/cure_curse.lua b/data/scripts/spells/healing/cure_curse.lua new file mode 100644 index 000000000..73c7fde84 --- /dev/null +++ b/data/scripts/spells/healing/cure_curse.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_CURSED) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Cure Curse") +spell:words("exana mort") +spell:group("healing") +spell:vocation("paladin;true", "royal paladin;true") +spell:id(147) +spell:cooldown(6000) +spell:groupCooldown(1000) +spell:level(80) +spell:mana(40) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/healing/cure_electrification.lua b/data/scripts/spells/healing/cure_electrification.lua new file mode 100644 index 000000000..0e1aed673 --- /dev/null +++ b/data/scripts/spells/healing/cure_electrification.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_ENERGY) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Cure Electrification") +spell:words("exana vis") +spell:group("healing") +spell:vocation("druid;true", "elder druid;true") +spell:id(146) +spell:cooldown(6000) +spell:groupCooldown(1000) +spell:level(22) +spell:mana(30) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/healing/cure_poison.lua b/data/scripts/spells/healing/cure_poison.lua new file mode 100644 index 000000000..8baa655f8 --- /dev/null +++ b/data/scripts/spells/healing/cure_poison.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_POISON) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Cure Poison") +spell:words("exana pox") +spell:group("healing") +spell:vocation("druid;true", "elder druid;true", "knight;true", "elite knight;true", "paladin;true", + "royal paladin;true", "sorcerer;true", "master sorcerer;true") +spell:id(29) +spell:cooldown(6000) +spell:groupCooldown(1000) +spell:level(10) +spell:mana(30) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/healing/divine_healing.lua b/data/scripts/spells/healing/divine_healing.lua new file mode 100644 index 000000000..1e2a42654 --- /dev/null +++ b/data/scripts/spells/healing/divine_healing.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +function onGetFormulaValues(_player, level, magicLevel) -- already compared to the official tibia | compared date: 05/07/19(m/d/y) + local min = (level * 0.2 + magicLevel * 7.22) + 44 + local max = (level * 0.2 + magicLevel * 12.79) + 79 + return min, max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Divine Healing") +spell:words("exura san") +spell:group("healing") +spell:vocation("paladin;true", "royal paladin;true") +spell:id(125) +spell:cooldown(1000) +spell:groupCooldown(1000) +spell:level(35) +spell:mana(160) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/healing/fair_wound_cleansing.lua b/data/scripts/spells/healing/fair_wound_cleansing.lua new file mode 100644 index 000000000..312781013 --- /dev/null +++ b/data/scripts/spells/healing/fair_wound_cleansing.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) + +function onGetFormulaValues(_player, level, magicLevel) -- already compared to the official tibia | compared date: 05/07/19(m/d/y) + local min = (level * 0.2 + magicLevel * 4 + 25) * 2 + local max = (level * 0.2 + magicLevel * 7.95 + 51) * 2 + return min, max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:group("healing") +spell:id(239) +spell:name("Fair Wound Cleansing") +spell:words("exura med ico") +spell:level(300) +spell:mana(90) +spell:isPremium(true) +spell:isSelfTarget(true) +spell:cooldown(1000) +spell:groupCooldown(1000) +spell:isAggressive(false) +spell:vocation("knight;true", "elite knight;true") +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/healing/heal_friend.lua b/data/scripts/spells/healing/heal_friend.lua new file mode 100644 index 000000000..c9cfaa3fe --- /dev/null +++ b/data/scripts/spells/healing/heal_friend.lua @@ -0,0 +1,37 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +function onGetFormulaValues(player, level, magicLevel) + local min = (level * 0.2 + magicLevel * 10) + 3 + local max = (level * 0.2 + magicLevel * 14) + 5 + return min, max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + return combat:execute(creature, variant) +end + +spell:name("Heal Friend") +spell:words("exura sio") +spell:group("healing") +spell:vocation("druid;true", "elder druid;true") +spell:id(84) +spell:cooldown(1000) +spell:groupCooldown(1000) +spell:level(18) +spell:mana(120) +spell:needTarget(true) +spell:hasParams(true) +spell:hasPlayerNameParam(true) +spell:allowOnSelf(false) +spell:isAggressive(false) +spell:isPremium(true) +spell:register() diff --git a/data/scripts/spells/healing/heal_monsters.lua b/data/scripts/spells/healing/heal_monsters.lua new file mode 100644 index 000000000..3e15d298a --- /dev/null +++ b/data/scripts/spells/healing/heal_monsters.lua @@ -0,0 +1,30 @@ +function onTargetCreature(creature, target) + local min = 100 + local max = 300 + + if target:isPlayer() then return true end + if target:getMaster() then return true end + + doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) + return true +end + +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) +combat:setArea(createCombatArea(AREA_CIRCLE3X3)) +combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("Heal Monster") +spell:words("#####458") +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() diff --git a/data/scripts/spells/healing/heal_monsters_9x9.lua b/data/scripts/spells/healing/heal_monsters_9x9.lua new file mode 100644 index 000000000..ec5bbb261 --- /dev/null +++ b/data/scripts/spells/healing/heal_monsters_9x9.lua @@ -0,0 +1,30 @@ +function onTargetCreature(creature, target) + local min = 0 + local max = 1000 + + if target:isPlayer() then return true end + if target:getMaster() then return true end + + doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) + return true +end + +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) +combat:setArea(createCombatArea(AREA_CIRCLE6X6)) +combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("Heal Monster 9x9") +spell:words("#####459") +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() diff --git a/data/scripts/spells/healing/intense_healing.lua b/data/scripts/spells/healing/intense_healing.lua new file mode 100644 index 000000000..1b6617e59 --- /dev/null +++ b/data/scripts/spells/healing/intense_healing.lua @@ -0,0 +1,33 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +function onGetFormulaValues(player, level, magicLevel) -- already compared to the official tibia | compared date: 05/07/19(m/d/y) + local min = (level * 0.2 + magicLevel * 3.184) + 20 + local max = (level * 0.2 + magicLevel * 5.59) + 35 + return min, max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Intense Healing") +spell:words("exura gran") +spell:group("healing") +spell:vocation("druid;true", "elder druid;true", "paladin;true", "royal paladin;true", "sorcerer;true", + "master sorcerer;true") +spell:id(2) +spell:cooldown(1000) +spell:groupCooldown(1000) +spell:level(20) +spell:mana(70) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:register() diff --git a/data/scripts/spells/healing/intense_recovery.lua b/data/scripts/spells/healing/intense_recovery.lua new file mode 100644 index 000000000..01a3afc2c --- /dev/null +++ b/data/scripts/spells/healing/intense_recovery.lua @@ -0,0 +1,33 @@ +local combat = Combat() +local cooldown = 60000 -- milis + +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +local condition = Condition(CONDITION_REGENERATION) +condition:setParameter(CONDITION_PARAM_TICKS, cooldown) +condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 40) +condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 3000) -- 3sec +condition:setParameter(CONDITION_PARAM_BUFF_SPELL, true) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Intense Recovery") +spell:words("utura gran") +spell:group("healing") +spell:vocation("knight;true", "elite knight;true", "paladin;true", "royal paladin;true") +spell:id(160) +spell:cooldown(cooldown) +spell:groupCooldown(1000) +spell:level(100) +spell:mana(165) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/healing/intense_wound_cleansing.lua b/data/scripts/spells/healing/intense_wound_cleansing.lua new file mode 100644 index 000000000..787b45656 --- /dev/null +++ b/data/scripts/spells/healing/intense_wound_cleansing.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +function onGetFormulaValues(player, level, magicLevel) + local min = (level * 0.2 + magicLevel * 70) + 438 + local max = (level * 0.2 + magicLevel * 92) + 544 + return min, max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Intense Wound Cleansing") +spell:words("exura gran ico") +spell:group("healing") +spell:vocation("knight;true", "elite knight;true") +spell:id(158) +spell:cooldown(600000) -- 600 sec +spell:groupCooldown(1000) +spell:level(80) +spell:mana(200) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/healing/light_healing.lua b/data/scripts/spells/healing/light_healing.lua new file mode 100644 index 000000000..a081e84a9 --- /dev/null +++ b/data/scripts/spells/healing/light_healing.lua @@ -0,0 +1,33 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +function onGetFormulaValues(player, level, magicLevel) -- already compared to the official tibia | compared date: 05/07/19(m/d/y) + local min = (level * 0.2 + magicLevel * 1.4) + 8 + local max = (level * 0.2 + magicLevel * 1.795) + 11 + return min, max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Light Healing") +spell:words("exura") +spell:group("healing") +spell:vocation("druid;true", "elder druid;true", "paladin;true", "royal paladin;true", "sorcerer;true", "master sorcerer;true") +spell:id(1) +spell:cooldown(1000) +spell:groupCooldown(1000) +spell:level(8) +spell:mana(20) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/healing/magic_patch.lua b/data/scripts/spells/healing/magic_patch.lua new file mode 100644 index 000000000..2ef109804 --- /dev/null +++ b/data/scripts/spells/healing/magic_patch.lua @@ -0,0 +1,35 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +function onGetFormulaValues(player, level, maglevel) -- already compared to the official tibia | compared date: 08/03/21(m/d/y) -- possible max limit of 30?, need test in magic level 71+. + local min = (level * 0 + maglevel * 0.1614) + 8 + local max = (level * 0 + maglevel * 0.2468) + 15 + return min, max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Magic Patch") +spell:words("exura infir") +spell:group("healing") +spell:vocation("druid;true", "elder druid;true", "paladin;true", "royal paladin;true", "sorcerer;true", + "master sorcerer;true") +spell:id(174) +spell:cooldown(1 * 1000) +spell:groupCooldown(1 * 1000) +spell:level(1) +spell:mana(6) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:needLearn(false) +spell:isPremium(false) +spell:register() diff --git a/data/scripts/spells/healing/mass_healing.lua b/data/scripts/spells/healing/mass_healing.lua new file mode 100644 index 000000000..93f732bff --- /dev/null +++ b/data/scripts/spells/healing/mass_healing.lua @@ -0,0 +1,45 @@ +function onTargetCreature(creature, target) + local player = creature:getPlayer() + local min = ((player:getLevel() / 5) + (player:getMagicLevel() * 5.7) + 26) + local max = ((player:getLevel() / 5) + (player:getMagicLevel() * 10.43) + 62) + + local bosses = {"leiden", "ravennous hunger", "dorokoll the mystic", "eshtaba the conjurer", "eliz the unyielding", "mezlon the defiler", "malkhar deathbringer", "containment crystal"} + local master = target:getMaster() + if target:isMonster() and not master or master and master:isMonster() then + if (not isInArray(bosses, target:getName():lower())) then + return true + end + end + + doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) + return true +end + +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) +combat:setArea(createCombatArea(AREA_CIRCLE3X3)) +combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + + +spell:name("Mass Healing") +spell:words("exura gran mas res") +spell:group("healing") +spell:vocation("druid;true", "elder druid;true") +spell:id(82) +spell:cooldown(2 * 1000) +spell:groupCooldown(1 * 1000) +spell:level(36) +spell:mana(150) +spell:isAggressive(false) +spell:isPremium(true) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/healing/nature's_embrace.lua b/data/scripts/spells/healing/nature's_embrace.lua new file mode 100644 index 000000000..377b3ec73 --- /dev/null +++ b/data/scripts/spells/healing/nature's_embrace.lua @@ -0,0 +1,43 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 2.5) + (maglevel * 20) + local max = (level / 2.5) + (maglevel * 28) -- TODO: Formulas (TibiaWiki says x2 but need more acurracy) + return min, max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + if creature:isPlayer() and var:getNumber() == creature:getId() then + creature:sendCancelMessage("You can't cast this spell to yourself.") + creature:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + else + return combat:execute(creature, var) + end +end + +spell:group("healing") +spell:id(242) +spell:name("Nature's Embrace") +spell:words("exura gran sio") +spell:level(300) +spell:mana(400) +spell:isPremium(true) +spell:needTarget(true) +spell:cooldown(1 * 1000) +spell:groupCooldown(1 * 1000) +spell:isAggressive(false) +spell:isBlockingWalls(true) +spell:hasParams(true) +spell:hasPlayerNameParam(true) +spell:vocation("druid;true", "elder druid;true") +spell:needLearn(false) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/healing/practice_healing.lua b/data/scripts/spells/healing/practice_healing.lua new file mode 100644 index 000000000..967b62aa9 --- /dev/null +++ b/data/scripts/spells/healing/practice_healing.lua @@ -0,0 +1,32 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) +combat:setFormula(COMBAT_FORMULA_DAMAGE, -5, 0, -9, 0) + +function onGetFormulaValues(player, level, magicLevel) + return 5, 9 +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Practice Healing") +spell:words("exura dis") +spell:group("healing") +spell:vocation("none") +spell:id(166) +spell:cooldown(1 * 1000) +spell:groupCooldown(1 * 1000) +spell:level(1) +spell:mana(5) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/healing/recovery.lua b/data/scripts/spells/healing/recovery.lua new file mode 100644 index 000000000..13bcae836 --- /dev/null +++ b/data/scripts/spells/healing/recovery.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +local condition = Condition(CONDITION_REGENERATION) +condition:setParameter(CONDITION_PARAM_TICKS, 1 * 60 * 1000) +condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 20) +condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 3 * 1000) +condition:setParameter(CONDITION_PARAM_BUFF_SPELL, true) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Recovery") +spell:words("utura") +spell:group("healing") +spell:vocation("knight;true", "elite knight;true", "paladin;true", "royal paladin;true") +spell:id(159) +spell:cooldown(1 * 60 * 1000) +spell:groupCooldown(1 * 1000) +spell:level(50) +spell:mana(75) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/healing/restoration.lua b/data/scripts/spells/healing/restoration.lua new file mode 100644 index 000000000..dd971ba1f --- /dev/null +++ b/data/scripts/spells/healing/restoration.lua @@ -0,0 +1,32 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) + +function onGetFormulaValues(player, level, maglevel) + local min = (level * 1.4 / 5) + (maglevel * 9.22 * 1.4) + 44 * 1.4 + local max = (level * 1.4 / 5) + (maglevel * 10.79 * 1.4) + 79 * 1.4 -- TODO: Formulas (Right now using 40% extra on Ultimate Healing with closer min and max values to the avg) + return min, max +end +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:group("healing") +spell:id(241) +spell:name("Restoration") +spell:words("exura max vita") +spell:level(300) +spell:mana(260) +spell:isSelfTarget(true) +spell:cooldown(6 * 1000) +spell:groupCooldown(1 * 1000) +spell:isAggressive(false) +spell:needLearn(false) +spell:vocation("druid;true", "sorcerer;true", "elder druid;true", "master sorcerer;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/healing/salvation.lua b/data/scripts/spells/healing/salvation.lua new file mode 100644 index 000000000..42d24a78f --- /dev/null +++ b/data/scripts/spells/healing/salvation.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +function onGetFormulaValues(player, level, magicLevel) -- already compared to the official tibia | compared date: 05/07/19(m/d/y) + local min = (level * 0.2 + magicLevel * 12) + 75 + local max = (level * 0.2 + magicLevel * 20) + 125 + return min, max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Salvation") +spell:words("exura gran san") +spell:group("healing") +spell:vocation("paladin;true", "royal paladin;true") +spell:id(36) +spell:cooldown(1000) +spell:groupCooldown(1000) +spell:level(60) +spell:mana(210) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/healing/ultimate_healing.lua b/data/scripts/spells/healing/ultimate_healing.lua new file mode 100644 index 000000000..ded205743 --- /dev/null +++ b/data/scripts/spells/healing/ultimate_healing.lua @@ -0,0 +1,33 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +function onGetFormulaValues(player, level, magicLevel) + local min = (level / 5) + (magicLevel * 6.8) + 42 + local max = (level / 5) + (magicLevel * 12.9) + 90 + return min, max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Ultimate Healing") +spell:words("exura vita") +spell:group("healing") +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:id(3) +spell:cooldown(1 * 1000) +spell:groupCooldown(1 * 1000) +spell:level(30) +spell:mana(160) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/healing/wound_cleansing.lua b/data/scripts/spells/healing/wound_cleansing.lua new file mode 100644 index 000000000..ce8cd637e --- /dev/null +++ b/data/scripts/spells/healing/wound_cleansing.lua @@ -0,0 +1,32 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +function onGetFormulaValues(player, level, magicLevel) -- already compared to the official tibia | compared date: 08/03/21(m/d/y) + local min = (level * 0.2 + magicLevel * 4) + 25 + local max = (level * 0.2 + magicLevel * 7.95) + 51 + return min, max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Wound Cleansing") +spell:words("exura ico") +spell:group("healing") +spell:vocation("knight;true", "elite knight;true") +spell:id(123) +spell:cooldown(1 * 1000) +spell:groupCooldown(1 * 1000) +spell:level(10) +spell:mana(40) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:register() diff --git a/data/scripts/spells/house/edit_door_list.lua b/data/scripts/spells/house/edit_door_list.lua new file mode 100644 index 000000000..c9cf57923 --- /dev/null +++ b/data/scripts/spells/house/edit_door_list.lua @@ -0,0 +1,24 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + local creaturePos = creature:getPosition() + creaturePos:getNextPosition(creature:getDirection()) + local tile = Tile(creaturePos) + local house = tile and tile:getHouse() + local doorId = house and house:getDoorIdByPosition(creaturePos) + if not doorId or not house:canEditAccessList(doorId, creature) then + creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + creature:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + creature:setEditHouse(house, doorId) + creature:sendHouseWindow(house, doorId) + return true +end + +spell:name("House Door List") +spell:words("aleta grav") +spell:needCasterTargetOrDirection(true) +spell:isAggressive(false) +spell:register() diff --git a/data/scripts/spells/house/edit_guest_list.lua b/data/scripts/spells/house/edit_guest_list.lua new file mode 100644 index 000000000..7b73b394e --- /dev/null +++ b/data/scripts/spells/house/edit_guest_list.lua @@ -0,0 +1,22 @@ +local spell = Spell("instant") + +function spell.onCastSpell(player, variant) + local house = player:getTile():getHouse() + if not house then + return false + end + + if house:canEditAccessList(GUEST_LIST, player) then + player:setEditHouse(house, GUEST_LIST) + player:sendHouseWindow(house, GUEST_LIST) + else + player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + player:getPosition():sendMagicEffect(CONST_ME_POFF) + end + return true +end + +spell:name("House Guest List") +spell:words("aleta sio") +spell:isAggressive(false) +spell:register() diff --git a/data/scripts/spells/house/edit_subowner_list.lua b/data/scripts/spells/house/edit_subowner_list.lua new file mode 100644 index 000000000..0306c56c7 --- /dev/null +++ b/data/scripts/spells/house/edit_subowner_list.lua @@ -0,0 +1,22 @@ +local spell = Spell("instant") + +function spell.onCastSpell(player, variant) + local house = player:getTile():getHouse() + if not house then + return false + end + + if house:canEditAccessList(SUBOWNER_LIST, player) then + player:setEditHouse(house, SUBOWNER_LIST) + player:sendHouseWindow(house, SUBOWNER_LIST) + else + player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + player:getPosition():sendMagicEffect(CONST_ME_POFF) + end + return true +end + +spell:name("House Subowner List") +spell:words("aleta som") +spell:isAggressive(false) +spell:register() diff --git a/data/scripts/spells/house/kick.lua b/data/scripts/spells/house/kick.lua new file mode 100644 index 000000000..2df8c9fe0 --- /dev/null +++ b/data/scripts/spells/house/kick.lua @@ -0,0 +1,20 @@ +local spell = Spell("instant") + +function spell.onCastSpell(player, variant) + local targetPlayer = Player(variant:getString()) or player + local guest = targetPlayer:getTile():getHouse() + local owner = player:getTile():getHouse() + if not owner or not guest or not guest:kickPlayer(player, targetPlayer) then + player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + player:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + return true +end + +spell:name("House Kick") +spell:words("alana sio") +spell:hasParams(true) +spell:hasPlayerNameParam(true) +spell:isAggressive(false) +spell:register() diff --git a/data/scripts/spells/monster/abyssador_paralyze.lua b/data/scripts/spells/monster/abyssador_paralyze.lua new file mode 100644 index 000000000..1571fd1b3 --- /dev/null +++ b/data/scripts/spells/monster/abyssador_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EXPLOSION) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.70, 0, -0.85, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("abyssador paralyze") +spell:words("###86") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/abyssador_poison_wave.lua b/data/scripts/spells/monster/abyssador_poison_wave.lua new file mode 100644 index 000000000..d2e0222eb --- /dev/null +++ b/data/scripts/spells/monster/abyssador_poison_wave.lua @@ -0,0 +1,29 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE) + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PLANTATTACK) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + + local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("abyssador poison wave") +spell:words("###87") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/abyssador_skill_reducer_1.lua b/data/scripts/spells/monster/abyssador_skill_reducer_1.lua new file mode 100644 index 000000000..a9091ecea --- /dev/null +++ b/data/scripts/spells/monster/abyssador_skill_reducer_1.lua @@ -0,0 +1,27 @@ +local combat = {} + +for i = 20, 55 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 15000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE1X1) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(20, 55)]:execute(creature, var) +end + +spell:name("abyssador skill reducer 1") +spell:words("###84") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/abyssador_skill_reducer_2.lua b/data/scripts/spells/monster/abyssador_skill_reducer_2.lua new file mode 100644 index 000000000..074770ba2 --- /dev/null +++ b/data/scripts/spells/monster/abyssador_skill_reducer_2.lua @@ -0,0 +1,28 @@ +local combat = {} + +for i = 50, 90 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 15000) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE1X1) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(50, 90)]:execute(creature, var) +end + +spell:name("abyssador skill reducer 2") +spell:words("###85") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/aftershock_wave.lua b/data/scripts/spells/monster/aftershock_wave.lua new file mode 100644 index 000000000..c8309275b --- /dev/null +++ b/data/scripts/spells/monster/aftershock_wave.lua @@ -0,0 +1,20 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) + +local area = createCombatArea(AREA_WAVE11) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("aftershock wave") +spell:words("###448") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/spells/scripts/monster/aggresiveLavaWave.lua b/data/scripts/spells/monster/aggresiveLavaWave.lua similarity index 78% rename from data/spells/scripts/monster/aggresiveLavaWave.lua rename to data/scripts/spells/monster/aggresiveLavaWave.lua index f5d4e6be3..4768d805f 100644 --- a/data/spells/scripts/monster/aggresiveLavaWave.lua +++ b/data/scripts/spells/monster/aggresiveLavaWave.lua @@ -31,6 +31,16 @@ end setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") -function onCastSpell(creature, var) +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) return combat:execute(creature, var) end + +spell:name("aggresiveLavaWave") +spell:words("###464") +spell:needLearn(true) +spell:needDirection(true) +spell:cooldown("2000") +spell:isSelfTarget(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ancient_scarab_paralyze.lua b/data/scripts/spells/monster/ancient_scarab_paralyze.lua new file mode 100644 index 000000000..f7e5f32d9 --- /dev/null +++ b/data/scripts/spells/monster/ancient_scarab_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) + + local condition = Condition(CONDITION_PARALYZE) + combat:setParameter(CONDITION_PARAM_TICKS, 25000) + combat:setFormula(-0.45, 0, -0.75, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("ancient scarab paralyze") +spell:words("###118") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/annihilon_paralyze.lua b/data/scripts/spells/monster/annihilon_paralyze.lua new file mode 100644 index 000000000..322af0020 --- /dev/null +++ b/data/scripts/spells/monster/annihilon_paralyze.lua @@ -0,0 +1,26 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SNOWBALL) + + local condition = Condition(CONDITION_PARALYZE) + combat:setParameter(CONDITION_PARAM_TICKS, 20000) + combat:setFormula(-0.55, 0, -0.75, 0) + combat:addCondition(condition) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("annihilon paralyze") +spell:words("###89") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/annihilon_skill_reducer.lua b/data/scripts/spells/monster/annihilon_skill_reducer.lua new file mode 100644 index 000000000..003206ed0 --- /dev/null +++ b/data/scripts/spells/monster/annihilon_skill_reducer.lua @@ -0,0 +1,29 @@ +local combat = {} + +for i = 40, 55 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 10000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(40, 55)]:execute(creature, var) +end + +spell:name("annihilon skill reducer") +spell:words("###88") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/anomaly_break.lua b/data/scripts/spells/monster/anomaly_break.lua new file mode 100644 index 000000000..fa51eceb7 --- /dev/null +++ b/data/scripts/spells/monster/anomaly_break.lua @@ -0,0 +1,35 @@ +local function anomalyBreak(pos) + local upConer = {x = pos.x - 1, y = pos.y - 1, z = pos.z} -- upLeftCorner + local downConer = {x = pos.x + 1, y = pos.y + 1, z = pos.z} -- downRightCorner + + for i=upConer.x, downConer.x do + for j=upConer.y, downConer.y do + for k= upConer.z, downConer.z do + local room = {x=i, y=j, z=k} + local tile = Tile(room) + if tile then + if tile:getItemById(1499) then + tile:getItemById(1499):remove() + Position(room):sendMagicEffect(3) + elseif tile:getItemById(1497) then + tile:getItemById(1497):remove() + Position(room):sendMagicEffect(3) + end + end + end + end + end +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local pos = creature:getPosition() + anomalyBreak(pos) +end + +spell:name("anomaly break") +spell:words("###452") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/anomaly_wave.lua b/data/scripts/spells/monster/anomaly_wave.lua new file mode 100644 index 000000000..ce33b86dc --- /dev/null +++ b/data/scripts/spells/monster/anomaly_wave.lua @@ -0,0 +1,20 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) + +local area = createCombatArea(AREA_WAVE12) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("anomaly wave") +spell:words("###453") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/apprentice_sheng_summon.lua b/data/scripts/spells/monster/apprentice_sheng_summon.lua new file mode 100644 index 000000000..83912ab37 --- /dev/null +++ b/data/scripts/spells/monster/apprentice_sheng_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Hyaena", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("apprentice sheng summon") +spell:words("###127") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/arachir_the_ancient_one_summon.lua b/data/scripts/spells/monster/arachir_the_ancient_one_summon.lua new file mode 100644 index 000000000..01c016c4b --- /dev/null +++ b/data/scripts/spells/monster/arachir_the_ancient_one_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Lich", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("arachir the ancient one summon") +spell:words("###128") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/arachnophobica_wavedice.lua b/data/scripts/spells/monster/arachnophobica_wavedice.lua new file mode 100644 index 000000000..71986fc98 --- /dev/null +++ b/data/scripts/spells/monster/arachnophobica_wavedice.lua @@ -0,0 +1,30 @@ +local combat = createCombatObject() +setCombatParam(combat, COMBAT_PARAM_TYPE, CONDITION_DROWN) +setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_CRAPS) + + arr = { + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + setCombatArea(combat, area) + + +local spell = Spell("instant") + +function spell.onCastSpell(cid, var) + return doCombat(cid, combat, var) +end + +spell:name("arachnophobicawavedice") +spell:words("###467") +spell:needLearn(true) +spell:needDirection(true) +spell:cooldown("2000") +spell:isSelfTarget(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/arachnophobica_waveenergy.lua b/data/scripts/spells/monster/arachnophobica_waveenergy.lua new file mode 100644 index 000000000..9ad2ad413 --- /dev/null +++ b/data/scripts/spells/monster/arachnophobica_waveenergy.lua @@ -0,0 +1,30 @@ +local combat = createCombatObject() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) + + arr = { + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + setCombatArea(combat, area) + + +local spell = Spell("instant") + +function spell.onCastSpell(cid, var) + return doCombat(cid, combat, var) +end + +spell:name("arachnophobicawaveenergy") +spell:words("###468") +spell:needLearn(true) +spell:needDirection(true) +spell:cooldown("2000") +spell:isSelfTarget(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/arkhothep_curse.lua b/data/scripts/spells/monster/arkhothep_curse.lua new file mode 100644 index 000000000..0ba8566d5 --- /dev/null +++ b/data/scripts/spells/monster/arkhothep_curse.lua @@ -0,0 +1,50 @@ +local combat = {} + +for i = 2, 5 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for j = 1, 33 do + damage = damage * 1.2 + condition:addDamage(1, 4000, -damage) + end + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(2, 5)]:execute(creature, var) +end + +spell:name("arkhothep curse") +spell:words("###91") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/arkhothep_paralyze.lua b/data/scripts/spells/monster/arkhothep_paralyze.lua new file mode 100644 index 000000000..e6b8f21b6 --- /dev/null +++ b/data/scripts/spells/monster/arkhothep_paralyze.lua @@ -0,0 +1,40 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.75, 0, -0.95, 0) + combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("arkhothep paralyze") +spell:words("###90") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/arkhothep_summon.lua b/data/scripts/spells/monster/arkhothep_summon.lua new file mode 100644 index 000000000..2c19cd1cd --- /dev/null +++ b/data/scripts/spells/monster/arkhothep_summon.lua @@ -0,0 +1,46 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) + +arr = { +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +} + +local area = createCombatArea(arr) +combat:setArea(area) + +local maxsummons = 6 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 6 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Ancient Scarab", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("arkhothep summon") +spell:words("###129") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/arthei_summon.lua b/data/scripts/spells/monster/arthei_summon.lua new file mode 100644 index 000000000..362f34d07 --- /dev/null +++ b/data/scripts/spells/monster/arthei_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 4 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 4 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Vampire", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("arthei summon") +spell:words("###130") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ashfalor_summon.lua b/data/scripts/spells/monster/ashfalor_summon.lua new file mode 100644 index 000000000..8b3ef9724 --- /dev/null +++ b/data/scripts/spells/monster/ashfalor_summon.lua @@ -0,0 +1,70 @@ +local summons = { + [1] = {name = "Demon Skeleton"}, + [2] = {name = "Bonebeast"}, + [3] = {name = "Banshee"}, + [4] = {name = "Blightwalker"}, + [5] = {name = "Crypt Shambler"}, + [6] = {name = "Ghoul"}, + [7] = {name = "Lich"}, + [8] = {name = "Mummy"}, + [9] = {name = "Zombie"}, + [10] = {name = "Ghost"}, + [11] = {name = "Enraged Soul"}, + [12] = {name = "Vampire"}, + [13] = {name = "Vampire Bride"}, + [14] = {name = "Vampire Viscount"}, + [15] = {name = "Pirate Ghost"}, + [16] = {name = "Souleater"}, + [17] = {name = "Tarnished Spirit"}, + [18] = {name = "White Shade"}, + [19] = {name = "Vicious Manbat"} +} + +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat:setArea(area) + +local maxsummons = 25 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) +creature:say("RISE MY SERVANTS! RISE!!", TALKTYPE_ORANGE_2) + + local summoncount = creature:getSummons() + local creaturePos = creature:getPosition() + if #summoncount < 25 then + for i = 1, maxsummons do + local mid = Game.createMonster(summons[math.random(#summons)].name, Position(creaturePos.x + math.random(-3, 3), creaturePos.y + math.random(-3, 3), creaturePos.z)) + if not mid then + return + end + end + end + return combat:execute(creature, var) +end + +spell:name("ashfalor summon") +spell:words("###355") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/askarak_wave.lua b/data/scripts/spells/monster/askarak_wave.lua new file mode 100644 index 000000000..f382cd6c8 --- /dev/null +++ b/data/scripts/spells/monster/askarak_wave.lua @@ -0,0 +1,27 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("askarak wave") +spell:words("###238") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/azerus_electrify.lua b/data/scripts/spells/monster/azerus_electrify.lua new file mode 100644 index 000000000..cb8f1bf4b --- /dev/null +++ b/data/scripts/spells/monster/azerus_electrify.lua @@ -0,0 +1,23 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_YELLOWENERGY) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL) + +local condition = Condition(CONDITION_ENERGY) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(10, 10000, -25) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("azerus electrify") +spell:words("###95") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/azerus_skill_reducer_1.lua b/data/scripts/spells/monster/azerus_skill_reducer_1.lua new file mode 100644 index 000000000..2cd24b66d --- /dev/null +++ b/data/scripts/spells/monster/azerus_skill_reducer_1.lua @@ -0,0 +1,26 @@ +local combat = {} + +for i = 40, 50 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 15000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(40, 50)]:execute(creature, var) +end + +spell:name("azerus skill reducer 1") +spell:words("###92") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/azerus_skill_reducer_2.lua b/data/scripts/spells/monster/azerus_skill_reducer_2.lua new file mode 100644 index 000000000..b7b7e2ce5 --- /dev/null +++ b/data/scripts/spells/monster/azerus_skill_reducer_2.lua @@ -0,0 +1,27 @@ +local combat = {} + +for i = 40, 55 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 15000) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(40, 55)]:execute(creature, var) +end + +spell:name("azerus skill reducer 2") +spell:words("###93") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/azerus_skill_reducer_3.lua b/data/scripts/spells/monster/azerus_skill_reducer_3.lua new file mode 100644 index 000000000..fa89ad9af --- /dev/null +++ b/data/scripts/spells/monster/azerus_skill_reducer_3.lua @@ -0,0 +1,26 @@ +local combat = {} + +for i = 45, 55 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 15000) + condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(45, 55)]:execute(creature, var) +end + +spell:name("azerus skill reducer 3") +spell:words("###94") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/azerus_soulfire_1.lua b/data/scripts/spells/monster/azerus_soulfire_1.lua new file mode 100644 index 000000000..69b21d656 --- /dev/null +++ b/data/scripts/spells/monster/azerus_soulfire_1.lua @@ -0,0 +1,24 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(20, 9000, -10) + +local area = createCombatArea(AREA_CIRCLE3X3) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("azerus soulfire 1") +spell:words("###96") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/azerus_soulfire_2.lua b/data/scripts/spells/monster/azerus_soulfire_2.lua new file mode 100644 index 000000000..b2030c1c9 --- /dev/null +++ b/data/scripts/spells/monster/azerus_soulfire_2.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(20, 9000, -10) + +local area = createCombatArea(AREA_CIRCLE3X3) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("azerus soulfire 2") +spell:words("###98") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/azerus_summon_1.lua b/data/scripts/spells/monster/azerus_summon_1.lua new file mode 100644 index 000000000..c13a4a9bc --- /dev/null +++ b/data/scripts/spells/monster/azerus_summon_1.lua @@ -0,0 +1,46 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER) + +arr = { +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +} + +local area = createCombatArea(arr) +combat:setArea(area) + +local maxsummons = 6 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 6 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Rift Worm", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("azerus summon 1") +spell:words("###131") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/azerus_summon_2.lua b/data/scripts/spells/monster/azerus_summon_2.lua new file mode 100644 index 000000000..eeef269e4 --- /dev/null +++ b/data/scripts/spells/monster/azerus_summon_2.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BIGCLOUDS) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) + +local maxsummons = 4 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 4 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Rift Brood", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("azerus summon 2") +spell:words("###132") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/azerus_summon_3.lua b/data/scripts/spells/monster/azerus_summon_3.lua new file mode 100644 index 000000000..37f7faa3e --- /dev/null +++ b/data/scripts/spells/monster/azerus_summon_3.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) + +local maxsummons = 4 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 4 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Rift Scythe", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("azerus summon 3") +spell:words("###133") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/azerus_summon_4.lua b/data/scripts/spells/monster/azerus_summon_4.lua new file mode 100644 index 000000000..12d66ce87 --- /dev/null +++ b/data/scripts/spells/monster/azerus_summon_4.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 4 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 4 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("War Golem", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("azerus summon 4") +spell:words("###134") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/bane_of_light_paralyze.lua b/data/scripts/spells/monster/bane_of_light_paralyze.lua new file mode 100644 index 000000000..08aead01c --- /dev/null +++ b/data/scripts/spells/monster/bane_of_light_paralyze.lua @@ -0,0 +1,39 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.45, 0, -0.8, 0) + combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("bane of light paralyze") +spell:words("###354") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/banshee_paralyze.lua b/data/scripts/spells/monster/banshee_paralyze.lua new file mode 100644 index 000000000..fb56ae2dd --- /dev/null +++ b/data/scripts/spells/monster/banshee_paralyze.lua @@ -0,0 +1,21 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.65, 0, -0.9, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("banshee paralyze") +spell:words("###81") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/barbarian_brutetamer_skill_reducer.lua b/data/scripts/spells/monster/barbarian_brutetamer_skill_reducer.lua new file mode 100644 index 000000000..e44756810 --- /dev/null +++ b/data/scripts/spells/monster/barbarian_brutetamer_skill_reducer.lua @@ -0,0 +1,30 @@ +local combat = {} + +for i = 90, 99 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SNOWBALL) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 8000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(90, 99)]:execute(creature, var) +end + +spell:name("barbarian brutetamer skill reducer") +spell:words("###38") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/betrayed_wraith_paralyze.lua b/data/scripts/spells/monster/betrayed_wraith_paralyze.lua new file mode 100644 index 000000000..f96e2729a --- /dev/null +++ b/data/scripts/spells/monster/betrayed_wraith_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 3000) + condition:setFormula(-0.85, 0, -0.95, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("betrayed wraith paralyze") +spell:words("###296") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/betrayed_wraith_skill_reducer.lua b/data/scripts/spells/monster/betrayed_wraith_skill_reducer.lua new file mode 100644 index 000000000..76b401581 --- /dev/null +++ b/data/scripts/spells/monster/betrayed_wraith_skill_reducer.lua @@ -0,0 +1,39 @@ +local combat = {} + +for i = 1, 20 do +combat[i] = Combat() +combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_YELLOW_RINGS) + +local condition = Condition(CONDITION_ATTRIBUTES) +condition:setParameter(CONDITION_PARAM_TICKS, 8000) +condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + +local area = createCombatArea({ + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0} +}) + +combat[i]:setArea(area) +combat[i]:addCondition(condition) + +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(1, 20)]:execute(creature, var) +end + +spell:name("betrayed wraith skill reducer") +spell:words("###48") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/bibby_bloodbath_paralyze.lua b/data/scripts/spells/monster/bibby_bloodbath_paralyze.lua new file mode 100644 index 000000000..57e53f840 --- /dev/null +++ b/data/scripts/spells/monster/bibby_bloodbath_paralyze.lua @@ -0,0 +1,24 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.35, 0, -0.55, 0) + combat:addCondition(condition) + + local area = createCombatArea(AREA_SQUARE1X1) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("bibby bloodbath paralyze") +spell:words("###99") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/big_boss_trolliver_summon.lua b/data/scripts/spells/monster/big_boss_trolliver_summon.lua new file mode 100644 index 000000000..ecf6a1c02 --- /dev/null +++ b/data/scripts/spells/monster/big_boss_trolliver_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 5 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 5 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Troll Champion", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("big boss trolliver summon") +spell:words("###135") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/big_death_wave.lua b/data/scripts/spells/monster/big_death_wave.lua new file mode 100644 index 000000000..35099d34d --- /dev/null +++ b/data/scripts/spells/monster/big_death_wave.lua @@ -0,0 +1,20 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + +local area = createCombatArea(AREA_WAVE11) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("big death wave") +spell:words("###455") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/big_energy_purple_wave.lua b/data/scripts/spells/monster/big_energy_purple_wave.lua new file mode 100644 index 000000000..55eb187d7 --- /dev/null +++ b/data/scripts/spells/monster/big_energy_purple_wave.lua @@ -0,0 +1,20 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) + +local area = createCombatArea(AREA_WAVE11) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("big energy purple wave") +spell:words("###423") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/big_energy_purple_wave2.lua b/data/scripts/spells/monster/big_energy_purple_wave2.lua new file mode 100644 index 000000000..ef0558215 --- /dev/null +++ b/data/scripts/spells/monster/big_energy_purple_wave2.lua @@ -0,0 +1,20 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) + +local area = createCombatArea(AREA_WAVE11) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("big energy purple wave2") +spell:words("###417") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/big_energy_wave.lua b/data/scripts/spells/monster/big_energy_wave.lua new file mode 100644 index 000000000..97c0f5bd1 --- /dev/null +++ b/data/scripts/spells/monster/big_energy_wave.lua @@ -0,0 +1,20 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) + +local area = createCombatArea(AREA_WAVE11) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("big energy wave") +spell:words("###447") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/big_explosion_wave.lua b/data/scripts/spells/monster/big_explosion_wave.lua new file mode 100644 index 000000000..4f6a6333b --- /dev/null +++ b/data/scripts/spells/monster/big_explosion_wave.lua @@ -0,0 +1,20 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA) + +local area = createCombatArea(AREA_WAVE11) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("big explosion wave") +spell:words("###454") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/big_lifedrain_wave.lua b/data/scripts/spells/monster/big_lifedrain_wave.lua new file mode 100644 index 000000000..4d625e30a --- /dev/null +++ b/data/scripts/spells/monster/big_lifedrain_wave.lua @@ -0,0 +1,20 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_LIFEDRAIN) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + +local area = createCombatArea(AREA_WAVE11) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("big lifedrain wave") +spell:words("###424") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/big_skill_reducer.lua b/data/scripts/spells/monster/big_skill_reducer.lua new file mode 100644 index 000000000..65e6423ec --- /dev/null +++ b/data/scripts/spells/monster/big_skill_reducer.lua @@ -0,0 +1,43 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) + +local condition = Condition(CONDITION_ATTRIBUTES) +condition:setParameter(CONDITION_PARAM_TICKS, 6000) +condition:setParameter(CONDITION_PARAM_SKILL_DISTANCE, -15) +condition:setParameter(CONDITION_PARAM_SKILL_SHIELD, -15) +condition:setParameter(CONDITION_PARAM_SKILL_MELEE, -15) +condition:setParameter(CONDITION_PARAM_STAT_MAGICPOINTS, -15) + +arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + +local area = createCombatArea(arr) + +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("big skill reducer") +spell:words("###421") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/blightwalker_curse.lua b/data/scripts/spells/monster/blightwalker_curse.lua new file mode 100644 index 000000000..f90221757 --- /dev/null +++ b/data/scripts/spells/monster/blightwalker_curse.lua @@ -0,0 +1,50 @@ +local combat = {} + +for i = 1, 1 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for j = 1, 26 do + damage = damage * 1.2 + condition:addDamage(1, 4000, -damage) + end + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(1, 1)]:execute(creature, var) +end + +spell:name("blightwalker curse") +spell:words("###16") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/blightwalker_paralyze.lua b/data/scripts/spells/monster/blightwalker_paralyze.lua new file mode 100644 index 000000000..8e5b38c45 --- /dev/null +++ b/data/scripts/spells/monster/blightwalker_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 25000) + condition:setFormula(-0.7, 0, -0.9, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("blightwalker paralyze") +spell:words("###209") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/blood_hand_paralyze.lua b/data/scripts/spells/monster/blood_hand_paralyze.lua new file mode 100644 index 000000000..50d770668 --- /dev/null +++ b/data/scripts/spells/monster/blood_hand_paralyze.lua @@ -0,0 +1,25 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 3000) + condition:setFormula(-0.45, 0, -0.65, 0) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("blood hand paralyze") +spell:words("###281") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/bog_raider_paralyze.lua b/data/scripts/spells/monster/bog_raider_paralyze.lua new file mode 100644 index 000000000..664c90717 --- /dev/null +++ b/data/scripts/spells/monster/bog_raider_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.40, 0, -0.50, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("bog raider paralyze") +spell:words("###62") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/bonebeast_paralyze.lua b/data/scripts/spells/monster/bonebeast_paralyze.lua new file mode 100644 index 000000000..63cd42bb5 --- /dev/null +++ b/data/scripts/spells/monster/bonebeast_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 25000) + condition:setFormula(-0.3, 0, -0.5, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("bonebeast paralyze") +spell:words("###205") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/boogey_summon.lua b/data/scripts/spells/monster/boogey_summon.lua new file mode 100644 index 000000000..25a131df2 --- /dev/null +++ b/data/scripts/spells/monster/boogey_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Demon Skeleton", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("boogey summon") +spell:words("###268") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/braindeath_paralyze.lua b/data/scripts/spells/monster/braindeath_paralyze.lua new file mode 100644 index 000000000..fa5616fe2 --- /dev/null +++ b/data/scripts/spells/monster/braindeath_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.65, 0, -0.85, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("braindeath paralyze") +spell:words("###80") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/breach_brood_reducer.lua b/data/scripts/spells/monster/breach_brood_reducer.lua new file mode 100644 index 000000000..d6343a47a --- /dev/null +++ b/data/scripts/spells/monster/breach_brood_reducer.lua @@ -0,0 +1,27 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_BURSTARROW) + +local condition = Condition(CONDITION_ATTRIBUTES) +condition:setParameter(CONDITION_PARAM_TICKS, 10000) +condition:setParameter(CONDITION_PARAM_STAT_MAGICPOINTS, -15) + +local area = createCombatArea(AREA_SQUARE1X1) + +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("breach brood reducer") +spell:words("###446") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:isSelfTarget("5") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/brimstone_bug_paralyze.lua b/data/scripts/spells/monster/brimstone_bug_paralyze.lua new file mode 100644 index 000000000..5ab94e5cf --- /dev/null +++ b/data/scripts/spells/monster/brimstone_bug_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 25000) + condition:setFormula(-0.65, 0, -0.80, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("brimstone bug paralyze") +spell:words("###211") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/brimstone_bug_wave.lua b/data/scripts/spells/monster/brimstone_bug_wave.lua new file mode 100644 index 000000000..066e76e4a --- /dev/null +++ b/data/scripts/spells/monster/brimstone_bug_wave.lua @@ -0,0 +1,29 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_YELLOW_RINGS) + + arr = { + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("brimstone bug wave") +spell:words("###210") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/bullwark_paralyze.lua b/data/scripts/spells/monster/bullwark_paralyze.lua new file mode 100644 index 000000000..b524f85f0 --- /dev/null +++ b/data/scripts/spells/monster/bullwark_paralyze.lua @@ -0,0 +1,32 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 5000) +condition:setFormula(-0.55, 0, -0.7, 0) +combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("bullwark paralyze") +spell:words("###381") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/bullwark_summon.lua b/data/scripts/spells/monster/bullwark_summon.lua new file mode 100644 index 000000000..459ac2714 --- /dev/null +++ b/data/scripts/spells/monster/bullwark_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 4 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 4 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Moohtant", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("bullwark summon") +spell:words("###380") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/burning_gladiator_firering.lua b/data/scripts/spells/monster/burning_gladiator_firering.lua new file mode 100644 index 000000000..525ce7784 --- /dev/null +++ b/data/scripts/spells/monster/burning_gladiator_firering.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) +arr = { +{0, 1, 1, 1, 0}, +{1, 0, 0, 0, 1}, +{1, 0, 2, 0, 1}, +{1, 0, 0, 0, 1}, +{0, 1, 1, 1, 0} +} + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("firering") +spell:words("###478") +spell:needLearn(true) +spell:cooldown("2000") +spell:isSelfTarget(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/burning_gladiator_firex.lua b/data/scripts/spells/monster/burning_gladiator_firex.lua new file mode 100644 index 000000000..eb19aa7f4 --- /dev/null +++ b/data/scripts/spells/monster/burning_gladiator_firex.lua @@ -0,0 +1,24 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) +arr = { +{1, 0, 1}, +{0, 2, 0}, +{1, 0, 1} +} + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("firex") +spell:words("###479") +spell:needLearn(true) +spell:cooldown("2000") +spell:isSelfTarget(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/canopic_jar_heal.lua b/data/scripts/spells/monster/canopic_jar_heal.lua new file mode 100644 index 000000000..e19b1fc9b --- /dev/null +++ b/data/scripts/spells/monster/canopic_jar_heal.lua @@ -0,0 +1,59 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) + +arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + +local area = createCombatArea(arr) +combat:setArea(area) + +function onTargetCreature(creature, target) + local hp = (creature:getHealth()/creature:getMaxHealth())*100 + local min = 4000 + local max = 5000 + + local master = target:getMaster() + if target:isPlayer() and not master + or master and master:isPlayer() then + return true + end + if hp > 75 then + doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) + elseif hp < 75 and hp > 50 then + doTargetCombatHealth(0, target, COMBAT_HEALING, min*0.5, max*0.5, CONST_ME_NONE) + elseif hp < 50 and hp > 25 then + doTargetCombatHealth(0, target, COMBAT_HEALING, min*0.25, max*0.25, CONST_ME_NONE) + elseif hp < 25 then + doTargetCombatHealth(0, target, COMBAT_HEALING, min*0.10, max*0.10, CONST_ME_NONE) + end + + return true +end + +combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("canopic jar heal") +spell:words("###390") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/carniphila_paralyze.lua b/data/scripts/spells/monster/carniphila_paralyze.lua new file mode 100644 index 000000000..479e234f2 --- /dev/null +++ b/data/scripts/spells/monster/carniphila_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.45, 0, -0.75, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("carniphila paralyze") +spell:words("###63") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/chakoya_freeze.lua b/data/scripts/spells/monster/chakoya_freeze.lua new file mode 100644 index 000000000..5835707f3 --- /dev/null +++ b/data/scripts/spells/monster/chakoya_freeze.lua @@ -0,0 +1,24 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK) + +local condition = Condition(CONDITION_FREEZING) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(2, 8000, -8) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("chakoya freeze") +spell:words("###235") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/charge_vortex.lua b/data/scripts/spells/monster/charge_vortex.lua new file mode 100644 index 000000000..3944d6078 --- /dev/null +++ b/data/scripts/spells/monster/charge_vortex.lua @@ -0,0 +1,55 @@ +local mathCount = 0 + +local positions = {} + +local function createVortex() + local storedPositions = { + {x = 32264, y = 31253, z = 14}, + {x = 32269, y = 31258, z = 14}, + {x = 32275, y = 31255, z = 14}, + {x = 32280, y = 31253, z = 14}, + {x = 32271, y = 31248, z = 14}, + {x = 32264, y = 31245, z = 14}, + {x = 32270, y = 31240, z = 14}, + {x = 32269, y = 31253, z = 14}, + {x = 32275, y = 31245, z = 14}, + {x = 32276, y = 31250, z = 14}, + {x = 32266, y = 31249, z = 14}, + } + + if mathCount == 0 then + positions = storedPositions + end + + local r1 = math.random(#positions) + + local tile = Tile(positions[r1]) + + if tile then + local ground = tile:getGround() + if ground then + ground:transform(25550) + addEvent(function() + ground:transform(25705) + end, 10*1000) -- 10*1000 = 10 SECONDS + mathCount = mathCount + 1 + table.remove(positions, r1) + end + end + + if mathCount == 11 then + mathCount = 0 + end +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + createVortex() +end + +spell:name("charge vortex") +spell:words("###451") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/charged_energy_elemental_electrify.lua b/data/scripts/spells/monster/charged_energy_elemental_electrify.lua new file mode 100644 index 000000000..b0dcb3c77 --- /dev/null +++ b/data/scripts/spells/monster/charged_energy_elemental_electrify.lua @@ -0,0 +1,24 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) + +local condition = Condition(CONDITION_ENERGY) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(4, 10000, -25) + +local area = createCombatArea(AREA_CIRCLE3X3) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("charged energy elemental electrify") +spell:words("###259") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/chizzoron_the_distorter_paralyze.lua b/data/scripts/spells/monster/chizzoron_the_distorter_paralyze.lua new file mode 100644 index 000000000..0ed52ce7f --- /dev/null +++ b/data/scripts/spells/monster/chizzoron_the_distorter_paralyze.lua @@ -0,0 +1,24 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.60, 0, -0.85, 0) + combat:addCondition(condition) + + local area = createCombatArea(AREA_CIRCLE3X3) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("chizzoron the distorter paralyze") +spell:words("###100") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/chizzoron_the_distorter_summon.lua b/data/scripts/spells/monster/chizzoron_the_distorter_summon.lua new file mode 100644 index 000000000..5ca4a32f2 --- /dev/null +++ b/data/scripts/spells/monster/chizzoron_the_distorter_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Lizard Dragon Priest2", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("chizzoron the distorter summon") +spell:words("###136") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/choking_fear_drown.lua b/data/scripts/spells/monster/choking_fear_drown.lua new file mode 100644 index 000000000..99b12759e --- /dev/null +++ b/data/scripts/spells/monster/choking_fear_drown.lua @@ -0,0 +1,40 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BUBBLES) + +arr = { +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +} + +local condition = Condition(CONDITION_DROWN) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(50, 5000, -20) + +local area = createCombatArea(arr) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("choking fear drown") +spell:words("###15") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/choking_fear_paralyze.lua b/data/scripts/spells/monster/choking_fear_paralyze.lua new file mode 100644 index 000000000..0d3f71ad1 --- /dev/null +++ b/data/scripts/spells/monster/choking_fear_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SLEEP) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.6, 0, -0.8, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("choking fear paralyze") +spell:words("###357") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/cliff_strider_electrify.lua b/data/scripts/spells/monster/cliff_strider_electrify.lua new file mode 100644 index 000000000..07337a9e8 --- /dev/null +++ b/data/scripts/spells/monster/cliff_strider_electrify.lua @@ -0,0 +1,23 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL) + +local condition = Condition(CONDITION_ENERGY) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(20, 10000, -25) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("cliff strider electrify") +spell:words("###21") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/cliff_strider_skill_reducer.lua b/data/scripts/spells/monster/cliff_strider_skill_reducer.lua new file mode 100644 index 000000000..92a1c8231 --- /dev/null +++ b/data/scripts/spells/monster/cliff_strider_skill_reducer.lua @@ -0,0 +1,28 @@ +local combat = {} + +for i = 15, 45 do +combat[i] = Combat() +combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + +local condition = Condition(CONDITION_ATTRIBUTES) +condition:setParameter(CONDITION_PARAM_TICKS, 4000) +condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat[i]:setArea(area) +combat[i]:addCondition(condition) + +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(15, 45)]:execute(creature, var) +end + +spell:name("cliff strider skill reducer") +spell:words("###31") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/coldheart_paralyze.lua b/data/scripts/spells/monster/coldheart_paralyze.lua new file mode 100644 index 000000000..3c681fd03 --- /dev/null +++ b/data/scripts/spells/monster/coldheart_paralyze.lua @@ -0,0 +1,24 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.5, 0, -0.75, 0) + combat:addCondition(condition) + + local area = createCombatArea(AREA_SQUARE1X1) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("coldheart paralyze") +spell:words("###314") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/corym_vanguard_wave.lua b/data/scripts/spells/monster/corym_vanguard_wave.lua new file mode 100644 index 000000000..81422b39a --- /dev/null +++ b/data/scripts/spells/monster/corym_vanguard_wave.lua @@ -0,0 +1,29 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("corym vanguard wave") +spell:words("###237") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/crystal_spider_paralyze_1.lua b/data/scripts/spells/monster/crystal_spider_paralyze_1.lua new file mode 100644 index 000000000..7421f78c3 --- /dev/null +++ b/data/scripts/spells/monster/crystal_spider_paralyze_1.lua @@ -0,0 +1,41 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.25, 0, -0.4, 0) +combat:addCondition(condition) + +arr = { +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +} + +local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("crystal spider paralyze 1") +spell:words("###50") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/crystal_spider_paralyze_2.lua b/data/scripts/spells/monster/crystal_spider_paralyze_2.lua new file mode 100644 index 000000000..3140bd28f --- /dev/null +++ b/data/scripts/spells/monster/crystal_spider_paralyze_2.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SNOWBALL) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.5, 0, -0.6, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("crystal spider paralyze 2") +spell:words("###51") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/crystal_wolf_wave.lua b/data/scripts/spells/monster/crystal_wolf_wave.lua new file mode 100644 index 000000000..e4be77a02 --- /dev/null +++ b/data/scripts/spells/monster/crystal_wolf_wave.lua @@ -0,0 +1,27 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STONES) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("crystal wolf wave") +spell:words("###236") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/cults_of_tibia_armor_buff.lua b/data/scripts/spells/monster/cults_of_tibia_armor_buff.lua new file mode 100644 index 000000000..11490eeef --- /dev/null +++ b/data/scripts/spells/monster/cults_of_tibia_armor_buff.lua @@ -0,0 +1,42 @@ +local combat = {} + +for i = 130, 150 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 6000) + condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + +arr = { +{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0} +} + + local area = createCombatArea(arr) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(130, 150)]:execute(creature, var) +end + +spell:name("Cults of Tibia Armor Buff") +spell:words("#####456") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/dark_torturer_skill_reducer.lua b/data/scripts/spells/monster/dark_torturer_skill_reducer.lua new file mode 100644 index 000000000..40749447a --- /dev/null +++ b/data/scripts/spells/monster/dark_torturer_skill_reducer.lua @@ -0,0 +1,46 @@ +local combat = {} + +for i = 1, 40 do +combat[i] = Combat() +combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_PURPLE) + +local condition = Condition(CONDITION_ATTRIBUTES) +condition:setParameter(CONDITION_PARAM_TICKS, 4000) +condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + +local area = createCombatArea({ + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0} +}) + +combat[i]:setArea(area) +combat[i]:addCondition(condition) + +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(1, 40)]:execute(creature, var) +end + +spell:name("dark torturer skill reducer") +spell:words("###34") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/death_blob_curse.lua b/data/scripts/spells/monster/death_blob_curse.lua new file mode 100644 index 000000000..717fc705e --- /dev/null +++ b/data/scripts/spells/monster/death_blob_curse.lua @@ -0,0 +1,34 @@ +local combat = {} + +for i = 2, 2 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for j = 1, 18 do + damage = damage * 1.2 + condition:addDamage(1, 4000, -damage) + end + + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(2, 2)]:execute(creature, var) +end + +spell:name("death blob curse") +spell:words("###14") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/death_priest_shargon_curse.lua b/data/scripts/spells/monster/death_priest_shargon_curse.lua new file mode 100644 index 000000000..479620877 --- /dev/null +++ b/data/scripts/spells/monster/death_priest_shargon_curse.lua @@ -0,0 +1,33 @@ +local combat = {} + +for i = 1.12, 1.12 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for j = 1, 32 do + damage = damage * 1.2 + condition:addDamage(1, 4000, -damage) + end + + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(1.12, 1.12)]:execute(creature, var) +end + +spell:name("death priest shargon curse") +spell:words("###376") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/death_priest_shargon_dazzle.lua b/data/scripts/spells/monster/death_priest_shargon_dazzle.lua new file mode 100644 index 000000000..9461d3900 --- /dev/null +++ b/data/scripts/spells/monster/death_priest_shargon_dazzle.lua @@ -0,0 +1,24 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + +local condition = Condition(CONDITION_DAZZLED) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(20, 10000, -20) +combat:addCondition(condition) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("death priest shargon dazzle") +spell:words("###377") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/death_priest_shargon_summon.lua b/data/scripts/spells/monster/death_priest_shargon_summon.lua new file mode 100644 index 000000000..2b8b59cea --- /dev/null +++ b/data/scripts/spells/monster/death_priest_shargon_summon.lua @@ -0,0 +1,21 @@ +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) +local summoncount = creature:getSummons() + if #summoncount < 2 then + local mon = Game.createMonster("Lesser Death Minion", creature:getPosition(), true, true) + if not mon then + return + end + mon:setMaster(creature) + end + return true +end + +spell:name("death priest shargon summon") +spell:words("###378") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/deathbringer_drown.lua b/data/scripts/spells/monster/deathbringer_drown.lua new file mode 100644 index 000000000..a7ea605cd --- /dev/null +++ b/data/scripts/spells/monster/deathbringer_drown.lua @@ -0,0 +1,36 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) + + arr = { + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local condition = Condition(CONDITION_DROWN) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(20, 5000, -20) + +local area = createCombatArea(arr) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("deathbringer drown") +spell:words("###54") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/deathstrike_freeze.lua b/data/scripts/spells/monster/deathstrike_freeze.lua new file mode 100644 index 000000000..66328f0fe --- /dev/null +++ b/data/scripts/spells/monster/deathstrike_freeze.lua @@ -0,0 +1,23 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + +local condition = Condition(CONDITION_FREEZING) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(30, 8000, -8) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("deathstrike freeze") +spell:words("###101") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/deathstrike_manadrain.lua b/data/scripts/spells/monster/deathstrike_manadrain.lua new file mode 100644 index 000000000..a742cc0e5 --- /dev/null +++ b/data/scripts/spells/monster/deathstrike_manadrain.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_MANADRAIN) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("deathstrike manadrain") +spell:words("###102") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/deathstrike_paralyze.lua b/data/scripts/spells/monster/deathstrike_paralyze.lua new file mode 100644 index 000000000..01dadc163 --- /dev/null +++ b/data/scripts/spells/monster/deathstrike_paralyze.lua @@ -0,0 +1,40 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.45, 0, -0.75, 0) + combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("deathstrike paralyze") +spell:words("###103") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/deepling_spellsinger_skill_reducer.lua b/data/scripts/spells/monster/deepling_spellsinger_skill_reducer.lua new file mode 100644 index 000000000..2fa00fbbf --- /dev/null +++ b/data/scripts/spells/monster/deepling_spellsinger_skill_reducer.lua @@ -0,0 +1,31 @@ +local combat = {} + +for i = 35, 65 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 8000) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + + local area = createCombatArea(AREA_BEAM1) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(35, 65)]:execute(creature, var) +end + +spell:name("deepling spellsinger skill reducer") +spell:words("###39") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/defiler_paralyze_1.lua b/data/scripts/spells/monster/defiler_paralyze_1.lua new file mode 100644 index 000000000..4257b3ec9 --- /dev/null +++ b/data/scripts/spells/monster/defiler_paralyze_1.lua @@ -0,0 +1,41 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.85, 0, -0.90, 0) +combat:addCondition(condition) + +arr = { +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +} + +local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("defiler paralyze 1") +spell:words("###64") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/defiler_paralyze_2.lua b/data/scripts/spells/monster/defiler_paralyze_2.lua new file mode 100644 index 000000000..4ce554d35 --- /dev/null +++ b/data/scripts/spells/monster/defiler_paralyze_2.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.85, 0, -0.90, 0) +combat:addCondition(condition) + + +local area = createCombatArea(AREA_SQUARE1X1) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("defiler paralyze 2") +spell:words("###65") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/defiler_paralyze_3.lua b/data/scripts/spells/monster/defiler_paralyze_3.lua new file mode 100644 index 000000000..7f53c4241 --- /dev/null +++ b/data/scripts/spells/monster/defiler_paralyze_3.lua @@ -0,0 +1,38 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.85, 0, -0.90, 0) +combat:addCondition(condition) + + arr = { + {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("defiler paralyze 3") +spell:words("###66") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/demon_outcast_skill_reducer.lua b/data/scripts/spells/monster/demon_outcast_skill_reducer.lua new file mode 100644 index 000000000..1b5a622ae --- /dev/null +++ b/data/scripts/spells/monster/demon_outcast_skill_reducer.lua @@ -0,0 +1,29 @@ +local combat = {} + +for i = 20, 25 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLASHARROW) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 10000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(20, 25)]:execute(creature, var) +end + +spell:name("demon outcast skill reducer") +spell:words("###36") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/demon_paralyze.lua b/data/scripts/spells/monster/demon_paralyze.lua new file mode 100644 index 000000000..7182c3a1b --- /dev/null +++ b/data/scripts/spells/monster/demon_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 25000) + condition:setFormula(-0.3, 0, -0.45, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("demon paralyze") +spell:words("###239") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/demon_summon.lua b/data/scripts/spells/monster/demon_summon.lua new file mode 100644 index 000000000..3696b4d53 --- /dev/null +++ b/data/scripts/spells/monster/demon_summon.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) + +local maxsummons = 1 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 1 then + mid = Game.createMonster("Fire Elemental", { x=creature:getPosition().x+math.random(-1, 1), y=creature:getPosition().y+math.random(-1, 1), z=creature:getPosition().z }) + if not mid then + return + end + mid:setMaster(creature) + end + return combat:execute(creature, var) +end + +spell:name("demon summon") +spell:words("###240") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/destruction_summon.lua b/data/scripts/spells/monster/destruction_summon.lua new file mode 100644 index 000000000..8efbf24c4 --- /dev/null +++ b/data/scripts/spells/monster/destruction_summon.lua @@ -0,0 +1,35 @@ +local destructionSummonDelay = false + +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) + +local function removeDelay() + destructionSummonDelay = false +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + + if destructionSummonDelay == false then + if destructionSummon < 3 then + Game.createMonster("Disruption", {x=creature:getPosition().x+math.random(-1, 1), y=creature:getPosition().y+math.random(-1, 1), z=creature:getPosition().z}, false, true) + destructionSummon = destructionSummon + 1 + + destructionSummonDelay = true + addEvent(removeDelay, 15000) + end + end + + return combat:execute(creature, var) +end + +spell:name("destruction summon") +spell:words("###418") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/devourer_paralyze.lua b/data/scripts/spells/monster/devourer_paralyze.lua new file mode 100644 index 000000000..b52fcd044 --- /dev/null +++ b/data/scripts/spells/monster/devourer_paralyze.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.55, 0, -0.75, 0) +combat:addCondition(condition) + + +local area = createCombatArea(AREA_SQUARE1X1) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("devourer paralyze") +spell:words("###366") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/devourer_summon.lua b/data/scripts/spells/monster/devourer_summon.lua new file mode 100644 index 000000000..1e40b279c --- /dev/null +++ b/data/scripts/spells/monster/devourer_summon.lua @@ -0,0 +1,27 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + + local creatures = {"Greed", "Frenzy", "Disruption"} + local monster = creatures[math.random(#creatures)] + + if devourerSummon < 3 then + Game.createMonster(monster, {x=creature:getPosition().x+math.random(-1, 1), y=creature:getPosition().y+math.random(-1, 1), z=creature:getPosition().z}, false, true) + devourerSummon = devourerSummon + 1 + end + + return combat:execute(creature, var) +end + +spell:name("devourer summon") +spell:words("###416") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/devourer_wave.lua b/data/scripts/spells/monster/devourer_wave.lua new file mode 100644 index 000000000..dc4b403ba --- /dev/null +++ b/data/scripts/spells/monster/devourer_wave.lua @@ -0,0 +1,29 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) + + arr = { + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("devourer wave") +spell:words("###365") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/devovorga_curse.lua b/data/scripts/spells/monster/devovorga_curse.lua new file mode 100644 index 000000000..b64741e8f --- /dev/null +++ b/data/scripts/spells/monster/devovorga_curse.lua @@ -0,0 +1,50 @@ +local combat = {} + +for i = 1, 3 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for j = 1, 35 do + damage = damage * 1.2 + condition:addDamage(1, 4000, -damage) + end + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(2, 5)]:execute(creature, var) +end + +spell:name("devovorga curse") +spell:words("###104") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/dharalion_skill_reducer.lua b/data/scripts/spells/monster/dharalion_skill_reducer.lua new file mode 100644 index 000000000..2eb4cb3cd --- /dev/null +++ b/data/scripts/spells/monster/dharalion_skill_reducer.lua @@ -0,0 +1,26 @@ +local combat = {} + +for i = 10, 35 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(10, 35)]:execute(creature, var) +end + +spell:name("dharalion skill reducer") +spell:words("###105") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/diabolic_imp_skill_reducer.lua b/data/scripts/spells/monster/diabolic_imp_skill_reducer.lua new file mode 100644 index 000000000..b51fa2da7 --- /dev/null +++ b/data/scripts/spells/monster/diabolic_imp_skill_reducer.lua @@ -0,0 +1,30 @@ +local combat = {} + +for i = 5, 20 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 6000) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + + local area = createCombatArea(AREA_BEAM1) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(5, 20)]:execute(creature, var) +end + +spell:name("diabolic imp skill reducer") +spell:words("###33") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/diblis_the_fair_summon.lua b/data/scripts/spells/monster/diblis_the_fair_summon.lua new file mode 100644 index 000000000..3ec2912ec --- /dev/null +++ b/data/scripts/spells/monster/diblis_the_fair_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 4 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 4 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Banshee", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("diblis the fair summon") +spell:words("###137") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/dipthrah_skill_reducer.lua b/data/scripts/spells/monster/dipthrah_skill_reducer.lua new file mode 100644 index 000000000..0398beb75 --- /dev/null +++ b/data/scripts/spells/monster/dipthrah_skill_reducer.lua @@ -0,0 +1,29 @@ +local combat = {} + +for i = 45, 65 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 80000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE3X3) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(45, 65)]:execute(creature, var) +end + +spell:name("dipthrah skill reducer") +spell:words("###285") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/dire_penguin_paralyze.lua b/data/scripts/spells/monster/dire_penguin_paralyze.lua new file mode 100644 index 000000000..b33307ea0 --- /dev/null +++ b/data/scripts/spells/monster/dire_penguin_paralyze.lua @@ -0,0 +1,24 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 6000) + condition:setFormula(-0.24, 0, -0.29, 0) + combat:addCondition(condition) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("dire penguin paralyze") +spell:words("###106") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/dirtbeard_summon.lua b/data/scripts/spells/monster/dirtbeard_summon.lua new file mode 100644 index 000000000..6ed618d21 --- /dev/null +++ b/data/scripts/spells/monster/dirtbeard_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_RED) + +local area = createCombatArea(AREA_CIRCLE3X3) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Pirate Marauder", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("dirtbeard summon") +spell:words("###269") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/diseased_paralyze.lua b/data/scripts/spells/monster/diseased_paralyze.lua new file mode 100644 index 000000000..e5a5f71d5 --- /dev/null +++ b/data/scripts/spells/monster/diseased_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.40, 0, -0.50, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("diseased paralyze") +spell:words("###107") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/djinn_cancel_invisibility.lua b/data/scripts/spells/monster/djinn_cancel_invisibility.lua new file mode 100644 index 000000000..fbcacd201 --- /dev/null +++ b/data/scripts/spells/monster/djinn_cancel_invisibility.lua @@ -0,0 +1,18 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_INVISIBLE) + +local area = createCombatArea(AREA_CIRCLE3X3) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("djinn cancel invisibility") +spell:words("###47") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/djinn_electrify.lua b/data/scripts/spells/monster/djinn_electrify.lua new file mode 100644 index 000000000..5a4df9f23 --- /dev/null +++ b/data/scripts/spells/monster/djinn_electrify.lua @@ -0,0 +1,23 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + +local condition = Condition(CONDITION_ENERGY) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(3, 10000, -25) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("djinn electrify") +spell:words("###2") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/djinn_electrify_2.lua b/data/scripts/spells/monster/djinn_electrify_2.lua new file mode 100644 index 000000000..635d6a75a --- /dev/null +++ b/data/scripts/spells/monster/djinn_electrify_2.lua @@ -0,0 +1,24 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) + +local condition = Condition(CONDITION_ENERGY) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(3, 10000, -25) +combat:addCondition(condition) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("djinn electrify 2") +spell:words("###52") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/djinn_paralyze.lua b/data/scripts/spells/monster/djinn_paralyze.lua new file mode 100644 index 000000000..fbff96b31 --- /dev/null +++ b/data/scripts/spells/monster/djinn_paralyze.lua @@ -0,0 +1,21 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.4, 0, -0.75, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("djinn paralyze") +spell:words("###55") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/doctor_perhaps_summon.lua b/data/scripts/spells/monster/doctor_perhaps_summon.lua new file mode 100644 index 000000000..cb8daad8a --- /dev/null +++ b/data/scripts/spells/monster/doctor_perhaps_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Zombie", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("doctor perhaps summon") +spell:words("###270") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/dragonling_paralyze.lua b/data/scripts/spells/monster/dragonling_paralyze.lua new file mode 100644 index 000000000..bfc99122e --- /dev/null +++ b/data/scripts/spells/monster/dragonling_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 25000) + condition:setFormula(-0.6, 0, -0.75, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("dragonling paralyze") +spell:words("###247") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/dragonling_wave.lua b/data/scripts/spells/monster/dragonling_wave.lua new file mode 100644 index 000000000..724fc3174 --- /dev/null +++ b/data/scripts/spells/monster/dragonling_wave.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) + + arr = { + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("dragonling wave") +spell:words("###246") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/draken_abomination_curse.lua b/data/scripts/spells/monster/draken_abomination_curse.lua new file mode 100644 index 000000000..4e1782d44 --- /dev/null +++ b/data/scripts/spells/monster/draken_abomination_curse.lua @@ -0,0 +1,34 @@ +local combat = {} + +for i = 15, 30 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for j = 1, 8 do + damage = damage * 1.2 + condition:addDamage(1, 4000, -damage) + end + + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(15, 30)]:execute(creature, var) +end + +spell:name("draken abomination curse") +spell:words("###11") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/draken_abomination_summon.lua b/data/scripts/spells/monster/draken_abomination_summon.lua new file mode 100644 index 000000000..ed69bc8dd --- /dev/null +++ b/data/scripts/spells/monster/draken_abomination_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Death Blob", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("draken abomination summon") +spell:words("###278") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/draken_elite_soulfire.lua b/data/scripts/spells/monster/draken_elite_soulfire.lua new file mode 100644 index 000000000..32d934ce0 --- /dev/null +++ b/data/scripts/spells/monster/draken_elite_soulfire.lua @@ -0,0 +1,23 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(20, 9000, -10) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("draken elite soulfire") +spell:words("###201") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/dread_intruder_wave.lua b/data/scripts/spells/monster/dread_intruder_wave.lua new file mode 100644 index 000000000..6215d4aa4 --- /dev/null +++ b/data/scripts/spells/monster/dread_intruder_wave.lua @@ -0,0 +1,20 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) + +local area = createCombatArea(AREA_SQUAREWAVE6) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("dread intruder wave") +spell:words("###445") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/dreadbeast_skill_reducer.lua b/data/scripts/spells/monster/dreadbeast_skill_reducer.lua new file mode 100644 index 000000000..816992337 --- /dev/null +++ b/data/scripts/spells/monster/dreadbeast_skill_reducer.lua @@ -0,0 +1,27 @@ +local combat = {} + +for i = 70, 80 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_YELLOWENERGY) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(70, 80)]:execute(creature, var) +end + +spell:name("dreadbeast skill reducer") +spell:words("###297") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/dreadbeast_summon.lua b/data/scripts/spells/monster/dreadbeast_summon.lua new file mode 100644 index 000000000..2908ac8f2 --- /dev/null +++ b/data/scripts/spells/monster/dreadbeast_summon.lua @@ -0,0 +1,35 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) +local t, spectator = Game.getSpectators(creature:getPosition(), false, false, 50, 50, 50, 50) + local check = 0 + if #t ~= nil then + for i = 1, #t do + spectator = t[i] + if spectator:getName() == "Dreadbeast" then + check = check + 1 + end + end + end + if (check < 10) then + local summon = Game.createMonster("Dreadbeast", creature:getPosition(), true, false) + if summon then + end + summon:setMaster(creature) + else + end +return combat:execute(creature, var) +end + +spell:name("dreadbeast summon") +spell:words("###159") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/dreadwing_curse.lua b/data/scripts/spells/monster/dreadwing_curse.lua new file mode 100644 index 000000000..85dc1b5ab --- /dev/null +++ b/data/scripts/spells/monster/dreadwing_curse.lua @@ -0,0 +1,44 @@ +local combat = {} + +for i = 1, 1 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_PURPLE) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for j = 1, 15 do + damage = damage * 1.2 + condition:addDamage(1, 4000, -damage) + end + + local area = createCombatArea({ + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + }) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(1, 1)]:execute(creature, var) +end + +spell:name("dreadwing curse") +spell:words("###108") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/dreadwing_skill_reducer.lua b/data/scripts/spells/monster/dreadwing_skill_reducer.lua new file mode 100644 index 000000000..baa8aacba --- /dev/null +++ b/data/scripts/spells/monster/dreadwing_skill_reducer.lua @@ -0,0 +1,26 @@ +local combat = {} + +for i = 30, 60 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_RED) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 10000) + condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(30, 60)]:execute(creature, var) +end + +spell:name("dreadwing skill reducer") +spell:words("###109") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/drillworm_paralyze.lua b/data/scripts/spells/monster/drillworm_paralyze.lua new file mode 100644 index 000000000..dc05b43d8 --- /dev/null +++ b/data/scripts/spells/monster/drillworm_paralyze.lua @@ -0,0 +1,36 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 10000) + condition:setFormula(-0.35, 0, -0.65, 0) + combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("drillworm paralyze") +spell:words("###362") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/dryad_paralyze.lua b/data/scripts/spells/monster/dryad_paralyze.lua new file mode 100644 index 000000000..1d96ae3b5 --- /dev/null +++ b/data/scripts/spells/monster/dryad_paralyze.lua @@ -0,0 +1,24 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.25, 0, -0.4, 0) + combat:addCondition(condition) + + local area = createCombatArea(AREA_CIRCLE3X3) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("dryad paralyze") +spell:words("###307") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/dwarf_henchman_drown.lua b/data/scripts/spells/monster/dwarf_henchman_drown.lua new file mode 100644 index 000000000..bbd861888 --- /dev/null +++ b/data/scripts/spells/monster/dwarf_henchman_drown.lua @@ -0,0 +1,22 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) + +local condition = Condition(CONDITION_DROWN) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(4, 5000, -20) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("dwarf henchman drown") +spell:words("###252") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/dworc_paralyze.lua b/data/scripts/spells/monster/dworc_paralyze.lua new file mode 100644 index 000000000..d7e50b07d --- /dev/null +++ b/data/scripts/spells/monster/dworc_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.5, 0, -0.75, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("dworc paralyze") +spell:words("###257") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/elder_bonelord_paralyze.lua b/data/scripts/spells/monster/elder_bonelord_paralyze.lua new file mode 100644 index 000000000..816843b75 --- /dev/null +++ b/data/scripts/spells/monster/elder_bonelord_paralyze.lua @@ -0,0 +1,21 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.65, 0, -0.85, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("elder bonelord paralyze") +spell:words("###83") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/elder_mummy_paralyze.lua b/data/scripts/spells/monster/elder_mummy_paralyze.lua new file mode 100644 index 000000000..e2fc2b046 --- /dev/null +++ b/data/scripts/spells/monster/elder_mummy_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.7, 0, -0.85, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("elder mummy paralyze") +spell:words("###304") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/elder_wyrm_electrify.lua b/data/scripts/spells/monster/elder_wyrm_electrify.lua new file mode 100644 index 000000000..c8b6100a5 --- /dev/null +++ b/data/scripts/spells/monster/elder_wyrm_electrify.lua @@ -0,0 +1,36 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) + +local condition = Condition(CONDITION_ENERGY) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(10, 10000, -25) +combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("elder wyrm electrify") +spell:words("###309") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/elder_wyrm_wave.lua b/data/scripts/spells/monster/elder_wyrm_wave.lua new file mode 100644 index 000000000..19d8763d5 --- /dev/null +++ b/data/scripts/spells/monster/elder_wyrm_wave.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_LIFEDRAIN) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLACKSMOKE) + + arr = { + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("elder wyrm wave") +spell:words("###308") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/spells/scripts/monster/emberBeastArea.lua b/data/scripts/spells/monster/emberBeastArea.lua similarity index 78% rename from data/spells/scripts/monster/emberBeastArea.lua rename to data/scripts/spells/monster/emberBeastArea.lua index 2faae81ec..565b9408d 100644 --- a/data/spells/scripts/monster/emberBeastArea.lua +++ b/data/scripts/spells/monster/emberBeastArea.lua @@ -29,6 +29,15 @@ end setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") -function onCastSpell(creature, var) +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) return combat:execute(creature, var) end + +spell:name("emberBeastArea") +spell:words("###462") +spell:needLearn(true) +spell:cooldown("2000") +spell:isSelfTarget(true) +spell:register() \ No newline at end of file diff --git a/data/spells/scripts/monster/emberBeastHur.lua b/data/scripts/spells/monster/emberBeastHur.lua similarity index 76% rename from data/spells/scripts/monster/emberBeastHur.lua rename to data/scripts/spells/monster/emberBeastHur.lua index b5f4cfc44..d526d8fe0 100644 --- a/data/spells/scripts/monster/emberBeastHur.lua +++ b/data/scripts/spells/monster/emberBeastHur.lua @@ -32,6 +32,16 @@ end setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") -function onCastSpell(creature, var) +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) return combat:execute(creature, var) end + +spell:name("emberBeastHur") +spell:words("###463") +spell:needLearn(true) +spell:needDirection(true) +spell:cooldown("2000") +spell:isSelfTarget(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/emperor_summon.lua b/data/scripts/spells/monster/emperor_summon.lua new file mode 100644 index 000000000..5063e9960 --- /dev/null +++ b/data/scripts/spells/monster/emperor_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_PURPLE) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Draken Warmaster", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("emperor summon") +spell:words("###140") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/energized_raging_mage_skill_reducer.lua b/data/scripts/spells/monster/energized_raging_mage_skill_reducer.lua new file mode 100644 index 000000000..ec7d8c73a --- /dev/null +++ b/data/scripts/spells/monster/energized_raging_mage_skill_reducer.lua @@ -0,0 +1,22 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) + +local area = createCombatArea(AREA_CIRCLE6X6) +combat:setArea(area) + +local condition = Condition(CONDITION_ATTRIBUTES) +condition:setParameter(CONDITION_PARAM_TICKS, 6000) +condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, 50) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("energized raging mage skill reducer") +spell:words("###472") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/energy_elemental_electrify.lua b/data/scripts/spells/monster/energy_elemental_electrify.lua new file mode 100644 index 000000000..25ae476d3 --- /dev/null +++ b/data/scripts/spells/monster/energy_elemental_electrify.lua @@ -0,0 +1,24 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) + +local condition = Condition(CONDITION_ENERGY) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(7, 10000, -25) + +local area = createCombatArea(AREA_CIRCLE3X3) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("energy elemental electrify") +spell:words("###3") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/energy_overlord_paralyze.lua b/data/scripts/spells/monster/energy_overlord_paralyze.lua new file mode 100644 index 000000000..06afe055a --- /dev/null +++ b/data/scripts/spells/monster/energy_overlord_paralyze.lua @@ -0,0 +1,40 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PLANTATTACK) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.3, 0, -0.65, 0) + combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("energy overlord paralyze") +spell:words("###261") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/energy_pulse_explosion.lua b/data/scripts/spells/monster/energy_pulse_explosion.lua new file mode 100644 index 000000000..1517a3dbe --- /dev/null +++ b/data/scripts/spells/monster/energy_pulse_explosion.lua @@ -0,0 +1,35 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) + +arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var), creature:remove() +end + +spell:name("energy pulse explosion") +spell:words("###401") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/enslaved_dwarf_skill_reducer_1.lua b/data/scripts/spells/monster/enslaved_dwarf_skill_reducer_1.lua new file mode 100644 index 000000000..52bd3bd8a --- /dev/null +++ b/data/scripts/spells/monster/enslaved_dwarf_skill_reducer_1.lua @@ -0,0 +1,27 @@ +local combat = {} + +for i = 20, 65 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 6000) + condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(20, 65)]:execute(creature, var) +end + +spell:name("enslaved dwarf skill reducer 1") +spell:words("###45") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/enslaved_dwarf_skill_reducer_2.lua b/data/scripts/spells/monster/enslaved_dwarf_skill_reducer_2.lua new file mode 100644 index 000000000..54f23ad99 --- /dev/null +++ b/data/scripts/spells/monster/enslaved_dwarf_skill_reducer_2.lua @@ -0,0 +1,27 @@ +local combat = {} + +for i = 35, 75 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 6000) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE1X1) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(35, 75)]:execute(creature, var) +end + +spell:name("enslaved dwarf skill reducer 2") +spell:words("###46") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/eruption_of_destruction_explosion.lua b/data/scripts/spells/monster/eruption_of_destruction_explosion.lua new file mode 100644 index 000000000..d0ca7293f --- /dev/null +++ b/data/scripts/spells/monster/eruption_of_destruction_explosion.lua @@ -0,0 +1,93 @@ +local vocation = { + VOCATION.BASE_ID.SORCERER, + VOCATION.BASE_ID.DRUID, + VOCATION.BASE_ID.PALADIN, + VOCATION.BASE_ID.KNIGHT +} + +local area = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + +local createArea = createCombatArea(area) + +local combat = Combat() +combat:setArea(createArea) + +function onTargetTile(creature, pos) + local creatureTable = {} + local n, i = Tile({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 + if n ~= 0 then + local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid + while v ~= 0 do + if isCreature(v) == true then + table.insert(creatureTable, v) + if n == #creatureTable then + break + end + end + i = i + 1 + v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid + end + end + if #creatureTable ~= nil and #creatureTable > 0 then + for r = 1, #creatureTable do + if creatureTable[r] ~= creature then + local min = 4000 + local max = 6000 + local player = Player(creatureTable[r]) + + if isPlayer(creatureTable[r]) == true and table.contains(vocation, player:getVocation():getBaseId()) then + doTargetCombatHealth(creature, creatureTable[r], COMBAT_FIREDAMAGE, -min, -max, CONST_ME_NONE) + elseif isMonster(creatureTable[r]) == true then + doTargetCombatHealth(creature, creatureTable[r], COMBAT_FIREDAMAGE, -min, -max, CONST_ME_NONE) + end + end + end + end + pos:sendMagicEffect(CONST_ME_FIREAREA) + creature:remove() + return true +end + +combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") + +local function delayedCastSpell(cid, var) + local creature = Creature(cid) + if not creature then + return + end + if creature:getHealth() >= 1 then + local master = creature:getMaster() + master:addHealth(math.random(20000, 30000), true, true) + Game.createMonster('demon', creature:getPosition(), true, true) + return combat:execute(creature, positionToVariant(creature:getPosition())) + end + return +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + addEvent(delayedCastSpell, 7000, creature:getId(), var) + return true +end + +spell:name("eruption of destruction explosion") +spell:words("###413") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/essence_of_darkness_curse.lua b/data/scripts/spells/monster/essence_of_darkness_curse.lua new file mode 100644 index 000000000..87936a7e2 --- /dev/null +++ b/data/scripts/spells/monster/essence_of_darkness_curse.lua @@ -0,0 +1,34 @@ +local combat = {} + +for i = 2, 2 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for j = 1, 3 do + damage = damage * 1.2 + condition:addDamage(1, 4000, -damage) + end + + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(2, 2)]:execute(creature, var) +end + +spell:name("essence of darkness curse") +spell:words("###77") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/essence_of_darkness_paralyze.lua b/data/scripts/spells/monster/essence_of_darkness_paralyze.lua new file mode 100644 index 000000000..cba55588c --- /dev/null +++ b/data/scripts/spells/monster/essence_of_darkness_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 5000) + condition:setFormula(-0.2, 0, -0.3, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("midnight spawn paralyze") +spell:words("###79") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/evil_sheep_lord_summon.lua b/data/scripts/spells/monster/evil_sheep_lord_summon.lua new file mode 100644 index 000000000..535ca1220 --- /dev/null +++ b/data/scripts/spells/monster/evil_sheep_lord_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HEARTS) + +local area = createCombatArea(AREA_CIRCLE3X3) +combat:setArea(area) + +local maxsummons = 3 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 3 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Evil Sheep", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("evil sheep lord summon") +spell:words("###271") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/explosion_wave.lua b/data/scripts/spells/monster/explosion_wave.lua new file mode 100644 index 000000000..b9ea22276 --- /dev/null +++ b/data/scripts/spells/monster/explosion_wave.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) +arr = { +{1, 1, 1}, +{1, 1, 1}, +{0, 1, 0}, +{0, 3, 0} +} + + local area = createCombatArea(arr) + combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("explosion wave") +spell:words("###481") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/feroxa_summon.lua b/data/scripts/spells/monster/feroxa_summon.lua new file mode 100644 index 000000000..505a7b7b1 --- /dev/null +++ b/data/scripts/spells/monster/feroxa_summon.lua @@ -0,0 +1,54 @@ +local summons = { + [1] = {name = "Werewolf"} +} + +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat:setArea(area) + +local maxsummons = 10 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) +creature:say("RISE MY SERVANTS! RISE!!", TALKTYPE_MONSTER_SAY) + + local summoncount = creature:getSummons() + local creaturePos = creature:getPosition() + if #summoncount < 10 then + for i = 1, maxsummons do + local mid = Game.createMonster(summons[math.random(#summons)].name, Position(creaturePos.x + math.random(-3, 3), creaturePos.y + math.random(-3, 3), creaturePos.z)) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("feroxa summon") +spell:words("###422") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ferumbras_electrify.lua b/data/scripts/spells/monster/ferumbras_electrify.lua new file mode 100644 index 000000000..f2fe4c403 --- /dev/null +++ b/data/scripts/spells/monster/ferumbras_electrify.lua @@ -0,0 +1,40 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) + +local condition = Condition(CONDITION_ENERGY) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(20, 10000, -25) +combat:addCondition(condition) + +arr = { +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +} + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("ferumbras electrify") +spell:words("###116") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ferumbras_soulfire.lua b/data/scripts/spells/monster/ferumbras_soulfire.lua new file mode 100644 index 000000000..b8319c0f8 --- /dev/null +++ b/data/scripts/spells/monster/ferumbras_soulfire.lua @@ -0,0 +1,42 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(50, 9000, -10) +combat:addCondition(condition) + +arr = { +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +} + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("ferumbras soulfire") +spell:words("###117") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/feverish_citizen_drunk.lua b/data/scripts/spells/monster/feverish_citizen_drunk.lua new file mode 100644 index 000000000..872e36be8 --- /dev/null +++ b/data/scripts/spells/monster/feverish_citizen_drunk.lua @@ -0,0 +1,29 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) + +local condition = Condition(CONDITION_DRUNK) +condition:setParameter(CONDITION_PARAM_TICKS, 25000) +combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("feverish citizen drunk") +spell:words("###282") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/feversleep_skill_reducer.lua b/data/scripts/spells/monster/feversleep_skill_reducer.lua new file mode 100644 index 000000000..8e274357c --- /dev/null +++ b/data/scripts/spells/monster/feversleep_skill_reducer.lua @@ -0,0 +1,45 @@ +local combat = {} + +for i = 35, 60 do +combat[i] = Combat() +combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_YELLOW_RINGS) + +local condition = Condition(CONDITION_ATTRIBUTES) +condition:setParameter(CONDITION_PARAM_TICKS, 8000) +condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) +condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + +arr = { +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +} + +local area = createCombatArea(arr) + combat[i]:setArea(area) + combat[i]:addCondition(condition) + +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(35, 60)]:execute(creature, var) +end + +spell:name("feversleep skill reducer") +spell:words("###42") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/fire_overlord_paralyze.lua b/data/scripts/spells/monster/fire_overlord_paralyze.lua new file mode 100644 index 000000000..ccd7b0a56 --- /dev/null +++ b/data/scripts/spells/monster/fire_overlord_paralyze.lua @@ -0,0 +1,40 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.3, 0, -0.65, 0) + combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("fire overlord paralyze") +spell:words("###288") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/fire_overlord_soulfire.lua b/data/scripts/spells/monster/fire_overlord_soulfire.lua new file mode 100644 index 000000000..a92775684 --- /dev/null +++ b/data/scripts/spells/monster/fire_overlord_soulfire.lua @@ -0,0 +1,23 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(50, 9000, -10) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("fire overlord soulfire") +spell:words("###289") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/firestarter_soulfire.lua b/data/scripts/spells/monster/firestarter_soulfire.lua new file mode 100644 index 000000000..c327c4b14 --- /dev/null +++ b/data/scripts/spells/monster/firestarter_soulfire.lua @@ -0,0 +1,23 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLAMMINGARROW) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(10, 9000, -10) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("firestarter soulfire") +spell:words("###258") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/flamecaller_zazrak_summon.lua b/data/scripts/spells/monster/flamecaller_zazrak_summon.lua new file mode 100644 index 000000000..263fe3dc4 --- /dev/null +++ b/data/scripts/spells/monster/flamecaller_zazrak_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 3 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 3 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Fire Elemental", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("flamecaller zazrak summon") +spell:words("###139") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/forest_fury_skill_reducer_1.lua b/data/scripts/spells/monster/forest_fury_skill_reducer_1.lua new file mode 100644 index 000000000..e5e61bbe4 --- /dev/null +++ b/data/scripts/spells/monster/forest_fury_skill_reducer_1.lua @@ -0,0 +1,29 @@ +local combat = {} + +for i = 40, 50 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_LARGEROCK) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 7000) + condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(40, 50)]:execute(creature, var) +end + +spell:name("forest fury skill reducer") +spell:words("###35") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/forest_fury_skill_reducer_2.lua b/data/scripts/spells/monster/forest_fury_skill_reducer_2.lua new file mode 100644 index 000000000..ad563f80f --- /dev/null +++ b/data/scripts/spells/monster/forest_fury_skill_reducer_2.lua @@ -0,0 +1,29 @@ +local combat = {} + +for i = 50, 65 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HUNTINGSPEAR) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 7000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(50, 65)]:execute(creature, var) +end + +spell:name("forest fury skill reducer 2") +spell:words("###75") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/frazzlemaw_paralyze.lua b/data/scripts/spells/monster/frazzlemaw_paralyze.lua new file mode 100644 index 000000000..9846c6247 --- /dev/null +++ b/data/scripts/spells/monster/frazzlemaw_paralyze.lua @@ -0,0 +1,39 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.6, 0, -0.8, 0) + combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("frazzlemaw paralyze") +spell:words("###356") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/freed_soul_spell.lua b/data/scripts/spells/monster/freed_soul_spell.lua new file mode 100644 index 000000000..9c40da570 --- /dev/null +++ b/data/scripts/spells/monster/freed_soul_spell.lua @@ -0,0 +1,48 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) + +combat:setArea(createCombatArea({ +{0, 0, 1, 1, 1, 0, 0}, +{0, 1, 1, 1, 1, 1, 0}, +{1, 1, 1, 1, 1, 1, 1}, +{1, 1, 1, 3, 1, 1, 1}, +{1, 1, 1, 1, 1, 1, 1}, +{0, 1, 1, 1, 1, 1, 0}, +{0, 0, 1, 1, 1, 0, 0} +})) + +function spellCallback(param) + local tile = Tile(Position(param.pos)) + if tile then + if tile:getTopCreature() and tile:getTopCreature():isMonster() then + if tile:getTopCreature():getName():lower() == "the souldespoiler" then + tile:getTopCreature():addHealth( - math.random(500, 2000)) + end + end + end +end + +function onTargetTile(cid, pos) + local param = {} + param.cid = cid + param.pos = pos + param.count = 0 + spellCallback(param) +end + +setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("Freed Soul Spell") +spell:words("#####457") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/frost_dragon_paralyze_1.lua b/data/scripts/spells/monster/frost_dragon_paralyze_1.lua new file mode 100644 index 000000000..a6b176143 --- /dev/null +++ b/data/scripts/spells/monster/frost_dragon_paralyze_1.lua @@ -0,0 +1,24 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.35, 0, -0.45, 0) + combat:addCondition(condition) + + local area = createCombatArea(AREA_SQUARE1X1) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("frost dragon paralyze 1") +spell:words("###248") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/frost_dragon_paralyze_2.lua b/data/scripts/spells/monster/frost_dragon_paralyze_2.lua new file mode 100644 index 000000000..e5e201cee --- /dev/null +++ b/data/scripts/spells/monster/frost_dragon_paralyze_2.lua @@ -0,0 +1,27 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.35, 0, -0.5, 0) +combat:addCondition(condition) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("frost dragon paralyze 2") +spell:words("###249") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/frost_dragon_paralyze_3.lua b/data/scripts/spells/monster/frost_dragon_paralyze_3.lua new file mode 100644 index 000000000..5d5828685 --- /dev/null +++ b/data/scripts/spells/monster/frost_dragon_paralyze_3.lua @@ -0,0 +1,35 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.6, 0, -0.8, 0) +combat:addCondition(condition) + +local area = createCombatArea({ + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0} +}) +combat:setArea(area) +combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("frost dragon paralyze 3") +spell:words("###250") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/frozen_minion_beam.lua b/data/scripts/spells/monster/frozen_minion_beam.lua new file mode 100644 index 000000000..4ac1728cb --- /dev/null +++ b/data/scripts/spells/monster/frozen_minion_beam.lua @@ -0,0 +1,35 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) +combat:setArea(createCombatArea(AREA_BEAM7)) + +function onTargetCreature(creature, target) + local min = 200 + local max = 700 + + local master = target:getMaster() + if target:isPlayer() and not master + or master and master:isPlayer() then + doTargetCombatHealth(0, target, COMBAT_ICEDAMAGE, min, max, CONST_ME_NONE) + return true + end + + doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) + return true +end + +combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("frozen minion beam") +spell:words("###438") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/frozen_minion_heal.lua b/data/scripts/spells/monster/frozen_minion_heal.lua new file mode 100644 index 000000000..5ecba0b85 --- /dev/null +++ b/data/scripts/spells/monster/frozen_minion_heal.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) +combat:setArea(createCombatArea(AREA_CIRCLE2X2)) + +function onTargetCreature(creature, target) + local min = 100 + local max = 200 + + local master = target:getMaster() + if target:isPlayer() and not master + or master and master:isPlayer() then + return true + end + + doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) + return true +end + +combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("frozen minion heal") +spell:words("###435") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:isSelfTarget(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/frozen_minion_wave.lua b/data/scripts/spells/monster/frozen_minion_wave.lua new file mode 100644 index 000000000..bd73df6b9 --- /dev/null +++ b/data/scripts/spells/monster/frozen_minion_wave.lua @@ -0,0 +1,45 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) + +arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) +combat:setArea(area) + +function onTargetCreature(creature, target) + local min = 200 + local max = 700 + + local master = target:getMaster() + if target:isPlayer() and not master + or master and master:isPlayer() then + doTargetCombatHealth(0, target, COMBAT_ICEDAMAGE, min, max, CONST_ME_NONE) + return true + end + + doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) + return true +end + +combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("frozen minion wave") +spell:words("###437") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/fury_paralyze.lua b/data/scripts/spells/monster/fury_paralyze.lua new file mode 100644 index 000000000..f72bc231c --- /dev/null +++ b/data/scripts/spells/monster/fury_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_THROWINGSTAR) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 10000) + condition:setFormula(-0.25, 0, -0.35, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("fury paralyze") +spell:words("###168") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/fury_skill_reducer_1.lua b/data/scripts/spells/monster/fury_skill_reducer_1.lua new file mode 100644 index 000000000..1d4b7e7a8 --- /dev/null +++ b/data/scripts/spells/monster/fury_skill_reducer_1.lua @@ -0,0 +1,27 @@ +local combat = {} + +for i = 65, 80 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_YELLOW) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 5000) + condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE3X3) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(65, 80)]:execute(creature, var) +end + +spell:name("fury skill reducer") +spell:words("###37") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/fury_skill_reducer_2.lua b/data/scripts/spells/monster/fury_skill_reducer_2.lua new file mode 100644 index 000000000..2e7280fb1 --- /dev/null +++ b/data/scripts/spells/monster/fury_skill_reducer_2.lua @@ -0,0 +1,29 @@ +local combat = {} + +for i = 45, 60 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_YELLOW) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 5000) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE3X3) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(45, 60)]:execute(creature, var) +end + +spell:name("fury skill reducer 2") +spell:words("###169") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/furyosa_deathball.lua b/data/scripts/spells/monster/furyosa_deathball.lua new file mode 100644 index 000000000..8ec5cf986 --- /dev/null +++ b/data/scripts/spells/monster/furyosa_deathball.lua @@ -0,0 +1,40 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + +arr = { +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +} + + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + if creature:getHealth() < creature:getMaxHealth() * 0.4 then + creature:say("Back in black!", TALKTYPE_ORANGE_1) + return combat:execute(creature, var) + end + return false +end + +spell:name("furyosa deathball") +spell:words("###122") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/furyosa_heal.lua b/data/scripts/spells/monster/furyosa_heal.lua new file mode 100644 index 000000000..13d26e15c --- /dev/null +++ b/data/scripts/spells/monster/furyosa_heal.lua @@ -0,0 +1,24 @@ +local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) +condition:setParameter(CONDITION_PARAM_SUBID, 88888) +condition:setParameter(CONDITION_PARAM_TICKS, 15 * 60 * 1000) +condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) +condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 15 * 60 * 1000) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + if creature:getHealth() < creature:getMaxHealth() * 0.2 and not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then + creature:addCondition(condition) + creature:addHealth(10000) + else + return + end + return true +end + +spell:name("furyosa heal") +spell:words("###340") +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/furyosa_manadrain.lua b/data/scripts/spells/monster/furyosa_manadrain.lua new file mode 100644 index 000000000..84354363b --- /dev/null +++ b/data/scripts/spells/monster/furyosa_manadrain.lua @@ -0,0 +1,32 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_MANADRAIN) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("furyosa manadrain") +spell:words("###121") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/furyosa_skill_reducer.lua b/data/scripts/spells/monster/furyosa_skill_reducer.lua new file mode 100644 index 000000000..3b8e8e61c --- /dev/null +++ b/data/scripts/spells/monster/furyosa_skill_reducer.lua @@ -0,0 +1,43 @@ +local combat = {} + +for i = 40, 50 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_YELLOW) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 10000) + condition:setParameter(CONDITION_PARAM_STAT_MAGICPOINTSPERCENT, i) + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(40, 50)]:execute(creature, var) +end + +spell:name("furyosa skill reducer") +spell:words("###120") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/furyosa_soulfire.lua b/data/scripts/spells/monster/furyosa_soulfire.lua new file mode 100644 index 000000000..406076862 --- /dev/null +++ b/data/scripts/spells/monster/furyosa_soulfire.lua @@ -0,0 +1,36 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(30, 9000, -10) +combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("furyosa soulfire") +spell:words("###119") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/furyosa_summon.lua b/data/scripts/spells/monster/furyosa_summon.lua new file mode 100644 index 000000000..bbfe60632 --- /dev/null +++ b/data/scripts/spells/monster/furyosa_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) + +local maxsummons = 4 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 4 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Fury", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("furyosa summon") +spell:words("###141") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/gaz'haragoth_death.lua b/data/scripts/spells/monster/gaz'haragoth_death.lua new file mode 100644 index 000000000..f05e78f96 --- /dev/null +++ b/data/scripts/spells/monster/gaz'haragoth_death.lua @@ -0,0 +1,88 @@ +local vocation = { + VOCATION.BASE_ID.SORCERER, + VOCATION.BASE_ID.DRUID, + VOCATION.BASE_ID.PALADIN, + VOCATION.BASE_ID.KNIGHT +} + +local area = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + +local createArea = createCombatArea(area) + +local combat = Combat() +combat:setArea(createArea) + +function onTargetTile(creature, pos) + local creatureTable = {} + local n, i = Tile({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 + if n ~= 0 then + local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid + while v ~= 0 do + if isCreature(v) == true then + table.insert(creatureTable, v) + if n == #creatureTable then + break + end + end + i = i + 1 + v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid + end + end + if #creatureTable ~= nil and #creatureTable > 0 then + for r = 1, #creatureTable do + if creatureTable[r] ~= creature then + local min = 30000 + local max = 30000 + local player = Player(creatureTable[r]) + + if isPlayer(creatureTable[r]) == true and table.contains(vocation, player:getVocation():getBaseId()) then + doTargetCombatHealth(creature, creatureTable[r], COMBAT_ENERGYDAMAGE, -min, -max, CONST_ME_NONE) + elseif isMonster(creatureTable[r]) == true then + doTargetCombatHealth(creature, creatureTable[r], COMBAT_ENERGYDAMAGE, -min, -max, CONST_ME_NONE) + end + end + end + end + pos:sendMagicEffect(CONST_ME_PURPLEENERGY) + return true +end + +combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") + +local function delayedCastSpell(cid, var) + local creature = Creature(cid) + if not creature then + return + end + creature:say("Gaz'haragoth calls down: DEATH AND DOOM!", TALKTYPE_ORANGE_2) + return combat:execute(creature, positionToVariant(creature:getPosition())) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + creature:say("Gaz'haragoth begins to channel DEATH AND DOOM into the area! RUN!", TALKTYPE_ORANGE_2) + addEvent(delayedCastSpell, 5000, creature:getId(), var) + return true +end + +spell:name("gaz'haragoth death") +spell:words("###325") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/gaz'haragoth_iceball.lua b/data/scripts/spells/monster/gaz'haragoth_iceball.lua new file mode 100644 index 000000000..1ff4b3c61 --- /dev/null +++ b/data/scripts/spells/monster/gaz'haragoth_iceball.lua @@ -0,0 +1,37 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) + +arr = { +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +} + + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) +creature:say("Chill out!", TALKTYPE_ORANGE_1) + return combat:execute(creature, var) +end + +spell:name("gaz'haragoth iceball") +spell:words("###123") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/gaz'haragoth_paralyze.lua b/data/scripts/spells/monster/gaz'haragoth_paralyze.lua new file mode 100644 index 000000000..d2b3ba9f0 --- /dev/null +++ b/data/scripts/spells/monster/gaz'haragoth_paralyze.lua @@ -0,0 +1,39 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.55, 0, -0.85, 0) + combat:addCondition(condition) + +arr = { +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +} + local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("gaz'haragoth paralyze") +spell:words("###124") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/gaz'haragoth_summon.lua b/data/scripts/spells/monster/gaz'haragoth_summon.lua new file mode 100644 index 000000000..7ae24e6ca --- /dev/null +++ b/data/scripts/spells/monster/gaz'haragoth_summon.lua @@ -0,0 +1,35 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) +local t, spectator = Game.getSpectators(creature:getPosition(), false, false, 5, 5, 5, 5) + local check = 0 + if #t ~= nil then + for i = 1, #t do + spectator = t[i] + if spectator:getName() == "Minion Of Gaz'haragoth" then + check = check + 1 + end + end + end + local hp = (creature:getHealth()/creature:getMaxHealth())* 100 + if ((check < 2) and hp <= 95) or ((check < 4) and hp <= 75) or ((check < 6) and hp <= 55) or ((check < 10) and hp <= 35) then + for j = 1, 5 do + creature:say("Minions! Follow my call!", TALKTYPE_ORANGE_1) + end + for k = 1, 2 do + local monster = Game.createMonster("minion of gaz'haragoth", creature:getPosition(), true, false) + if not monster then + return + end + creature:getPosition():sendMagicEffect(CONST_ME_SOUND_RED) + end + else + end +return true +end + +spell:name("gaz'haragoth summon") +spell:words("###125") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/generator.lua b/data/scripts/spells/monster/generator.lua new file mode 100644 index 000000000..37586791f --- /dev/null +++ b/data/scripts/spells/monster/generator.lua @@ -0,0 +1,22 @@ +local generator = { + [1] = {pos = Position(33708, 32042, 15)}, + [2] = {pos = Position(33714, 32042, 15)}, + [3] = {pos = Position(33708, 32051, 15)}, + [4] = {pos = Position(33714, 32051, 15)} +} +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local rand = math.random(1, 4) + local generators = generator[rand] + local monster = Game.createMonster('glooth-generator', generators.pos, true, true) + monster:say('THE GLOOTH GENERATOR CHARGES UP FOR A LETHAL EXPLOSION!', TALKTYPE_MONSTER_YELL) + return +end + +spell:name("generator") +spell:words("###427") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ghastly_dragon_curse.lua b/data/scripts/spells/monster/ghastly_dragon_curse.lua new file mode 100644 index 000000000..408392b49 --- /dev/null +++ b/data/scripts/spells/monster/ghastly_dragon_curse.lua @@ -0,0 +1,43 @@ +local combat = {} + +for i = 40, 170 do + for j = 1, 3 do + local index = ((i - 40) * 3) + j + combat[index] = Combat() + combat[index]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[index]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + combat[index]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for k = 1, 4 do + damage = damage * 1.2 + condition:addDamage(1, 4000, -damage) + end + if j > 1 then + damage = damage * 1.2 + condition:addDamage(1, 4000, -damage) + if j > 2 then + condition:addDamage(1, 4000, -(damage * 1.2)) + end + end + combat[index]:addCondition(condition) + end +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(#combat)]:execute(creature, var) +end + +spell:name("ghastly dragon curse") +spell:words("###115") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ghastly_dragon_paralyze.lua b/data/scripts/spells/monster/ghastly_dragon_paralyze.lua new file mode 100644 index 000000000..44191bfe0 --- /dev/null +++ b/data/scripts/spells/monster/ghastly_dragon_paralyze.lua @@ -0,0 +1,21 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BATS) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.8, 0, -0.9, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("ghastly dragon paralyze") +spell:words("###113") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ghastly_dragon_wave.lua b/data/scripts/spells/monster/ghastly_dragon_wave.lua new file mode 100644 index 000000000..a13f0d6d1 --- /dev/null +++ b/data/scripts/spells/monster/ghastly_dragon_wave.lua @@ -0,0 +1,29 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("ghastly dragon wave") +spell:words("###114") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ghazbaran_paralyze.lua b/data/scripts/spells/monster/ghazbaran_paralyze.lua new file mode 100644 index 000000000..576cd3dbc --- /dev/null +++ b/data/scripts/spells/monster/ghazbaran_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_THROWINGKNIFE) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 10000) + condition:setFormula(-0.75, 0, -0.90, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("ghazbaran paralyze") +spell:words("###145") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ghazbaran_skill_reducer_1.lua b/data/scripts/spells/monster/ghazbaran_skill_reducer_1.lua new file mode 100644 index 000000000..d60e441f4 --- /dev/null +++ b/data/scripts/spells/monster/ghazbaran_skill_reducer_1.lua @@ -0,0 +1,43 @@ +local combat = {} + +for i = 0, 15 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 10000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + + arr = { + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(0, 15)]:execute(creature, var) +end + +spell:name("ghazbaran skill reducer 1") +spell:words("###143") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ghazbaran_skill_reducer_2.lua b/data/scripts/spells/monster/ghazbaran_skill_reducer_2.lua new file mode 100644 index 000000000..8980213ac --- /dev/null +++ b/data/scripts/spells/monster/ghazbaran_skill_reducer_2.lua @@ -0,0 +1,43 @@ +local combat = {} + +for i = 0, 15 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 10000) + condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + + arr = { + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(0, 15)]:execute(creature, var) +end + +spell:name("ghazbaran skill reducer 2") +spell:words("###144") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ghazbaran_summon.lua b/data/scripts/spells/monster/ghazbaran_summon.lua new file mode 100644 index 000000000..2c27fd091 --- /dev/null +++ b/data/scripts/spells/monster/ghazbaran_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) + +local maxsummons = 4 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 4 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Deathslicer", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("ghazbaran summon") +spell:words("###142") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ghoulish_hyaena_wave.lua b/data/scripts/spells/monster/ghoulish_hyaena_wave.lua new file mode 100644 index 000000000..d203470b0 --- /dev/null +++ b/data/scripts/spells/monster/ghoulish_hyaena_wave.lua @@ -0,0 +1,32 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) + +local condition = Condition(CONDITION_POISON) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(1, 4000, -3) +condition:addDamage(9, 4000, -2) +condition:addDamage(21, 4000, -1) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("ghoulish hyaena wave") +spell:words("###310") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/glooth-generator_summon.lua b/data/scripts/spells/monster/glooth-generator_summon.lua new file mode 100644 index 000000000..9587820d9 --- /dev/null +++ b/data/scripts/spells/monster/glooth-generator_summon.lua @@ -0,0 +1,22 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + addEvent(function(cid) + local creature = Creature(cid) + if not creature then + return + end + Game.createMonster("Energy Pulse", creature:getPosition(), true, true) + creature:say("The fully charged generator explodes in a blast!", TALKTYPE_ORANGE_2) + creature:remove() + return true + end, 14000, creature:getId()) +return true +end + +spell:name("glooth-generator summon") +spell:words("###402") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/glooth_anemone_summon.lua b/data/scripts/spells/monster/glooth_anemone_summon.lua new file mode 100644 index 000000000..d279620c9 --- /dev/null +++ b/data/scripts/spells/monster/glooth_anemone_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 1 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 1 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Glooth Blob", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("glooth anemone summon") +spell:words("##372") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/glooth_battery_heal.lua b/data/scripts/spells/monster/glooth_battery_heal.lua new file mode 100644 index 000000000..adf427e93 --- /dev/null +++ b/data/scripts/spells/monster/glooth_battery_heal.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +function onTargetCreature(creature, target) + local min = 50 + local max = 500 + + local master = target:getMaster() + if target:isPlayer() and not master + or master and master:isPlayer() then + return true + end + + doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) + return true +end + +combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("glooth battery heal") +spell:words("###400") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/glooth_bomb_walkthrough.lua b/data/scripts/spells/monster/glooth_bomb_walkthrough.lua new file mode 100644 index 000000000..baf0c11ad --- /dev/null +++ b/data/scripts/spells/monster/glooth_bomb_walkthrough.lua @@ -0,0 +1,42 @@ +local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) +condition:setParameter(CONDITION_PARAM_SUBID, 88888) +condition:setParameter(CONDITION_PARAM_TICKS, 10 * 1000) +condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) +condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 10 * 1000) + +local function changeSpeeds(cid, var) + local creature = Creature(cid) + if not creature then + return + end + creature:changeSpeed(creature:getBaseSpeed()) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local nextPosition = creature:getPosition() + local speed = creature:getSpeed() + local tile = Tile(nextPosition.x, nextPosition.y - 1, nextPosition.z) + local topCreature = tile:getTopCreature() + if not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then + creature:addCondition(condition) + creature:teleportTo(Position(nextPosition.x, nextPosition.y - 1, nextPosition.z), true) + creature:changeSpeed(-speed) + addEvent(changeSpeeds, 11 * 1000, creature:getId(), var) + if not topCreature then + return + end + if topCreature:isPlayer() then + topCreature:teleportTo(Position(nextPosition.x, nextPosition.y - 3, nextPosition.z), true) + else + end + end + return true +end + +spell:name("glooth bomb walkthrough") +spell:words("###399") +spell:isAggressive(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/glooth_fairy_healing.lua b/data/scripts/spells/monster/glooth_fairy_healing.lua new file mode 100644 index 000000000..c43de6940 --- /dev/null +++ b/data/scripts/spells/monster/glooth_fairy_healing.lua @@ -0,0 +1,25 @@ +local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) +condition:setParameter(CONDITION_PARAM_SUBID, 88888) +condition:setParameter(CONDITION_PARAM_TICKS, 30 * 1000) +condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) +condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 30 * 1000) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + if creature:getHealth() < creature:getMaxHealth() * 0.1 and not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then + creature:addCondition(condition) + addEvent(function(cid) + creature:addHealth(math.random(7500, 8000)) + creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + end, 10 * 1000, creature:getId()) + end + return true +end + +spell:name("glooth fairy healing") +spell:words("###384") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/glooth_fairy_paralyze.lua b/data/scripts/spells/monster/glooth_fairy_paralyze.lua new file mode 100644 index 000000000..a5ce65b31 --- /dev/null +++ b/data/scripts/spells/monster/glooth_fairy_paralyze.lua @@ -0,0 +1,41 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.6, 0, -0.8, 0) +combat:addCondition(condition) + +arr = { +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +} + +local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("glooth fairy paralyze") +spell:words("###383") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/glooth_fairy_skill_reducer.lua b/data/scripts/spells/monster/glooth_fairy_skill_reducer.lua new file mode 100644 index 000000000..b2ae699e5 --- /dev/null +++ b/data/scripts/spells/monster/glooth_fairy_skill_reducer.lua @@ -0,0 +1,39 @@ +local combat = {} + +for i = 40, 60 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 6000) + condition:setParameter(CONDITION_PARAM_STAT_MAGICPOINTSPERCENT, i) + + local arr = { + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + + local area = createCombatArea(arr) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(40, 60)]:execute(creature, var) +end + +spell:name("glooth fairy skill reducer") +spell:words("###382") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/gnomevil_drunk.lua b/data/scripts/spells/monster/gnomevil_drunk.lua new file mode 100644 index 000000000..f92de8936 --- /dev/null +++ b/data/scripts/spells/monster/gnomevil_drunk.lua @@ -0,0 +1,31 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) + +local condition = Condition(CONDITION_DRUNK) +condition:setParameter(CONDITION_PARAM_TICKS, 25000) +combat:addCondition(condition) + + arr = { + {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("gnomevil drunk") +spell:words("###146") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/gnomevil_electrify.lua b/data/scripts/spells/monster/gnomevil_electrify.lua new file mode 100644 index 000000000..dbdb2b209 --- /dev/null +++ b/data/scripts/spells/monster/gnomevil_electrify.lua @@ -0,0 +1,36 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) + +local condition = Condition(CONDITION_ENERGY) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(36, 10000, -25) +combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("gnomevil electrify") +spell:words("###150") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/gnomevil_skill_reducer_1.lua b/data/scripts/spells/monster/gnomevil_skill_reducer_1.lua new file mode 100644 index 000000000..a83a6f31e --- /dev/null +++ b/data/scripts/spells/monster/gnomevil_skill_reducer_1.lua @@ -0,0 +1,27 @@ +local combat = {} + +for i = 10, 45 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 10000) + condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(10, 45)]:execute(creature, var) +end + +spell:name("gnomevil skill reducer 1") +spell:words("###147") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/gnomevil_skill_reducer_2.lua b/data/scripts/spells/monster/gnomevil_skill_reducer_2.lua new file mode 100644 index 000000000..ea41bfba1 --- /dev/null +++ b/data/scripts/spells/monster/gnomevil_skill_reducer_2.lua @@ -0,0 +1,27 @@ +local combat = {} + +for i = 15, 45 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 10000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(15, 45)]:execute(creature, var) +end + +spell:name("gnomevil skill reducer 2") +spell:words("###148") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/gnomevil_soulfire.lua b/data/scripts/spells/monster/gnomevil_soulfire.lua new file mode 100644 index 000000000..040e4c9e9 --- /dev/null +++ b/data/scripts/spells/monster/gnomevil_soulfire.lua @@ -0,0 +1,32 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(159, 9000, -10) +combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("gnomevil soulfire") +spell:words("###149") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/gnorre_chyllson_drown.lua b/data/scripts/spells/monster/gnorre_chyllson_drown.lua new file mode 100644 index 000000000..9ce3ad5b8 --- /dev/null +++ b/data/scripts/spells/monster/gnorre_chyllson_drown.lua @@ -0,0 +1,24 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY) + +local condition = Condition(CONDITION_DROWN) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(20, 5000, -20) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("gnorre chyllson drown") +spell:words("###56") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/gnorre_chyllson_paralyze.lua b/data/scripts/spells/monster/gnorre_chyllson_paralyze.lua new file mode 100644 index 000000000..448445013 --- /dev/null +++ b/data/scripts/spells/monster/gnorre_chyllson_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SNOWBALL) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.1, 0, -0.2, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("gnorre chyllson paralyze") +spell:words("###58") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/gnorre_chyllson_skill_reducer.lua b/data/scripts/spells/monster/gnorre_chyllson_skill_reducer.lua new file mode 100644 index 000000000..e502614b9 --- /dev/null +++ b/data/scripts/spells/monster/gnorre_chyllson_skill_reducer.lua @@ -0,0 +1,30 @@ +local combat = {} + +for i = 45, 55 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 3000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE3X3) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(45, 55)]:execute(creature, var) +end + +spell:name("gnorre chyllson skill reducer") +spell:words("###57") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/grand_mother_foulscale_summon.lua b/data/scripts/spells/monster/grand_mother_foulscale_summon.lua new file mode 100644 index 000000000..eab36d8a5 --- /dev/null +++ b/data/scripts/spells/monster/grand_mother_foulscale_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_BLUE) + +local area = createCombatArea(AREA_CIRCLE3X3) +combat:setArea(area) + +local maxsummons = 4 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 4 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Dragon Hatchling", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("grand mother foulscale summon") +spell:words("###154") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/grandfather_tridian_paralyze.lua b/data/scripts/spells/monster/grandfather_tridian_paralyze.lua new file mode 100644 index 000000000..830e5ec38 --- /dev/null +++ b/data/scripts/spells/monster/grandfather_tridian_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.50, 0, -0.90, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("grandfather tridian paralyze") +spell:words("###155") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/greater_jar_summon.lua b/data/scripts/spells/monster/greater_jar_summon.lua new file mode 100644 index 000000000..114e4bc6c --- /dev/null +++ b/data/scripts/spells/monster/greater_jar_summon.lua @@ -0,0 +1,28 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) + +local area = createCombatArea(AREA_CIRCLE3X3) +combat:setArea(area) + +local maxsummons = 1 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 1 then + mid = Game.createMonster("Elder Mummy", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + return combat:execute(creature, var) +end + +spell:name("greater jar summon") +spell:words("###397") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/haunted_treeling_paralyze.lua b/data/scripts/spells/monster/haunted_treeling_paralyze.lua new file mode 100644 index 000000000..ad0f96d46 --- /dev/null +++ b/data/scripts/spells/monster/haunted_treeling_paralyze.lua @@ -0,0 +1,35 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.55, 0, -0.75, 0) +combat:addCondition(condition) + + arr = { + {1}, + {1}, + {1}, + {1}, + {1}, + {3} + } + +local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("haunted treeling paralyze") +spell:words("###67") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/haunter_curse.lua b/data/scripts/spells/monster/haunter_curse.lua new file mode 100644 index 000000000..c4164de33 --- /dev/null +++ b/data/scripts/spells/monster/haunter_curse.lua @@ -0,0 +1,34 @@ +local combat = {} + +for i = 2, 2 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for j = 1, 19 do + damage = damage * 1.2 + condition:addDamage(1, 4000, -damage) + end + + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(2, 2)]:execute(creature, var) +end + +spell:name("haunter curse") +spell:words("###312") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/haunter_electrify.lua b/data/scripts/spells/monster/haunter_electrify.lua new file mode 100644 index 000000000..af5ea028f --- /dev/null +++ b/data/scripts/spells/monster/haunter_electrify.lua @@ -0,0 +1,22 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + +local condition = Condition(CONDITION_ENERGY) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(10, 10000, -25) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("haunter electrify") +spell:words("###313") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/hell_hole_summon.lua b/data/scripts/spells/monster/hell_hole_summon.lua new file mode 100644 index 000000000..44b17ba85 --- /dev/null +++ b/data/scripts/spells/monster/hell_hole_summon.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + +local maxsummons = 4 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 4 then + mid = Game.createMonster("Deathspawn", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + return combat:execute(creature, var) +end + +spell:name("hell hole summon") +spell:words("###300") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/hellfire_fighter_soulfire.lua b/data/scripts/spells/monster/hellfire_fighter_soulfire.lua new file mode 100644 index 000000000..cce8fbc96 --- /dev/null +++ b/data/scripts/spells/monster/hellfire_fighter_soulfire.lua @@ -0,0 +1,40 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(20, 9000, -10) + +arr = { +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +} + +local area = createCombatArea(arr) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("hellfire fighter soulfire") +spell:words("###6") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/hellgorak_skill_reducer.lua b/data/scripts/spells/monster/hellgorak_skill_reducer.lua new file mode 100644 index 000000000..a0751ec63 --- /dev/null +++ b/data/scripts/spells/monster/hellgorak_skill_reducer.lua @@ -0,0 +1,43 @@ +local combat = {} + +for i = 20, 40 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(20, 40)]:execute(creature, var) +end + +spell:name("hellgorak skill reducer") +spell:words("###158") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/hellspawn_soulfire.lua b/data/scripts/spells/monster/hellspawn_soulfire.lua new file mode 100644 index 000000000..b933d33d7 --- /dev/null +++ b/data/scripts/spells/monster/hellspawn_soulfire.lua @@ -0,0 +1,24 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(26, 9000, -10) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("hellspawn soulfire") +spell:words("###7") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:isSelfTarget("7") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/hideous_fungus_paralyze.lua b/data/scripts/spells/monster/hideous_fungus_paralyze.lua new file mode 100644 index 000000000..02de106c3 --- /dev/null +++ b/data/scripts/spells/monster/hideous_fungus_paralyze.lua @@ -0,0 +1,29 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) + + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.40, 0, -0.80, 0) +combat:addCondition(condition) + + +local area = createCombatArea(AREA_CIRCLE2X2) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("hideous fungus paralyze") +spell:words("###70") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/hideous_fungus_poison.lua b/data/scripts/spells/monster/hideous_fungus_poison.lua new file mode 100644 index 000000000..782c68f4e --- /dev/null +++ b/data/scripts/spells/monster/hideous_fungus_poison.lua @@ -0,0 +1,33 @@ +local combat = {} + +for i = 25, 30 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON) + + local condition = Condition(CONDITION_POISON) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + condition:addDamage(10, 4000, -i) + condition:addDamage(10, 4000, -i + 1) + condition:addDamage(10, 4000, -i + 2) + condition:addDamage(10, 4000, -i + 3) + condition:addDamage(10, 4000, -i + 4) + + + local area = createCombatArea(AREA_SQUARE1X1) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(25, 30)]:execute(creature, var) +end + +spell:name("hideous fungus poison") +spell:words("###71") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/hideous_fungus_summon.lua b/data/scripts/spells/monster/hideous_fungus_summon.lua new file mode 100644 index 000000000..ef3e244a0 --- /dev/null +++ b/data/scripts/spells/monster/hideous_fungus_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Humorless Fungus", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("hideous fungus summon") +spell:words("###126") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/hirintror_freeze.lua b/data/scripts/spells/monster/hirintror_freeze.lua new file mode 100644 index 000000000..6c1760afc --- /dev/null +++ b/data/scripts/spells/monster/hirintror_freeze.lua @@ -0,0 +1,40 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO) + + local condition = Condition(CONDITION_FREEZING) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + condition:addDamage(25, 8000, -8) + combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("hirintror freeze") +spell:words("###165") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/hirintror_heal.lua b/data/scripts/spells/monster/hirintror_heal.lua new file mode 100644 index 000000000..44545a388 --- /dev/null +++ b/data/scripts/spells/monster/hirintror_heal.lua @@ -0,0 +1,24 @@ +local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) +condition:setParameter(CONDITION_PARAM_SUBID, 88888) +condition:setParameter(CONDITION_PARAM_TICKS, 15 * 60 * 1000) +condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) +condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 15 * 60 * 1000) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + if creature:getHealth() < creature:getMaxHealth() * 0.2 and not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then + creature:addCondition(condition) + creature:addHealth(1000) + else + return false + end +return true +end + +spell:name("hirintror heal") +spell:words("###341") +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/hirintror_skill_reducer.lua b/data/scripts/spells/monster/hirintror_skill_reducer.lua new file mode 100644 index 000000000..e8b7c8230 --- /dev/null +++ b/data/scripts/spells/monster/hirintror_skill_reducer.lua @@ -0,0 +1,30 @@ +local combat = {} + +for i = 20, 40 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 15000) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + + local area = createCombatArea(AREA_SQUARE1X1) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(20, 40)]:execute(creature, var) +end + +spell:name("hirintror skill reducer") +spell:words("###163") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/hirintror_summon.lua b/data/scripts/spells/monster/hirintror_summon.lua new file mode 100644 index 000000000..56afe18a2 --- /dev/null +++ b/data/scripts/spells/monster/hirintror_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) + +local area = createCombatArea(AREA_CIRCLE3X3) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Ice Golem", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("hirintror summon") +spell:words("###164") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/hive_pore_summon.lua b/data/scripts/spells/monster/hive_pore_summon.lua new file mode 100644 index 000000000..d95bdeeea --- /dev/null +++ b/data/scripts/spells/monster/hive_pore_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 3 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 3 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Lesser Swarmer", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("hive pore summon") +spell:words("###301") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/horadron_heal.lua b/data/scripts/spells/monster/horadron_heal.lua new file mode 100644 index 000000000..dcfb4b4ea --- /dev/null +++ b/data/scripts/spells/monster/horadron_heal.lua @@ -0,0 +1,50 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) + +arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + +local area = createCombatArea(arr) +combat:setArea(area) + +function onTargetCreature(creature, target) + local min = 400 + local max = 700 + + local master = target:getMaster() + if target:isPlayer() and not master + or master and master:isPlayer() then + return true + end + + doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) + return true +end + +combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("horadron heal") +spell:words("###392") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/horadron_paralyze.lua b/data/scripts/spells/monster/horadron_paralyze.lua new file mode 100644 index 000000000..7d309e331 --- /dev/null +++ b/data/scripts/spells/monster/horadron_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.50, 0, -0.75, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("horadron paralyze") +spell:words("###166") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/horestis_paralyze.lua b/data/scripts/spells/monster/horestis_paralyze.lua new file mode 100644 index 000000000..41868de45 --- /dev/null +++ b/data/scripts/spells/monster/horestis_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.75, 0, -0.90, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("horestis paralyze") +spell:words("###167") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/hot_dog_soulfire.lua b/data/scripts/spells/monster/hot_dog_soulfire.lua new file mode 100644 index 000000000..79ce8a5aa --- /dev/null +++ b/data/scripts/spells/monster/hot_dog_soulfire.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(20, 9000, -10) + +local area = createCombatArea(AREA_CIRCLE1X1) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("hot dog soulfire") +spell:words("###276") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/hot_dog_wave.lua b/data/scripts/spells/monster/hot_dog_wave.lua new file mode 100644 index 000000000..6dc8db766 --- /dev/null +++ b/data/scripts/spells/monster/hot_dog_wave.lua @@ -0,0 +1,29 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("hot dog wave") +spell:words("###277") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/humongous_fungus_paralyze.lua b/data/scripts/spells/monster/humongous_fungus_paralyze.lua new file mode 100644 index 000000000..aeafbd146 --- /dev/null +++ b/data/scripts/spells/monster/humongous_fungus_paralyze.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.55, 0, -0.80, 0) +combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("humongous fungus paralyze") +spell:words("###69") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/humongous_fungus_poison.lua b/data/scripts/spells/monster/humongous_fungus_poison.lua new file mode 100644 index 000000000..fbb2e6d43 --- /dev/null +++ b/data/scripts/spells/monster/humongous_fungus_poison.lua @@ -0,0 +1,43 @@ +local combat = {} + +for i = 25, 30 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) + + local condition = Condition(CONDITION_POISON) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + condition:addDamage(10, 4000, -i) + condition:addDamage(10, 4000, -i + 1) + condition:addDamage(10, 4000, -i + 2) + condition:addDamage(10, 4000, -i + 3) + condition:addDamage(10, 4000, -i + 4) + + arr = { + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + + local area = createCombatArea(arr) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(25, 30)]:execute(creature, var) +end + +spell:name("humongous fungus poison") +spell:words("###68") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/hunger_summon.lua b/data/scripts/spells/monster/hunger_summon.lua new file mode 100644 index 000000000..ad32e07ca --- /dev/null +++ b/data/scripts/spells/monster/hunger_summon.lua @@ -0,0 +1,35 @@ +local hungerSummonDelay = false + +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) + +local function removeDelay() + hungerSummonDelay = false +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + + if hungerSummonDelay == false then + if hungerSummon < 3 then + Game.createMonster("Greed", {x=creature:getPosition().x+math.random(-1, 1), y=creature:getPosition().y+math.random(-1, 1), z=creature:getPosition().z}, false, true) + hungerSummon = hungerSummon + 1 + + hungerSummonDelay = true + addEvent(removeDelay, 15000) + end + end + + return combat:execute(creature, var) +end + +spell:name("hunger summon") +spell:words("###420") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ice_crystal_bomb.lua b/data/scripts/spells/monster/ice_crystal_bomb.lua new file mode 100644 index 000000000..738132d5e --- /dev/null +++ b/data/scripts/spells/monster/ice_crystal_bomb.lua @@ -0,0 +1,29 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, 44) +combat:setParameter(COMBAT_PARAM_EFFECT, 53) +combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) +combat:setParameter(COMBAT_PARAM_USECHARGES, 1) +combat:setArea(createCombatArea(AREA_CIRCLE2X2)) + +function onGetFormulaValues(player, skill, attack, factor) + local skillTotal = skill * attack + local levelTotal = player:getLevel() / 5 + return -(((skillTotal * 0.02) + 4) + (levelTotal)), -(((skillTotal * 0.03) + 6) + (levelTotal)) +end + +combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("Ice Crystal Bomb") +spell:words("###470") +spell:needLearn(true) +spell:needDirection(true) +spell:cooldown("2000") +spell:isSelfTarget(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ice_golem_paralyze.lua b/data/scripts/spells/monster/ice_golem_paralyze.lua new file mode 100644 index 000000000..20cc52370 --- /dev/null +++ b/data/scripts/spells/monster/ice_golem_paralyze.lua @@ -0,0 +1,37 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.35, 0, -0.45, 0) +combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("ice golem paralyze") +spell:words("###162") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ice_golem_skill_reducer.lua b/data/scripts/spells/monster/ice_golem_skill_reducer.lua new file mode 100644 index 000000000..f6768623b --- /dev/null +++ b/data/scripts/spells/monster/ice_golem_skill_reducer.lua @@ -0,0 +1,30 @@ +local combat = {} + +for i = 20, 40 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 15000) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + + local area = createCombatArea(AREA_SQUARE1X1) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(20, 40)]:execute(creature, var) +end + +spell:name("ice golem skill reducer") +spell:words("###207") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ice_overlord_freeze.lua b/data/scripts/spells/monster/ice_overlord_freeze.lua new file mode 100644 index 000000000..52b592cf4 --- /dev/null +++ b/data/scripts/spells/monster/ice_overlord_freeze.lua @@ -0,0 +1,23 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE) + +local condition = Condition(CONDITION_FREEZING) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(30, 8000, -8) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("ice overlord freeze") +spell:words("###264") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ice_overlord_paralyze.lua b/data/scripts/spells/monster/ice_overlord_paralyze.lua new file mode 100644 index 000000000..ae78b610b --- /dev/null +++ b/data/scripts/spells/monster/ice_overlord_paralyze.lua @@ -0,0 +1,40 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.3, 0, -0.65, 0) + combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("ice overlord paralyze") +spell:words("###265") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ice_witch_paralyze.lua b/data/scripts/spells/monster/ice_witch_paralyze.lua new file mode 100644 index 000000000..2f5f53dc0 --- /dev/null +++ b/data/scripts/spells/monster/ice_witch_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.55, 0, -0.75, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("ice witch paralyze") +spell:words("###299") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/icecle_heal.lua b/data/scripts/spells/monster/icecle_heal.lua new file mode 100644 index 000000000..8fe994a78 --- /dev/null +++ b/data/scripts/spells/monster/icecle_heal.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) +combat:setArea(createCombatArea(AREA_CIRCLE3X3)) + +function onTargetCreature(creature, target) + local min = 400 + local max = 600 + + local master = target:getMaster() + if target:isPlayer() and not master + or master and master:isPlayer() then + return true + end + + doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) + return true +end + +combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("icecle heal") +spell:words("###436") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:isSelfTarget(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/incineron_soulfire.lua b/data/scripts/spells/monster/incineron_soulfire.lua new file mode 100644 index 000000000..634c3d61c --- /dev/null +++ b/data/scripts/spells/monster/incineron_soulfire.lua @@ -0,0 +1,40 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(20, 9000, -10) + +arr = { +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +} + +local area = createCombatArea(arr) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("incineron soulfire") +spell:words("###311") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/infected_weeper_summon.lua b/data/scripts/spells/monster/infected_weeper_summon.lua new file mode 100644 index 000000000..82a2818e3 --- /dev/null +++ b/data/scripts/spells/monster/infected_weeper_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) + +local maxsummons = 1 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 1 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Parasite", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("infected weeper summon") +spell:words("###291") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ironblight_freeze.lua b/data/scripts/spells/monster/ironblight_freeze.lua new file mode 100644 index 000000000..8defcb9af --- /dev/null +++ b/data/scripts/spells/monster/ironblight_freeze.lua @@ -0,0 +1,23 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE) + +local condition = Condition(CONDITION_FREEZING) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(30, 8000, -8) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("ironblight freeze") +spell:words("###263") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ironblight_skill_reducer.lua b/data/scripts/spells/monster/ironblight_skill_reducer.lua new file mode 100644 index 000000000..70e59a686 --- /dev/null +++ b/data/scripts/spells/monster/ironblight_skill_reducer.lua @@ -0,0 +1,27 @@ +local combat = {} + +for i = 30, 70 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 4000) + condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(30, 70)]:execute(creature, var) +end + +spell:name("ironblight skill reducer") +spell:words("###262") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/jaul_paralyze.lua b/data/scripts/spells/monster/jaul_paralyze.lua new file mode 100644 index 000000000..15b7dee3a --- /dev/null +++ b/data/scripts/spells/monster/jaul_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BUBBLES) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 10000) + condition:setFormula(-0.55, 0, -0.85, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("jaul paralyze") +spell:words("###170") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/jewelry_chest_summon.lua b/data/scripts/spells/monster/jewelry_chest_summon.lua new file mode 100644 index 000000000..be686c595 --- /dev/null +++ b/data/scripts/spells/monster/jewelry_chest_summon.lua @@ -0,0 +1,32 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 5 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 5 then + for i = 1, maxsummons - #summoncount do + creature:addHealth(500) + creature:getPosition():sendMagicEffect(12) + local mid = Game.createMonster("Chest Guard", { x=creature:getPosition().x+math.random(-2, 2), y=creature:getPosition().y+math.random(-2, 2), z=creature:getPosition().z }) + if not mid then + return + end + mid:say("FREEZE! LET ME SEE YOUR HANDS UP!", TALKTYPE_ORANGE_2) + end + end +return combat:execute(creature, var) +end + +spell:name("jewelry chest summon") +spell:words("###316") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/killer_rabbit_summon.lua b/data/scripts/spells/monster/killer_rabbit_summon.lua new file mode 100644 index 000000000..31d4f62b9 --- /dev/null +++ b/data/scripts/spells/monster/killer_rabbit_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Killer Rabbit Summon", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("killer rabbit summon") +spell:words("###272") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/koshei_the_deathless_curse.lua b/data/scripts/spells/monster/koshei_the_deathless_curse.lua new file mode 100644 index 000000000..da5258138 --- /dev/null +++ b/data/scripts/spells/monster/koshei_the_deathless_curse.lua @@ -0,0 +1,34 @@ +local combat = {} + +for i = 1, 1 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for j = 1, 19 do + damage = damage * 1.25 + condition:addDamage(1, 4000, -damage) + end + + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(1, 1)]:execute(creature, var) +end + +spell:name("koshei the deathless curse") +spell:words("###171") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/koshei_the_deathless_paralyze.lua b/data/scripts/spells/monster/koshei_the_deathless_paralyze.lua new file mode 100644 index 000000000..c98541d49 --- /dev/null +++ b/data/scripts/spells/monster/koshei_the_deathless_paralyze.lua @@ -0,0 +1,21 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.6, 0, -0.85, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("koshei the deathless paralyze") +spell:words("###172") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/kraknaknork_explosion_wave.lua b/data/scripts/spells/monster/kraknaknork_explosion_wave.lua new file mode 100644 index 000000000..3bef2efa0 --- /dev/null +++ b/data/scripts/spells/monster/kraknaknork_explosion_wave.lua @@ -0,0 +1,27 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("kraknaknork explosion wave") +spell:words("###174") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/kraknaknork_ice_wave.lua b/data/scripts/spells/monster/kraknaknork_ice_wave.lua new file mode 100644 index 000000000..17409e1cc --- /dev/null +++ b/data/scripts/spells/monster/kraknaknork_ice_wave.lua @@ -0,0 +1,27 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) + + arr = { + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("kraknaknork ice wave") +spell:words("###175") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/kraknaknork_paralyze.lua b/data/scripts/spells/monster/kraknaknork_paralyze.lua new file mode 100644 index 000000000..84f55d3dc --- /dev/null +++ b/data/scripts/spells/monster/kraknaknork_paralyze.lua @@ -0,0 +1,21 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 2000) + condition:setFormula(-0.25, 0, -0.35, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("kraknaknork paralyze") +spell:words("###176") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/kraknaknork_poison_wave.lua b/data/scripts/spells/monster/kraknaknork_poison_wave.lua new file mode 100644 index 000000000..61eac32b5 --- /dev/null +++ b/data/scripts/spells/monster/kraknaknork_poison_wave.lua @@ -0,0 +1,28 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("kraknaknork poison wave") +spell:words("###173") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lancer_beetle_curse.lua b/data/scripts/spells/monster/lancer_beetle_curse.lua new file mode 100644 index 000000000..a7efa85c3 --- /dev/null +++ b/data/scripts/spells/monster/lancer_beetle_curse.lua @@ -0,0 +1,33 @@ +local combat = {} + +for i = 1, 1 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for j = 1, 22 do + damage = damage * 1.2 + condition:addDamage(1, 4000, -damage) + end + + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(1, 1)]:execute(creature, var) +end + +spell:name("lancer beetle curse") +spell:words("###12") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lancer_beetle_skill_reducer.lua b/data/scripts/spells/monster/lancer_beetle_skill_reducer.lua new file mode 100644 index 000000000..d24a00f54 --- /dev/null +++ b/data/scripts/spells/monster/lancer_beetle_skill_reducer.lua @@ -0,0 +1,26 @@ +local combat = {} + +for i = 10, 30 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 15000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(10, 30)]:execute(creature, var) +end + +spell:name("lancer beetle skill reducer") +spell:words("###218") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lava_golem_soulfire.lua b/data/scripts/spells/monster/lava_golem_soulfire.lua new file mode 100644 index 000000000..13aa49bba --- /dev/null +++ b/data/scripts/spells/monster/lava_golem_soulfire.lua @@ -0,0 +1,24 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(40, 9000, -10) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("lava golem soulfire") +spell:words("###26") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lava_golem_soulfire2.lua b/data/scripts/spells/monster/lava_golem_soulfire2.lua new file mode 100644 index 000000000..55f5c8c11 --- /dev/null +++ b/data/scripts/spells/monster/lava_golem_soulfire2.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(40, 9000, -10) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("lava golem soulfire2") +spell:words("###315") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/leaf_golem_paralyze.lua b/data/scripts/spells/monster/leaf_golem_paralyze.lua new file mode 100644 index 000000000..09aae4ec2 --- /dev/null +++ b/data/scripts/spells/monster/leaf_golem_paralyze.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.25, 0, -0.45, 0) +combat:addCondition(condition) + + +local area = createCombatArea(AREA_SQUARE1X1) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("leaf golem paralyze") +spell:words("###73") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lersatio_summon.lua b/data/scripts/spells/monster/lersatio_summon.lua new file mode 100644 index 000000000..92ec909b3 --- /dev/null +++ b/data/scripts/spells/monster/lersatio_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BATS) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 3 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 3 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Vampire", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("lersatio summon") +spell:words("###177") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lethal_lissy_skill_reducer.lua b/data/scripts/spells/monster/lethal_lissy_skill_reducer.lua new file mode 100644 index 000000000..4b66fc54b --- /dev/null +++ b/data/scripts/spells/monster/lethal_lissy_skill_reducer.lua @@ -0,0 +1,30 @@ +local combat = {} + +for i = 10, 25 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_PURPLE) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 10000) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + + local area = createCombatArea(AREA_BEAM1) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(10, 25)]:execute(creature, var) +end + +spell:name("lethal lissy skill reducer") +spell:words("###178") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lich_paralyze.lua b/data/scripts/spells/monster/lich_paralyze.lua new file mode 100644 index 000000000..8b5cd7e1b --- /dev/null +++ b/data/scripts/spells/monster/lich_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.75, 0, -0.85, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("lich paralyze") +spell:words("###157") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lisa_heal.lua b/data/scripts/spells/monster/lisa_heal.lua new file mode 100644 index 000000000..39ac2c955 --- /dev/null +++ b/data/scripts/spells/monster/lisa_heal.lua @@ -0,0 +1,27 @@ +local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) +condition:setParameter(CONDITION_PARAM_SUBID, 88888) +condition:setParameter(CONDITION_PARAM_TICKS, 6 * 1000) +condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) +condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 6 * 1000) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + if creature:getHealth() < creature:getMaxHealth() * 0.07 and not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then + creature:say("Lisa takes a final breath before she's healing up!", TALKTYPE_ORANGE_1) + creature:addCondition(condition) + addEvent(function(cid) + creature:addHealth(math.random(18000, 23000)) + creature:say("Lisa healed up!", TALKTYPE_ORANGE_1) + creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + end, 6 * 1000, creature:getId()) + end + return true +end + +spell:name("lisa heal") +spell:words("###386") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lisa_paralyze.lua b/data/scripts/spells/monster/lisa_paralyze.lua new file mode 100644 index 000000000..176b1b5a9 --- /dev/null +++ b/data/scripts/spells/monster/lisa_paralyze.lua @@ -0,0 +1,24 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.55, 0, -0.75, 0) + combat:addCondition(condition) + + local area = createCombatArea(AREA_CIRCLE3X3) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("lisa paralyze") +spell:words("###387") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lisa_skill_reducer.lua b/data/scripts/spells/monster/lisa_skill_reducer.lua new file mode 100644 index 000000000..9d3d3376c --- /dev/null +++ b/data/scripts/spells/monster/lisa_skill_reducer.lua @@ -0,0 +1,93 @@ +local combat = {} + +for i = 60, 75 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLEARTH) + + local condition1 = Condition(CONDITION_ATTRIBUTES) + condition1:setParameter(CONDITION_PARAM_TICKS, 7000) + condition1:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition1:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + condition1:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + + local condition2 = Condition(CONDITION_ATTRIBUTES) + condition2:setParameter(CONDITION_PARAM_TICKS, 7000) + condition2:setParameter(CONDITION_PARAM_STAT_MAGICPOINTSPERCENT, i) + + local condition3 = Condition(CONDITION_ATTRIBUTES) + condition3:setParameter(CONDITION_PARAM_TICKS, 7000) + condition3:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + condition3:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + + arr = { + {0, 0, 0, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 1, 1, 1}, + {1, 1, 1, 1, 3, 1, 1, 1, 1}, + {1, 1, 1, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 0, 0, 0} + } + + local area = createCombatArea(arr) + combat[i]:setArea(area) + + + function onTargetTile(creature, pos) + local creatureTable = {} + local n, i = Tile({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 + if n ~= 0 then + local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid + while v ~= 0 do + if isCreature(v) == true then + table.insert(creatureTable, v) + if n == #creatureTable then + break + end + end + i = i + 1 + v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid + end + end + if #creatureTable ~= nil and #creatureTable > 0 then + for r = 1, #creatureTable do + if creatureTable[r] ~= creature then + local player = Player(creatureTable[r]) + local vocationClientId = player:getVocation():getBaseId() + + if isPlayer(creatureTable[r]) == true + and table.contains({VOCATION.BASE_ID.SORCERER, VOCATION.BASE_ID.DRUID}, vocationClientId) then + player:addCondition(condition2) + elseif isPlayer(creatureTable[r]) == true + and table.contains({VOCATION.BASE_ID.PALADIN}, vocationClientId) then + player:addCondition(condition3) + elseif isPlayer(creatureTable[r]) == true + and table.contains({VOCATION.BASE_ID.KNIGHT}, vocationClientId) then + player:addCondition(condition1) + elseif isMonster(creatureTable[r]) == true then + end + end + end + end + pos:sendMagicEffect(CONST_ME_SMALLPLANTS) + return true + end + + combat[i]:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") + +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(60, 75)]:execute(creature, var) +end +spell:name("lisa skill reducer") +spell:words("###385") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lisa_summon.lua b/data/scripts/spells/monster/lisa_summon.lua new file mode 100644 index 000000000..e7170b3bc --- /dev/null +++ b/data/scripts/spells/monster/lisa_summon.lua @@ -0,0 +1,29 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) + +local maxsummons = 4 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 4 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Glooth Anemone2", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("lisa summon") +spell:words("###389") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lisa_wave.lua b/data/scripts/spells/monster/lisa_wave.lua new file mode 100644 index 000000000..a9c3ea4d5 --- /dev/null +++ b/data/scripts/spells/monster/lisa_wave.lua @@ -0,0 +1,27 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE) + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + + local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("lisa wave") +spell:words("###388") +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lizard_dragon_priest_summon.lua b/data/scripts/spells/monster/lizard_dragon_priest_summon.lua new file mode 100644 index 000000000..e92878c4e --- /dev/null +++ b/data/scripts/spells/monster/lizard_dragon_priest_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Dragon Hatchling", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("lizard dragon priest summon") +spell:words("###138") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lizard_gate_guardian_summon.lua b/data/scripts/spells/monster/lizard_gate_guardian_summon.lua new file mode 100644 index 000000000..a0b623b58 --- /dev/null +++ b/data/scripts/spells/monster/lizard_gate_guardian_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Lizard Chosen", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("lizard gate guardian summon") +spell:words("###179") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lizard_magistratus_curse.lua b/data/scripts/spells/monster/lizard_magistratus_curse.lua new file mode 100644 index 000000000..ab0902bbb --- /dev/null +++ b/data/scripts/spells/monster/lizard_magistratus_curse.lua @@ -0,0 +1,34 @@ +local combat = {} + +for i = 2, 2 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for j = 1, 20 do + damage = damage * 1.2 + condition:addDamage(1, 4000, -damage) + end + + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(2, 2)]:execute(creature, var) +end + +spell:name("lizard magistratus curse") +spell:words("###13") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lizard_wave.lua b/data/scripts/spells/monster/lizard_wave.lua new file mode 100644 index 000000000..76e8aef19 --- /dev/null +++ b/data/scripts/spells/monster/lizard_wave.lua @@ -0,0 +1,29 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("lizard wave") +spell:words("###283") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lizard_wave_2.lua b/data/scripts/spells/monster/lizard_wave_2.lua new file mode 100644 index 000000000..db96b0564 --- /dev/null +++ b/data/scripts/spells/monster/lizard_wave_2.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("lizard wave 2") +spell:words("###284") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lloyd_wave.lua b/data/scripts/spells/monster/lloyd_wave.lua new file mode 100644 index 000000000..9499f1391 --- /dev/null +++ b/data/scripts/spells/monster/lloyd_wave.lua @@ -0,0 +1,31 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, 179) + +arr = { + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} +} + + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("lloyd wave") +spell:words("###432") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lloyd_wave2.lua b/data/scripts/spells/monster/lloyd_wave2.lua new file mode 100644 index 000000000..f43a0e9bc --- /dev/null +++ b/data/scripts/spells/monster/lloyd_wave2.lua @@ -0,0 +1,31 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, 179) + +arr = { + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} +} + + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("lloyd wave2") +spell:words("###433") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lloyd_wave3.lua b/data/scripts/spells/monster/lloyd_wave3.lua new file mode 100644 index 000000000..d5c30b825 --- /dev/null +++ b/data/scripts/spells/monster/lloyd_wave3.lua @@ -0,0 +1,31 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, 179) + +arr = { + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} +} + + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("lloyd wave3") +spell:words("###434") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:isSelfTarget(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lord_of_the_elements_paralyze.lua b/data/scripts/spells/monster/lord_of_the_elements_paralyze.lua new file mode 100644 index 000000000..fba928cb7 --- /dev/null +++ b/data/scripts/spells/monster/lord_of_the_elements_paralyze.lua @@ -0,0 +1,41 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STONES) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.50, 0, -0.75, 0) +combat:addCondition(condition) + +arr = { +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +} + +local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("lord of the elements paralyze") +spell:words("###182") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lord_of_the_elements_skill_reducer.lua b/data/scripts/spells/monster/lord_of_the_elements_skill_reducer.lua new file mode 100644 index 000000000..a837f01cf --- /dev/null +++ b/data/scripts/spells/monster/lord_of_the_elements_skill_reducer.lua @@ -0,0 +1,45 @@ +local combat = {} + +for i = 65, 85 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 10000) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + + arr = { + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(65, 85)]:execute(creature, var) +end + +spell:name("lord of the elements skill reducer") +spell:words("###183") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lord_of_the_elements_soulfire.lua b/data/scripts/spells/monster/lord_of_the_elements_soulfire.lua new file mode 100644 index 000000000..731bdc3ce --- /dev/null +++ b/data/scripts/spells/monster/lord_of_the_elements_soulfire.lua @@ -0,0 +1,23 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLAMMINGARROW) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(50, 9000, -10) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("lord of the elements soulfire") +spell:words("###181") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lord_of_the_elements_summon.lua b/data/scripts/spells/monster/lord_of_the_elements_summon.lua new file mode 100644 index 000000000..ddd55304e --- /dev/null +++ b/data/scripts/spells/monster/lord_of_the_elements_summon.lua @@ -0,0 +1,51 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + + if creature:getOutfit().lookType == 11 then + local mid = Game.createMonster("roaring water elemental", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + elseif creature:getOutfit().lookType == 285 then + local mid = Game.createMonster("jagged earth elemental", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + elseif creature:getOutfit().lookType == 290 then + local mid = Game.createMonster("overcharged energy elemental", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + elseif creature:getOutfit().lookType == 243 then + local mid = Game.createMonster("blistering fire elemental", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + end +return combat:execute(creature, var) +end + +spell:name("lord of the elements summon") +spell:words("###180") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lost_berserker_skill_reducer.lua b/data/scripts/spells/monster/lost_berserker_skill_reducer.lua new file mode 100644 index 000000000..ac92c74f6 --- /dev/null +++ b/data/scripts/spells/monster/lost_berserker_skill_reducer.lua @@ -0,0 +1,27 @@ +local combat = {} + +for i = 15, 55 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 7000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE1X1) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(15, 55)]:execute(creature, var) +end + +spell:name("lost berserker skill reducer") +spell:words("###253") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lost_soul_paralyze.lua b/data/scripts/spells/monster/lost_soul_paralyze.lua new file mode 100644 index 000000000..a43225a6f --- /dev/null +++ b/data/scripts/spells/monster/lost_soul_paralyze.lua @@ -0,0 +1,40 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.6, 0, -0.75, 0) + combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("lost soul paralyze") +spell:words("###298") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/lost_thrower_skill_reducer.lua b/data/scripts/spells/monster/lost_thrower_skill_reducer.lua new file mode 100644 index 000000000..b62f24d42 --- /dev/null +++ b/data/scripts/spells/monster/lost_thrower_skill_reducer.lua @@ -0,0 +1,27 @@ +local combat = {} + +for i = 20, 60 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 8000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE1X1) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(20, 60)]:execute(creature, var) +end + +spell:name("lost thrower skill reducer") +spell:words("###256") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/madareth_pillar_skill_reducer.lua b/data/scripts/spells/monster/madareth_pillar_skill_reducer.lua new file mode 100644 index 000000000..8907f9d1a --- /dev/null +++ b/data/scripts/spells/monster/madareth_pillar_skill_reducer.lua @@ -0,0 +1,33 @@ +local combat = {} + +for i = 5, 10 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 15000) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + + local condition2 = Condition(CONDITION_PARALYZE) + condition2:setParameter(CONDITION_PARAM_TICKS, 20000) + condition2:setFormula(-0.7, 0, -0.9, 0) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat[i]:setArea(area) + combat[i]:addCondition(condition) + combat[i]:addCondition(condition2) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(5, 10)]:execute(creature, var) +end + +spell:name("madareth pillar skill reducer") +spell:words("###184") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/madareth_skill_reducer.lua b/data/scripts/spells/monster/madareth_skill_reducer.lua new file mode 100644 index 000000000..d7f221511 --- /dev/null +++ b/data/scripts/spells/monster/madareth_skill_reducer.lua @@ -0,0 +1,41 @@ +local combat = {} + +for i = 20, 40 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + + arr = { + {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + + local area = createCombatArea(arr) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(20, 40)]:execute(creature, var) +end + +spell:name("madareth skill reducer") +spell:words("###185") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/magic_pillar_summon.lua b/data/scripts/spells/monster/magic_pillar_summon.lua new file mode 100644 index 000000000..44e1ca576 --- /dev/null +++ b/data/scripts/spells/monster/magic_pillar_summon.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + +local maxsummons = 3 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 3 then + mid = Game.createMonster("Demon2", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + return combat:execute(creature, var) +end + +spell:name("magic pillar summon") +spell:words("###302") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/magma_crawler_skill_reducer.lua b/data/scripts/spells/monster/magma_crawler_skill_reducer.lua new file mode 100644 index 000000000..cd5fe8cce --- /dev/null +++ b/data/scripts/spells/monster/magma_crawler_skill_reducer.lua @@ -0,0 +1,28 @@ +local combat = {} + +for i = 15, 55 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 7000) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE1X1) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(15, 55)]:execute(creature, var) +end + +spell:name("magma crawler skill reducer") +spell:words("###254") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/magma_crawler_soulfire.lua b/data/scripts/spells/monster/magma_crawler_soulfire.lua new file mode 100644 index 000000000..98ebdcdfc --- /dev/null +++ b/data/scripts/spells/monster/magma_crawler_soulfire.lua @@ -0,0 +1,24 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(20, 9000, -10) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("magma crawler soulfire") +spell:words("###27") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/magma_crawler_soulfire_2.lua b/data/scripts/spells/monster/magma_crawler_soulfire_2.lua new file mode 100644 index 000000000..236bce3fe --- /dev/null +++ b/data/scripts/spells/monster/magma_crawler_soulfire_2.lua @@ -0,0 +1,23 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(20, 9000, -10) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("magma crawler soulfire 2") +spell:words("###293") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/magma_crawler_wave.lua b/data/scripts/spells/monster/magma_crawler_wave.lua new file mode 100644 index 000000000..869b84f4b --- /dev/null +++ b/data/scripts/spells/monster/magma_crawler_wave.lua @@ -0,0 +1,27 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("magma crawler wave") +spell:words("###292") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/mahrdis_soulfire.lua b/data/scripts/spells/monster/mahrdis_soulfire.lua new file mode 100644 index 000000000..aa87ff5e8 --- /dev/null +++ b/data/scripts/spells/monster/mahrdis_soulfire.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(50, 9000, -10) + +local area = createCombatArea({ + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0} +}) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("mahrdis soulfire") +spell:words("###286") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/mamma_longlegs_paralyze.lua b/data/scripts/spells/monster/mamma_longlegs_paralyze.lua new file mode 100644 index 000000000..d3843e60c --- /dev/null +++ b/data/scripts/spells/monster/mamma_longlegs_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 25000) + condition:setFormula(-0.5, 0, -0.8, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("mamma longlegs paralyze") +spell:words("###186") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/man_in_the_cave_summon.lua b/data/scripts/spells/monster/man_in_the_cave_summon.lua new file mode 100644 index 000000000..8f246dcb5 --- /dev/null +++ b/data/scripts/spells/monster/man_in_the_cave_summon.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GIFT_WRAPS) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + mid = Game.createMonster("Monk", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + return combat:execute(creature, var) +end + +spell:name("man in the cave summon") +spell:words("###187") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/massive_energy_elemental_electrify.lua b/data/scripts/spells/monster/massive_energy_elemental_electrify.lua new file mode 100644 index 000000000..9cd50eaec --- /dev/null +++ b/data/scripts/spells/monster/massive_energy_elemental_electrify.lua @@ -0,0 +1,24 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) + +local condition = Condition(CONDITION_ENERGY) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(10, 10000, -25) + +local area = createCombatArea(AREA_CIRCLE3X3) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("massive energy elemental electrify") +spell:words("###4") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/massive_fire_elemental_soulfire.lua b/data/scripts/spells/monster/massive_fire_elemental_soulfire.lua new file mode 100644 index 000000000..e5bcaacf7 --- /dev/null +++ b/data/scripts/spells/monster/massive_fire_elemental_soulfire.lua @@ -0,0 +1,40 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(20, 9000, -10) + +arr = { +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +} + +local area = createCombatArea(arr) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("massive fire elemental soulfire") +spell:words("###5") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/mawhawk_summon.lua b/data/scripts/spells/monster/mawhawk_summon.lua new file mode 100644 index 000000000..20d1f6511 --- /dev/null +++ b/data/scripts/spells/monster/mawhawk_summon.lua @@ -0,0 +1,31 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) + +local area = createCombatArea(AREA_CIRCLE1X1) +combat:setArea(area) + +local maxsummons = 4 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) +creature:say("Watch my maws!", TALKTYPE_ORANGE_1) + local summoncount = creature:getSummons() + if #summoncount < 4 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Guzzlemaw", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("mawhawk summon") +spell:words("###360") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/mawhawk_ue.lua b/data/scripts/spells/monster/mawhawk_ue.lua new file mode 100644 index 000000000..2cfe9e531 --- /dev/null +++ b/data/scripts/spells/monster/mawhawk_ue.lua @@ -0,0 +1,98 @@ +local vocation = { + VOCATION.BASE_ID.SORCERER, + VOCATION.BASE_ID.DRUID, + VOCATION.BASE_ID.PALADIN, + VOCATION.BASE_ID.KNIGHT +} + +local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) +condition:setParameter(CONDITION_PARAM_SUBID, 88888) +condition:setParameter(CONDITION_PARAM_TICKS, 10 * 60 * 1000) +condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) +condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 10 * 60 * 1000) + +local area = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +} + +local createArea = createCombatArea(area) + +local combat = Combat() +combat:setArea(createArea) + +function onTargetTile(creature, pos) + local creatureTable = {} + local n, i = Tile({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 + if n ~= 0 then + local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid + while v ~= 0 do + if isCreature(v) == true then + table.insert(creatureTable, v) + if n == #creatureTable then + break + end + end + i = i + 1 + v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid + end + end + if #creatureTable ~= nil and #creatureTable > 0 then + for r = 1, #creatureTable do + if creatureTable[r] ~= creature then + local min = 1500 + local max = 1700 + local player = Player(creatureTable[r]) + + if isPlayer(creatureTable[r]) == true and table.contains(vocation, player:getVocation():getBaseId()) then + doTargetCombatHealth(creature, creatureTable[r], COMBAT_FIREDAMAGE, -min, -max, CONST_ME_NONE) + elseif isMonster(creatureTable[r]) == true then + doTargetCombatHealth(creature, creatureTable[r], COMBAT_FIREDAMAGE, -min, -max, CONST_ME_NONE) + end + end + end + end + pos:sendMagicEffect(CONST_ME_FIREAREA) + return true +end + +combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") + +local function delayedCastSpell(cid, var) + local creature = Creature(cid) + if not creature then + return + end + return combat:execute(creature, positionToVariant(creature:getPosition())) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + if creature:getHealth() < creature:getMaxHealth() * 0.1 and not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then + creature:addCondition(condition) + addEvent(delayedCastSpell, 5000, creature:getId(), var) + creature:say("Better flee now.", TALKTYPE_ORANGE_1) + else + return + end + return true +end + +spell:name("mawhawk ue") +spell:words("###361") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/maxxen_teleport.lua b/data/scripts/spells/monster/maxxen_teleport.lua new file mode 100644 index 000000000..1d2e8133c --- /dev/null +++ b/data/scripts/spells/monster/maxxen_teleport.lua @@ -0,0 +1,15 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + creature:getPosition():sendMagicEffect(CONST_ME_POFF) + creature:teleportTo(Position(math.random(33704, 33718), math.random(32040, 32053), 15)) + creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + return +end + +spell:name("maxxenTeleport") +spell:words("###428") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/mazoran_fire.lua b/data/scripts/spells/monster/mazoran_fire.lua new file mode 100644 index 000000000..751c25a63 --- /dev/null +++ b/data/scripts/spells/monster/mazoran_fire.lua @@ -0,0 +1,965 @@ +local Montains = {4468, 4469, 4470, 4471, 4472, 4473, 4474, 4475, 4476, 4477, 4478, 4479, 1387} + +local tiles = {9068, 9069, 9070, 9071, 9072, 9073} +local itemsRoom = { + {itemid = 23868, position = Position(33589,32691, 14)}, + {itemid = 23868, position = Position(33588,32686, 14)}, + {itemid = 23868, position = Position(33583,32699, 14)}, + {itemid = 23868, position = Position(33579,32691, 14)}, + {itemid = 23868, position = Position(33576,32685, 14)}, + {itemid = 23868, position = Position(33589,32695, 14)}, + {itemid = 23868, position = Position(33588,32692, 14)}, + {itemid = 23868, position = Position(33588,32695, 14)}, + {itemid = 23868, position = Position(33586,32692, 14)}, + {itemid = 23868, position = Position(33590,32696, 14)}, + {itemid = 23868, position = Position(33572,32690, 14)}, + {itemid = 23868, position = Position(33594,32688, 14)}, + {itemid = 23868, position = Position(33572,32690, 14)}, + {itemid = 23868, position = Position(33574,32690, 14)}, + {itemid = 23868, position = Position(33582,32687, 14)}, + {itemid = 23868, position = Position(33593,32693, 14)}, + {itemid = 23867, position = Position(33592,32689, 14)}, + {itemid = 23867, position = Position(33578,32689, 14)}, + {itemid = 23867, position = Position(33576,32686, 14)}, + {itemid = 23867, position = Position(33579,32682, 14)}, + {itemid = 23867, position = Position(33580,32695, 14)}, + {itemid = 23867, position = Position(33583,32687, 14)}, + {itemid = 23867, position = Position(33583,32698, 14)}, + {itemid = 23867, position = Position(33583,32689, 14)}, + {itemid = 23867, position = Position(33575,32685, 14)}, + {itemid = 23867, position = Position(33582,32682, 14)}, + {itemid = 23866, position = Position(33587,32690, 14)}, + {itemid = 23866, position = Position(33575,32689, 14)}, + {itemid = 23866, position = Position(33578,32693, 14)}, + {itemid = 23866, position = Position(33587,32688, 14)}, + {itemid = 23866, position = Position(33579,32687, 14)}, + {itemid = 23866, position = Position(33594,32695, 14)}, + {itemid = 23866, position = Position(33585,32694, 14)}, + {itemid = 23866, position = Position(33582,32686, 14)}, + {itemid = 23866, position = Position(33583,32688, 14)}, + {itemid = 23866, position = Position(33592,32686, 14)}, + {itemid = 23866, position = Position(33580,32692, 14)}, + {itemid = 23866, position = Position(33574,32685, 14)}, + {itemid = 23865, position = Position(33581,32692, 14)}, + {itemid = 23865, position = Position(33581,32686, 14)}, + {itemid = 23865, position = Position(33587,32692, 14)}, + {itemid = 23865, position = Position(33579,32685, 14)}, + {itemid = 23865, position = Position(33593,32686, 14)}, + {itemid = 23865, position = Position(33586,32687, 14)}, + {itemid = 23865, position = Position(33584,32696, 14)}, + {itemid = 23865, position = Position(33581,32680, 14)}, + {itemid = 23865, position = Position(33585,32696, 14)}, + {itemid = 23865, position = Position(33581,32681, 14)}, + {itemid = 23865, position = Position(33591,32684, 14)}, + {itemid = 23865, position = Position(33579,32681, 14)}, + {itemid = 23865, position = Position(33588,32687, 14)}, + {itemid = 23865, position = Position(33583,32690, 14)}, + {itemid = 23864, position = Position(33591,32688, 14)}, + {itemid = 23864, position = Position(33578,32692, 14)}, + {itemid = 23864, position = Position(33587,32689, 14)}, + {itemid = 23864, position = Position(33588,32684, 14)}, + {itemid = 23864, position = Position(33576,32687, 14)}, + {itemid = 23864, position = Position(33577,32692, 14)}, + {itemid = 23864, position = Position(33580,32686, 14)}, + {itemid = 23864, position = Position(33592,32688, 14)}, + {itemid = 23864, position = Position(33593,32683, 14)}, + {itemid = 23863, position = Position(33593,32694, 14)}, + {itemid = 23863, position = Position(33585,32688, 14)}, + {itemid = 23863, position = Position(33592,32691, 14)}, + {itemid = 23863, position = Position(33591,32692, 14)}, + {itemid = 23863, position = Position(33583,32684, 14)}, + {itemid = 23863, position = Position(33594,32694, 14)}, + {itemid = 23863, position = Position(33589,32692, 14)}, + {itemid = 23863, position = Position(33594,32687, 14)}, + {itemid = 23863, position = Position(33578,32685, 14)}, + {itemid = 23862, position = Position(33582,32683, 14)}, + {itemid = 23862, position = Position(33579,32690, 14)}, + {itemid = 23862, position = Position(33591,32697, 14)}, + {itemid = 23862, position = Position(33592,32690, 14)}, + {itemid = 23862, position = Position(33575,32688, 14)}, + {itemid = 23862, position = Position(33585,32695, 14)}, + {itemid = 23862, position = Position(33593,32684, 14)}, + {itemid = 23861, position = Position(33592,32684, 14)}, + {itemid = 23861, position = Position(33592,32692, 14)}, + {itemid = 23861, position = Position(33585,32690, 14)}, + {itemid = 23861, position = Position(33576,32692, 14)}, + {itemid = 23861, position = Position(33576,32688, 14)}, + {itemid = 23861, position = Position(33573,32690, 14)}, + {itemid = 23861, position = Position(33584,32682, 14)}, + {itemid = 23861, position = Position(33589,32684, 14)}, + {itemid = 23861, position = Position(33591,32696, 14)}, + {itemid = 23861, position = Position(33578,32688, 14)}, + {itemid = 23861, position = Position(33579,32696, 14)}, + {itemid = 23861, position = Position(33587,32691, 14)}, + {itemid = 23861, position = Position(33579,32683, 14)}, + {itemid = 23861, position = Position(33574,32691, 14)}, + {itemid = 23861, position = Position(33590,32688, 14)}, + {itemid = 23861, position = Position(33589,32688, 14)}, + {itemid = 23860, position = Position(33585,32687, 14)}, + {itemid = 23860, position = Position(33586,32690, 14)}, + {itemid = 23860, position = Position(33588,32696, 14)}, + {itemid = 23860, position = Position(33579,32688, 14)}, + {itemid = 23860, position = Position(33594,32690, 14)}, + {itemid = 23860, position = Position(33579,32692, 14)}, + {itemid = 23860, position = Position(33579,32695, 14)}, + {itemid = 23860, position = Position(33593,32690, 14)}, + {itemid = 23860, position = Position(33590,32691, 14)}, + {itemid = 23860, position = Position(33589,32693, 14)}, + {itemid = 23860, position = Position(33588,32690, 14)}, + {itemid = 23860, position = Position(33586,32693, 14)}, + {itemid = 23860, position = Position(33593,32687, 14)}, + {itemid = 23860, position = Position(33587,32686, 14)}, + {itemid = 23860, position = Position(33578,32684, 14)}, + {itemid = 23860, position = Position(33588,32685, 14)}, + {itemid = 23859, position = Position(33583,32700, 14)}, + {itemid = 23859, position = Position(33591,32686, 14)}, + {itemid = 23859, position = Position(33582,32684, 14)}, + {itemid = 23859, position = Position(33588,32688, 14)}, + {itemid = 23859, position = Position(33579,32686, 14)}, + {itemid = 23859, position = Position(33578,32683, 14)}, + {itemid = 23858, position = Position(33578,32694, 14)}, + {itemid = 23858, position = Position(33583,32696, 14)}, + {itemid = 23858, position = Position(33585,32693, 14)}, + {itemid = 23858, position = Position(33589,32690, 14)}, + {itemid = 23858, position = Position(33582,32692, 14)}, + {itemid = 23858, position = Position(33585,32689, 14)}, + {itemid = 23858, position = Position(33585,32680, 14)}, + {itemid = 23858, position = Position(33586,32686, 14)}, + {itemid = 23858, position = Position(33585,32681, 14)}, + {itemid = 23857, position = Position(33590,32695, 14)}, + {itemid = 23857, position = Position(33575,32691, 14)}, + {itemid = 23857, position = Position(33591,32698, 14)}, + {itemid = 23857, position = Position(33578,32695, 14)}, + {itemid = 23857, position = Position(33592,32685, 14)}, + {itemid = 23857, position = Position(33583,32685, 14)}, + {itemid = 23857, position = Position(33576,32691, 14)}, + {itemid = 23857, position = Position(33583,32697, 14)}, + {itemid = 23857, position = Position(33590,32684, 14)}, + {itemid = 23857, position = Position(33584,32689, 14)}, + {itemid = 23857, position = Position(33582,32681, 14)}, + {itemid = 23857, position = Position(33585,32682, 14)}, + {itemid = 23857, position = Position(33584,32683, 14)}, + {itemid = 9073, position = Position(33584,32688, 14)}, + {itemid = 9073, position = Position(33572,32688, 14)}, + {itemid = 9073, position = Position(33586,32700, 14)}, + {itemid = 9073, position = Position(33580,32698, 14)}, + {itemid = 9073, position = Position(33590,32697, 14)}, + {itemid = 9073, position = Position(33581,32693, 14)}, + {itemid = 9073, position = Position(33581,32690, 14)}, + {itemid = 9073, position = Position(33591,32682, 14)}, + {itemid = 9073, position = Position(33587,32680, 14)}, + {itemid = 9073, position = Position(33572,32692, 14)}, + {itemid = 9073, position = Position(33586,32695, 14)}, + {itemid = 9073, position = Position(33583,32695, 14)}, + {itemid = 9073, position = Position(33587,32695, 14)}, + {itemid = 9073, position = Position(33587,32696, 14)}, + {itemid = 9073, position = Position(33581,32700, 14)}, + {itemid = 9073, position = Position(33573,32686, 14)}, + {itemid = 9073, position = Position(33583,32681, 14)}, + {itemid = 9073, position = Position(33597,32690, 14)}, + {itemid = 9073, position = Position(33582,32695, 14)}, + {itemid = 9073, position = Position(33591,32699, 14)}, + {itemid = 9073, position = Position(33581,32689, 14)}, + {itemid = 9073, position = Position(33581,32687, 14)}, + {itemid = 9073, position = Position(33572,32692, 14)}, + {itemid = 9073, position = Position(33574,32689, 14)}, + {itemid = 9073, position = Position(33594,32683, 14)}, + {itemid = 9073, position = Position(33573,32694, 14)}, + {itemid = 9073, position = Position(33579,32698, 14)}, + {itemid = 9073, position = Position(33593,32697, 14)}, + {itemid = 9073, position = Position(33580,32687, 14)}, + {itemid = 9073, position = Position(33580,32690, 14)}, + {itemid = 9073, position = Position(33580,32689, 14)}, + {itemid = 9073, position = Position(33597,32687, 14)}, + {itemid = 9073, position = Position(33593,32682, 14)}, + {itemid = 9073, position = Position(33591,32690, 14)}, + {itemid = 9073, position = Position(33583,32692, 14)}, + {itemid = 9073, position = Position(33586,32683, 14)}, + {itemid = 9073, position = Position(33584,32695, 14)}, + {itemid = 9073, position = Position(33573,32693, 14)}, + {itemid = 9073, position = Position(33579,32689, 14)}, + {itemid = 9073, position = Position(33584,32693, 14)}, + {itemid = 9073, position = Position(33592,32693, 14)}, + {itemid = 9073, position = Position(33572,32688, 14)}, + {itemid = 9073, position = Position(33573,32686, 14)}, + {itemid = 9073, position = Position(33584,32697, 14)}, + {itemid = 9073, position = Position(33583,32694, 14)}, + {itemid = 9073, position = Position(33586,32685, 14)}, + {itemid = 9073, position = Position(33587,32700, 14)}, + {itemid = 9073, position = Position(33596,32689, 14)}, + {itemid = 9073, position = Position(33576,32697, 14)}, + {itemid = 9073, position = Position(33589,32697, 14)}, + {itemid = 9073, position = Position(33589,32696, 14)}, + {itemid = 9073, position = Position(33574,32695, 14)}, + {itemid = 9073, position = Position(33589,32698, 14)}, + {itemid = 9073, position = Position(33593,32689, 14)}, + {itemid = 9073, position = Position(33589,32699, 14)}, + {itemid = 9073, position = Position(33590,32681, 14)}, + {itemid = 9073, position = Position(33595,32693, 14)}, + {itemid = 9073, position = Position(33591,32694, 14)}, + {itemid = 9073, position = Position(33576,32695, 14)}, + {itemid = 9073, position = Position(33576,32696, 14)}, + {itemid = 9073, position = Position(33595,32691, 14)}, + {itemid = 9073, position = Position(33595,32687, 14)}, + {itemid = 9073, position = Position(33577,32696, 14)}, + {itemid = 9073, position = Position(33577,32698, 14)}, + {itemid = 9073, position = Position(33577,32697, 14)}, + {itemid = 9073, position = Position(33575,32696, 14)}, + {itemid = 9073, position = Position(33577,32689, 14)}, + {itemid = 9073, position = Position(33596,32685, 14)}, + {itemid = 9073, position = Position(33575,32683, 14)}, + {itemid = 9073, position = Position(33575,32694, 14)}, + {itemid = 9073, position = Position(33593,32688, 14)}, + {itemid = 9073, position = Position(33590,32694, 14)}, + {itemid = 9073, position = Position(33595,32696, 14)}, + {itemid = 9073, position = Position(33575,32686, 14)}, + {itemid = 9073, position = Position(33588,32682, 14)}, + {itemid = 9073, position = Position(33573,32692, 14)}, + {itemid = 9073, position = Position(33596,32691, 14)}, + {itemid = 9072, position = Position(33596,32690, 14)}, + {itemid = 9072, position = Position(33589,32689, 14)}, + {itemid = 9072, position = Position(33578,32690, 14)}, + {itemid = 9072, position = Position(33581,32691, 14)}, + {itemid = 9072, position = Position(33585,32697, 14)}, + {itemid = 9072, position = Position(33574,32692, 14)}, + {itemid = 9072, position = Position(33574,32686, 14)}, + {itemid = 9072, position = Position(33577,32682, 14)}, + {itemid = 9072, position = Position(33583,32686, 14)}, + {itemid = 9072, position = Position(33587,32683, 14)}, + {itemid = 9072, position = Position(33586,32698, 14)}, + {itemid = 9072, position = Position(33590,32680, 14)}, + {itemid = 9072, position = Position(33575,32692, 14)}, + {itemid = 9072, position = Position(33588,32689, 14)}, + {itemid = 9072, position = Position(33578,32682, 14)}, + {itemid = 9071, position = Position(33591,32685, 14)}, + {itemid = 9071, position = Position(33589,32687, 14)}, + {itemid = 9071, position = Position(33594,32692, 14)}, + {itemid = 9071, position = Position(33595,32690, 14)}, + {itemid = 9071, position = Position(33576,32694, 14)}, + {itemid = 9071, position = Position(33585,32685, 14)}, + {itemid = 9071, position = Position(33597,32691, 14)}, + {itemid = 9071, position = Position(33585,32679, 14)}, + {itemid = 9071, position = Position(33581,32682, 14)}, + {itemid = 9071, position = Position(33590,32689, 14)}, + {itemid = 9071, position = Position(33585,32683, 14)}, + {itemid = 9071, position = Position(33582,32694, 14)}, + {itemid = 9071, position = Position(33590,32698, 14)}, + {itemid = 9071, position = Position(33587,32699, 14)}, + {itemid = 9071, position = Position(33578,32691, 14)}, + {itemid = 9071, position = Position(33586,32694, 14)}, + {itemid = 9070, position = Position(33586,32691, 14)}, + {itemid = 9070, position = Position(33581,32688, 14)}, + {itemid = 9070, position = Position(33590,32682, 14)}, + {itemid = 9070, position = Position(33588,32699, 14)}, + {itemid = 9070, position = Position(33588,32697, 14)}, + {itemid = 9070, position = Position(33590,32699, 14)}, + {itemid = 9070, position = Position(33586,32697, 14)}, + {itemid = 9070, position = Position(33584,32681, 14)}, + {itemid = 9070, position = Position(33576,32682, 14)}, + {itemid = 9070, position = Position(33587,32684, 14)}, + {itemid = 9070, position = Position(33581,32696, 14)}, + {itemid = 9070, position = Position(33585,32692, 14)}, + {itemid = 9070, position = Position(33584,32691, 14)}, + {itemid = 9070, position = Position(33587,32685, 14)}, + {itemid = 9070, position = Position(33584,32692, 14)}, + {itemid = 9070, position = Position(33590,32693, 14)}, + {itemid = 9070, position = Position(33576,32684, 14)}, + {itemid = 9070, position = Position(33597,32692, 14)}, + {itemid = 9070, position = Position(33577,32688, 14)}, + {itemid = 9070, position = Position(33588,32680, 14)}, + {itemid = 9069, position = Position(33593,32696, 14)}, + {itemid = 9069, position = Position(33574,32688, 14)}, + {itemid = 9069, position = Position(33594,32686, 14)}, + {itemid = 9069, position = Position(33579,32699, 14)}, + {itemid = 9069, position = Position(33574,32693, 14)}, + {itemid = 9069, position = Position(33584,32690, 14)}, + {itemid = 9069, position = Position(33584,32699, 14)}, + {itemid = 9069, position = Position(33596,32687, 14)}, + {itemid = 9069, position = Position(33592,32682, 14)}, + {itemid = 9069, position = Position(33575,32687, 14)}, + {itemid = 9069, position = Position(33587,32697, 14)}, + {itemid = 9069, position = Position(33592,32695, 14)}, + {itemid = 9069, position = Position(33591,32681, 14)}, + {itemid = 9069, position = Position(33580,32696, 14)}, + {itemid = 9069, position = Position(33577,32694, 14)}, + {itemid = 9069, position = Position(33582,32685, 14)}, + {itemid = 9069, position = Position(33582,32691, 14)}, + {itemid = 9069, position = Position(33578,32696, 14)}, + {itemid = 9069, position = Position(33585,32684, 14)}, + {itemid = 9069, position = Position(33590,32690, 14)}, + {itemid = 9068, position = Position(33583,32682, 14)}, + {itemid = 9068, position = Position(33584,32685, 14)}, + {itemid = 9068, position = Position(33591,32687, 14)}, + {itemid = 9068, position = Position(33584,32684, 14)}, + {itemid = 9068, position = Position(33584,32686, 14)}, + {itemid = 9068, position = Position(33587,32694, 14)}, + {itemid = 9068, position = Position(33584,32687, 14)}, + {itemid = 9068, position = Position(33590,32692, 14)}, + {itemid = 9068, position = Position(33587,32698, 14)}, + {itemid = 9068, position = Position(33592,32698, 14)}, + {itemid = 9068, position = Position(33590,32683, 14)}, + {itemid = 9068, position = Position(33583,32683, 14)}, + {itemid = 9068, position = Position(33588,32683, 14)}, + {itemid = 9068, position = Position(33583,32680, 14)}, + {itemid = 9068, position = Position(33592,32697, 14)}, + {itemid = 9068, position = Position(33583,32693, 14)}, + {itemid = 9068, position = Position(33590,32686, 14)}, + {itemid = 9068, position = Position(33587,32687, 14)}, + {itemid = 9068, position = Position(33590,32687, 14)}, + {itemid = 9068, position = Position(33583,32691, 14)}, + {itemid = 9068, position = Position(33590,32685, 14)}, + {itemid = 9068, position = Position(33587,32693, 14)}, + {itemid = 9068, position = Position(33584,32680, 14)}, + {itemid = 9068, position = Position(33588,32681, 14)}, + {itemid = 9068, position = Position(33584,32679, 14)}, + {itemid = 9068, position = Position(33594,32685, 14)}, + {itemid = 9068, position = Position(33592,32696, 14)}, + {itemid = 9068, position = Position(33586,32681, 14)}, + {itemid = 9068, position = Position(33587,32682, 14)}, + {itemid = 9068, position = Position(33589,32686, 14)}, + {itemid = 9068, position = Position(33589,32685, 14)}, + {itemid = 9068, position = Position(33589,32683, 14)}, + {itemid = 9068, position = Position(33589,32682, 14)}, + {itemid = 9068, position = Position(33585,32691, 14)}, + {itemid = 9068, position = Position(33588,32698, 14)}, + {itemid = 9068, position = Position(33593,32695, 14)}, + {itemid = 9068, position = Position(33593,32685, 14)}, + {itemid = 9068, position = Position(33591,32691, 14)}, + {itemid = 9068, position = Position(33586,32688, 14)}, + {itemid = 9068, position = Position(33586,32684, 14)}, + {itemid = 9068, position = Position(33593,32698, 14)}, + {itemid = 9068, position = Position(33586,32679, 14)}, + {itemid = 9068, position = Position(33589,32680, 14)}, + {itemid = 9068, position = Position(33586,32680, 14)}, + {itemid = 9068, position = Position(33585,32698, 14)}, + {itemid = 9068, position = Position(33589,32681, 14)}, + {itemid = 9068, position = Position(33588,32700, 14)}, + {itemid = 9068, position = Position(33585,32700, 14)}, + {itemid = 9068, position = Position(33591,32683, 14)}, + {itemid = 9068, position = Position(33585,32699, 14)}, + {itemid = 9068, position = Position(33591,32689, 14)}, + {itemid = 9068, position = Position(33585,32686, 14)}, + {itemid = 9068, position = Position(33592,32687, 14)}, + {itemid = 9068, position = Position(33584,32694, 14)}, + {itemid = 9068, position = Position(33588,32691, 14)}, + {itemid = 9068, position = Position(33592,32694, 14)}, + {itemid = 9068, position = Position(33592,32683, 14)}, + {itemid = 9068, position = Position(33593,32692, 14)}, + {itemid = 9068, position = Position(33591,32693, 14)}, + {itemid = 9068, position = Position(33589,32700, 14)}, + {itemid = 9068, position = Position(33587,32681, 14)}, + {itemid = 9068, position = Position(33586,32682, 14)}, + {itemid = 9068, position = Position(33586,32689, 14)}, + {itemid = 9068, position = Position(33586,32699, 14)}, + {itemid = 9068, position = Position(33584,32698, 14)}, + {itemid = 9068, position = Position(33588,32694, 14)}, + {itemid = 9068, position = Position(33593,32691, 14)}, + {itemid = 9068, position = Position(33591,32695, 14)}, + {itemid = 9068, position = Position(33588,32693, 14)}, + {itemid = 9068, position = Position(33589,32694, 14)}, + {itemid = 9068, position = Position(33594,32684, 14)}, + {itemid = 9068, position = Position(33584,32700, 14)}, + {itemid = 9068, position = Position(33586,32696, 14)}, + {itemid = 9068, position = Position(33583,32679, 14)}, + {itemid = 9068, position = Position(33597,32693, 14)}, + {itemid = 9068, position = Position(33582,32700, 14)}, + {itemid = 9068, position = Position(33581,32697, 14)}, + {itemid = 9068, position = Position(33581,32695, 14)}, + {itemid = 9068, position = Position(33581,32698, 14)}, + {itemid = 9068, position = Position(33580,32684, 14)}, + {itemid = 9068, position = Position(33581,32699, 14)}, + {itemid = 9068, position = Position(33577,32691, 14)}, + {itemid = 9068, position = Position(33581,32694, 14)}, + {itemid = 9068, position = Position(33577,32690, 14)}, + {itemid = 9068, position = Position(33595,32689, 14)}, + {itemid = 9068, position = Position(33580,32685, 14)}, + {itemid = 9068, position = Position(33594,32691, 14)}, + {itemid = 9068, position = Position(33575,32684, 14)}, + {itemid = 9068, position = Position(33574,32694, 14)}, + {itemid = 9068, position = Position(33580,32681, 14)}, + {itemid = 9068, position = Position(33580,32680, 14)}, + {itemid = 9068, position = Position(33574,32687, 14)}, + {itemid = 9068, position = Position(33577,32693, 14)}, + {itemid = 9068, position = Position(33582,32680, 14)}, + {itemid = 9068, position = Position(33582,32679, 14)}, + {itemid = 9068, position = Position(33594,32689, 14)}, + {itemid = 9068, position = Position(33580,32683, 14)}, + {itemid = 9068, position = Position(33580,32682, 14)}, + {itemid = 9068, position = Position(33580,32693, 14)}, + {itemid = 9068, position = Position(33577,32687, 14)}, + {itemid = 9068, position = Position(33581,32685, 14)}, + {itemid = 9068, position = Position(33576,32689, 14)}, + {itemid = 9068, position = Position(33576,32690, 14)}, + {itemid = 9068, position = Position(33580,32691, 14)}, + {itemid = 9068, position = Position(33580,32688, 14)}, + {itemid = 9068, position = Position(33577,32684, 14)}, + {itemid = 9068, position = Position(33580,32699, 14)}, + {itemid = 9068, position = Position(33595,32692, 14)}, + {itemid = 9068, position = Position(33577,32683, 14)}, + {itemid = 9068, position = Position(33580,32697, 14)}, + {itemid = 9068, position = Position(33576,32693, 14)}, + {itemid = 9068, position = Position(33577,32686, 14)}, + {itemid = 9068, position = Position(33581,32679, 14)}, + {itemid = 9068, position = Position(33595,32694, 14)}, + {itemid = 9068, position = Position(33581,32684, 14)}, + {itemid = 9068, position = Position(33575,32693, 14)}, + {itemid = 9068, position = Position(33575,32690, 14)}, + {itemid = 9068, position = Position(33576,32683, 14)}, + {itemid = 9068, position = Position(33581,32683, 14)}, + {itemid = 9068, position = Position(33577,32685, 14)}, + {itemid = 9068, position = Position(33595,32695, 14)}, + {itemid = 9068, position = Position(33594,32693, 14)}, + {itemid = 9068, position = Position(33575,32695, 14)}, + {itemid = 9068, position = Position(33595,32688, 14)}, + {itemid = 9068, position = Position(33577,32695, 14)}, + {itemid = 9068, position = Position(33574,32684, 14)}, + {itemid = 9068, position = Position(33582,32690, 14)}, + {itemid = 9068, position = Position(33579,32684, 14)}, + {itemid = 9068, position = Position(33573,32687, 14)}, + {itemid = 9068, position = Position(33597,32688, 14)}, + {itemid = 9068, position = Position(33578,32698, 14)}, + {itemid = 9068, position = Position(33582,32689, 14)}, + {itemid = 9068, position = Position(33573,32688, 14)}, + {itemid = 9068, position = Position(33596,32695, 14)}, + {itemid = 9068, position = Position(33578,32697, 14)}, + {itemid = 9068, position = Position(33596,32686, 14)}, + {itemid = 9068, position = Position(33597,32689, 14)}, + {itemid = 9068, position = Position(33579,32680, 14)}, + {itemid = 9068, position = Position(33582,32698, 14)}, + {itemid = 9068, position = Position(33582,32699, 14)}, + {itemid = 9068, position = Position(33572,32689, 14)}, + {itemid = 9068, position = Position(33594,32697, 14)}, + {itemid = 9068, position = Position(33582,32697, 14)}, + {itemid = 9068, position = Position(33594,32696, 14)}, + {itemid = 9068, position = Position(33582,32696, 14)}, + {itemid = 9068, position = Position(33582,32693, 14)}, + {itemid = 9068, position = Position(33572,32691, 14)}, + {itemid = 9068, position = Position(33572,32689, 14)}, + {itemid = 9068, position = Position(33582,32688, 14)}, + {itemid = 9068, position = Position(33596,32694, 14)}, + {itemid = 9068, position = Position(33573,32688, 14)}, + {itemid = 9068, position = Position(33595,32686, 14)}, + {itemid = 9068, position = Position(33579,32693, 14)}, + {itemid = 9068, position = Position(33573,32687, 14)}, + {itemid = 9068, position = Position(33573,32689, 14)}, + {itemid = 9068, position = Position(33573,32691, 14)}, + {itemid = 9068, position = Position(33578,32681, 14)}, + {itemid = 9068, position = Position(33596,32688, 14)}, + {itemid = 9068, position = Position(33579,32697, 14)}, + {itemid = 9068, position = Position(33596,32692, 14)}, + {itemid = 9068, position = Position(33579,32694, 14)}, + {itemid = 9068, position = Position(33578,32687, 14)}, + {itemid = 9068, position = Position(33572,32691, 14)}, + {itemid = 9068, position = Position(33578,32686, 14)}, + {itemid = 9068, position = Position(33595,32684, 14)}, + {itemid = 9068, position = Position(33596,32693, 14)}, + {itemid = 9068, position = Position(33595,32685, 14)}, + {itemid = 9068, position = Position(33580,32694, 14)}, + {itemid = 7090, position = Position(33585,32688, 14)}, + {itemid = 7090, position = Position(33586,32693, 14)}, + {itemid = 7090, position = Position(33586,32687, 14)}, + {itemid = 7090, position = Position(33588,32696, 14)}, + {itemid = 7090, position = Position(33578,32689, 14)}, + {itemid = 7090, position = Position(33579,32688, 14)}, + {itemid = 7090, position = Position(33579,32683, 14)}, + {itemid = 7090, position = Position(33585,32696, 14)}, + {itemid = 7090, position = Position(33576,32688, 14)}, + {itemid = 7090, position = Position(33590,32691, 14)}, + {itemid = 7090, position = Position(33593,32684, 14)}, + {itemid = 7090, position = Position(33575,32689, 14)}, + {itemid = 7090, position = Position(33592,32692, 14)}, + {itemid = 7090, position = Position(33589,32693, 14)}, + {itemid = 7090, position = Position(33585,32682, 14)}, + {itemid = 7089, position = Position(33593,32687, 14)}, + {itemid = 7089, position = Position(33591,32698, 14)}, + {itemid = 7089, position = Position(33578,32685, 14)}, + {itemid = 7089, position = Position(33578,32695, 14)}, + {itemid = 7089, position = Position(33583,32685, 14)}, + {itemid = 7089, position = Position(33590,32696, 14)}, + {itemid = 7089, position = Position(33584,32683, 14)}, + {itemid = 7089, position = Position(33593,32694, 14)}, + {itemid = 7089, position = Position(33574,32691, 14)}, + {itemid = 7089, position = Position(33582,32684, 14)}, + {itemid = 7089, position = Position(33579,32696, 14)}, + {itemid = 7089, position = Position(33582,32687, 14)}, + {itemid = 7089, position = Position(33581,32681, 14)}, + {itemid = 7089, position = Position(33594,32688, 14)}, + {itemid = 7089, position = Position(33585,32690, 14)}, + {itemid = 7089, position = Position(33576,32692, 14)}, + {itemid = 7089, position = Position(33589,32691, 14)}, + {itemid = 7088, position = Position(33583,32687, 14)}, + {itemid = 7088, position = Position(33589,32692, 14)}, + {itemid = 7088, position = Position(33579,32685, 14)}, + {itemid = 7088, position = Position(33579,32690, 14)}, + {itemid = 7088, position = Position(33592,32688, 14)}, + {itemid = 7088, position = Position(33586,32690, 14)}, + {itemid = 7088, position = Position(33582,32686, 14)}, + {itemid = 7088, position = Position(33594,32687, 14)}, + {itemid = 7088, position = Position(33572,32692, 14)}, + {itemid = 7088, position = Position(33587,32700, 14)}, + {itemid = 7088, position = Position(33591,32696, 14)}, + {itemid = 7088, position = Position(33582,32681, 14)}, + {itemid = 7088, position = Position(33582,32692, 14)}, + {itemid = 7088, position = Position(33576,32691, 14)}, + {itemid = 7088, position = Position(33583,32684, 14)}, + {itemid = 7088, position = Position(33585,32680, 14)}, + {itemid = 7088, position = Position(33573,32693, 14)}, + {itemid = 7088, position = Position(33589,32690, 14)}, + {itemid = 7088, position = Position(33594,32694, 14)}, + {itemid = 7088, position = Position(33585,32689, 14)}, + {itemid = 7088, position = Position(33580,32695, 14)}, + {itemid = 7088, position = Position(33585,32693, 14)}, + {itemid = 7088, position = Position(33576,32685, 14)}, + {itemid = 7088, position = Position(33590,32695, 14)}, + {itemid = 7088, position = Position(33593,32686, 14)}, + {itemid = 7088, position = Position(33574,32690, 14)}, + {itemid = 7088, position = Position(33593,32683, 14)}, + {itemid = 7088, position = Position(33579,32681, 14)}, + {itemid = 7088, position = Position(33594,32690, 14)}, + {itemid = 7088, position = Position(33572,32692, 14)}, + {itemid = 7087, position = Position(33586,32700, 14)}, + {itemid = 7087, position = Position(33593,32693, 14)}, + {itemid = 7087, position = Position(33587,32688, 14)}, + {itemid = 7087, position = Position(33583,32696, 14)}, + {itemid = 7087, position = Position(33586,32692, 14)}, + {itemid = 7087, position = Position(33591,32692, 14)}, + {itemid = 7087, position = Position(33588,32695, 14)}, + {itemid = 7087, position = Position(33591,32686, 14)}, + {itemid = 7087, position = Position(33575,32688, 14)}, + {itemid = 7087, position = Position(33584,32682, 14)}, + {itemid = 7087, position = Position(33586,32686, 14)}, + {itemid = 7087, position = Position(33578,32683, 14)}, + {itemid = 7087, position = Position(33585,32687, 14)}, + {itemid = 7087, position = Position(33588,32684, 14)}, + {itemid = 7087, position = Position(33578,32688, 14)}, + {itemid = 7087, position = Position(33588,32684, 14)}, + {itemid = 7086, position = Position(33587,32690, 14)}, + {itemid = 7086, position = Position(33588,32684, 14)}, + {itemid = 7086, position = Position(33575,32688, 14)}, + {itemid = 7086, position = Position(33587,32688, 14)}, + {itemid = 7086, position = Position(33578,32688, 14)}, + {itemid = 7086, position = Position(33578,32683, 14)}, + {itemid = 7086, position = Position(33592,32684, 14)}, + {itemid = 7086, position = Position(33588,32684, 14)}, + {itemid = 7086, position = Position(33588,32695, 14)}, + {itemid = 7086, position = Position(33592,32690, 14)}, + {itemid = 7086, position = Position(33578,32692, 14)}, + {itemid = 7086, position = Position(33579,32695, 14)}, + {itemid = 7086, position = Position(33579,32686, 14)}, + {itemid = 7086, position = Position(33583,32689, 14)}, + {itemid = 7086, position = Position(33583,32696, 14)}, + {itemid = 7086, position = Position(33584,32682, 14)}, + {itemid = 7086, position = Position(33586,32686, 14)}, + {itemid = 7086, position = Position(33585,32687, 14)}, + {itemid = 7086, position = Position(33586,32692, 14)}, + {itemid = 7085, position = Position(33589,32690, 14)}, + {itemid = 7085, position = Position(33594,32687, 14)}, + {itemid = 7085, position = Position(33591,32696, 14)}, + {itemid = 7085, position = Position(33588,32686, 14)}, + {itemid = 7085, position = Position(33579,32695, 14)}, + {itemid = 7085, position = Position(33592,32684, 14)}, + {itemid = 7085, position = Position(33582,32686, 14)}, + {itemid = 7085, position = Position(33578,32692, 14)}, + {itemid = 7085, position = Position(33576,32691, 14)}, + {itemid = 7085, position = Position(33582,32681, 14)}, + {itemid = 7085, position = Position(33576,32685, 14)}, + {itemid = 7085, position = Position(33574,32690, 14)}, + {itemid = 7085, position = Position(33594,32694, 14)}, + {itemid = 7085, position = Position(33583,32684, 14)}, + {itemid = 7085, position = Position(33590,32695, 14)}, + {itemid = 7085, position = Position(33583,32687, 14)}, + {itemid = 7085, position = Position(33593,32686, 14)}, + {itemid = 7085, position = Position(33592,32688, 14)}, + {itemid = 7085, position = Position(33585,32689, 14)}, + {itemid = 7085, position = Position(33589,32692, 14)}, + {itemid = 7085, position = Position(33579,32685, 14)}, + {itemid = 7084, position = Position(33592,32690, 14)}, + {itemid = 7084, position = Position(33574,32691, 14)}, + {itemid = 7084, position = Position(33585,32690, 14)}, + {itemid = 7084, position = Position(33579,32692, 14)}, + {itemid = 7084, position = Position(33587,32692, 14)}, + {itemid = 7084, position = Position(33578,32685, 14)}, + {itemid = 7084, position = Position(33583,32689, 14)}, + {itemid = 7084, position = Position(33589,32691, 14)}, + {itemid = 7084, position = Position(33592,32686, 14)}, + {itemid = 7084, position = Position(33593,32687, 14)}, + {itemid = 7084, position = Position(33590,32696, 14)}, + {itemid = 7084, position = Position(33579,32686, 14)}, + {itemid = 7084, position = Position(33581,32681, 14)}, + {itemid = 7084, position = Position(33576,32692, 14)}, + {itemid = 7084, position = Position(33593,32694, 14)}, + {itemid = 7084, position = Position(33588,32688, 14)}, + {itemid = 7084, position = Position(33582,32687, 14)}, + {itemid = 7084, position = Position(33578,32695, 14)}, + {itemid = 7084, position = Position(33587,32690, 14)}, + {itemid = 7084, position = Position(33582,32684, 14)}, + {itemid = 7083, position = Position(33588,32688, 14)}, + {itemid = 7083, position = Position(33579,32692, 14)}, + {itemid = 7083, position = Position(33593,32684, 14)}, + {itemid = 7083, position = Position(33579,32688, 14)}, + {itemid = 7083, position = Position(33579,32683, 14)}, + {itemid = 7083, position = Position(33592,32692, 14)}, + {itemid = 7083, position = Position(33592,32686, 14)}, + {itemid = 7083, position = Position(33576,32688, 14)}, + {itemid = 7083, position = Position(33585,32696, 14)}, + {itemid = 7083, position = Position(33585,32682, 14)}, + {itemid = 7083, position = Position(33588,32686, 14)}, + {itemid = 7083, position = Position(33587,32692, 14)}, + {itemid = 7083, position = Position(33586,32687, 14)}, + {itemid = 7082, position = Position(33585,32681, 14)}, + {itemid = 7082, position = Position(33589,32693, 14)}, + {itemid = 7082, position = Position(33576,32687, 14)}, + {itemid = 7082, position = Position(33585,32688, 14)}, + {itemid = 7082, position = Position(33593,32683, 14)}, + {itemid = 7082, position = Position(33582,32683, 14)}, + {itemid = 7082, position = Position(33581,32680, 14)}, + {itemid = 7082, position = Position(33592,32690, 14)}, + {itemid = 7082, position = Position(33592,32689, 14)}, + {itemid = 7082, position = Position(33583,32690, 14)}, + {itemid = 7082, position = Position(33583,32689, 14)}, + {itemid = 7082, position = Position(33583,32688, 14)}, + {itemid = 7082, position = Position(33592,32691, 14)}, + {itemid = 7082, position = Position(33585,32680, 14)}, + {itemid = 7082, position = Position(33592,32685, 14)}, + {itemid = 7082, position = Position(33583,32697, 14)}, + {itemid = 7082, position = Position(33582,32682, 14)}, + {itemid = 7082, position = Position(33575,32689, 14)}, + {itemid = 7082, position = Position(33591,32697, 14)}, + {itemid = 7082, position = Position(33583,32700, 14)}, + {itemid = 7082, position = Position(33583,32698, 14)}, + {itemid = 7082, position = Position(33583,32699, 14)}, + {itemid = 7082, position = Position(33585,32693, 14)}, + {itemid = 7082, position = Position(33576,32686, 14)}, + {itemid = 7082, position = Position(33594,32695, 14)}, + {itemid = 7082, position = Position(33579,32691, 14)}, + {itemid = 7082, position = Position(33578,32693, 14)}, + {itemid = 7082, position = Position(33578,32694, 14)}, + {itemid = 7082, position = Position(33579,32690, 14)}, + {itemid = 7082, position = Position(33579,32687, 14)}, + {itemid = 7082, position = Position(33588,32696, 14)}, + {itemid = 7082, position = Position(33578,32684, 14)}, + {itemid = 7082, position = Position(33578,32689, 14)}, + {itemid = 7082, position = Position(33586,32693, 14)}, + {itemid = 7082, position = Position(33579,32686, 14)}, + {itemid = 7082, position = Position(33585,32695, 14)}, + {itemid = 7082, position = Position(33578,32684, 14)}, + {itemid = 7082, position = Position(33588,32687, 14)}, + {itemid = 7082, position = Position(33579,32681, 14)}, + {itemid = 7082, position = Position(33588,32685, 14)}, + {itemid = 7082, position = Position(33585,32694, 14)}, + {itemid = 7082, position = Position(33579,32682, 14)}, + {itemid = 7082, position = Position(33587,32690, 14)}, + {itemid = 7082, position = Position(33587,32689, 14)}, + {itemid = 7082, position = Position(33587,32691, 14)}, + {itemid = 7081, position = Position(33591,32684, 14)}, + {itemid = 7081, position = Position(33580,32686, 14)}, + {itemid = 7081, position = Position(33575,32685, 14)}, + {itemid = 7081, position = Position(33594,32690, 14)}, + {itemid = 7081, position = Position(33588,32692, 14)}, + {itemid = 7081, position = Position(33588,32690, 14)}, + {itemid = 7081, position = Position(33581,32692, 14)}, + {itemid = 7081, position = Position(33591,32686, 14)}, + {itemid = 7081, position = Position(33584,32689, 14)}, + {itemid = 7081, position = Position(33574,32685, 14)}, + {itemid = 7081, position = Position(33586,32690, 14)}, + {itemid = 7081, position = Position(33591,32692, 14)}, + {itemid = 7081, position = Position(33587,32692, 14)}, + {itemid = 7081, position = Position(33572,32690, 14)}, + {itemid = 7081, position = Position(33582,32692, 14)}, + {itemid = 7081, position = Position(33572,32690, 14)}, + {itemid = 7081, position = Position(33591,32688, 14)}, + {itemid = 7081, position = Position(33592,32686, 14)}, + {itemid = 7081, position = Position(33583,32692, 14)}, + {itemid = 7081, position = Position(33573,32690, 14)}, + {itemid = 7081, position = Position(33583,32690, 14)}, + {itemid = 7081, position = Position(33579,32692, 14)}, + {itemid = 7081, position = Position(33581,32686, 14)}, + {itemid = 7081, position = Position(33575,32691, 14)}, + {itemid = 7081, position = Position(33588,32688, 14)}, + {itemid = 7081, position = Position(33587,32686, 14)}, + {itemid = 7081, position = Position(33580,32692, 14)}, + {itemid = 7081, position = Position(33590,32684, 14)}, + {itemid = 7081, position = Position(33589,32695, 14)}, + {itemid = 7081, position = Position(33593,32690, 14)}, + {itemid = 7081, position = Position(33580,32695, 14)}, + {itemid = 7081, position = Position(33589,32688, 14)}, + {itemid = 7081, position = Position(33577,32692, 14)}, + {itemid = 7081, position = Position(33584,32696, 14)}, + {itemid = 7081, position = Position(33589,32684, 14)}, + {itemid = 7081, position = Position(33590,32688, 14)}, + {itemid = 7080, position = Position(33579,32687, 14)}, + {itemid = 7080, position = Position(33576,32687, 14)}, + {itemid = 7080, position = Position(33592,32685, 14)}, + {itemid = 7080, position = Position(33583,32692, 14)}, + {itemid = 7080, position = Position(33582,32683, 14)}, + {itemid = 7080, position = Position(33585,32681, 14)}, + {itemid = 7080, position = Position(33591,32697, 14)}, + {itemid = 7080, position = Position(33588,32685, 14)}, + {itemid = 7080, position = Position(33583,32698, 14)}, + {itemid = 7080, position = Position(33591,32698, 14)}, + {itemid = 7080, position = Position(33583,32697, 14)}, + {itemid = 7080, position = Position(33583,32690, 14)}, + {itemid = 7080, position = Position(33588,32686, 14)}, + {itemid = 7080, position = Position(33583,32688, 14)}, + {itemid = 7080, position = Position(33587,32689, 14)}, + {itemid = 7080, position = Position(33579,32682, 14)}, + {itemid = 7080, position = Position(33594,32688, 14)}, + {itemid = 7080, position = Position(33583,32685, 14)}, + {itemid = 7080, position = Position(33578,32693, 14)}, + {itemid = 7080, position = Position(33592,32691, 14)}, + {itemid = 7080, position = Position(33585,32694, 14)}, + {itemid = 7080, position = Position(33578,32694, 14)}, + {itemid = 7080, position = Position(33587,32691, 14)}, + {itemid = 7080, position = Position(33592,32689, 14)}, + {itemid = 7080, position = Position(33585,32695, 14)}, + {itemid = 7080, position = Position(33583,32699, 14)}, + {itemid = 7080, position = Position(33579,32691, 14)}, + {itemid = 7080, position = Position(33583,32700, 14)}, + {itemid = 7080, position = Position(33584,32683, 14)}, + {itemid = 7080, position = Position(33582,32682, 14)}, + {itemid = 7080, position = Position(33581,32680, 14)}, + {itemid = 7080, position = Position(33579,32696, 14)}, + {itemid = 7080, position = Position(33593,32693, 14)}, + {itemid = 7080, position = Position(33576,32686, 14)}, + {itemid = 7080, position = Position(33578,32684, 14)}, + {itemid = 7080, position = Position(33588,32687, 14)}, + {itemid = 7080, position = Position(33594,32695, 14)}, + {itemid = 7080, position = Position(33578,32684, 14)}, + {itemid = 7079, position = Position(33577,32692, 14)}, + {itemid = 7079, position = Position(33572,32690, 14)}, + {itemid = 7079, position = Position(33575,32685, 14)}, + {itemid = 7079, position = Position(33584,32689, 14)}, + {itemid = 7079, position = Position(33584,32696, 14)}, + {itemid = 7079, position = Position(33589,32684, 14)}, + {itemid = 7079, position = Position(33581,32686, 14)}, + {itemid = 7079, position = Position(33572,32690, 14)}, + {itemid = 7079, position = Position(33590,32691, 14)}, + {itemid = 7079, position = Position(33588,32690, 14)}, + {itemid = 7079, position = Position(33589,32688, 14)}, + {itemid = 7079, position = Position(33588,32692, 14)}, + {itemid = 7079, position = Position(33581,32692, 14)}, + {itemid = 7079, position = Position(33580,32692, 14)}, + {itemid = 7079, position = Position(33590,32688, 14)}, + {itemid = 7079, position = Position(33578,32692, 14)}, + {itemid = 7079, position = Position(33590,32684, 14)}, + {itemid = 7079, position = Position(33583,32692, 14)}, + {itemid = 7079, position = Position(33591,32688, 14)}, + {itemid = 7079, position = Position(33593,32690, 14)}, + {itemid = 7079, position = Position(33587,32686, 14)}, + {itemid = 7079, position = Position(33580,32686, 14)}, + {itemid = 7079, position = Position(33573,32690, 14)}, + {itemid = 7079, position = Position(33579,32695, 14)}, + {itemid = 7079, position = Position(33575,32691, 14)}, + {itemid = 7079, position = Position(33574,32685, 14)}, + {itemid = 7079, position = Position(33589,32695, 14)}, + {itemid = 7079, position = Position(33591,32684, 14)}, + {itemid = 7079, position = Position(33592,32684, 14)}, + {itemid = 4479, position = Position(33591,32699, 14)}, + {itemid = 4479, position = Position(33596,32695, 14)}, + {itemid = 4479, position = Position(33589,32700, 14)}, + {itemid = 4479, position = Position(33597,32693, 14)}, + {itemid = 4479, position = Position(33595,32696, 14)}, + {itemid = 4479, position = Position(33593,32698, 14)}, + {itemid = 4479, position = Position(33594,32697, 14)}, + {itemid = 4478, position = Position(33586,32679, 14)}, + {itemid = 4478, position = Position(33590,32680, 14)}, + {itemid = 4478, position = Position(33593,32682, 14)}, + {itemid = 4478, position = Position(33597,32687, 14)}, + {itemid = 4478, position = Position(33596,32685, 14)}, + {itemid = 4478, position = Position(33595,32684, 14)}, + {itemid = 4478, position = Position(33594,32683, 14)}, + {itemid = 4478, position = Position(33591,32681, 14)}, + {itemid = 4477, position = Position(33572,32692, 14)}, + {itemid = 4477, position = Position(33574,32695, 14)}, + {itemid = 4477, position = Position(33575,32696, 14)}, + {itemid = 4477, position = Position(33576,32697, 14)}, + {itemid = 4477, position = Position(33577,32698, 14)}, + {itemid = 4477, position = Position(33581,32700, 14)}, + {itemid = 4477, position = Position(33579,32699, 14)}, + {itemid = 4477, position = Position(33572,32692, 14)}, + {itemid = 4477, position = Position(33573,32694, 14)}, + {itemid = 4476, position = Position(33572,32688, 14)}, + {itemid = 4476, position = Position(33574,32684, 14)}, + {itemid = 4476, position = Position(33572,32688, 14)}, + {itemid = 4476, position = Position(33578,32681, 14)}, + {itemid = 4476, position = Position(33573,32686, 14)}, + {itemid = 4476, position = Position(33581,32679, 14)}, + {itemid = 4476, position = Position(33575,32683, 14)}, + {itemid = 4476, position = Position(33573,32686, 14)}, + {itemid = 4476, position = Position(33579,32680, 14)}, + {itemid = 4476, position = Position(33576,32682, 14)}, + {itemid = 4475, position = Position(33581,32680, 14)}, + {itemid = 4475, position = Position(33573,32688, 14)}, + {itemid = 4475, position = Position(33578,32682, 14)}, + {itemid = 4475, position = Position(33579,32681, 14)}, + {itemid = 4475, position = Position(33576,32683, 14)}, + {itemid = 4475, position = Position(33573,32688, 14)}, + {itemid = 4475, position = Position(33574,32686, 14)}, + {itemid = 4475, position = Position(33575,32684, 14)}, + {itemid = 4474, position = Position(33586,32680, 14)}, + {itemid = 4474, position = Position(33593,32683, 14)}, + {itemid = 4474, position = Position(33594,32684, 14)}, + {itemid = 4474, position = Position(33596,32687, 14)}, + {itemid = 4474, position = Position(33595,32685, 14)}, + {itemid = 4474, position = Position(33591,32682, 14)}, + {itemid = 4474, position = Position(33590,32681, 14)}, + {itemid = 4473, position = Position(33581,32699, 14)}, + {itemid = 4473, position = Position(33574,32694, 14)}, + {itemid = 4473, position = Position(33573,32692, 14)}, + {itemid = 4473, position = Position(33576,32696, 14)}, + {itemid = 4473, position = Position(33577,32697, 14)}, + {itemid = 4473, position = Position(33579,32698, 14)}, + {itemid = 4473, position = Position(33575,32695, 14)}, + {itemid = 4472, position = Position(33572,32691, 14)}, + {itemid = 4472, position = Position(33574,32685, 14)}, + {itemid = 4472, position = Position(33573,32687, 14)}, + {itemid = 4472, position = Position(33573,32687, 14)}, + {itemid = 4472, position = Position(33572,32690, 14)}, + {itemid = 4472, position = Position(33573,32693, 14)}, + {itemid = 4472, position = Position(33572,32690, 14)}, + {itemid = 4472, position = Position(33572,32689, 14)}, + {itemid = 4472, position = Position(33572,32689, 14)}, + {itemid = 4472, position = Position(33572,32691, 14)}, + {itemid = 4471, position = Position(33587,32680, 14)}, + {itemid = 4471, position = Position(33589,32680, 14)}, + {itemid = 4471, position = Position(33588,32680, 14)}, + {itemid = 4471, position = Position(33585,32679, 14)}, + {itemid = 4471, position = Position(33577,32682, 14)}, + {itemid = 4471, position = Position(33584,32679, 14)}, + {itemid = 4471, position = Position(33582,32679, 14)}, + {itemid = 4471, position = Position(33583,32679, 14)}, + {itemid = 4471, position = Position(33592,32682, 14)}, + {itemid = 4471, position = Position(33580,32680, 14)}, + {itemid = 4470, position = Position(33589,32699, 14)}, + {itemid = 4470, position = Position(33594,32696, 14)}, + {itemid = 4470, position = Position(33591,32698, 14)}, + {itemid = 4470, position = Position(33596,32693, 14)}, + {itemid = 4470, position = Position(33593,32697, 14)}, + {itemid = 4470, position = Position(33595,32695, 14)}, + {itemid = 4469, position = Position(33586,32700, 14)}, + {itemid = 4469, position = Position(33590,32699, 14)}, + {itemid = 4469, position = Position(33584,32700, 14)}, + {itemid = 4469, position = Position(33583,32700, 14)}, + {itemid = 4469, position = Position(33580,32699, 14)}, + {itemid = 4469, position = Position(33592,32698, 14)}, + {itemid = 4469, position = Position(33578,32698, 14)}, + {itemid = 4469, position = Position(33582,32700, 14)}, + {itemid = 4469, position = Position(33588,32700, 14)}, + {itemid = 4469, position = Position(33585,32700, 14)}, + {itemid = 4469, position = Position(33587,32700, 14)}, + {itemid = 4468, position = Position(33597,32692, 14)}, + {itemid = 4468, position = Position(33597,32688, 14)}, + {itemid = 4468, position = Position(33596,32686, 14)}, + {itemid = 4468, position = Position(33596,32694, 14)}, + {itemid = 4468, position = Position(33597,32691, 14)}, + {itemid = 4468, position = Position(33597,32689, 14)}, + {itemid = 4468, position = Position(33597,32690, 14)}, + {itemid = 4466, position = Position(33596,32695, 14)}, + {itemid = 4458, position = Position(33584,32700, 14)}, + {itemid = 4458, position = Position(33585,32700, 14)}, + {itemid = 3623, position = Position(33588,32691, 14)}, + {itemid = 3623, position = Position(33595,32686, 14)}, + {itemid = 3622, position = Position(33586,32686, 14)}, + {itemid = 3622, position = Position(33583,32694, 14)}, + {itemid = 3622, position = Position(33591,32686, 14)}, + {itemid = 3622, position = Position(33581,32695, 14)}, + {itemid = 3622, position = Position(33592,32689, 14)}, + {itemid = 3621, position = Position(33581,32683, 14)}, + {itemid = 3621, position = Position(33591,32697, 14)}, + {itemid = 3614, position = Position(33579,32685, 14)}, + {itemid = 3614, position = Position(33578,32688, 14)}, + {itemid = 3614, position = Position(33593,32683, 14)}, + {itemid = 3614, position = Position(33579,32694, 14)}, + {itemid = 3613, position = Position(33592,32696, 14)}, + {itemid = 3613, position = Position(33585,32683, 14)}, + {itemid = 3613, position = Position(33586,32696, 14)}, + {itemid = 3613, position = Position(33582,32680, 14)}, + {itemid = 3612, position = Position(33588,32695, 14)}, + {itemid = 3612, position = Position(33579,32682, 14)}, + {itemid = 3612, position = Position(33596,32690, 14)}, + {itemid = 3612, position = Position(33583,32687, 14)}, + {itemid = 3612, position = Position(33582,32694, 14)}, + {itemid = 3611, position = Position(33591,32683, 14)}, + {itemid = 3611, position = Position(33577,32688, 14)}, + {itemid = 3611, position = Position(33578,32691, 14)}, + {itemid = 3611, position = Position(33590,32696, 14)}, + {itemid = 3611, position = Position(33588,32689, 14)}, + {itemid = 3611, position = Position(33577,32682, 14)}, + {itemid = 3611, position = Position(33583,32682, 14)}, + {itemid = 3611, position = Position(33590,32691, 14)}, + {itemid = 3611, position = Position(33575,32689, 14)}, + {itemid = 3610, position = Position(33581,32689, 14)} +} + +local function revertLava() + for i = 1, #itemsRoom do + local item = itemsRoom[i] + if isInArray(tiles, item.itemid) then + local ground = Tile(item.position):getGround() + local transformid = item.itemid + if ground then + ground:transform(transformid) + ground:setActionId(34201) + end + else + local tp = Game.createItem(item.itemid, 1, item.position) + tp:setActionId(34201) + end + end + return true +end +local function lavaGrounds (cid) + local creature = Creature(cid) + if not creature then return true end + local summoncount = creature:getSummons() + if #summoncount < 4 then + for i = 1, 4 do + local mid = Game.createMonster("Rage of Mazoran", Position(math.random(33576, 33593), math.random(32684, 32695), 14), true, true) + if not mid then + return + end + mid:setMaster(creature) + end + end + for x = 33572, 33598 do + for y = 32679, 32701 do + local position = Position(x, y, 14) + local tile = Tile(position) + if not tile then + return + end + local ground = tile:getGround() + if not ground then + return + end + local grounds = ground:getId() + if grounds ~= 919 then + local items = tile:getItems() + for i = 1, #items do + local item = items[i] + local itemId = item:getId() + if not isInArray(Montains, itemId) then + item:remove() + end + end + ground:transform(23863) + ground:setActionId(34200) + end + end + end + addEvent(revertLava, 5 * 1000) +end +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + creature:say('THE GROUND BEGINS TO HEAT UP RAPIDLY!', TALKTYPE_MONSTER_YELL) + addEvent(lavaGrounds, 3 * 1000, creature:getId()) + return +end + +spell:name("mazoran fire") +spell:words("###425") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/mazoran_summon.lua b/data/scripts/spells/monster/mazoran_summon.lua new file mode 100644 index 000000000..3b58c2c3d --- /dev/null +++ b/data/scripts/spells/monster/mazoran_summon.lua @@ -0,0 +1,22 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 4 then + for i = 1, 4 do + local mid = Game.createMonster("Rage of Mazoran", Position(math.random(33576, 33593), math.random(32684, 32695), 14), true, true) + if not mid then + return + end + mid:setMaster(creature) + end + end + return +end + +spell:name("mazoran summon") +spell:words("###409") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/medusa_paralyze.lua b/data/scripts/spells/monster/medusa_paralyze.lua new file mode 100644 index 000000000..cf8de29ec --- /dev/null +++ b/data/scripts/spells/monster/medusa_paralyze.lua @@ -0,0 +1,43 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.45, 0, -0.5, 0) +combat:addCondition(condition) + +arr = { +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +} + +local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("medusa paralyze") +spell:words("###152") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/mephiles_skill_reducer.lua b/data/scripts/spells/monster/mephiles_skill_reducer.lua new file mode 100644 index 000000000..705faf5fa --- /dev/null +++ b/data/scripts/spells/monster/mephiles_skill_reducer.lua @@ -0,0 +1,30 @@ +local combat = {} + +for i = 80, 95 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 6000) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + + local area = createCombatArea(AREA_BEAM1) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(80, 95)]:execute(creature, var) +end + +spell:name("mephiles skill reducer") +spell:words("###275") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/mephiles_summon.lua b/data/scripts/spells/monster/mephiles_summon.lua new file mode 100644 index 000000000..12e96fbc4 --- /dev/null +++ b/data/scripts/spells/monster/mephiles_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Fire Devil", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("mephiles summon") +spell:words("###273") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/metal_gargoyle_curse.lua b/data/scripts/spells/monster/metal_gargoyle_curse.lua new file mode 100644 index 000000000..9266941e2 --- /dev/null +++ b/data/scripts/spells/monster/metal_gargoyle_curse.lua @@ -0,0 +1,33 @@ +local combat = {} + +for i = 2.32, 2.32 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for j = 1, 23 do + damage = damage * 1.2 + condition:addDamage(1, 4000, -damage) + end + + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(2.32, 2.32)]:execute(creature, var) +end + +spell:name("metal gargoyle curse") +spell:words("###370") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/mindmasher_drown.lua b/data/scripts/spells/monster/mindmasher_drown.lua new file mode 100644 index 000000000..b78915d66 --- /dev/null +++ b/data/scripts/spells/monster/mindmasher_drown.lua @@ -0,0 +1,22 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BUBBLES) + +local condition = Condition(CONDITION_DROWN) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(20, 5000, -20) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("mindmasher drown") +spell:words("###188") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/mindmasher_summon.lua b/data/scripts/spells/monster/mindmasher_summon.lua new file mode 100644 index 000000000..d6484f469 --- /dev/null +++ b/data/scripts/spells/monster/mindmasher_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 4 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 4 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Mindmasher summon", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("mindmasher summon") +spell:words("###189") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/minotaur_amazon_paralyze.lua b/data/scripts/spells/monster/minotaur_amazon_paralyze.lua new file mode 100644 index 000000000..ccfb6e10a --- /dev/null +++ b/data/scripts/spells/monster/minotaur_amazon_paralyze.lua @@ -0,0 +1,33 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, 3) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 10000) +condition:setFormula(-0.4, 0, -0.7, 0) +combat:addCondition(condition) + + arr = { + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("minotaur amazon paralyze") +spell:words("###363") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/minotaur_wallbreaker_walkthrough.lua b/data/scripts/spells/monster/minotaur_wallbreaker_walkthrough.lua new file mode 100644 index 000000000..4149da32a --- /dev/null +++ b/data/scripts/spells/monster/minotaur_wallbreaker_walkthrough.lua @@ -0,0 +1,42 @@ +local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) +condition:setParameter(CONDITION_PARAM_SUBID, 88888) +condition:setParameter(CONDITION_PARAM_TICKS, 10 * 1000) +condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) +condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 10 * 1000) + +local function changeSpeeds(cid, var) + local creature = Creature(cid) + if not creature then + return + end + creature:changeSpeed(creature:getBaseSpeed()) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local nextPosition = creature:getPosition() + local speed = creature:getSpeed() + local tile = Tile(nextPosition.x - 1, nextPosition.y, nextPosition.z) + local topCreature = tile:getTopCreature() + if not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then + creature:addCondition(condition) + creature:teleportTo(Position(nextPosition.x - 1, nextPosition.y, nextPosition.z), true) + creature:changeSpeed(-speed) + addEvent(changeSpeeds, 11 * 1000, creature:getId(), var) + if not topCreature then + return + end + if topCreature:isPlayer() then + topCreature:teleportTo(Position(nextPosition.x - 3, nextPosition.y, nextPosition.z), true) + else + end + end + return true +end + +spell:name("minotaur wallbreaker walkthrough") +spell:words("###403") +spell:isAggressive(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/monstor_summon.lua b/data/scripts/spells/monster/monstor_summon.lua new file mode 100644 index 000000000..9f6bc2151 --- /dev/null +++ b/data/scripts/spells/monster/monstor_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) + +local area = createCombatArea(AREA_CIRCLE3X3) +combat:setArea(area) + +local maxsummons = 3 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 3 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Acid Blob", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("monstor summon") +spell:words("###274") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/mooh'tah_master_skill_reducer.lua b/data/scripts/spells/monster/mooh'tah_master_skill_reducer.lua new file mode 100644 index 000000000..61204c260 --- /dev/null +++ b/data/scripts/spells/monster/mooh'tah_master_skill_reducer.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 3000) + condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, -100) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("mooh'tah master skill reducer") +spell:words("###190") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/morgaroth_paralyze.lua b/data/scripts/spells/monster/morgaroth_paralyze.lua new file mode 100644 index 000000000..92a7f4227 --- /dev/null +++ b/data/scripts/spells/monster/morgaroth_paralyze.lua @@ -0,0 +1,40 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_RED) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 30000) + condition:setFormula(-0.7, 0, -0.9, 0) + combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("morgaroth paralyze") +spell:words("###193") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/morgaroth_skill_reducer_1.lua b/data/scripts/spells/monster/morgaroth_skill_reducer_1.lua new file mode 100644 index 000000000..e7edc9a0c --- /dev/null +++ b/data/scripts/spells/monster/morgaroth_skill_reducer_1.lua @@ -0,0 +1,27 @@ +local combat = {} + +for i = 15, 30 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 15000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE3X3) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(15, 30)]:execute(creature, var) +end + +spell:name("morgaroth skill reducer 1") +spell:words("###191") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/morgaroth_skill_reducer_2.lua b/data/scripts/spells/monster/morgaroth_skill_reducer_2.lua new file mode 100644 index 000000000..cbd67d038 --- /dev/null +++ b/data/scripts/spells/monster/morgaroth_skill_reducer_2.lua @@ -0,0 +1,28 @@ +local combat = {} + +for i = 15, 30 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 15000) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(15, 30)]:execute(creature, var) +end + +spell:name("morgaroth skill reducer 2") +spell:words("###192") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/morgaroth_summon.lua b/data/scripts/spells/monster/morgaroth_summon.lua new file mode 100644 index 000000000..54935f23e --- /dev/null +++ b/data/scripts/spells/monster/morgaroth_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 4 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 4 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Demon2", { x=creature:getPosition().x+math.random(-2, 2), y=creature:getPosition().y+math.random(-2, 2), z=creature:getPosition().z }) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("morgaroth summon") +spell:words("###194") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/morik_the_gladiator_summon.lua b/data/scripts/spells/monster/morik_the_gladiator_summon.lua new file mode 100644 index 000000000..0bc9ffdec --- /dev/null +++ b/data/scripts/spells/monster/morik_the_gladiator_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_GREEN) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Gladiator", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("morik the gladiator summon") +spell:words("###195") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/mummy_paralyze.lua b/data/scripts/spells/monster/mummy_paralyze.lua new file mode 100644 index 000000000..2fd3ca186 --- /dev/null +++ b/data/scripts/spells/monster/mummy_paralyze.lua @@ -0,0 +1,21 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.7, 0, -0.85, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("mummy paralyze") +spell:words("###305") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/munster_summon.lua b/data/scripts/spells/monster/munster_summon.lua new file mode 100644 index 000000000..5c8f27d6a --- /dev/null +++ b/data/scripts/spells/monster/munster_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Rat", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("munster summon") +spell:words("###196") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/mutated_bat_curse.lua b/data/scripts/spells/monster/mutated_bat_curse.lua new file mode 100644 index 000000000..788c02501 --- /dev/null +++ b/data/scripts/spells/monster/mutated_bat_curse.lua @@ -0,0 +1,48 @@ +local combat = {} + +for i = 2, 4 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for j = 1, 9 do + damage = damage * 1.2 + condition:addDamage(1, 4000, -damage) + end + + local area = createCombatArea({ + {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + }) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(2, 4)]:execute(creature, var) +end + +spell:name("mutated bat curse") +spell:words("###24") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/mutated_human_paralyze.lua b/data/scripts/spells/monster/mutated_human_paralyze.lua new file mode 100644 index 000000000..ca17c3556 --- /dev/null +++ b/data/scripts/spells/monster/mutated_human_paralyze.lua @@ -0,0 +1,21 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 5000) + condition:setFormula(-0.05, 0, -0.15, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("mutated human paralyze") +spell:words("###280") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/mutated_rat_paralyze.lua b/data/scripts/spells/monster/mutated_rat_paralyze.lua new file mode 100644 index 000000000..ab53fcebb --- /dev/null +++ b/data/scripts/spells/monster/mutated_rat_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.2, 0, -0.45, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("mutated rat paralyze") +spell:words("###112") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/nightstalker_paralyze.lua b/data/scripts/spells/monster/nightstalker_paralyze.lua new file mode 100644 index 000000000..85a4639d5 --- /dev/null +++ b/data/scripts/spells/monster/nightstalker_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SLEEP) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.7, 0, -0.9, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("nightstalker paralyze") +spell:words("###241") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/obujos_skill_reducer_1.lua b/data/scripts/spells/monster/obujos_skill_reducer_1.lua new file mode 100644 index 000000000..6218baa69 --- /dev/null +++ b/data/scripts/spells/monster/obujos_skill_reducer_1.lua @@ -0,0 +1,26 @@ +local combat = {} + +for i = 35, 50 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 15000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(35, 50)]:execute(creature, var) +end + +spell:name("obujos skill reducer 1") +spell:words("###197") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/obujos_skill_reducer_2.lua b/data/scripts/spells/monster/obujos_skill_reducer_2.lua new file mode 100644 index 000000000..7bcbbd947 --- /dev/null +++ b/data/scripts/spells/monster/obujos_skill_reducer_2.lua @@ -0,0 +1,27 @@ +local combat = {} + +for i = 35, 60 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 15000) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(35, 60)]:execute(creature, var) +end + +spell:name("obujos skill reducer 2") +spell:words("###198") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ocyakao_freeze.lua b/data/scripts/spells/monster/ocyakao_freeze.lua new file mode 100644 index 000000000..c7fc36cbc --- /dev/null +++ b/data/scripts/spells/monster/ocyakao_freeze.lua @@ -0,0 +1,24 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA) + + local condition = Condition(CONDITION_FREEZING) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + condition:addDamage(25, 8000, -8) + combat:addCondition(condition) + + local area = createCombatArea(AREA_CIRCLE3X3) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("ocyakao freeze") +spell:words("###199") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/omrafir_beam.lua b/data/scripts/spells/monster/omrafir_beam.lua new file mode 100644 index 000000000..4f3332ca6 --- /dev/null +++ b/data/scripts/spells/monster/omrafir_beam.lua @@ -0,0 +1,136 @@ +local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) +condition:setParameter(CONDITION_PARAM_SUBID, 88888) +condition:setParameter(CONDITION_PARAM_TICKS, 5 * 1000) +condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) +condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 5 * 1000) + +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) +combat:setFormula(COMBAT_FORMULA_DAMAGE, -7000, 0, -10000, 0) + + arr1 = { +{0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +} + +local area1 = createCombatArea(arr1) +combat:setArea(area1) + +----------------------------------------------------------------------------- + +local combat2 = Combat() +combat2:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat2:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) +combat2:setFormula(COMBAT_FORMULA_DAMAGE, -7000, 0, -10000, 0) + + arr2 = { +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +} + +local area2 = createCombatArea(arr2) +combat2:setArea(area2) + +-------------------------------------------------------------------------- + +local combat3 = Combat() +combat3:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat3:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) +combat3:setFormula(COMBAT_FORMULA_DAMAGE, -7000, 0, -10000, 0) + + arr3 = { +{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +} + +local area3 = createCombatArea(arr3) +combat3:setArea(area3) + +-------------------------------------------------------------------------- + +local combat4 = Combat() +combat4:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat4:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) +combat4:setFormula(COMBAT_FORMULA_DAMAGE, -7000, 0, -10000, 0) + + arr4 = { +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +} + +local area4 = createCombatArea(arr4) +combat4:setArea(area4) + +-------------------------------------------------------------- + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + if not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then + creature:say("OMRAFIR INHALES DEEPLY!", TALKTYPE_ORANGE_2) + creature:addCondition(condition) + addEvent(function(cid, var) + local creature = Creature(cid) + if not creature then + return + end + if creature:getDirection() == 0 then + combat:execute(creature, positionToVariant(creature:getPosition())) + elseif creature:getDirection() == 1 then + combat2:execute(creature, positionToVariant(creature:getPosition())) + elseif creature:getDirection() == 2 then + combat3:execute(creature, positionToVariant(creature:getPosition())) + elseif creature:getDirection() == 3 then + combat4:execute(creature, positionToVariant(creature:getPosition())) + end + creature:say("OMRAFIR BREATHES INFERNAL FIRE", TALKTYPE_ORANGE_2) +end, 4000, creature:getId(), var) + else + return + end + return true +end + +spell:name("omrafir beam") +spell:words("###331") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/omrafir_healing_2.lua b/data/scripts/spells/monster/omrafir_healing_2.lua new file mode 100644 index 000000000..665782d32 --- /dev/null +++ b/data/scripts/spells/monster/omrafir_healing_2.lua @@ -0,0 +1,24 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) +local health, hp, cpos = math.random(7500, 9000), (creature:getHealth()/creature:getMaxHealth())*100, creature:getPosition() + + if creature:getName() == "Omrafir" and (hp < 99.99) then + local t = Tile(cpos) + if t == nil then + return + end + if t:getItemById(1487) or t:getItemById(1492) or t:getItemById(1500) then + creature:addHealth(health) + cpos:sendMagicEffect(CONST_ME_MAGIC_BLUE) + creature:say("Omrafir gains new strength from the fire", TALKTYPE_ORANGE_1) + else + end + end +end + +spell:name("omrafir healing 2") +spell:words("###346") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/omrafir_summon.lua b/data/scripts/spells/monster/omrafir_summon.lua new file mode 100644 index 000000000..c5e91e0da --- /dev/null +++ b/data/scripts/spells/monster/omrafir_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) + +local area = createCombatArea(AREA_CIRCLE3X3) +combat:setArea(area) + +local maxsummons = 4 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 4 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Flame Of Omrafir", { x=creature:getPosition().x+math.random(-2, 2), y=creature:getPosition().y+math.random(-2, 2), z=creature:getPosition().z }) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("omrafir summon") +spell:words("###317") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/omrafir_wave.lua b/data/scripts/spells/monster/omrafir_wave.lua new file mode 100644 index 000000000..31bdfc063 --- /dev/null +++ b/data/scripts/spells/monster/omrafir_wave.lua @@ -0,0 +1,28 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("omrafir wave") +spell:words("###318") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/orewalker_skill_reducer_1.lua b/data/scripts/spells/monster/orewalker_skill_reducer_1.lua new file mode 100644 index 000000000..bbac4bea1 --- /dev/null +++ b/data/scripts/spells/monster/orewalker_skill_reducer_1.lua @@ -0,0 +1,36 @@ +local combat = {} + +for i = 25, 45 do +combat[i] = Combat() +combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) + +local condition = Condition(CONDITION_ATTRIBUTES) +condition:setParameter(CONDITION_PARAM_TICKS, 15000) +condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + +local area = createCombatArea({ + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + }) + +combat[i]:setArea(area) +combat[i]:addCondition(condition) + +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(25, 45)]:execute(creature, var) +end + +spell:name("orewalker skill reducer 1") +spell:words("###260") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/orewalker_wave.lua b/data/scripts/spells/monster/orewalker_wave.lua new file mode 100644 index 000000000..f29e6873a --- /dev/null +++ b/data/scripts/spells/monster/orewalker_wave.lua @@ -0,0 +1,28 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_MANADRAIN) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("orewalker wave") +spell:words("###294") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/orshabaal_skill_reducer.lua b/data/scripts/spells/monster/orshabaal_skill_reducer.lua new file mode 100644 index 000000000..7962d792e --- /dev/null +++ b/data/scripts/spells/monster/orshabaal_skill_reducer.lua @@ -0,0 +1,27 @@ +local combat = {} + +for i = 30, 40 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE3X3) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(30, 40)]:execute(creature, var) +end + +spell:name("orshabaal skill reducer") +spell:words("###200") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/outburst_explode.lua b/data/scripts/spells/monster/outburst_explode.lua new file mode 100644 index 000000000..b0a5e4e88 --- /dev/null +++ b/data/scripts/spells/monster/outburst_explode.lua @@ -0,0 +1,84 @@ +local function outExplode() + local upConer = {x = 32223, y = 31273, z = 14} -- upLeftCorner + local downConer = {x = 32246, y = 31297, z = 14} -- downRightCorner + + for i=upConer.x, downConer.x do + for j=upConer.y, downConer.y do + for k= upConer.z, downConer.z do + local room = {x=i, y=j, z=k} + local tile = Tile(room) + if tile then + local creatures = tile:getCreatures() + if creatures and #creatures > 0 then + for _, c in pairs(creatures) do + if isPlayer(c) then + c:teleportTo({x = 32234, y = 31280, z = 14}) + elseif isMonster(c) and c:getName() == "Charging Outburst" then + c:teleportTo({x = 32234, y = 31279, z = 14}) + end + end + end + end + end + end + end +end + +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) + +arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +} + +local area = createCombatArea(arr) +combat:setArea(area) + +local function delayedCastSpell(creature, var) + if not creature then + return + end + return combat:execute(creature, positionToVariant(creature:getPosition())) +end + +function removeOutburst(cid) + local creature = Creature(cid) + if not isCreature(creature) then return false end + creature:remove() +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local from = creature:getId() + + outExplode() + delayedCastSpell(creature, var) + chargingOutKilled = true + addEvent(removeOutburst, 1000, creature.uid) + + local monster = Game.createMonster("Outburst", {x = 32234, y = 31284, z = 14}, false, true) + monster:addHealth(-monster:getHealth() + outburstHealth, COMBAT_PHYSICALDAMAGE) + transferBossPoints(from, monster:getId()) + return true +end + +spell:name("outburst explode") +spell:words("###449") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/phantasm_drown.lua b/data/scripts/spells/monster/phantasm_drown.lua new file mode 100644 index 000000000..b1c37107d --- /dev/null +++ b/data/scripts/spells/monster/phantasm_drown.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) + +local condition = Condition(CONDITION_DROWN) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(20, 5000, -20) + +local area = createCombatArea({ + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0} +}) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("phantasm drown") +spell:words("###9") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/pirate_corsair_skill_reducer.lua b/data/scripts/spells/monster/pirate_corsair_skill_reducer.lua new file mode 100644 index 000000000..a9c40e1b3 --- /dev/null +++ b/data/scripts/spells/monster/pirate_corsair_skill_reducer.lua @@ -0,0 +1,30 @@ +local combat = {} + +for i = 25, 55 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_PURPLE) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 7000) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + + local area = createCombatArea(AREA_BEAM1) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(25, 55)]:execute(creature, var) +end + +spell:name("pirate corsair skill reducer") +spell:words("###49") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/pixie_skill_reducer.lua b/data/scripts/spells/monster/pixie_skill_reducer.lua new file mode 100644 index 000000000..007f9b7ab --- /dev/null +++ b/data/scripts/spells/monster/pixie_skill_reducer.lua @@ -0,0 +1,27 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PIXIE_EXPLOSION) + +local condition = Condition(CONDITION_ATTRIBUTES) +condition:setParameter(CONDITION_PARAM_TICKS, 6000) +condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, 30) +condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, 30) +condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, 30) + +local area = createCombatArea(AREA_CIRCLE2X2) + +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("pixie skill reducer") +spell:words("###469") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:cooldown("2000") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/plagirath_bog.lua b/data/scripts/spells/monster/plagirath_bog.lua new file mode 100644 index 000000000..d9a1d792e --- /dev/null +++ b/data/scripts/spells/monster/plagirath_bog.lua @@ -0,0 +1,67 @@ +local combat2 = Combat() +combat2:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) +combat2:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISON) +combat2:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) + + +arr = { +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +} + +local area = createCombatArea(arr) +combat2:setArea(area) + +function onGetFormulaValues(player, level, maglevel) + min = -1500 + max = -1500 + return min, max +end + +combat2:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local function spellDamage(cid, target, var) + local creature = Creature(cid) + local target = Creature(target) + if not creature or not target then + return + end + if creature:getHealth() >= 1 and creature:getPosition():getDistance(target:getPosition()) < 20 then + return combat2:execute(creature, var) + end +end + +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) + +local condition = Condition(CONDITION_OUTFIT) +condition:setParameter(CONDITION_PARAM_TICKS, 10000) +condition:setOutfit({lookType = 299}) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local target = creature:getTarget() + addEvent(spellDamage, 10 * 1000, creature:getId(), target:getId(), var) + return combat:execute(creature, var) +end +spell:name("plagirath bog") +spell:words("###443") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/plagirath_heal.lua b/data/scripts/spells/monster/plagirath_heal.lua new file mode 100644 index 000000000..f746fc86b --- /dev/null +++ b/data/scripts/spells/monster/plagirath_heal.lua @@ -0,0 +1,51 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) + +arr = { + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + } + +local area = createCombatArea(arr) +combat:setArea(area) + +function onTargetCreature(creature, target) + local min = 300 + local max = 700 + + local master = target:getMaster() + if target:isPlayer() and not master + or master and master:isPlayer() then + return true + end + + doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) + return true +end + +combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("plagirath heal") +spell:words("###426") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/plagirath_summon.lua b/data/scripts/spells/monster/plagirath_summon.lua new file mode 100644 index 000000000..f77095a08 --- /dev/null +++ b/data/scripts/spells/monster/plagirath_summon.lua @@ -0,0 +1,23 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + local maxsummons = 4 + if #summoncount < 4 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Disgusting Ooze", Position(math.random(33163, 33180), math.random(31497, 31506), 13), true, true) + if not mid then + return + end + mid:setMaster(creature) + end + end + return +end + +spell:name("plagirath summon") +spell:words("###411") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/plaguesmith_paralyze.lua b/data/scripts/spells/monster/plaguesmith_paralyze.lua new file mode 100644 index 000000000..9940f25d5 --- /dev/null +++ b/data/scripts/spells/monster/plaguesmith_paralyze.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.7, 0, -0.85, 0) +combat:addCondition(condition) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("plaguesmith paralyze") +spell:words("###243") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/plaguesmith_wave.lua b/data/scripts/spells/monster/plaguesmith_wave.lua new file mode 100644 index 000000000..bc6f0f906 --- /dev/null +++ b/data/scripts/spells/monster/plaguesmith_wave.lua @@ -0,0 +1,29 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_LIFEDRAINDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_YELLOW_RINGS) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("plaguesmith wave") +spell:words("###242") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/priestess_firering.lua b/data/scripts/spells/monster/priestess_firering.lua new file mode 100644 index 000000000..7f24f5db5 --- /dev/null +++ b/data/scripts/spells/monster/priestess_firering.lua @@ -0,0 +1,27 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) +combat:setParameter(COMBAT_PARAM_SHOOT_EFFECT, CONST_ANI_FIRE) +arr = { +{1, 0, 1}, +{0, 2, 0}, +{1, 0, 1} +} + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("targetfirering") +spell:words("###480") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:cooldown("2000") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/prince_drazzak_druid.lua b/data/scripts/spells/monster/prince_drazzak_druid.lua new file mode 100644 index 000000000..aaef3c77f --- /dev/null +++ b/data/scripts/spells/monster/prince_drazzak_druid.lua @@ -0,0 +1,88 @@ +local storage = 674531 + +local area = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +} + +local createArea = createCombatArea(area) + +local combat = Combat() +combat:setArea(createArea) + +function onTargetTile(creature, pos) + local creatureTable = {} + local n, i = Tile({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 + if n ~= 0 then + local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid + while v ~= 0 do + if isCreature(v) == true then + table.insert(creatureTable, v) + if n == #creatureTable then + break + end + end + i = i + 1 + v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid + end + end + if #creatureTable ~= nil and #creatureTable > 0 then + for r = 1, #creatureTable do + if creatureTable[r] ~= creature then + local min = 4000 + local max = 8000 + local player = Player(creatureTable[r]) + + if isPlayer(creatureTable[r]) == true + and table.contains({VOCATION.BASE_ID.DRUID}, player:getVocation():getBaseId()) then + doTargetCombatHealth(creature, creatureTable[r], COMBAT_POISONDAMAGE, -min, -max, CONST_ME_NONE) + elseif isMonster(creatureTable[r]) == true then + doTargetCombatHealth(creature, creatureTable[r], COMBAT_POISONDAMAGE, -min, -max, CONST_ME_NONE) + end + end + end + end + pos:sendMagicEffect(CONST_ME_POISONAREA) + return true +end + +combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") + +local function delayedCastSpell(cid, var) + local creature = Creature(cid) + if not creature then + return + end + creature:say("DIE!", TALKTYPE_ORANGE_1) + return combat:execute(creature, positionToVariant(creature:getPosition())) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local value = Game.getStorageValue(storage) + if(os.time()-value >= 4) then + creature:say("All DRUIDS must DIE!", TALKTYPE_ORANGE_1) + addEvent(delayedCastSpell, 4000, creature:getId(), var) + Game.setStorageValue(storage, os.time()) + end + return true +end + +spell:name("prince drazzak druid") +spell:words("###321") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/prince_drazzak_knight.lua b/data/scripts/spells/monster/prince_drazzak_knight.lua new file mode 100644 index 000000000..b2d513ad4 --- /dev/null +++ b/data/scripts/spells/monster/prince_drazzak_knight.lua @@ -0,0 +1,72 @@ +local storage = 674531 + +local area = createCombatArea(AREA_CIRCLE3X3) + +local combat = Combat() +combat:setArea(area) + +function onTargetTile(creature, pos) + local creatureTable = {} + local n, i = Tile({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 + if n ~= 0 then + local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid + while v ~= 0 do + if isCreature(v) == true then + table.insert(creatureTable, v) + if n == #creatureTable then + break + end + end + i = i + 1 + v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid + end + end + if #creatureTable ~= nil and #creatureTable > 0 then + for r = 1, #creatureTable do + if creatureTable[r] ~= creature then + local min = 4000 + local max = 8000 + local player = Player(creatureTable[r]) + + if isPlayer(creatureTable[r]) == true + and table.contains({VOCATION.BASE_ID.KNIGHT}, player:getVocation():getBaseId()) then + doTargetCombatHealth(creature, creatureTable[r], COMBAT_FIREDAMAGE, -min, -max, CONST_ME_NONE) + elseif isMonster(creatureTable[r]) == true then + doTargetCombatHealth(creature, creatureTable[r], COMBAT_FIREDAMAGE, -min, -max, CONST_ME_NONE) + end + end + end + end + pos:sendMagicEffect(CONST_ME_HITBYFIRE) + return true +end + +combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") + +local function delayedCastSpell(cid, var) + local creature = Creature(cid) + if not creature then + return + end + creature:say("DIE!", TALKTYPE_ORANGE_1) + return combat:execute(creature, positionToVariant(creature:getPosition())) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) +local value = Game.getStorageValue(storage) + if(os.time()-value >= 4) then + creature:say("All KNIGHTS must DIE!", TALKTYPE_ORANGE_1) + addEvent(delayedCastSpell, 4000, creature:getId(), var) + Game.setStorageValue(storage, os.time()) + end + return true +end + +spell:name("prince drazzak knight") +spell:words("###320") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/prince_drazzak_paladin.lua b/data/scripts/spells/monster/prince_drazzak_paladin.lua new file mode 100644 index 000000000..76da09c5b --- /dev/null +++ b/data/scripts/spells/monster/prince_drazzak_paladin.lua @@ -0,0 +1,88 @@ +local storage = 674531 + +local area = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + +local createArea = createCombatArea(area) + +local combat = Combat() +combat:setArea(createArea) + +function onTargetTile(creature, pos) + local creatureTable = {} + local n, i = Tile({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 + if n ~= 0 then + local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid + while v ~= 0 do + if isCreature(v) == true then + table.insert(creatureTable, v) + if n == #creatureTable then + break + end + end + i = i + 1 + v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid + end + end + if #creatureTable ~= nil and #creatureTable > 0 then + for r = 1, #creatureTable do + if creatureTable[r] ~= creature then + local min = 4000 + local max = 8000 + local player = Player(creatureTable[r]) + + if isPlayer(creatureTable[r]) == true + and table.contains({VOCATION.BASE_ID.PALADIN}, player:getVocation():getBaseId()) then + doTargetCombatHealth(creature, creatureTable[r], COMBAT_ENERGYDAMAGE, -min, -max, CONST_ME_NONE) + elseif isMonster(creatureTable[r]) == true then + doTargetCombatHealth(creature, creatureTable[r], COMBAT_ENERGYDAMAGE, -min, -max, CONST_ME_NONE) + end + end + end + end + pos:sendMagicEffect(CONST_ME_ENERGYHIT) + return true +end + +combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") + +local function delayedCastSpell(cid, var) + local creature = Creature(cid) + if not creature then + return + end + creature:say("DIE!", TALKTYPE_ORANGE_1) + return combat:execute(creature, positionToVariant(creature:getPosition())) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) +local value = Game.getStorageValue(storage) + if(os.time()-value >= 4) then + creature:say("All PALADINS must DIE!", TALKTYPE_ORANGE_1) + addEvent(delayedCastSpell, 4000, creature:getId(), var) + Game.setStorageValue(storage, os.time()) + end + return true +end + +spell:name("prince drazzak paladin") +spell:words("###322") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/prince_drazzak_sorcerer.lua b/data/scripts/spells/monster/prince_drazzak_sorcerer.lua new file mode 100644 index 000000000..c5b079202 --- /dev/null +++ b/data/scripts/spells/monster/prince_drazzak_sorcerer.lua @@ -0,0 +1,88 @@ +local storage = 674531 + +local area = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + +local createArea = createCombatArea(area) + +local combat = Combat() +combat:setArea(createArea) + +function onTargetTile(creature, pos) + local creatureTable = {} + local n, i = Tile({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 + if n ~= 0 then + local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid + while v ~= 0 do + if isCreature(v) == true then + table.insert(creatureTable, v) + if n == #creatureTable then + break + end + end + i = i + 1 + v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid + end + end + if #creatureTable ~= nil and #creatureTable > 0 then + for r = 1, #creatureTable do + if creatureTable[r] ~= creature then + local min = 4000 + local max = 8000 + local player = Player(creatureTable[r]) + + if isPlayer(creatureTable[r]) == true + and table.contains({VOCATION.BASE_ID.SORCERER}, player:getVocation():getBaseId()) then + doTargetCombatHealth(creature, creatureTable[r], COMBAT_DEATHDAMAGE, -min, -max, CONST_ME_NONE) + elseif isMonster(creatureTable[r]) == true then + doTargetCombatHealth(creature, creatureTable[r], COMBAT_DEATHDAMAGE, -min, -max, CONST_ME_NONE) + end + end + end + end + pos:sendMagicEffect(CONST_ME_MORTAREA) + return true +end + +combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") + +local function delayedCastSpell(cid, var) + local creature = Creature(cid) + if not creature then + return + end + creature:say("DIE!", TALKTYPE_ORANGE_1) + return combat:execute(creature, positionToVariant(creature:getPosition())) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) +local value = Game.getStorageValue(storage) + if(os.time()-value >= 4) then + creature:say("All SORCERERS must DIE!", TALKTYPE_ORANGE_1) + addEvent(delayedCastSpell, 4000, creature:getId(), var) + Game.setStorageValue(storage, os.time()) + end + return true +end + +spell:name("prince drazzak sorcerer") +spell:words("###323") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/prince_drazzak_summon.lua b/data/scripts/spells/monster/prince_drazzak_summon.lua new file mode 100644 index 000000000..ce5407512 --- /dev/null +++ b/data/scripts/spells/monster/prince_drazzak_summon.lua @@ -0,0 +1,28 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) +local t, spectator = Game.getSpectators(Position(33528, 32335, 12), false, false, 20, 20, 20, 20) + local check = 0 + if #t ~= nil then + for i = 1, #t do + spectator = t[i] + if spectator:getName() == "Demon" then + check = check + 1 + end + end + end + if (check < 1) then + creature:say("CRUSH THEM ALL!", TALKTYPE_ORANGE_2) + Game.createMonster("Demon", Position(33528, 32330, 12)) + Game.createMonster("Demon", Position(33523, 32338, 12)) + Game.createMonster("Demon", Position(33532, 32337, 12)) + else + end +return true +end + +spell:name("prince drazzak summon") +spell:words("###324") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/prince_drazzak_tp.lua b/data/scripts/spells/monster/prince_drazzak_tp.lua new file mode 100644 index 000000000..2f32968d1 --- /dev/null +++ b/data/scripts/spells/monster/prince_drazzak_tp.lua @@ -0,0 +1,22 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) +local center, center2 = {x=33529, y=32334, z=12, stackpos=255}, {x=33528, y=32334, z=12, stackpos=255} + creature:say("GET OVER HERE!", TALKTYPE_ORANGE_2, false, 0, center2) + for x = 33519, 33538 do + for y = 32327, 32342 do + local a = Tile(Position({x = x, y = y, z = 12})):getTopCreature() + if a ~= 0 and isMonster(a) and creature:getName():lower() ~= "prince drazzak" or isPlayer(a) then + a:teleportTo(center, true) + creature:teleportTo(center2, true) + end + end + end +return true +end + +spell:name("prince drazzak tp") +spell:words("###353") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/prince_drazzak_wave.lua b/data/scripts/spells/monster/prince_drazzak_wave.lua new file mode 100644 index 000000000..02483cc32 --- /dev/null +++ b/data/scripts/spells/monster/prince_drazzak_wave.lua @@ -0,0 +1,28 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("prince drazzak wave") +spell:words("###319") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/pythius_the_rotten_curse.lua b/data/scripts/spells/monster/pythius_the_rotten_curse.lua new file mode 100644 index 000000000..cf923e192 --- /dev/null +++ b/data/scripts/spells/monster/pythius_the_rotten_curse.lua @@ -0,0 +1,34 @@ +local combat = {} + +for i = 1, 1 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for j = 1, 33 do + damage = damage * 1.2 + condition:addDamage(1, 4000, -damage) + end + + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(1, 1)]:execute(creature, var) +end + +spell:name("pythius the rotten curse") +spell:words("###203") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/pythius_the_rotten_paralyze.lua b/data/scripts/spells/monster/pythius_the_rotten_paralyze.lua new file mode 100644 index 000000000..7420b9aee --- /dev/null +++ b/data/scripts/spells/monster/pythius_the_rotten_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.15, 0, -0.2, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("pythius the rotten paralyze") +spell:words("###204") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/pythius_the_rotten_summon.lua b/data/scripts/spells/monster/pythius_the_rotten_summon.lua new file mode 100644 index 000000000..4b5740eff --- /dev/null +++ b/data/scripts/spells/monster/pythius_the_rotten_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + +local area = createCombatArea(AREA_CIRCLE3X3) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Undead Gladiator", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("pythius the rotten summon") +spell:words("###202") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/quara_constrictor_electrify.lua b/data/scripts/spells/monster/quara_constrictor_electrify.lua new file mode 100644 index 000000000..6a5d8525d --- /dev/null +++ b/data/scripts/spells/monster/quara_constrictor_electrify.lua @@ -0,0 +1,23 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + +local condition = Condition(CONDITION_ENERGY) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(3, 10000, -25) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("quara constrictor electrify") +spell:words("###20") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/quara_constrictor_freeze.lua b/data/scripts/spells/monster/quara_constrictor_freeze.lua new file mode 100644 index 000000000..eba5696a5 --- /dev/null +++ b/data/scripts/spells/monster/quara_constrictor_freeze.lua @@ -0,0 +1,24 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) + +local condition = Condition(CONDITION_FREEZING) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(10, 8000, -8) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("quara constrictor freeze") +spell:words("###19") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/rage_summon.lua b/data/scripts/spells/monster/rage_summon.lua new file mode 100644 index 000000000..fa08dc167 --- /dev/null +++ b/data/scripts/spells/monster/rage_summon.lua @@ -0,0 +1,24 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + + if rageSummon < 3 then + Game.createMonster("Frenzy", {x=creature:getPosition().x+math.random(-1, 1), y=creature:getPosition().y+math.random(-1, 1), z=creature:getPosition().z}, false, true) + rageSummon = rageSummon + 1 + end + + return combat:execute(creature, var) +end + +spell:name("rage summon") +spell:words("###419") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ragiaz_transform.lua b/data/scripts/spells/monster/ragiaz_transform.lua new file mode 100644 index 000000000..073bad30f --- /dev/null +++ b/data/scripts/spells/monster/ragiaz_transform.lua @@ -0,0 +1,22 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local pos = creature:getPosition() + if pos.z ~= 13 then + return + end + pos:sendMagicEffect(172) + creature:say('Ragiaz encase himself in bones to regenerate.', TALKTYPE_MONSTER_SAY) + creature:teleportTo(Position(33487, 32333, 14)) + creature:addHealth(1000) + local capsule = Tile(Position(33485, 32333, 14)):getTopCreature() + capsule:teleportTo(pos) + return +end + +spell:name("ragiaz transform") +spell:words("###410") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/raging_mage_skill_reducer_1.lua b/data/scripts/spells/monster/raging_mage_skill_reducer_1.lua new file mode 100644 index 000000000..46bfbf568 --- /dev/null +++ b/data/scripts/spells/monster/raging_mage_skill_reducer_1.lua @@ -0,0 +1,26 @@ +local combat = {} + +for i = 35, 55 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 15000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(35, 55)]:execute(creature, var) +end + +spell:name("raging mage skill reducer 1") +spell:words("###110") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/raging_mage_skill_reducer_2.lua b/data/scripts/spells/monster/raging_mage_skill_reducer_2.lua new file mode 100644 index 000000000..e8e526a50 --- /dev/null +++ b/data/scripts/spells/monster/raging_mage_skill_reducer_2.lua @@ -0,0 +1,45 @@ +local combat = {} + +for i = 35, 55 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 15000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + combat[i]:addCondition(condition) + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(35, 55)]:execute(creature, var) +end + +spell:name("raging mage skill reducer 2") +spell:words("###111") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/spells/scripts/monster/ravennousLavaLurkerTarget.lua b/data/scripts/spells/monster/ravennousLavaLurkerTarget.lua similarity index 77% rename from data/spells/scripts/monster/ravennousLavaLurkerTarget.lua rename to data/scripts/spells/monster/ravennousLavaLurkerTarget.lua index 8d883e997..43a71e6a4 100644 --- a/data/spells/scripts/monster/ravennousLavaLurkerTarget.lua +++ b/data/scripts/spells/monster/ravennousLavaLurkerTarget.lua @@ -34,6 +34,16 @@ end combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") -function onCastSpell(creature, var) +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) return combat:execute(creature, var) end + +spell:name("ravennousLavaLurkerTarget") +spell:words("###466") +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:cooldown("2000") +spell:register() \ No newline at end of file diff --git a/data/spells/scripts/monster/ravennousLavaLurkerWave.lua b/data/scripts/spells/monster/ravennousLavaLurkerWave.lua similarity index 78% rename from data/spells/scripts/monster/ravennousLavaLurkerWave.lua rename to data/scripts/spells/monster/ravennousLavaLurkerWave.lua index 804a79ad3..2b49e4e2c 100644 --- a/data/spells/scripts/monster/ravennousLavaLurkerWave.lua +++ b/data/scripts/spells/monster/ravennousLavaLurkerWave.lua @@ -30,6 +30,14 @@ end combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") -function onCastSpell(creature, var) +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) return combat:execute(creature, var) end + +spell:name("ravennousLavaLurkerWave") +spell:words("###465") +spell:needLearn(true) +spell:cooldown("2000") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/razzagorn_summon.lua b/data/scripts/spells/monster/razzagorn_summon.lua new file mode 100644 index 000000000..a7ecf8cb0 --- /dev/null +++ b/data/scripts/spells/monster/razzagorn_summon.lua @@ -0,0 +1,18 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + for i = 1, 4 do + local mid = Game.createMonster("Demon", Position(math.random(33416, 33431), math.random(32460, 32474), 14), true, true) + if not mid then + return + end + end + return +end + +spell:name("razzagorn summon") +spell:words("###412") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/reality_reaver_wave.lua b/data/scripts/spells/monster/reality_reaver_wave.lua new file mode 100644 index 000000000..77332d1fd --- /dev/null +++ b/data/scripts/spells/monster/reality_reaver_wave.lua @@ -0,0 +1,20 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) + +local area = createCombatArea(AREA_SQUAREWAVE7) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("reality reaver wave") +spell:words("###444") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/remorseless_wave.lua b/data/scripts/spells/monster/remorseless_wave.lua new file mode 100644 index 000000000..9c0a0e17f --- /dev/null +++ b/data/scripts/spells/monster/remorseless_wave.lua @@ -0,0 +1,53 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLACKSMOKE) + +combat:setArea(createCombatArea({ +{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0} +})) + +function spellCallback(param) + local tile = Tile(Position(param.pos)) + if tile then + if tile:getTopCreature() and tile:getTopCreature():isPlayer() then + tile:getTopCreature():addHealth( - math.random(0, 600)) + elseif tile:getTopCreature() and tile:getTopCreature():isMonster() then + if tile:getTopCreature():getName():lower() == "stolen soul" then + tile:getTopCreature():addHealth( - math.random(700, 1500)) + end + end + end +end + +function onTargetTile(cid, pos) + local param = {} + param.cid = cid + param.pos = pos + param.count = 0 + spellCallback(param) +end + +setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("Remorseless Wave") +spell:words("#####460") +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/renegade_knight.lua b/data/scripts/spells/monster/renegade_knight.lua new file mode 100644 index 000000000..53956d695 --- /dev/null +++ b/data/scripts/spells/monster/renegade_knight.lua @@ -0,0 +1,21 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, 6) +combat:setArea(createCombatArea(AREA_SQUARE1X1)) + +local condition = Condition(COMBAT_PHYSICALDAMAGE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(3, 10000, -25) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("renegade knight") +spell:words("##404") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/retching_horror_paralyze.lua b/data/scripts/spells/monster/retching_horror_paralyze.lua new file mode 100644 index 000000000..61942433e --- /dev/null +++ b/data/scripts/spells/monster/retching_horror_paralyze.lua @@ -0,0 +1,24 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.55, 0, -0.75, 0) + combat:addCondition(condition) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("retching horror paralyze") +spell:words("###358") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/rift_brood_electrify.lua b/data/scripts/spells/monster/rift_brood_electrify.lua new file mode 100644 index 000000000..d25f8daba --- /dev/null +++ b/data/scripts/spells/monster/rift_brood_electrify.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + +local condition = Condition(CONDITION_ENERGY) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(10, 10000, -25) +combat:addCondition(condition) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("rift brood electrify") +spell:words("###295") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/root_branchy_rotten.lua b/data/scripts/spells/monster/root_branchy_rotten.lua new file mode 100644 index 000000000..41c27adf7 --- /dev/null +++ b/data/scripts/spells/monster/root_branchy_rotten.lua @@ -0,0 +1,20 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ROOTS) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_LEAFSTAR) + +local condition = Condition(CONDITION_ROOTED) +condition:setParameter(CONDITION_PARAM_TICKS, 3000) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("root") +spell:words("###483") +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/rot_elemental_paralyze.lua b/data/scripts/spells/monster/rot_elemental_paralyze.lua new file mode 100644 index 000000000..31bbf722b --- /dev/null +++ b/data/scripts/spells/monster/rot_elemental_paralyze.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_GREEN) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.45, 0, -0.65, 0) +combat:addCondition(condition) + + +local area = createCombatArea(AREA_CIRCLE2X2) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("rot elemental paralyze") +spell:words("###367") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/rupture_wave.lua b/data/scripts/spells/monster/rupture_wave.lua new file mode 100644 index 000000000..2e2fe1305 --- /dev/null +++ b/data/scripts/spells/monster/rupture_wave.lua @@ -0,0 +1,20 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) + +local area = createCombatArea(AREA_WAVE11) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("rupture wave") +spell:words("###450") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/rustheap_golem_electrify.lua b/data/scripts/spells/monster/rustheap_golem_electrify.lua new file mode 100644 index 000000000..9911b0021 --- /dev/null +++ b/data/scripts/spells/monster/rustheap_golem_electrify.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + +local condition = Condition(CONDITION_ENERGY) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(17, 10000, -25) +combat:addCondition(condition) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("rustheap golem electrify") +spell:words("###368") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/rustheap_golem_wave.lua b/data/scripts/spells/monster/rustheap_golem_wave.lua new file mode 100644 index 000000000..361022b24 --- /dev/null +++ b/data/scripts/spells/monster/rustheap_golem_wave.lua @@ -0,0 +1,28 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_LIFEDRAIN) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLACKSMOKE) + + arr = { + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("rustheap golem wave") +spell:words("###369") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/salamander_trainer_summon.lua b/data/scripts/spells/monster/salamander_trainer_summon.lua new file mode 100644 index 000000000..7a845c07f --- /dev/null +++ b/data/scripts/spells/monster/salamander_trainer_summon.lua @@ -0,0 +1,28 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_RED) + +local area = createCombatArea(AREA_CIRCLE1X1) +combat:setArea(area) + +local maxsummons = 1 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 1 then + mid = Game.createMonster("Troll-trained Salamander", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + return combat:execute(creature, var) +end + +spell:name("salamander trainer summon") +spell:words("##374") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/sea_serpent_drown.lua b/data/scripts/spells/monster/sea_serpent_drown.lua new file mode 100644 index 000000000..ce8581706 --- /dev/null +++ b/data/scripts/spells/monster/sea_serpent_drown.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_WATERSPLASH) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL) + +local condition = Condition(CONDITION_DROWN) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(6, 5000, -20) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("sea serpent drown") +spell:words("###17") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/seacrest_serpent_wave.lua b/data/scripts/spells/monster/seacrest_serpent_wave.lua new file mode 100644 index 000000000..ccb7214ea --- /dev/null +++ b/data/scripts/spells/monster/seacrest_serpent_wave.lua @@ -0,0 +1,29 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_WATERSPLASH) + + arr = { + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("seacrest serpent wave") +spell:words("###373") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/serpent_spawn_paralyze.lua b/data/scripts/spells/monster/serpent_spawn_paralyze.lua new file mode 100644 index 000000000..240240dfd --- /dev/null +++ b/data/scripts/spells/monster/serpent_spawn_paralyze.lua @@ -0,0 +1,27 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.6, 0, -0.8, 0) +combat:addCondition(condition) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("serpent spawn paralyze") +spell:words("###153") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/shaburak_wave.lua b/data/scripts/spells/monster/shaburak_wave.lua new file mode 100644 index 000000000..2c90d6514 --- /dev/null +++ b/data/scripts/spells/monster/shaburak_wave.lua @@ -0,0 +1,28 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("shaburak wave") +spell:words("###244") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/shadow_hound_curse.lua b/data/scripts/spells/monster/shadow_hound_curse.lua new file mode 100644 index 000000000..79757dff9 --- /dev/null +++ b/data/scripts/spells/monster/shadow_hound_curse.lua @@ -0,0 +1,41 @@ +local combat = {} + +for i = 1, 1 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for j = 1, 12 do + damage = damage * 1.25 + condition:addDamage(1, 4000, -damage) + end + + local area = createCombatArea({ + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + }) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(1, 1)]:execute(creature, var) +end + +spell:name("shadow hound curse") +spell:words("###245") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/shargon_heal.lua b/data/scripts/spells/monster/shargon_heal.lua new file mode 100644 index 000000000..24f39575b --- /dev/null +++ b/data/scripts/spells/monster/shargon_heal.lua @@ -0,0 +1,27 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local msg = "Shargon absorbs necromantic energy to regenerate!" + local spectators, spectator = Game.getSpectators(creature:getPosition(), false, false, 10, 10, 10, 10) + for i = 1, #spectators do + spectator = spectators[i] + if spectator:isMonster() and spectator:getName() == "Necromantic Energy" then + spectator:getPosition():sendMagicEffect(CONST_ME_POFF) + spectator:remove() + creature:say(msg, TALKTYPE_ORANGE_1) + creature:addHealth(65000) + creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + end + end + return combat:execute(creature, var) +end + +spell:name("shargon heal") +spell:words("###379") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/shlorg_paralyze.lua b/data/scripts/spells/monster/shlorg_paralyze.lua new file mode 100644 index 000000000..58a206de9 --- /dev/null +++ b/data/scripts/spells/monster/shlorg_paralyze.lua @@ -0,0 +1,25 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.40, 0, -0.55, 0) + + local area = createCombatArea(AREA_SQUARE1X1) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("shlorg paralyze") +spell:words("###326") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/shock_head_paralyze.lua b/data/scripts/spells/monster/shock_head_paralyze.lua new file mode 100644 index 000000000..8494e31ad --- /dev/null +++ b/data/scripts/spells/monster/shock_head_paralyze.lua @@ -0,0 +1,35 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.5, 0, -0.75, 0) +combat:addCondition(condition) + + local area = createCombatArea({ + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + }) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("shock head paralyze") +spell:words("###359") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/shock_head_skill_reducer_1.lua b/data/scripts/spells/monster/shock_head_skill_reducer_1.lua new file mode 100644 index 000000000..7351f6d0f --- /dev/null +++ b/data/scripts/spells/monster/shock_head_skill_reducer_1.lua @@ -0,0 +1,43 @@ +local combat = {} + +for i = 15, 30 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) + +arr = { +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, +} + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 6000) + condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + + local area = createCombatArea(arr) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(15, 30)]:execute(creature, var) +end + +spell:name("shock head skill reducer 1") +spell:words("###43") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/shock_head_skill_reducer_2.lua b/data/scripts/spells/monster/shock_head_skill_reducer_2.lua new file mode 100644 index 000000000..2a1e6eb73 --- /dev/null +++ b/data/scripts/spells/monster/shock_head_skill_reducer_2.lua @@ -0,0 +1,39 @@ +local combat = {} + +for i = 20, 50 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 6000) + condition:setParameter(CONDITION_PARAM_STAT_MAGICPOINTSPERCENT, i) + +arr = { +{0, 0, 0, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 0, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 0}, +{1, 1, 1, 1, 1, 1, 1, 1, 1}, +{1, 1, 1, 1, 3, 1, 1, 1, 1}, +{1, 1, 1, 1, 1, 1, 1, 1 ,1}, +{0, 1, 1, 1, 1, 1, 1, 1 ,0}, +{0, 0, 1, 1, 1, 1, 1, 0 ,0}, +{0, 0, 0, 1, 1, 1, 0, 0, 0} +} + + local area = createCombatArea(arr) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(20, 50)]:execute(creature, var) +end + +spell:name("shock head skill reducer 2") +spell:words("###44") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/shulgrax_summon.lua b/data/scripts/spells/monster/shulgrax_summon.lua new file mode 100644 index 000000000..c3899be7c --- /dev/null +++ b/data/scripts/spells/monster/shulgrax_summon.lua @@ -0,0 +1,28 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 8 then + for i = 1, 4 do + local mid = Game.createMonster("Sin Devourer", Position(math.random(33478, 33491), math.random(32781, 32793), 13), true, true) + if not mid then + return + end + mid:setMaster(creature) + end + for i = 1, 4 do + local mid2 = Game.createMonster("Damned Soul", Position(math.random(33478, 33491), math.random(32781, 32793), 13), true, true) + if not mid2 then + return + end + end + end + return +end + +spell:name("shulgrax summon") +spell:words("###407") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/silencer_skill_reducer.lua b/data/scripts/spells/monster/silencer_skill_reducer.lua new file mode 100644 index 000000000..6a8bf8c0b --- /dev/null +++ b/data/scripts/spells/monster/silencer_skill_reducer.lua @@ -0,0 +1,29 @@ +local combat = {} + +for i = 40, 70 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 7000) + condition:setParameter(CONDITION_PARAM_STAT_MAGICPOINTSPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(40, 70)]:execute(creature, var) +end + +spell:name("silencer skill reducer") +spell:words("###29") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/single_cloud_chain.lua b/data/scripts/spells/monster/single_cloud_chain.lua new file mode 100644 index 000000000..52879490b --- /dev/null +++ b/data/scripts/spells/monster/single_cloud_chain.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STORM) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local target = Creature(var.number) + if not target then return false end + local creaturePos = creature:getPosition() + local path = creaturePos:getPathTo(target:getPosition(), 0, 0, true, true, 8) + if not path or #path == 0 then return false end + for i=1, #path do + creaturePos:getNextPosition(path[i], 1) + creaturePos:sendMagicEffect(CONST_ME_STORM) + end + return combat:execute(creature, var) +end + +spell:name("singlecloudchain") +spell:words("###487") +spell:isAggressive(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/single_death_chain.lua b/data/scripts/spells/monster/single_death_chain.lua new file mode 100644 index 000000000..aeeb6b2c4 --- /dev/null +++ b/data/scripts/spells/monster/single_death_chain.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_WHITE_ENERGY_SPARK) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local target = Creature(var.number) + if not target then return false end + local creaturePos = creature:getPosition() + local path = creaturePos:getPathTo(target:getPosition(), 0, 0, true, true, 8) + if not path or #path == 0 then return false end + for i=1, #path do + creaturePos:getNextPosition(path[i], 1) + creaturePos:sendMagicEffect(CONST_ME_WHITE_ENERGY_SPARK) + end + return combat:execute(creature, var) +end + +spell:name("singledeathchain") +spell:words("###485") +spell:isAggressive(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/single_ice_chain.lua b/data/scripts/spells/monster/single_ice_chain.lua new file mode 100644 index 000000000..6e3327844 --- /dev/null +++ b/data/scripts/spells/monster/single_ice_chain.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLUE_ENERGY_SPARK) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local target = Creature(var.number) + if not target then return false end + local creaturePos = creature:getPosition() + local path = creaturePos:getPathTo(target:getPosition(), 0, 0, true, true, 8) + if not path or #path == 0 then return false end + for i=1, #path do + creaturePos:getNextPosition(path[i], 1) + creaturePos:sendMagicEffect(CONST_ME_BLUE_ENERGY_SPARK) + end + return combat:execute(creature, var) +end + +spell:name("singleicechain") +spell:words("###486") +spell:isAggressive(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/sir_valorcrest_summon.lua b/data/scripts/spells/monster/sir_valorcrest_summon.lua new file mode 100644 index 000000000..be3e3f795 --- /dev/null +++ b/data/scripts/spells/monster/sir_valorcrest_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 4 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 4 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Vampire", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("sir valorcrest summon") +spell:words("###208") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/slime_puddle_paralyze.lua b/data/scripts/spells/monster/slime_puddle_paralyze.lua new file mode 100644 index 000000000..761dab1b3 --- /dev/null +++ b/data/scripts/spells/monster/slime_puddle_paralyze.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.85, 0, -0.90, 0) +combat:addCondition(condition) + + +local area = createCombatArea(AREA_SQUARE1X1) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("slime puddle paralyze") +spell:words("###327") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/soulcatcher_summon.lua b/data/scripts/spells/monster/soulcatcher_summon.lua new file mode 100644 index 000000000..74d5dbc10 --- /dev/null +++ b/data/scripts/spells/monster/soulcatcher_summon.lua @@ -0,0 +1,20 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + if creature:getCondition(CONDITION_POISON) or creature:getCondition(CONDITION_BLEEDING) then + local pos = creature:getPosition() + pos.y = pos.y - 1 + Game.createMonster('corrupted soul', pos, true, true) + creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + else + return + end + return true +end + +spell:name("soulcatcher summon") +spell:words("###431") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/souleater_drown.lua b/data/scripts/spells/monster/souleater_drown.lua new file mode 100644 index 000000000..dba4f142e --- /dev/null +++ b/data/scripts/spells/monster/souleater_drown.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + +local condition = Condition(CONDITION_DROWN) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(10, 5000, -20) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("souleater drown") +spell:words("###23") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/souleater_wave.lua b/data/scripts/spells/monster/souleater_wave.lua new file mode 100644 index 000000000..7730f7deb --- /dev/null +++ b/data/scripts/spells/monster/souleater_wave.lua @@ -0,0 +1,28 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_LIFEDRAINDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_RED) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("souleater wave") +spell:words("###306") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/source_of_corruption_wave.lua b/data/scripts/spells/monster/source_of_corruption_wave.lua new file mode 100644 index 000000000..2754b352c --- /dev/null +++ b/data/scripts/spells/monster/source_of_corruption_wave.lua @@ -0,0 +1,45 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) + +combat:setArea(createCombatArea({ +{0, 0, 0, 0, 0}, +{0, 1, 3, 1, 0}, +{0, 0, 0, 0, 0} +})) + +function spellCallback(param) + local tile = Tile(Position(param.pos)) + if tile then + if tile:getTopCreature() and tile:getTopCreature():isPlayer() then + tile:getTopCreature():addHealth( - math.random(0, 600)) + elseif tile:getTopCreature() and tile:getTopCreature():isMonster() then + if tile:getTopCreature():getName():lower() == "stolen soul" then + tile:getTopCreature():addHealth( - math.random(700, 1500)) + end + end + end +end + +function onTargetTile(cid, pos) + local param = {} + param.cid = cid + param.pos = pos + param.count = 0 + spellCallback(param) +end + +setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("Source of Corruption Wave") +spell:words("#####461") +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/spawn_of_the_welter_heal.lua b/data/scripts/spells/monster/spawn_of_the_welter_heal.lua new file mode 100644 index 000000000..80b5be88b --- /dev/null +++ b/data/scripts/spells/monster/spawn_of_the_welter_heal.lua @@ -0,0 +1,50 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) + +arr = { + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + } + +local area = createCombatArea(arr) +combat:setArea(area) + +function onTargetCreature(creature, target) + local min = 200 + local max = 700 + + local master = target:getMaster() + if target:isPlayer() and not master + or master and master:isPlayer() then + return true + end + + doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) + return true +end + +combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("spawn of the welter heal") +spell:words("###395") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/spawn_of_the_welter_heal2.lua b/data/scripts/spells/monster/spawn_of_the_welter_heal2.lua new file mode 100644 index 000000000..54e1b86a6 --- /dev/null +++ b/data/scripts/spells/monster/spawn_of_the_welter_heal2.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) + +local area = createCombatArea(AREA_CIRCLE3X3) +combat:setArea(area) + +function onTargetCreature(creature, target) + local min = 200 + local max = 300 + + local master = target:getMaster() + if target:isPlayer() and not master + or master and master:isPlayer() then + return true + end + + doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) + return true +end + +combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("spawn of the welter heal2") +spell:words("###396") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/spectre_drown.lua b/data/scripts/spells/monster/spectre_drown.lua new file mode 100644 index 000000000..716e76922 --- /dev/null +++ b/data/scripts/spells/monster/spectre_drown.lua @@ -0,0 +1,24 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) + +local condition = Condition(CONDITION_DROWN) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(20, 5000, -20) + +local area = createCombatArea(AREA_CIRCLE3X3) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("spectre drown") +spell:words("###8") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/spells/scripts/monster/spider_queen_wrap.lua b/data/scripts/spells/monster/spider_queen_wrap.lua similarity index 81% rename from data/spells/scripts/monster/spider_queen_wrap.lua rename to data/scripts/spells/monster/spider_queen_wrap.lua index 8dbbe3ba0..6d6bc3b8a 100644 --- a/data/spells/scripts/monster/spider_queen_wrap.lua +++ b/data/scripts/spells/monster/spider_queen_wrap.lua @@ -18,7 +18,9 @@ local function moveToSpiderNest(uid) end end -function onCastSpell(creature, var) +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) local target = creature:getTarget() if target and target:isPlayer() then if combat:execute(creature, var) then @@ -31,3 +33,11 @@ function onCastSpell(creature, var) end return false end + +spell:name("spider queen wrap") +spell:words("###484") +spell:isAggressive(true) +spell:needTarget(true) +spell:needLearn(true) +spell:isSelfTarget("1") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/spirit_of_earth_paralyze.lua b/data/scripts/spells/monster/spirit_of_earth_paralyze.lua new file mode 100644 index 000000000..b589c754e --- /dev/null +++ b/data/scripts/spells/monster/spirit_of_earth_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SLEEP) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.6, 0, -0.65, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("spirit of earth paralyze") +spell:words("###53") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/spitter_paralyze.lua b/data/scripts/spells/monster/spitter_paralyze.lua new file mode 100644 index 000000000..96e8073c0 --- /dev/null +++ b/data/scripts/spells/monster/spitter_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.55, 0, -0.7, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("spitter paralyze") +spell:words("###206") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/stampor_skill_reducer.lua b/data/scripts/spells/monster/stampor_skill_reducer.lua new file mode 100644 index 000000000..78f7b71ea --- /dev/null +++ b/data/scripts/spells/monster/stampor_skill_reducer.lua @@ -0,0 +1,31 @@ +local combat = {} + +for i = 60, 85 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 25000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + + local area = createCombatArea(AREA_BEAM1) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(60, 85)]:execute(creature, var) +end + +spell:name("stampor skill reducer") +spell:words("###32") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/stone_devourer_paralyze.lua b/data/scripts/spells/monster/stone_devourer_paralyze.lua new file mode 100644 index 000000000..6d3c30859 --- /dev/null +++ b/data/scripts/spells/monster/stone_devourer_paralyze.lua @@ -0,0 +1,38 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER) + + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.50, 0, -0.60, 0) +combat:addCondition(condition) + +arr = { +{0, 0, 0, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 0, 0}, +{0, 1, 1, 1, 1, 1, 1, 1, 0}, +{1, 1, 1, 1, 1, 1, 1, 1, 1}, +{1, 1, 1, 1, 3, 1, 1, 1, 1}, +{1, 1, 1, 1, 1, 1, 1, 1 ,1}, +{0, 1, 1, 1, 1, 1, 1, 1 ,0}, +{0, 0, 1, 1, 1, 1, 1, 0 ,0}, +{0, 0, 0, 1, 1, 1, 0, 0, 0} +} + +local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("stone devourer paralyze") +spell:words("###72") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/summonchallenge.lua b/data/scripts/spells/monster/summonchallenge.lua new file mode 100644 index 000000000..bd2851839 --- /dev/null +++ b/data/scripts/spells/monster/summonchallenge.lua @@ -0,0 +1,21 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setArea(createCombatArea(AREA_CIRCLE2X2)) + +function onTargetCreature(creature, target) + return doChallengeCreature(creature, target) +end + +combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("summon challenge") +spell:words("###471") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/svoren_the_mad_paralyze.lua b/data/scripts/spells/monster/svoren_the_mad_paralyze.lua new file mode 100644 index 000000000..288cb45f7 --- /dev/null +++ b/data/scripts/spells/monster/svoren_the_mad_paralyze.lua @@ -0,0 +1,24 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_WHITE) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.75, 0, -0.85, 0) + combat:addCondition(condition) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("svoren the mad paralyze") +spell:words("###59") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/swampling_paralyze.lua b/data/scripts/spells/monster/swampling_paralyze.lua new file mode 100644 index 000000000..92bf83e45 --- /dev/null +++ b/data/scripts/spells/monster/swampling_paralyze.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, 2) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 4000) +condition:setFormula(-0.1, 0, -0.1, 0) + +arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("swampling paralyze") +spell:words("###76") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/tanjis_skill_reducer.lua b/data/scripts/spells/monster/tanjis_skill_reducer.lua new file mode 100644 index 000000000..3137189e9 --- /dev/null +++ b/data/scripts/spells/monster/tanjis_skill_reducer.lua @@ -0,0 +1,26 @@ +local combat = {} + +for i = 35, 60 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 15000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(35, 60)]:execute(creature, var) +end + +spell:name("tanjis skill reducer") +spell:words("###212") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/tarbaz_tp.lua b/data/scripts/spells/monster/tarbaz_tp.lua new file mode 100644 index 000000000..c99a1caff --- /dev/null +++ b/data/scripts/spells/monster/tarbaz_tp.lua @@ -0,0 +1,31 @@ +local function teleport(fromPosition, toPosition) + for x = fromPosition.x, toPosition.x do + for y = fromPosition.y, toPosition.y do + for z = fromPosition.z, toPosition.z do + local creature = Tile(Position(x, y, z)):getTopCreature() + if creature then + if creature:isPlayer() then + creature:teleportTo(Position(33454, 32872, 12)) + end + end + end + end + end +end + + + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + teleport(Position(33449, 32834, 11), Position(33470, 32854, 11)) + return true +end + +spell:name("tarbaz tp") +spell:words("###408") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/tenebris_summon.lua b/data/scripts/spells/monster/tenebris_summon.lua new file mode 100644 index 000000000..24c6cc30f --- /dev/null +++ b/data/scripts/spells/monster/tenebris_summon.lua @@ -0,0 +1,21 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local mid = Game.createMonster("shadow fiend", Position(math.random(32906, 32918), math.random(31594, 31604), 14)) + if not mid then + return + end + mid:say('The shadow fiend revives!', TALKTYPE_MONSTER_SAY) + return combat:execute(creature, var) +end + +spell:name("tenebris summon") +spell:words("###429") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/tenebris_ultimate.lua b/data/scripts/spells/monster/tenebris_ultimate.lua new file mode 100644 index 000000000..39e0f58f7 --- /dev/null +++ b/data/scripts/spells/monster/tenebris_ultimate.lua @@ -0,0 +1,103 @@ +local vocation = { + VOCATION.BASE_ID.SORCERER, + VOCATION.BASE_ID.DRUID, + VOCATION.BASE_ID.PALADIN, + VOCATION.BASE_ID.KNIGHT +} + +area = { + {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0} +} + +local createArea = createCombatArea(area) + +local combat = Combat() +combat:setArea(createArea) + +function onTargetTile(creature, pos) + local creatureTable = {} + local n, i = Tile({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 + if n ~= 0 then + local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid + while v ~= 0 do + if isCreature(v) == true then + table.insert(creatureTable, v) + if n == #creatureTable then + break + end + end + i = i + 1 + v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid + end + end + if #creatureTable ~= nil and #creatureTable > 0 then + for r = 1, #creatureTable do + if creatureTable[r] ~= creature then + local min = 2200 + local max = 2500 + local player = Player(creatureTable[r]) + + if isPlayer(creatureTable[r]) == true and table.contains(vocation, player:getVocation():getBaseId()) then + doTargetCombatHealth(creature, creatureTable[r], COMBAT_DEATHDAMAGE, -min, -max, CONST_ME_NONE) + elseif isMonster(creatureTable[r]) == true then + doTargetCombatHealth(creature, creatureTable[r], COMBAT_DEATHDAMAGE, -min, -max, CONST_ME_NONE) + end + end + end + end + pos:sendMagicEffect(CONST_ME_MORTAREA) + return true +end + +combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") + +local function delayedCastSpell(cid, var) + local creature = Creature(cid) + if not creature then + return + end + if creature:getHealth() >= 1 then + creature:setMoveLocked(false) + return combat:execute(creature, positionToVariant(creature:getPosition())) + end + return +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local specs, spec = Game.getSpectators(Position(32912, 31599, 14), false, false, 12, 12, 12, 12) + for i = 1, #specs do + spec = specs[i] + if spec:isPlayer() then + spec:teleportTo(Position(32912, 31599, 14)) + elseif spec:getName():lower() == 'lady tenebris' then + spec:teleportTo(Position(32912, 31599, 14)) + spec:setMoveLocked(true) + end + end + creature:say("LADY TENEBRIS BEGINS TO CHANNEL A POWERFULL SPELL! TAKE COVER!", TALKTYPE_MONSTER_YELL) + addEvent(delayedCastSpell, 4000, creature:getId(), var) + return true +end + +spell:name("tenebris ultimate") +spell:words("###430") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/terofar_curse.lua b/data/scripts/spells/monster/terofar_curse.lua new file mode 100644 index 000000000..82ca659f3 --- /dev/null +++ b/data/scripts/spells/monster/terofar_curse.lua @@ -0,0 +1,45 @@ +local combat = {} +local condition2 = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) +condition2:setParameter(CONDITION_PARAM_SUBID, 88888) +condition2:setParameter(CONDITION_PARAM_TICKS, 15 * 60 * 1000) +condition2:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) +condition2:setParameter(CONDITION_PARAM_HEALTHTICKS, 15 * 60 * 1000) + +for i = 0.935, 0.935 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for j = 1, 38 do + damage = damage * 1.2 + condition:addDamage(1, 4000, -damage) + end + + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + if not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then + creature:addCondition(condition2) + creature:say("Terofar cast a greater death curse on you!", TALKTYPE_ORANGE_1) + else + return false + end +return combat[math.random(0.935, 0.935)]:execute(creature, var) +end + +spell:name("terofar curse") +spell:words("###213") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/terofar_heal.lua b/data/scripts/spells/monster/terofar_heal.lua new file mode 100644 index 000000000..f52bb3d90 --- /dev/null +++ b/data/scripts/spells/monster/terofar_heal.lua @@ -0,0 +1,50 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) + +arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + +local area = createCombatArea(arr) +combat:setArea(area) + +function onTargetCreature(creature, target) + local min = 300 + local max = 500 + + local master = target:getMaster() + if target:isPlayer() and not master + or master and master:isPlayer() then + return true + end + + doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) + return true +end + +combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("terofar heal") +spell:words("###391") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/terofar_skill_reducer_1.lua b/data/scripts/spells/monster/terofar_skill_reducer_1.lua new file mode 100644 index 000000000..af70b0ac8 --- /dev/null +++ b/data/scripts/spells/monster/terofar_skill_reducer_1.lua @@ -0,0 +1,42 @@ +local combat = {} + +for i = 1, 10 do +combat[i] = Combat() +combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + +local condition = Condition(CONDITION_ATTRIBUTES) +condition:setParameter(CONDITION_PARAM_TICKS, 15000) +condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) +condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) +condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) +condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + + local area = createCombatArea({ + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + }) + +combat[i]:setArea(area) +combat[i]:addCondition(condition) + +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(1, 10)]:execute(creature, var) +end + +spell:name("terofar skill reducer 1") +spell:words("###214") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/terofar_skill_reducer_2.lua b/data/scripts/spells/monster/terofar_skill_reducer_2.lua new file mode 100644 index 000000000..1db51e51c --- /dev/null +++ b/data/scripts/spells/monster/terofar_skill_reducer_2.lua @@ -0,0 +1,39 @@ +local combat = {} + +for i = 1, 10 do +combat[i] = Combat() +combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) + +local condition = Condition(CONDITION_ATTRIBUTES) +condition:setParameter(CONDITION_PARAM_TICKS, 15000) +condition:setParameter(CONDITION_PARAM_STAT_MAGICPOINTSPERCENT, i) + + local area = createCombatArea({ + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + }) + +combat[i]:setArea(area) +combat[i]:addCondition(condition) + +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(1, 10)]:execute(creature, var) +end + +spell:name("terofar skill reducer 2") +spell:words("###215") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/thalas_summon.lua b/data/scripts/spells/monster/thalas_summon.lua new file mode 100644 index 000000000..8b2143be9 --- /dev/null +++ b/data/scripts/spells/monster/thalas_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 8 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 8 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Slime Summon", { x=creature:getPosition().x+math.random(-2, 2), y=creature:getPosition().y+math.random(-2, 2), z=creature:getPosition().z }) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("thalas summon") +spell:words("###287") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/the_abomination_paralyze.lua b/data/scripts/spells/monster/the_abomination_paralyze.lua new file mode 100644 index 000000000..c4138824d --- /dev/null +++ b/data/scripts/spells/monster/the_abomination_paralyze.lua @@ -0,0 +1,40 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.75, 0, -0.95, 0) + combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("the abomination paralyze") +spell:words("###216") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/the_abomination_summon.lua b/data/scripts/spells/monster/the_abomination_summon.lua new file mode 100644 index 000000000..ffef2e214 --- /dev/null +++ b/data/scripts/spells/monster/the_abomination_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 10 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 10 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Demon Skeleton", { x=creature:getPosition().x+math.random(-2, 2), y=creature:getPosition().y+math.random(-2, 2), z=creature:getPosition().z }) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("the abomination summon") +spell:words("###217") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/the_blightfather_summon.lua b/data/scripts/spells/monster/the_blightfather_summon.lua new file mode 100644 index 000000000..b8c4ecf47 --- /dev/null +++ b/data/scripts/spells/monster/the_blightfather_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_PURPLE) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Lancer Beetle", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("the blightfather summon") +spell:words("###219") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/the_dark_dancer_summon.lua b/data/scripts/spells/monster/the_dark_dancer_summon.lua new file mode 100644 index 000000000..f374925f8 --- /dev/null +++ b/data/scripts/spells/monster/the_dark_dancer_summon.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_PURPLE) + +local maxsummons = 3 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 3 then + mid = Game.createMonster("Ghoul", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + return combat:execute(creature, var) +end + +spell:name("the dark dancer summon") +spell:words("#156") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/the_dreadorian_curse.lua b/data/scripts/spells/monster/the_dreadorian_curse.lua new file mode 100644 index 000000000..102ab3d3d --- /dev/null +++ b/data/scripts/spells/monster/the_dreadorian_curse.lua @@ -0,0 +1,34 @@ +local combat = {} + +for i = 2, 2 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for j = 1, 19 do + damage = damage * 1.2 + condition:addDamage(1, 4000, -damage) + end + + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(2, 2)]:execute(creature, var) +end + +spell:name("the dreadorian curse") +spell:words("###330") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/the_dreadorian_drown.lua b/data/scripts/spells/monster/the_dreadorian_drown.lua new file mode 100644 index 000000000..3c90277eb --- /dev/null +++ b/data/scripts/spells/monster/the_dreadorian_drown.lua @@ -0,0 +1,23 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) + +local condition = Condition(CONDITION_DROWN) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(20, 5000, -20) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("the dreadorian drown") +spell:words("###328") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/the_dreadorian_soulfire.lua b/data/scripts/spells/monster/the_dreadorian_soulfire.lua new file mode 100644 index 000000000..7fef8f9c2 --- /dev/null +++ b/data/scripts/spells/monster/the_dreadorian_soulfire.lua @@ -0,0 +1,23 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(20, 9000, -10) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("the dreadorian soulfire") +spell:words("###329") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/the_imperor_summon.lua b/data/scripts/spells/monster/the_imperor_summon.lua new file mode 100644 index 000000000..18a2fd173 --- /dev/null +++ b/data/scripts/spells/monster/the_imperor_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Diabolic Imp", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("the imperor summon") +spell:words("###220") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/the_pale_count_bomb.lua b/data/scripts/spells/monster/the_pale_count_bomb.lua new file mode 100644 index 000000000..e666fa400 --- /dev/null +++ b/data/scripts/spells/monster/the_pale_count_bomb.lua @@ -0,0 +1,38 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + creature:say("Feel the hungry kiss of death!", TALKTYPE_ORANGE_1) + return combat:execute(creature, var) +end + +spell:name("the pale count bomb") +spell:words("###332") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/the_pale_count_manadrain.lua b/data/scripts/spells/monster/the_pale_count_manadrain.lua new file mode 100644 index 000000000..6c19495e6 --- /dev/null +++ b/data/scripts/spells/monster/the_pale_count_manadrain.lua @@ -0,0 +1,36 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_MANADRAIN) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_RED) + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + creature:say("Feel the hungry kiss of death!", TALKTYPE_ORANGE_1) + return combat:execute(creature, var) +end + +spell:name("the pale count manadrain") +spell:words("###333") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/the_pale_count_summon.lua b/data/scripts/spells/monster/the_pale_count_summon.lua new file mode 100644 index 000000000..798fb9a45 --- /dev/null +++ b/data/scripts/spells/monster/the_pale_count_summon.lua @@ -0,0 +1,31 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BATS) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 4 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + creature:say("Out of the dark I call you, fiend in the night!", TALKTYPE_ORANGE_1) + local summoncount = creature:getSummons() + if #summoncount < 4 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Nightfiend", { x=creature:getPosition().x+math.random(-2, 2), y=creature:getPosition().y+math.random(-2, 2), z=creature:getPosition().z }) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("the pale count summon") +spell:words("###334") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/the_pale_count_wave.lua b/data/scripts/spells/monster/the_pale_count_wave.lua new file mode 100644 index 000000000..3cbcac6fb --- /dev/null +++ b/data/scripts/spells/monster/the_pale_count_wave.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("the pale count wave") +spell:words("###335") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/the_ravager_heal.lua b/data/scripts/spells/monster/the_ravager_heal.lua new file mode 100644 index 000000000..c8454fd93 --- /dev/null +++ b/data/scripts/spells/monster/the_ravager_heal.lua @@ -0,0 +1,23 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local spectators, spectator = Game.getSpectators(creature:getPosition(), false, false, 25, 25, 25, 25) + for i = 1, #spectators do + spectator = spectators[i] + if spectator:isMonster() and spectator:getName() == "Greater Canopic Jar" then + creature:addHealth(10000) + creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + end + end + return combat:execute(creature, var) +end + +spell:name("the ravager heal") +spell:words("###398") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/the_voice_of_ruin_paralyze.lua b/data/scripts/spells/monster/the_voice_of_ruin_paralyze.lua new file mode 100644 index 000000000..2bf7a5cf3 --- /dev/null +++ b/data/scripts/spells/monster/the_voice_of_ruin_paralyze.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.6, 0, -0.75, 0) +combat:addCondition(condition) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("the voice of ruin paralyze") +spell:words("###221") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/the_welter_heal.lua b/data/scripts/spells/monster/the_welter_heal.lua new file mode 100644 index 000000000..3f3e8e4fe --- /dev/null +++ b/data/scripts/spells/monster/the_welter_heal.lua @@ -0,0 +1,33 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local spectators, spectator = Game.getSpectators(creature:getPosition(), false, false, 10, 10, 10, 10) + for i = 1, #spectators do + spectator = spectators[i] + if spectator:isMonster() and spectator:getName() == "Egg" then + spectator:getPosition():sendMagicEffect(CONST_ME_HITBYPOISON) + spectator:remove() + creature:say("", TALKTYPE_ORANGE_1) + creature:addHealth(25000) + creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + elseif spectator:isMonster() and spectator:getName() == "Spawn Of The Welter" then + spectator:getPosition():sendMagicEffect(CONST_ME_DRAWBLOOD) + spectator:remove() + creature:say("", TALKTYPE_ORANGE_1) + creature:addHealth(25000) + creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + end + end + return combat:execute(creature, var) +end + +spell:name("the welter heal") +spell:words("###336") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/the_welter_heal2.lua b/data/scripts/spells/monster/the_welter_heal2.lua new file mode 100644 index 000000000..4baa4f863 --- /dev/null +++ b/data/scripts/spells/monster/the_welter_heal2.lua @@ -0,0 +1,50 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) + +arr = { + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + } + +local area = createCombatArea(arr) +combat:setArea(area) + +function onTargetCreature(creature, target) + local min = 100 + local max = 300 + + local master = target:getMaster() + if target:isPlayer() and not master + or master and master:isPlayer() then + return true + end + + doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) + return true +end + +combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("the welter heal2") +spell:words("###394") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/the_welter_paralyze.lua b/data/scripts/spells/monster/the_welter_paralyze.lua new file mode 100644 index 000000000..23143e66d --- /dev/null +++ b/data/scripts/spells/monster/the_welter_paralyze.lua @@ -0,0 +1,40 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.7, 0, -0.9, 0) + combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("the welter paralyze") +spell:words("###339") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/the_welter_summon.lua b/data/scripts/spells/monster/the_welter_summon.lua new file mode 100644 index 000000000..e0511664c --- /dev/null +++ b/data/scripts/spells/monster/the_welter_summon.lua @@ -0,0 +1,46 @@ +local function delayedCastSpell(cid, var) + local creature = Creature(cid) + if not creature then + return + end + + if creature:getName(creature:getMaster()) == "The Welter" then + local summon = creature:getSummons() + for i = 1, #summon do + if summon[i]:getName() == "Egg" then + summon[i]:getPosition():sendMagicEffect(CONST_ME_POISONAREA) + local newmon = Game.createMonster("Spawn Of The Welter", summon[i]:getPosition(), false, true) + summon[i]:remove() + if not newmon then + return + end + newmon:setMaster(creature) + end + end + end +end + +local maxsummons = 1 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) +local summoncount = creature:getSummons() + if #summoncount < 1 then + for i = 1, maxsummons - #summoncount do + local mon = Game.createMonster("Egg", creature:getPosition()) + if not mon then + return + end + mon:setMaster(creature) + end + end + addEvent(delayedCastSpell, 10000, creature:getId(), var) + return true +end + +spell:name("the welter summon") +spell:words("###337") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/the_welter_summon2.lua b/data/scripts/spells/monster/the_welter_summon2.lua new file mode 100644 index 000000000..6f3362aae --- /dev/null +++ b/data/scripts/spells/monster/the_welter_summon2.lua @@ -0,0 +1,26 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) +local t, spectator = Game.getSpectators(creature:getPosition(), false, false, 50, 50, 50, 50) + local check = 0 + if #t ~= nil then + for i = 1, #t do + spectator = t[i] + if spectator:getName() == "Egg" or spectator:getName() == "Spawn Of The Welter" then + check = check + 1 + end + end + end + if (check < 10) then + creature:getPosition():sendMagicEffect(CONST_ME_GREEN_RINGS) + Game.createMonster("Egg", creature:getPosition(), false, true) + else + end +return true +end + +spell:name("the welter summon2") +spell:words("###338") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/thorn_summon.lua b/data/scripts/spells/monster/thorn_summon.lua new file mode 100644 index 000000000..baaa5e157 --- /dev/null +++ b/data/scripts/spells/monster/thorn_summon.lua @@ -0,0 +1,21 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local creaturePos = creature:getPosition() + local mid = Game.createMonster('thorn minion', Position(creaturePos.x + math.random(-3, 3), creaturePos.y + math.random(-3, 3), creaturePos.z), true, false) + if not mid then + return + end + return combat:execute(creature, var) +end + +spell:name("thorn summon") +spell:words("###442") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/thul_paralyze.lua b/data/scripts/spells/monster/thul_paralyze.lua new file mode 100644 index 000000000..c3d59786f --- /dev/null +++ b/data/scripts/spells/monster/thul_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SNOWBALL) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 10000) + condition:setFormula(-0.8, 0, -0.9, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("thul paralyze") +spell:words("###223") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/thul_summon.lua b/data/scripts/spells/monster/thul_summon.lua new file mode 100644 index 000000000..6a5718da2 --- /dev/null +++ b/data/scripts/spells/monster/thul_summon.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + mid = Game.createMonster("Massive Water Elemental", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end +return combat:execute(creature, var) +end + +spell:name("thul summon") +spell:words("###222") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/time_guardian.lua b/data/scripts/spells/monster/time_guardian.lua new file mode 100644 index 000000000..b95327860 --- /dev/null +++ b/data/scripts/spells/monster/time_guardian.lua @@ -0,0 +1,59 @@ +local monsters = { + [1] = {pos = Position(32980, 31664, 13)}, + [2] = {pos = Position(32975, 31664, 13)} +} + +local function functionBack(position, oldpos) + local guardian = Tile(position):getTopCreature() + local bool, diference, health = false, 0, 0 + local spectators, spectator = Game.getSpectators(Position(32977, 31662, 14), false, false, 15, 15, 15, 15) + for v = 1, #spectators do + spectator = spectators[v] + if spectator:getName():lower() == 'the freezing time guardian' or spectator:getName():lower() == 'the blazing time guardian' then + oldpos = spectator:getPosition() + bool = true + end + end + if not bool then + guardian:remove() + return true + end + local specs, spec = Game.getSpectators(Position(32977, 31662, 14), false, false, 15, 15, 15, 15) + for i = 1, #specs do + spec = specs[i] + if spec:isMonster() and spec:getName():lower() == 'the freezing time guardian' or spec:getName():lower() == 'the blazing time guardian' then + spec:teleportTo(position) + health = spec:getHealth() + diference = guardian:getHealth() - health + end + end + guardian:addHealth( - diference) + guardian:teleportTo(oldpos) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local index = math.random(1, 2) + local monsterPos = creature:getPosition() + if monsterPos.z ~= 14 then + return true + end + local position = monsters[index].pos + local form = Tile(position):getTopCreature() + creature:teleportTo(position) + local diference, health = 0, 0 + health = creature:getHealth() + diference = form:getHealth() - health + form:addHealth( - diference) + form:teleportTo(monsterPos) + addEvent(functionBack, 30 * 1000, position, monsterPos) + return true +end + +spell:name("time guardian") +spell:words("###440") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/time_guardian_lost_time.lua b/data/scripts/spells/monster/time_guardian_lost_time.lua new file mode 100644 index 000000000..92fd6af69 --- /dev/null +++ b/data/scripts/spells/monster/time_guardian_lost_time.lua @@ -0,0 +1,22 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local pos = creature:getPosition() + if pos.z ~= 15 then + return true + end + if creature:getName():lower() == 'the freezing time guardian' then + Game.createMonster('lost time', { x=creature:getPosition().x+math.random(-2, 2), y=creature:getPosition().y+math.random(-2, 2), z=creature:getPosition().z }) + elseif creature:getName():lower() == 'the blazing time guardian' then + Game.createMonster('time waster', { x=creature:getPosition().x+math.random(-2, 2), y=creature:getPosition().y+math.random(-2, 2), z=creature:getPosition().z }) + end + return true +end + +spell:name("time guardian lost time") +spell:words("###439") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/time_guardiann.lua b/data/scripts/spells/monster/time_guardiann.lua new file mode 100644 index 000000000..0dde8351b --- /dev/null +++ b/data/scripts/spells/monster/time_guardiann.lua @@ -0,0 +1,59 @@ +local monsters = { + [1] = {pos = Position(32810, 32664, 14)}, + [2] = {pos = Position(32815, 32664, 14)} +} + +local function functionBack(position, oldpos) + local guardian = Tile(position):getTopCreature() + local bool, diference, health = false, 0, 0 + local spectators, spectator = Game.getSpectators(Position(32813, 32664, 14), false, false, 15, 15, 15, 15) + for v = 1, #spectators do + spectator = spectators[v] + if spectator:getName():lower() == 'the blazing time guardian' or spectator:getName():lower() == 'the freezing time guardian' then + oldpos = spectator:getPosition() + bool = true + end + end + if not bool then + guardian:remove() + return true + end + local specs, spec = Game.getSpectators(Position(32813, 32664, 14), false, false, 15, 15, 15, 15) + for i = 1, #specs do + spec = specs[i] + if spec:isMonster() and spec:getName():lower() == 'the blazing time guardian' or spec:getName():lower() == 'the freezing time guardian' then + spec:teleportTo(position) + health = spec:getHealth() + diference = guardian:getHealth() - health + end + end + guardian:addHealth( - diference) + guardian:teleportTo(oldpos) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local index = math.random(1, 2) + local monsterPos = creature:getPosition() + if monsterPos.z ~= 14 then + return true + end + local position = monsters[index].pos + local form = Tile(position):getTopCreature() + creature:teleportTo(position) + local diference, health = 0, 0 + health = creature:getHealth() + diference = form:getHealth() - health + form:addHealth( - diference) + form:teleportTo(monsterPos) + addEvent(functionBack, 30 * 1000, position, monsterPos) + return true +end + +spell:name("time guardiann") +spell:words("###441") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/twins_skill_reducer.lua b/data/scripts/spells/monster/twins_skill_reducer.lua new file mode 100644 index 000000000..ca6ae4e0b --- /dev/null +++ b/data/scripts/spells/monster/twins_skill_reducer.lua @@ -0,0 +1,42 @@ +local combat = {} + +for i = 10, 25 do +combat[i] = Combat() +combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) + +local condition = Condition(CONDITION_ATTRIBUTES) +condition:setParameter(CONDITION_PARAM_TICKS, 35000) +condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) +condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + + local area = createCombatArea({ + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + }) + +combat[i]:setArea(area) +combat[i]:addCondition(condition) + +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(10, 25)]:execute(creature, var) +end + +spell:name("twins skill reducer") +spell:words("###151") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/twisted_shaper_ice.lua b/data/scripts/spells/monster/twisted_shaper_ice.lua new file mode 100644 index 000000000..079d0d58b --- /dev/null +++ b/data/scripts/spells/monster/twisted_shaper_ice.lua @@ -0,0 +1,27 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, 53) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLICE) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 1.4) + 8 + local max = (level / 5) + (maglevel * 2.2) + 14 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("twisted shaper ice") +spell:words("###406") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:isSelfTarget("3") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/tyrn_electrify.lua b/data/scripts/spells/monster/tyrn_electrify.lua new file mode 100644 index 000000000..731681c1c --- /dev/null +++ b/data/scripts/spells/monster/tyrn_electrify.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMOKE) + +local condition = Condition(CONDITION_ENERGY) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(30, 10000, -25) +combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("tyrn electrify") +spell:words("###343") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/tyrn_heal.lua b/data/scripts/spells/monster/tyrn_heal.lua new file mode 100644 index 000000000..ba79a356f --- /dev/null +++ b/data/scripts/spells/monster/tyrn_heal.lua @@ -0,0 +1,23 @@ +local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) +condition:setParameter(CONDITION_PARAM_SUBID, 88888) +condition:setParameter(CONDITION_PARAM_TICKS, 15 * 60 * 1000) +condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) +condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 15 * 60 * 1000) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + if creature:getHealth() < creature:getMaxHealth() * 0.2 and not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then + creature:addCondition(condition) + creature:addHealth(math.random(5000, 7500)) + else + return + end + return true +end + +spell:name("tyrn heal") +spell:words("###345") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/tyrn_skill_reducer.lua b/data/scripts/spells/monster/tyrn_skill_reducer.lua new file mode 100644 index 000000000..d5716a018 --- /dev/null +++ b/data/scripts/spells/monster/tyrn_skill_reducer.lua @@ -0,0 +1,45 @@ +local combat = {} + +for i = 40, 55 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_WHITE) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 12000) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(40, 55)]:execute(creature, var) +end + +spell:name("tyrn skill reducer") +spell:words("###344") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/undead_cavebear_curse.lua b/data/scripts/spells/monster/undead_cavebear_curse.lua new file mode 100644 index 000000000..222eb6fb7 --- /dev/null +++ b/data/scripts/spells/monster/undead_cavebear_curse.lua @@ -0,0 +1,34 @@ +local combat = {} + +for i = 2, 2 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for j = 1, 18 do + damage = damage * 1.2 + condition:addDamage(1, 4000, -damage) + end + + local area = createCombatArea(AREA_SQUARE1X1) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(2, 2)]:execute(creature, var) +end + +spell:name("undead cavebear curse") +spell:words("###61") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/undead_dragon_curse.lua b/data/scripts/spells/monster/undead_dragon_curse.lua new file mode 100644 index 000000000..f1cb72320 --- /dev/null +++ b/data/scripts/spells/monster/undead_dragon_curse.lua @@ -0,0 +1,44 @@ +local combat = {} + +for i = 1, 2 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for j = 1, 30 do + damage = damage * 1.2 + condition:addDamage(1, 4000, -damage) + end + + local area = createCombatArea({ + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + }) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(1, 2)]:execute(creature, var) +end + +spell:name("undead dragon curse") +spell:words("###10") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/undead_jester_paralyze.lua b/data/scripts/spells/monster/undead_jester_paralyze.lua new file mode 100644 index 000000000..617f8a539 --- /dev/null +++ b/data/scripts/spells/monster/undead_jester_paralyze.lua @@ -0,0 +1,38 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GIFT_WRAPS) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.35, 0, -0.5, 0) +combat:addCondition(condition) + + arr = { + {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("undead jester paralyze") +spell:words("###347") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/undead_jester_summon.lua b/data/scripts/spells/monster/undead_jester_summon.lua new file mode 100644 index 000000000..58e796da5 --- /dev/null +++ b/data/scripts/spells/monster/undead_jester_summon.lua @@ -0,0 +1,46 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_RED) + +arr = { +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +} + +local area = createCombatArea(arr) +combat:setArea(area) + +local maxsummons = 4 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 4 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Cave Rat", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("undead jester summon") +spell:words("###348") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/urmahlullu_ring.lua b/data/scripts/spells/monster/urmahlullu_ring.lua new file mode 100644 index 000000000..f8b11bc81 --- /dev/null +++ b/data/scripts/spells/monster/urmahlullu_ring.lua @@ -0,0 +1,27 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) +arr = { +{0, 1, 1, 1, 0}, +{1, 0, 0, 0, 1}, +{1, 0, 2, 0, 1}, +{1, 0, 0, 0, 1}, +{0, 1, 1, 1, 0} +} + + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("urmahlulluring") +spell:words("###482") +spell:needLearn(true) +spell:cooldown("2000") +spell:isSelfTarget(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ushuriel_curse.lua b/data/scripts/spells/monster/ushuriel_curse.lua new file mode 100644 index 000000000..f0ef784d9 --- /dev/null +++ b/data/scripts/spells/monster/ushuriel_curse.lua @@ -0,0 +1,34 @@ +local combat = {} + +for i = 1, 1.1 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + + local condition = Condition(CONDITION_CURSED) + condition:setParameter(CONDITION_PARAM_DELAYED, 1) + + local damage = i + condition:addDamage(1, 4000, -damage) + for j = 1, 27 do + damage = damage * 1.2 + condition:addDamage(1, 4000, -damage) + end + + local area = createCombatArea(AREA_CIRCLE3X3) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(1, 1.1)]:execute(creature, var) +end + +spell:name("ushuriel curse") +spell:words("###224") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/ushuriel_electrify.lua b/data/scripts/spells/monster/ushuriel_electrify.lua new file mode 100644 index 000000000..ff5f80f39 --- /dev/null +++ b/data/scripts/spells/monster/ushuriel_electrify.lua @@ -0,0 +1,24 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) + +local condition = Condition(CONDITION_ENERGY) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(25, 10000, -25) +combat:addCondition(condition) + +local area = createCombatArea(AREA_CIRCLE3X3) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("ushuriel electrify") +spell:words("###225") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/vampire_paralyze.lua b/data/scripts/spells/monster/vampire_paralyze.lua new file mode 100644 index 000000000..068522c23 --- /dev/null +++ b/data/scripts/spells/monster/vampire_paralyze.lua @@ -0,0 +1,21 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.45, 0, -0.8, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("vampire paralyze") +spell:words("###82") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/vampire_viscount_paralyze.lua b/data/scripts/spells/monster/vampire_viscount_paralyze.lua new file mode 100644 index 000000000..1973790af --- /dev/null +++ b/data/scripts/spells/monster/vampire_viscount_paralyze.lua @@ -0,0 +1,24 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.55, 0, -0.7, 0) + combat:addCondition(condition) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("vampire viscount paralyze") +spell:words("###349") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/verminor_paralyze.lua b/data/scripts/spells/monster/verminor_paralyze.lua new file mode 100644 index 000000000..3186d9954 --- /dev/null +++ b/data/scripts/spells/monster/verminor_paralyze.lua @@ -0,0 +1,40 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.75, 0, -0.95, 0) + combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + + local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("verminor paralyze") +spell:words("###226") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/verminor_summon.lua b/data/scripts/spells/monster/verminor_summon.lua new file mode 100644 index 000000000..c9cf60d84 --- /dev/null +++ b/data/scripts/spells/monster/verminor_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 6 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 6 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Son of Verminor", { x=creature:getPosition().x+math.random(-2, 2), y=creature:getPosition().y+math.random(-2, 2), z=creature:getPosition().z }) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("verminor summon") +spell:words("###227") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/vile_grandmaster.lua b/data/scripts/spells/monster/vile_grandmaster.lua new file mode 100644 index 000000000..0977febb9 --- /dev/null +++ b/data/scripts/spells/monster/vile_grandmaster.lua @@ -0,0 +1,21 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER) +combat:setArea(createCombatArea(AREA_CIRCLE3X3)) + +local condition = Condition(COMBAT_PHYSICALDAMAGE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(3, 100, -35) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("vile grandmaster") +spell:words("##405") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/vulcongra_soulfire.lua b/data/scripts/spells/monster/vulcongra_soulfire.lua new file mode 100644 index 000000000..3ae15a8a3 --- /dev/null +++ b/data/scripts/spells/monster/vulcongra_soulfire.lua @@ -0,0 +1,24 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(20, 9000, -10) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("vulcongra soulfire") +spell:words("###25") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/walker_skill_reducer.lua b/data/scripts/spells/monster/walker_skill_reducer.lua new file mode 100644 index 000000000..89eac715f --- /dev/null +++ b/data/scripts/spells/monster/walker_skill_reducer.lua @@ -0,0 +1,82 @@ +local combat = {} + +for i = 45, 60 do + combat[i] = Combat() + + local condition1 = Condition(CONDITION_ATTRIBUTES) + condition1:setParameter(CONDITION_PARAM_TICKS, 7000) + condition1:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition1:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + condition1:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + + local condition2 = Condition(CONDITION_ATTRIBUTES) + condition2:setParameter(CONDITION_PARAM_TICKS, 7000) + condition2:setParameter(CONDITION_PARAM_STAT_MAGICPOINTSPERCENT, i) + + local condition3 = Condition(CONDITION_ATTRIBUTES) + condition3:setParameter(CONDITION_PARAM_TICKS, 7000) + condition3:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + condition3:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE3X3) + combat[i]:setArea(area) + + + function onTargetTile(creature, pos) + local creatureTable = {} + local n, i = Tile({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 + if n ~= 0 then + local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid + while v ~= 0 do + if isCreature(v) == true then + table.insert(creatureTable, v) + if n == #creatureTable then + break + end + end + i = i + 1 + v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid + end + end + + if #creatureTable ~= nil and #creatureTable > 0 then + for r = 1, #creatureTable do + if creatureTable[r] ~= creature then + local specCreature = Player(creatureTable[r]) + + if specCreature and specCreature:isPlayer() then + if specCreature:isKnight() then + specCreature:addCondition(condition1) + end + + if specCreature:isMage() then + specCreature:addCondition(condition2) + end + + if specCreature:isPaladin() then + specCreature:addCondition(condition3) + end + end + end + end + end + pos:sendMagicEffect(CONST_ME_MAGIC_RED) + return true + end + + combat[i]:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") + +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(45, 60)]:execute(creature, var) +end + +spell:name("walker skill reducer") +spell:words("##371") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/war_golem_electrify.lua b/data/scripts/spells/monster/war_golem_electrify.lua new file mode 100644 index 000000000..a57d3702b --- /dev/null +++ b/data/scripts/spells/monster/war_golem_electrify.lua @@ -0,0 +1,23 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL) + +local condition = Condition(CONDITION_ENERGY) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(8, 10000, -25) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("war golem electrify") +spell:words("###22") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/war_golem_skill_reducer.lua b/data/scripts/spells/monster/war_golem_skill_reducer.lua new file mode 100644 index 000000000..731614fcf --- /dev/null +++ b/data/scripts/spells/monster/war_golem_skill_reducer.lua @@ -0,0 +1,39 @@ +local combat = {} + +for i = 40, 60 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 8000) + condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + + local arr = { + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + + local area = createCombatArea(arr) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(40, 60)]:execute(creature, var) +end + +spell:name("war golem skill reducer") +spell:words("###28") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/warden_ring.lua b/data/scripts/spells/monster/warden_ring.lua new file mode 100644 index 000000000..083c4b524 --- /dev/null +++ b/data/scripts/spells/monster/warden_ring.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER) +arr = { +{0, 1, 1, 1, 0}, +{1, 0, 0, 0, 1}, +{1, 0, 2, 0, 1}, +{1, 0, 0, 0, 1}, +{0, 1, 1, 1, 0} +} + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("warden ring") +spell:words("###476") +spell:needLearn(true) +spell:cooldown("2000") +spell:isSelfTarget(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/warden_x.lua b/data/scripts/spells/monster/warden_x.lua new file mode 100644 index 000000000..331d26116 --- /dev/null +++ b/data/scripts/spells/monster/warden_x.lua @@ -0,0 +1,24 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER) +arr = { +{1, 0, 1}, +{0, 2, 0}, +{1, 0, 1} +} + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("warden x") +spell:words("###475") +spell:needLearn(true) +spell:cooldown("2000") +spell:isSelfTarget(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/warlock_skill_reducer.lua b/data/scripts/spells/monster/warlock_skill_reducer.lua new file mode 100644 index 000000000..02d6fd82a --- /dev/null +++ b/data/scripts/spells/monster/warlock_skill_reducer.lua @@ -0,0 +1,28 @@ +local combat = {} + +for i = 40, 50 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 6000) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(40, 50)]:execute(creature, var) +end + +spell:name("warlock skill reducer") +spell:words("###30") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/wave_t.lua b/data/scripts/spells/monster/wave_t.lua new file mode 100644 index 000000000..480c6087a --- /dev/null +++ b/data/scripts/spells/monster/wave_t.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) +arr = { +{1, 1, 1}, +{0, 1, 0}, +{0, 3, 0} +} + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("wave t") +spell:words("###477") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/webster_paralyze.lua b/data/scripts/spells/monster/webster_paralyze.lua new file mode 100644 index 000000000..0752a2c14 --- /dev/null +++ b/data/scripts/spells/monster/webster_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.5, 0, -0.65, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("webster paralyze") +spell:words("###60") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/weeper_paralyze.lua b/data/scripts/spells/monster/weeper_paralyze.lua new file mode 100644 index 000000000..df4fe2e6c --- /dev/null +++ b/data/scripts/spells/monster/weeper_paralyze.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 5000) +condition:setFormula(-0.55, 0, -0.7, 0) +combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("weeper paralyze") +spell:words("###290") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/weeper_skill_reducer.lua b/data/scripts/spells/monster/weeper_skill_reducer.lua new file mode 100644 index 000000000..a764427f7 --- /dev/null +++ b/data/scripts/spells/monster/weeper_skill_reducer.lua @@ -0,0 +1,27 @@ +local combat = {} + +for i = 15, 55 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 7000) + condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE1X1) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(15, 55)]:execute(creature, var) +end + +spell:name("weeper skill reducer") +spell:words("###255") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/werelion_wave.lua b/data/scripts/spells/monster/werelion_wave.lua new file mode 100644 index 000000000..3f266f53b --- /dev/null +++ b/data/scripts/spells/monster/werelion_wave.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) + + arr = { + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("werelion wave") +spell:words("###473") +spell:needLearn(true) +spell:needDirection(true) +spell:cooldown("2000") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/werewolf_skill_reducer.lua b/data/scripts/spells/monster/werewolf_skill_reducer.lua new file mode 100644 index 000000000..c2c424f44 --- /dev/null +++ b/data/scripts/spells/monster/werewolf_skill_reducer.lua @@ -0,0 +1,35 @@ +local combat = {} + +for i = 65, 85 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_RED) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 4000) + condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) + condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) + + arr = { + {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0} + } + + local area = createCombatArea(arr) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(65, 85)]:execute(creature, var) +end + +spell:name("werewolf skill reducer") +spell:words("###161") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/werewolf_summon.lua b/data/scripts/spells/monster/werewolf_summon.lua new file mode 100644 index 000000000..23861200a --- /dev/null +++ b/data/scripts/spells/monster/werewolf_summon.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_WHITE) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("War Wolf", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("werewolf summon") +spell:words("###160") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/white_pale_heal.lua b/data/scripts/spells/monster/white_pale_heal.lua new file mode 100644 index 000000000..e96c9bd78 --- /dev/null +++ b/data/scripts/spells/monster/white_pale_heal.lua @@ -0,0 +1,23 @@ +local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) +condition:setParameter(CONDITION_PARAM_SUBID, 88888) +condition:setParameter(CONDITION_PARAM_TICKS, 15 * 60 * 1000) +condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) +condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 15 * 60 * 1000) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + if creature:getHealth() < creature:getMaxHealth() * 0.2 and not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then + creature:addCondition(condition) + creature:addHealth(400) + else + return + end +return true +end + +spell:name("white pale heal") +spell:words("###352") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/white_pale_paralyze.lua b/data/scripts/spells/monster/white_pale_paralyze.lua new file mode 100644 index 000000000..5e71764f5 --- /dev/null +++ b/data/scripts/spells/monster/white_pale_paralyze.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.6, 0, -0.65, 0) +combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("white pale paralyze") +spell:words("###350") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/white_pale_summon.lua b/data/scripts/spells/monster/white_pale_summon.lua new file mode 100644 index 000000000..5a7bf5c35 --- /dev/null +++ b/data/scripts/spells/monster/white_pale_summon.lua @@ -0,0 +1,46 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER) + +arr = { +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0, 0}, +{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, +{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, +{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +} + +local area = createCombatArea(arr) +combat:setArea(area) + +local maxsummons = 2 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summoncount = creature:getSummons() + if #summoncount < 2 then + for i = 1, maxsummons - #summoncount do + local mid = Game.createMonster("Carrion Worm", creature:getPosition()) + if not mid then + return + end + mid:setMaster(creature) + end + end + return combat:execute(creature, var) +end + +spell:name("white pale summon") +spell:words("###351") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/white_shade_paralyze.lua b/data/scripts/spells/monster/white_shade_paralyze.lua new file mode 100644 index 000000000..c8aba4f84 --- /dev/null +++ b/data/scripts/spells/monster/white_shade_paralyze.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.3, 0, -0.45, 0) +combat:addCondition(condition) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("white shade paralyze") +spell:words("###266") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/wiggler_paralyze.lua b/data/scripts/spells/monster/wiggler_paralyze.lua new file mode 100644 index 000000000..59032570a --- /dev/null +++ b/data/scripts/spells/monster/wiggler_paralyze.lua @@ -0,0 +1,32 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.25, 0, -0.5, 0) +combat:addCondition(condition) + + arr = { + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("wiggler paralyze") +spell:words("###267") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/wilting_leaf_golem_paralyze.lua b/data/scripts/spells/monster/wilting_leaf_golem_paralyze.lua new file mode 100644 index 000000000..a98850b4d --- /dev/null +++ b/data/scripts/spells/monster/wilting_leaf_golem_paralyze.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.25, 0, -0.45, 0) +combat:addCondition(condition) + + +local area = createCombatArea(AREA_SQUARE1X1) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("wilting leaf golem paralyze") +spell:words("###74") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/woodling_paralyze.lua b/data/scripts/spells/monster/woodling_paralyze.lua new file mode 100644 index 000000000..4a1ad9314 --- /dev/null +++ b/data/scripts/spells/monster/woodling_paralyze.lua @@ -0,0 +1,31 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, 2) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 3000) +condition:setFormula(-0.05, 0, -0.1, 0) + +arr = { + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("woodling paralyze") +spell:words("###375") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/worm_priestess_paralyze.lua b/data/scripts/spells/monster/worm_priestess_paralyze.lua new file mode 100644 index 000000000..77e8fa4d7 --- /dev/null +++ b/data/scripts/spells/monster/worm_priestess_paralyze.lua @@ -0,0 +1,32 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 10000) +condition:setFormula(-0.4, 0, -0.7, 0) +combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("worm priestess paralyze") +spell:words("###364") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/wyrm_wave.lua b/data/scripts/spells/monster/wyrm_wave.lua new file mode 100644 index 000000000..136940242 --- /dev/null +++ b/data/scripts/spells/monster/wyrm_wave.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) + + arr = { + {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) + combat:setArea(area) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("wyrm wave") +spell:words("###251") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/wyvern_drunk.lua b/data/scripts/spells/monster/wyvern_drunk.lua new file mode 100644 index 000000000..8e5a69bd2 --- /dev/null +++ b/data/scripts/spells/monster/wyvern_drunk.lua @@ -0,0 +1,29 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_RED) + +local condition = Condition(CONDITION_DRUNK) +condition:setParameter(CONDITION_PARAM_TICKS, 25000) +combat:addCondition(condition) + + arr = { + {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} + } + +local area = createCombatArea(arr) +combat:setArea(area) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("wyvern drunk") +spell:words("###279") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:needDirection(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/young_sea_serpent_drown.lua b/data/scripts/spells/monster/young_sea_serpent_drown.lua new file mode 100644 index 000000000..ededa43d6 --- /dev/null +++ b/data/scripts/spells/monster/young_sea_serpent_drown.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_WATERSPLASH) + +local condition = Condition(CONDITION_DROWN) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(6, 5000, -20) + +local area = createCombatArea(AREA_SQUARE1X1) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("young sea serpent drown") +spell:words("###18") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/zamulosh_invisible.lua b/data/scripts/spells/monster/zamulosh_invisible.lua new file mode 100644 index 000000000..079cdea6f --- /dev/null +++ b/data/scripts/spells/monster/zamulosh_invisible.lua @@ -0,0 +1,31 @@ +local condition = Condition(CONDITION_INVISIBLE) +condition:setParameter(CONDITION_PARAM_TICKS, 10000) +local function invisible(fromPosition, toPosition) + for x = fromPosition.x, toPosition.x do + for y = fromPosition.y, toPosition.y do + for z = fromPosition.z, toPosition.z do + local creature = Tile(Position(x, y, z)):getTopCreature() + if creature then + if creature:isMonster() and creature:getName():lower() == 'zamulosh' then + creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + creature:addCondition(condition) + end + end + end + end + end +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + invisible(Position(33634, 32749, 11), Position(33654, 32765, 11)) + return +end + +spell:name("zamulosh invisible") +spell:words("###414") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/zamulosh_tp.lua b/data/scripts/spells/monster/zamulosh_tp.lua new file mode 100644 index 000000000..5a2f70f4d --- /dev/null +++ b/data/scripts/spells/monster/zamulosh_tp.lua @@ -0,0 +1,15 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + creature:getPosition():sendMagicEffect(CONST_ME_POFF) + creature:teleportTo(Position(33644, 32757, 11)) + creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + return +end + +spell:name("zamulosh tp") +spell:words("###415") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/zavarash2_paralyze.lua b/data/scripts/spells/monster/zavarash2_paralyze.lua new file mode 100644 index 000000000..adaac9625 --- /dev/null +++ b/data/scripts/spells/monster/zavarash2_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.05, 0, -0.1, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("zavarash2 paralyze") +spell:words("###229") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/zavarash_heal.lua b/data/scripts/spells/monster/zavarash_heal.lua new file mode 100644 index 000000000..e07ab1092 --- /dev/null +++ b/data/scripts/spells/monster/zavarash_heal.lua @@ -0,0 +1,50 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) + +arr = { + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, + {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + } + +local area = createCombatArea(arr) +combat:setArea(area) + +function onTargetCreature(creature, target) + local min = 425 + local max = 575 + + local master = target:getMaster() + if target:isPlayer() and not master + or master and master:isPlayer() then + return true + end + + doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) + return true +end + +combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("zavarash heal") +spell:words("###393") +spell:blockWalls(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/zavarash_paralyze.lua b/data/scripts/spells/monster/zavarash_paralyze.lua new file mode 100644 index 000000000..dc9a3a87b --- /dev/null +++ b/data/scripts/spells/monster/zavarash_paralyze.lua @@ -0,0 +1,22 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.8, 0, -0.9, 0) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("zavarash paralyze") +spell:words("###228") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/zugurosh_pillar_skill_reducer.lua b/data/scripts/spells/monster/zugurosh_pillar_skill_reducer.lua new file mode 100644 index 000000000..7ad6c41a0 --- /dev/null +++ b/data/scripts/spells/monster/zugurosh_pillar_skill_reducer.lua @@ -0,0 +1,26 @@ +local combat = {} + +for i = 1, 20 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 7000) + condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(1, 20)]:execute(creature, var) +end + +spell:name("zugurosh pillar skill reducer") +spell:words("###303") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/zugurosh_soulfire.lua b/data/scripts/spells/monster/zugurosh_soulfire.lua new file mode 100644 index 000000000..910a23170 --- /dev/null +++ b/data/scripts/spells/monster/zugurosh_soulfire.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(30, 9000, -10) + +local area = createCombatArea(AREA_CIRCLE2X2) +combat:setArea(area) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("zugurosh soulfire") +spell:words("###230") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/zulazza_the_corruptor_paralyze.lua b/data/scripts/spells/monster/zulazza_the_corruptor_paralyze.lua new file mode 100644 index 000000000..83a22efd4 --- /dev/null +++ b/data/scripts/spells/monster/zulazza_the_corruptor_paralyze.lua @@ -0,0 +1,27 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_GREENSTAR) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 20000) +condition:setFormula(-0.6, 0, -0.8, 0) +combat:addCondition(condition) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat:setArea(area) + combat:addCondition(condition) + + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("zulazza the corruptor paralyze") +spell:words("###231") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/zulazza_the_corruptor_skill_reducer.lua b/data/scripts/spells/monster/zulazza_the_corruptor_skill_reducer.lua new file mode 100644 index 000000000..93a9d3c2c --- /dev/null +++ b/data/scripts/spells/monster/zulazza_the_corruptor_skill_reducer.lua @@ -0,0 +1,29 @@ +local combat = {} + +for i = 40, 50 do + combat[i] = Combat() + combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) + combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH) + + local condition = Condition(CONDITION_ATTRIBUTES) + condition:setParameter(CONDITION_PARAM_TICKS, 15000) + condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) + + local area = createCombatArea(AREA_CIRCLE2X2) + combat[i]:setArea(area) + combat[i]:addCondition(condition) +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat[math.random(40, 50)]:execute(creature, var) +end + +spell:name("zulazza the corruptor skill reducer") +spell:words("###232") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/zushuka_freeze.lua b/data/scripts/spells/monster/zushuka_freeze.lua new file mode 100644 index 000000000..46780ad36 --- /dev/null +++ b/data/scripts/spells/monster/zushuka_freeze.lua @@ -0,0 +1,23 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SHIVERARROW) + +local condition = Condition(CONDITION_FREEZING) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(30, 8000, -8) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("zushuka freeze") +spell:words("###234") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/zushuka_heal.lua b/data/scripts/spells/monster/zushuka_heal.lua new file mode 100644 index 000000000..75896ffa6 --- /dev/null +++ b/data/scripts/spells/monster/zushuka_heal.lua @@ -0,0 +1,24 @@ +local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) +condition:setParameter(CONDITION_PARAM_SUBID, 88888) +condition:setParameter(CONDITION_PARAM_TICKS, 15 * 60 * 1000) +condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) +condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 15 * 60 * 1000) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + if creature:getHealth() < creature:getMaxHealth() * 0.2 and not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then + creature:addCondition(condition) + creature:addHealth(math.random(7500, 7515)) + else + return + end +return true +end + +spell:name("zushuka heal") +spell:words("###342") +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/monster/zushuka_paralyze.lua b/data/scripts/spells/monster/zushuka_paralyze.lua new file mode 100644 index 000000000..32959fecb --- /dev/null +++ b/data/scripts/spells/monster/zushuka_paralyze.lua @@ -0,0 +1,25 @@ + local combat = Combat() + combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_WHITE) + combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE) + + local condition = Condition(CONDITION_PARALYZE) + condition:setParameter(CONDITION_PARAM_TICKS, 20000) + condition:setFormula(-0.6, 0, -0.7, 0) + + local area = createCombatArea(AREA_SQUARE1X1) + combat:setArea(area) + combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("zushuka paralyze") +spell:words("###233") +spell:isAggressive(true) +spell:blockWalls(true) +spell:needTarget(true) +spell:needLearn(true) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/party/enchant_party.lua b/data/scripts/spells/party/enchant_party.lua new file mode 100644 index 000000000..bbc5a4bca --- /dev/null +++ b/data/scripts/spells/party/enchant_party.lua @@ -0,0 +1,84 @@ +local combat = Combat() +combat:setArea(createCombatArea(AREA_CIRCLE5X5)) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) + +local condition = Condition(CONDITION_ATTRIBUTES) +condition:setParameter(CONDITION_PARAM_SUBID, 3) +condition:setParameter(CONDITION_PARAM_BUFF_SPELL, 1) +condition:setParameter(CONDITION_PARAM_TICKS, 2 * 60 * 1000) +condition:setParameter(CONDITION_PARAM_STAT_MAGICPOINTS, 1) + +local baseMana = 120 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var, isHotkey) + local position = creature:getPosition() + + local party = creature:getParty() + if not party then + creature:sendCancelMessage("No party members in range.") + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + local membersList = party:getMembers() + membersList[#membersList + 1] = party:getLeader() + if membersList == nil or type(membersList) ~= 'table' or #membersList <= 1 then + creature:sendCancelMessage("No party members in range.") + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + local affectedList = {} + for _, targetPlayer in ipairs(membersList) do + if targetPlayer:getPosition():getDistance(position) <= 36 then + affectedList[#affectedList + 1] = targetPlayer + end + end + + local tmp = #affectedList + if tmp <= 1 then + creature:sendCancelMessage("No party members in range.") + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + local mana = math.ceil((0.9 ^ (tmp - 1) * baseMana) * tmp) + if creature:getMana() < mana then + creature:sendCancelMessage(RETURNVALUE_NOTENOUGHMANA) + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + if not combat:execute(creature, var) then + creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + creature:addMana(-(mana - baseMana), FALSE) + creature:addManaSpent((mana - baseMana)) + + for _, targetPlayer in ipairs(affectedList) do + targetPlayer:addCondition(condition) + end + + return true +end + +spell:name("Enchant Party") +spell:words("utori mas sio") +spell:group("support") +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:id(129) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(32) +spell:mana(120) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/party/heal_party.lua b/data/scripts/spells/party/heal_party.lua new file mode 100644 index 000000000..236601d3a --- /dev/null +++ b/data/scripts/spells/party/heal_party.lua @@ -0,0 +1,85 @@ +local combat = Combat() +combat:setParameter(createCombatArea(AREA_CIRCLE5X5)) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) + +local condition = Condition(CONDITION_REGENERATION) +condition:setParameter(CONDITION_PARAM_SUBID, 1) +condition:setParameter(CONDITION_PARAM_BUFF_SPELL, 1) +condition:setParameter(CONDITION_PARAM_TICKS, 2 * 60 * 1000) +condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 20) +condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 2000) + +local baseMana = 120 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + local position = creature:getPosition() + + local party = creature:getParty() + if not party then + creature:sendCancelMessage("No party members in range.") + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + local membersList = party:getMembers() + membersList[#membersList + 1] = party:getLeader() + if membersList == nil or type(membersList) ~= 'table' or #membersList <= 1 then + creature:sendCancelMessage("No party members in range.") + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + local affectedList = {} + for _, targetPlayer in ipairs(membersList) do + if targetPlayer:getPosition():getDistance(position) <= 36 then + affectedList[#affectedList + 1] = targetPlayer + end + end + + local tmp = #affectedList + if tmp <= 1 then + creature:sendCancelMessage("No party members in range.") + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + local mana = math.ceil((0.9 ^ (tmp - 1) * baseMana) * tmp) + if creature:getMana() < mana then + creature:sendCancelMessage(RETURNVALUE_NOTENOUGHMANA) + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + if not combat:execute(creature, var) then + creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + creature:addMana(-(mana - baseMana), false) + creature:addManaSpent((mana - baseMana)) + + for _, targetPlayer in ipairs(affectedList) do + targetPlayer:addCondition(condition) + end + + return true +end + +spell:name("Heal Party") +spell:words("utura mas sio") +spell:group("support") +spell:vocation("druid;true", "elder druid;true") +spell:id(128) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(32) +spell:mana(120) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/party/protect_party.lua b/data/scripts/spells/party/protect_party.lua new file mode 100644 index 000000000..b88ab072e --- /dev/null +++ b/data/scripts/spells/party/protect_party.lua @@ -0,0 +1,84 @@ +local combat = Combat() +combat:setArea(createCombatArea(AREA_CIRCLE5X5)) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) + +local condition = Condition(CONDITION_ATTRIBUTES) +condition:setParameter(CONDITION_PARAM_SUBID, 2) +condition:setParameter(CONDITION_PARAM_BUFF_SPELL, 1) +condition:setParameter(CONDITION_PARAM_TICKS, 2 * 60 * 1000) +condition:setParameter(CONDITION_PARAM_SKILL_SHIELD, 2) + +local baseMana = 90 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + local position = creature:getPosition() + + local party = creature:getParty() + if not party then + creature:sendCancelMessage("No party members in range.") + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + local membersList = party:getMembers() + membersList[#membersList + 1] = party:getLeader() + if membersList == nil or type(membersList) ~= 'table' or #membersList <= 1 then + creature:sendCancelMessage("No party members in range.") + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + local affectedList = {} + for _, targetPlayer in ipairs(membersList) do + if targetPlayer:getPosition():getDistance(position) <= 36 then + affectedList[#affectedList + 1] = targetPlayer + end + end + + local tmp = #affectedList + if tmp <= 1 then + creature:sendCancelMessage("No party members in range.") + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + local mana = math.ceil((0.9 ^ (tmp - 1) * baseMana) * tmp) + if creature:getMana() < mana then + creature:sendCancelMessage(RETURNVALUE_NOTENOUGHMANA) + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + if not combat:execute(creature, var) then + creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + creature:addMana(-(mana - baseMana), false) + creature:addManaSpent((mana - baseMana)) + + for _, targetPlayer in ipairs(affectedList) do + targetPlayer:addCondition(condition) + end + + return true +end + +spell:name("Protect Party") +spell:words("utamo mas sio") +spell:group("support") +spell:vocation("paladin;true", "royal paladin;true") +spell:id(127) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(32) +spell:mana(90) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/party/train_party.lua b/data/scripts/spells/party/train_party.lua new file mode 100644 index 000000000..e604bfd2a --- /dev/null +++ b/data/scripts/spells/party/train_party.lua @@ -0,0 +1,85 @@ +local combat = Combat() +combat:setArea(createCombatArea(AREA_CIRCLE5X5)) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) + +local condition = Condition(CONDITION_ATTRIBUTES) +condition:setParameter(CONDITION_PARAM_SUBID, 1) +condition:setParameter(CONDITION_PARAM_BUFF_SPELL, 1) +condition:setParameter(CONDITION_PARAM_TICKS, 2 * 60 * 1000) +condition:setParameter(CONDITION_PARAM_SKILL_MELEE, 3) +condition:setParameter(CONDITION_PARAM_SKILL_DISTANCE, 3) + +local baseMana = 60 + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + local position = creature:getPosition() + + local party = creature:getParty() + if not party then + creature:sendCancelMessage("No party members in range.") + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + local membersList = party:getMembers() + membersList[#membersList + 1] = party:getLeader() + if membersList == nil or type(membersList) ~= 'table' or #membersList <= 1 then + creature:sendCancelMessage("No party members in range.") + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + local affectedList = {} + for _, targetPlayer in ipairs(membersList) do + if targetPlayer:getPosition():getDistance(position) <= 36 then + affectedList[#affectedList + 1] = targetPlayer + end + end + + local tmp = #affectedList + if tmp <= 1 then + creature:sendCancelMessage("No party members in range.") + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + local mana = math.ceil((0.9 ^ (tmp - 1) * baseMana) * tmp) + if creature:getMana() < mana then + creature:sendCancelMessage(RETURNVALUE_NOTENOUGHMANA) + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + if not combat:execute(creature, var) then + creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + creature:addMana(-(mana - baseMana), FALSE) + creature:addManaSpent((mana - baseMana)) + + for _, targetPlayer in ipairs(affectedList) do + targetPlayer:addCondition(condition) + end + + return true +end + +spell:name("Train Party") +spell:words("utito mas sio") +spell:group("support") +spell:vocation("knight;true", "elite knight;true") +spell:id(126) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(32) +spell:mana(60) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/runes/animate_dead_rune.lua b/data/scripts/spells/runes/animate_dead_rune.lua new file mode 100644 index 000000000..2800396bc --- /dev/null +++ b/data/scripts/spells/runes/animate_dead_rune.lua @@ -0,0 +1,180 @@ +local rune = Spell("rune") + +function rune.onCastSpell(player, variant) + local position = variant:getPosition() + local tile = Tile(position) + if tile then + local corpse = tile:getTopDownItem() + if corpse then + local itemType = corpse:getType() + if itemType:isCorpse() and itemType:isMovable() then + if #player:getSummons() < 2 and player:getSkull() ~= SKULL_BLACK and player:getLevel() <= 99 then + local summon = Game.createMonster("Skeleton", position, true, true) + if summon then + corpse:remove() + player:addSummon(summon) + summon:reload() + position:sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + end + elseif #player:getSummons() < 2 and player:getSkull() ~= SKULL_BLACK and player:getLevel() <= 149 then + local summon = Game.createMonster("Demon Skeleton", position, true, true) + if summon then + corpse:remove() + player:addSummon(summon) + summon:reload() + position:sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + end + elseif #player:getSummons() < 2 and player:getSkull() ~= SKULL_BLACK and player:getLevel() <= 199 then + local summon = Game.createMonster("Bonebeast", position, true, true) + if summon then + corpse:remove() + player:addSummon(summon) + summon:reload() + position:sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + end + elseif #player:getSummons() < 2 and player:getSkull() ~= SKULL_BLACK and player:getLevel() <= 249 then + local summon = Game.createMonster("Lich", position, true, true) + if summon then + corpse:remove() + player:addSummon(summon) + summon:reload() + position:sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + end + elseif #player:getSummons() < 2 and player:getSkull() ~= SKULL_BLACK and player:getLevel() <= 299 then + local summon = Game.createMonster("Undead Gladiator", position, true, true) + if summon then + corpse:remove() + player:addSummon(summon) + summon:reload() + position:sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + end + elseif #player:getSummons() < 2 and player:getSkull() ~= SKULL_BLACK and player:getLevel() <= 349 then + local summon = Game.createMonster("Vampire Bride", position, true, true) + if summon then + corpse:remove() + player:addSummon(summon) + summon:reload() + position:sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + end + elseif #player:getSummons() < 2 and player:getSkull() ~= SKULL_BLACK and player:getLevel() <= 399 then + local summon = Game.createMonster("Vicious Manbat", position, true, true) + if summon then + corpse:remove() + player:addSummon(summon) + summon:reload() + position:sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + end + elseif #player:getSummons() < 2 and player:getSkull() ~= SKULL_BLACK and player:getLevel() <= 449 then + local summon = Game.createMonster("Skeleton Elite Warrior", position, true, true) + if summon then + corpse:remove() + player:addSummon(summon) + summon:reload() + position:sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + end + elseif #player:getSummons() < 2 and player:getSkull() ~= SKULL_BLACK and player:getLevel() <= 499 then + local summon = Game.createMonster("Undead Elite Gladiator", position, true, true) + if summon then + corpse:remove() + player:addSummon(summon) + summon:reload() + position:sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + end + elseif #player:getSummons() < 2 and player:getSkull() ~= SKULL_BLACK and player:getLevel() <= 549 then + local summon = Game.createMonster("Undead Dragon", position, true, true) + if summon then + corpse:remove() + player:addSummon(summon) + summon:reload() + position:sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + end + elseif #player:getSummons() < 2 and player:getSkull() ~= SKULL_BLACK and player:getLevel() <= 599 then + local summon = Game.createMonster("Demon", position, true, true) + if summon then + corpse:remove() + player:addSummon(summon) + summon:reload() + position:sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + end + elseif #player:getSummons() < 1 and player:getSkull() ~= SKULL_BLACK and player:getLevel() <= 699 then + local summon = Game.createMonster("Hellflayer", position, true, true) + if summon then + corpse:remove() + player:addSummon(summon) + summon:reload() + position:sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + end + elseif #player:getSummons() < 1 and player:getSkull() ~= SKULL_BLACK and player:getLevel() <= 799 then + local summon = Game.createMonster("Mr. Punish", position, true, true) + if summon then + corpse:remove() + player:addSummon(summon) + summon:reload() + position:sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + end + elseif #player:getSummons() < 1 and player:getSkull() ~= SKULL_BLACK and player:getLevel() <= 899 then + local summon = Game.createMonster("Courage Leech", position, true, true) + if summon then + corpse:remove() + player:addSummon(summon) + summon:reload() + position:sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + end + elseif #player:getSummons() < 1 and player:getSkull() ~= SKULL_BLACK and player:getLevel() <= 999 then + local summon = Game.createMonster("Zulazza the Corruptor", position, true, true) + if summon then + corpse:remove() + player:addSummon(summon) + summon:reload() + position:sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + end + elseif #player:getSummons() < 1 and player:getSkull() ~= SKULL_BLACK and player:getLevel() >= 1000 then + local summon = Game.createMonster("Distorted Phantom", position, true, true) + if summon then + corpse:remove() + player:addSummon(summon) + summon:reload() + position:sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true + end + else + player:sendCancelMessage("You cannot control more creatures.") + player:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + end + end + end + + player:getPosition():sendMagicEffect(CONST_ME_POFF) + player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + return false +end + +rune:group("support") +rune:id(83) +rune:name("Animate Dead") +rune:runeId(2316) +rune:allowFarUse(true) +rune:charges(1) +rune:level(27) +rune:magicLevel(4) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/antidote_rune.lua b/data/scripts/spells/runes/antidote_rune.lua new file mode 100644 index 000000000..36127a5cf --- /dev/null +++ b/data/scripts/spells/runes/antidote_rune.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_POISON) + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("healing") +rune:id(31) +rune:name("Antidote Rune") +rune:runeId(2266) +rune:allowFarUse(true) +rune:charges(1) +rune:level(15) +rune:magicLevel(0) +rune:cooldown(1 * 1000) +rune:groupCooldown(1 * 1000) +rune:isAggressive(false) +rune:needTarget(true) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/avalanche.lua b/data/scripts/spells/runes/avalanche.lua new file mode 100644 index 000000000..49d275da6 --- /dev/null +++ b/data/scripts/spells/runes/avalanche.lua @@ -0,0 +1,31 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE) +combat:setArea(createCombatArea(AREA_CIRCLE3X3)) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 1.2) + 7 + local max = (level / 5) + (maglevel * 2.8) + 17 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(115) +rune:name("Avalanche") +rune:runeId(2274) +rune:allowFarUse(true) +rune:charges(4) +rune:level(30) +rune:magicLevel(4) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/chameleon.lua b/data/scripts/spells/runes/chameleon.lua new file mode 100644 index 000000000..9bb0ee359 --- /dev/null +++ b/data/scripts/spells/runes/chameleon.lua @@ -0,0 +1,44 @@ +local rune = Spell("rune") + +local condition = Condition(CONDITION_OUTFIT) +condition:setTicks(200000) + +function rune.onCastSpell(creature, variant, isHotkey) + local position, item = variant:getPosition() + if position.x == CONTAINER_POSITION then + local container = creature:getContainerById(position.y - 64) + if container then + item = container:getItem(position.z) + else + item = creature:getSlotItem(position.y) + end + else + item = Tile(position):getTopDownItem() + end + + if not item or item.itemid == 0 or not isMoveable(item.uid) then + creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + creature:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + condition:setOutfit({lookTypeEx = item.itemid}) + creature:addCondition(condition) + creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) + return true +end + +rune:group("support") +rune:id(14) +rune:name("Chameleon Rune") +rune:runeId(2291) +rune:allowFarUse(true) +rune:charges(1) +rune:level(27) +rune:magicLevel(4) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:isAggressive(false) +rune:isSelfTarget(true) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/convince_creature.lua b/data/scripts/spells/runes/convince_creature.lua new file mode 100644 index 000000000..f608fc826 --- /dev/null +++ b/data/scripts/spells/runes/convince_creature.lua @@ -0,0 +1,53 @@ +local rune = Spell("rune") + +function rune.onCastSpell(creature, variant, isHotkey) + local target = Creature(variant:getNumber()) + if not target or not target:isMonster() then + creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + creature:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + local monsterType = target:getType() + if not getPlayerFlagValue(creature, PlayerFlag_CanConvinceAll) then + if not monsterType:isConvinceable() then + creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + creature:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + if #creature:getSummons() >= 2 then + creature:sendCancelMessage("You cannot control more creatures.") + creature:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + end + + local manaCost = target:getType():getManaCost() + if creature:getMana() < manaCost and not getPlayerFlagValue(creature, PlayerFlag_HasInfiniteMana) then + creature:sendCancelMessage(RETURNVALUE_NOTENOUGHMANA) + creature:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + creature:addMana(-manaCost) + creature:addManaSpent(manaCost) + creature:addSummon(target) + target:reload() + creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true +end + +rune:group("support") +rune:id(12) +rune:name("Convince Creature Rune") +rune:runeId(2290) +rune:allowFarUse(true) +rune:charges(1) +rune:level(16) +rune:magicLevel(5) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:needTarget(true) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/desintegrate_rune.lua b/data/scripts/spells/runes/desintegrate_rune.lua new file mode 100644 index 000000000..17a874e3a --- /dev/null +++ b/data/scripts/spells/runes/desintegrate_rune.lua @@ -0,0 +1,40 @@ +local rune = Spell("rune") + +local corpseIds = {3058, 3059, 3060, 3061, 3064, 3065, 3066} +local removalLimit = 500 + +function rune.onCastSpell(creature, variant, isHotkey) + local position = variant:getPosition() + local tile = Tile(position) + if tile then + local items = tile:getItems() + if items then + for i, item in ipairs(items) do + if item:getType():isMovable() and item:getUniqueId() > 65535 and item:getActionId() == 0 and not table.contains(corpseIds, item:getId()) then + item:remove() + end + + if i == removalLimit then + break + end + end + end + end + + creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + position:sendMagicEffect(CONST_ME_POFF) + return true +end + +rune:group("support") +rune:id(78) +rune:name("Desintegrate") +rune:runeId(2310) +rune:allowFarUse(false) +rune:charges(3) +rune:level(21) +rune:magicLevel(4) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:range(1) +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/destroy_field_rune.lua b/data/scripts/spells/runes/destroy_field_rune.lua new file mode 100644 index 000000000..7d57ee98e --- /dev/null +++ b/data/scripts/spells/runes/destroy_field_rune.lua @@ -0,0 +1,30 @@ +local rune = Spell("rune") + +function rune.onCastSpell(creature, variant, isHotkey) + local position = Variant.getPosition(variant) + local tile = Tile(position) + local field = tile and tile:getItemByType(ITEM_TYPE_MAGICFIELD) + if field and isInArray(FIELDS, field:getId()) then + field:remove() + position:sendMagicEffect(CONST_ME_POFF) + return true + end + + creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + creature:getPosition():sendMagicEffect(CONST_ME_POFF) + return false +end + +rune:group("support") +rune:id(30) +rune:name("Destroy Field") +rune:runeId(2261) +rune:allowFarUse(true) +rune:charges(3) +rune:level(17) +rune:magicLevel(3) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:isAggressive(false) +rune:range(5) +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/energy_bomb.lua b/data/scripts/spells/runes/energy_bomb.lua new file mode 100644 index 000000000..8863fd9d6 --- /dev/null +++ b/data/scripts/spells/runes/energy_bomb.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL) +combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_ENERGYFIELD_PVP) +combat:setArea(createCombatArea(AREA_SQUARE1X1)) + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(55) +rune:name("Energybomb") +rune:runeId(2262) +rune:allowFarUse(true) +rune:setPzLocked(true) +rune:charges(2) +rune:level(37) +rune:magicLevel(10) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() diff --git a/data/scripts/spells/runes/energy_field.lua b/data/scripts/spells/runes/energy_field.lua new file mode 100644 index 000000000..dc0751390 --- /dev/null +++ b/data/scripts/spells/runes/energy_field.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL) +combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_ENERGYFIELD_PVP) + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(27) +rune:name("Energy Field") +rune:runeId(2277) +rune:allowFarUse(true) +rune:setPzLocked(true) +rune:charges(3) +rune:level(18) +rune:magicLevel(3) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() diff --git a/data/scripts/spells/runes/energy_wall.lua b/data/scripts/spells/runes/energy_wall.lua new file mode 100644 index 000000000..9e3d61c0f --- /dev/null +++ b/data/scripts/spells/runes/energy_wall.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL) +combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_ENERGYFIELD_PVP) +combat:setArea(createCombatArea(AREA_WALLFIELD_ENERGY, AREADIAGONAL_WALLFIELD_ENERGY)) + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(33) +rune:name("Energy Wall") +rune:runeId(2279) +rune:allowFarUse(true) +rune:setPzLocked(true) +rune:charges(4) +rune:level(41) +rune:magicLevel(9) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() diff --git a/data/scripts/spells/runes/explosion.lua b/data/scripts/spells/runes/explosion.lua new file mode 100644 index 000000000..64cbe9d10 --- /dev/null +++ b/data/scripts/spells/runes/explosion.lua @@ -0,0 +1,33 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EXPLOSION) +combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) +combat:setArea(createCombatArea(AREA_CIRCLE1X1)) + +function onGetFormulaValues(player, level, maglevel) + local min = 0 + local max = (level / 5) + (maglevel * 4.8) + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(18) +rune:name("Explosion") +rune:runeId(2313) +rune:allowFarUse(true) +rune:charges(6) +rune:level(31) +rune:magicLevel(6) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/fire_bomb.lua b/data/scripts/spells/runes/fire_bomb.lua new file mode 100644 index 000000000..4299fd354 --- /dev/null +++ b/data/scripts/spells/runes/fire_bomb.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) +combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_FIREFIELD_PVP_FULL) +combat:setArea(createCombatArea(AREA_SQUARE1X1)) + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(17) +rune:name("Firebomb") +rune:runeId(2305) +rune:allowFarUse(true) +rune:setPzLocked(true) +rune:charges(2) +rune:level(27) +rune:magicLevel(5) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() diff --git a/data/scripts/spells/runes/fire_field.lua b/data/scripts/spells/runes/fire_field.lua new file mode 100644 index 000000000..30385a87c --- /dev/null +++ b/data/scripts/spells/runes/fire_field.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) +combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_FIREFIELD_PVP_FULL) + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(25) +rune:name("Fire Field") +rune:runeId(2301) +rune:allowFarUse(true) +rune:setPzLocked(true) +rune:charges(3) +rune:level(15) +rune:magicLevel(1) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() diff --git a/data/scripts/spells/runes/fire_wall.lua b/data/scripts/spells/runes/fire_wall.lua new file mode 100644 index 000000000..8c6b16988 --- /dev/null +++ b/data/scripts/spells/runes/fire_wall.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) +combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_FIREFIELD_PVP_FULL) +combat:setArea(createCombatArea(AREA_WALLFIELD, AREADIAGONAL_WALLFIELD)) + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(28) +rune:name("Fire Wall") +rune:runeId(2303) +rune:allowFarUse(true) +rune:setPzLocked(true) +rune:charges(4) +rune:level(33) +rune:magicLevel(6) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() diff --git a/data/scripts/spells/runes/fireball.lua b/data/scripts/spells/runes/fireball.lua new file mode 100644 index 000000000..c25bb2124 --- /dev/null +++ b/data/scripts/spells/runes/fireball.lua @@ -0,0 +1,32 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 1.81) + 10 + local max = (level / 5) + (maglevel * 3) + 18 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(15) +rune:name("Fireball") +rune:runeId(2302) +rune:allowFarUse(true) +rune:charges(5) +rune:level(27) +rune:magicLevel(4) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:needTarget(true) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/great_fireball.lua b/data/scripts/spells/runes/great_fireball.lua new file mode 100644 index 000000000..4b37e7a5a --- /dev/null +++ b/data/scripts/spells/runes/great_fireball.lua @@ -0,0 +1,31 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) +combat:setArea(createCombatArea(AREA_CIRCLE3X3)) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 1.2) + 7 + local max = (level / 5) + (maglevel * 2.8) + 17 + return -min, -max +end +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(16) +rune:name("Great Fireball") +rune:runeId(2304) +rune:allowFarUse(true) +rune:charges(4) +rune:level(30) +rune:magicLevel(4) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/heavy_magic_missile.lua b/data/scripts/spells/runes/heavy_magic_missile.lua new file mode 100644 index 000000000..bbf32efc2 --- /dev/null +++ b/data/scripts/spells/runes/heavy_magic_missile.lua @@ -0,0 +1,32 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 0.4) + 2 + local max = (level / 5) + (maglevel * 1.59) + 10 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(8) +rune:name("Heavy Magic Missile") +rune:runeId(2311) +rune:allowFarUse(true) +rune:charges(10) +rune:level(25) +rune:magicLevel(3) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:needTarget(true) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/holy_missile.lua b/data/scripts/spells/runes/holy_missile.lua new file mode 100644 index 000000000..9ce63ae7c --- /dev/null +++ b/data/scripts/spells/runes/holy_missile.lua @@ -0,0 +1,34 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 1.79) + 11 + local max = (level / 5) + (maglevel * 3.75) + 24 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(130) +rune:name("Holy Missile") +rune:runeId(2295) +rune:allowFarUse(true) +rune:charges(5) +rune:level(27) +rune:magicLevel(4) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:needTarget(true) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:vocation("paladin;true", "royal paladin;true") +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/icicle.lua b/data/scripts/spells/runes/icicle.lua new file mode 100644 index 000000000..3d89fd583 --- /dev/null +++ b/data/scripts/spells/runes/icicle.lua @@ -0,0 +1,31 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 1.81) + 10 + local max = (level / 5) + (maglevel * 3) + 18 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(114) +rune:name("Icicle") +rune:runeId(2271) +rune:allowFarUse(true) +rune:charges(5) +rune:level(28) +rune:magicLevel(4) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:needTarget(true) -- True = Solid / False = Creature +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/intense_healing_rune.lua b/data/scripts/spells/runes/intense_healing_rune.lua new file mode 100644 index 000000000..55231d697 --- /dev/null +++ b/data/scripts/spells/runes/intense_healing_rune.lua @@ -0,0 +1,41 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) +combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, 1) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 3.2) + 20 + local max = (level / 5) + (maglevel * 5.4) + 40 + return min, max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + if Monster(var:getNumber(1073762188)) then + creature:sendCancelMessage("Sorry, not possible.") + creature:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + else + return combat:execute(creature, var) + end +end + +rune:group("healing") +rune:id(4) +rune:name("Intense Healing Rune") +rune:runeId(2265) +rune:allowFarUse(true) +rune:charges(1) +rune:level(15) +rune:magicLevel(1) +rune:cooldown(1 * 1000) +rune:groupCooldown(1 * 1000) +rune:isAggressive(false) +rune:needTarget(true) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/light_magic_missile.lua b/data/scripts/spells/runes/light_magic_missile.lua new file mode 100644 index 000000000..442ab6290 --- /dev/null +++ b/data/scripts/spells/runes/light_magic_missile.lua @@ -0,0 +1,32 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 0.4) + 2 + local max = (level / 5) + (maglevel * 0.81) + 4 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(7) +rune:name("Light Magic Missile") +rune:runeId(2287) +rune:allowFarUse(true) +rune:charges(10) +rune:level(15) +rune:magicLevel(0) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:needTarget(true) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/light_stone_shower.lua b/data/scripts/spells/runes/light_stone_shower.lua new file mode 100644 index 000000000..9973fddc9 --- /dev/null +++ b/data/scripts/spells/runes/light_stone_shower.lua @@ -0,0 +1,33 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STONES) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH) +combat:setArea(createCombatArea(AREA_CIRCLE1X1)) + +function onGetFormulaValues(player, level, maglevel) + level = math.min(level, 20) + maglevel = math.min(maglevel, 20) + local min = (level / 5) + (maglevel * 0.3) + 2 + local max = (level / 5) + (maglevel * 0.45) + 3 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(116) +rune:name("Light Stone Shower") +rune:runeId(23722) +rune:allowFarUse(true) +rune:charges(4) +rune:level(1) +rune:magicLevel(0) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/lightest_magic_missile.lua b/data/scripts/spells/runes/lightest_magic_missile.lua new file mode 100644 index 000000000..6567d8abe --- /dev/null +++ b/data/scripts/spells/runes/lightest_magic_missile.lua @@ -0,0 +1,31 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + +function onGetFormulaValues(player, level, maglevel) + return -3, -5 +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(7) +rune:name("Lightest Magic Missile") +rune:runeId(19792) +rune:allowFarUse(true) +rune:charges(10) +rune:level(1) +rune:magicLevel(0) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:needTarget(true) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:vocation("sorcerer;true", "master sorcerer;true", "druid;true", "elder druid;true", "paladin;true", "royal paladin;true", "knight;true", "elite knight;true") +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/lightest_missile.lua b/data/scripts/spells/runes/lightest_missile.lua new file mode 100644 index 000000000..a7c29507b --- /dev/null +++ b/data/scripts/spells/runes/lightest_missile.lua @@ -0,0 +1,33 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 0.4) + 3 + local max = (level / 5) + (maglevel * 0.8) + 5 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(7) +rune:name("Lightest Missile") +rune:runeId(23723) +rune:allowFarUse(true) +rune:charges(10) +rune:level(1) +rune:magicLevel(0) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:needTarget(true) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:vocation("sorcerer;true", "master sorcerer;true", "druid;true", "elder druid;true", "paladin;true", "royal paladin;true") +rune:register() \ No newline at end of file diff --git a/data/scripts/runes/magic_wall.lua b/data/scripts/spells/runes/magic_wall.lua similarity index 100% rename from data/scripts/runes/magic_wall.lua rename to data/scripts/spells/runes/magic_wall.lua diff --git a/data/scripts/spells/runes/paralyze_rune.lua b/data/scripts/spells/runes/paralyze_rune.lua new file mode 100644 index 000000000..46fbc764b --- /dev/null +++ b/data/scripts/spells/runes/paralyze_rune.lua @@ -0,0 +1,36 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_UNDEFINEDDAMAGE) + +local condition = Condition(CONDITION_PARALYZE) +condition:setParameter(CONDITION_PARAM_TICKS, 6000) +condition:setFormula(-1, 45, -1, 45) +combat:addCondition(condition) + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var) + if not combat:execute(creature, var) then + return false + end + + creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) + return true +end + +rune:group("support") +rune:id(54) +rune:name("Paralyze") +rune:runeId(2278) +rune:allowFarUse(true) +rune:charges(1) +rune:setPzLocked(true) +rune:level(54) +rune:magicLevel(18) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:mana(1400) +rune:needTarget(true) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:vocation("druid;true", "elder druid;true") +rune:register() diff --git a/data/scripts/spells/runes/poison_bomb.lua b/data/scripts/spells/runes/poison_bomb.lua new file mode 100644 index 000000000..efe242910 --- /dev/null +++ b/data/scripts/spells/runes/poison_bomb.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) +combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_POISONFIELD_PVP) +combat:setArea(createCombatArea(AREA_SQUARE1X1)) + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(91) +rune:name("Poison Bomb") +rune:runeId(2286) +rune:allowFarUse(true) +rune:setPzLocked(true) +rune:charges(2) +rune:level(25) +rune:magicLevel(4) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() diff --git a/data/scripts/spells/runes/poison_field.lua b/data/scripts/spells/runes/poison_field.lua new file mode 100644 index 000000000..648756536 --- /dev/null +++ b/data/scripts/spells/runes/poison_field.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) +combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_POISONFIELD_PVP) + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(26) +rune:name("Poison Field") +rune:runeId(2285) +rune:allowFarUse(true) +rune:setPzLocked(true) +rune:charges(3) +rune:level(14) +rune:magicLevel(0) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() diff --git a/data/scripts/spells/runes/poison_wall.lua b/data/scripts/spells/runes/poison_wall.lua new file mode 100644 index 000000000..bc77091ab --- /dev/null +++ b/data/scripts/spells/runes/poison_wall.lua @@ -0,0 +1,26 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) +combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_POISONFIELD_PVP) +combat:setArea(createCombatArea(AREA_WALLFIELD, AREADIAGONAL_WALLFIELD)) + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(32) +rune:name("Poison Wall") +rune:runeId(2289) +rune:allowFarUse(true) +rune:setPzLocked(true) +rune:charges(4) +rune:level(29) +rune:magicLevel(5) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() diff --git a/data/scripts/spells/runes/soul_fire.lua b/data/scripts/spells/runes/soul_fire.lua new file mode 100644 index 000000000..7d7f9dd65 --- /dev/null +++ b/data/scripts/spells/runes/soul_fire.lua @@ -0,0 +1,29 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) + +local condition = Condition(CONDITION_FIRE) +condition:setParameter(CONDITION_PARAM_DELAYED, 1) +condition:addDamage(10, 2000, -10) +combat:addCondition(condition) + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(50) +rune:name("Soulfire") +rune:runeId(2308) +rune:allowFarUse(true) +rune:charges(3) +rune:level(27) +rune:magicLevel(7) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:needTarget(true) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/stalagmite.lua b/data/scripts/spells/runes/stalagmite.lua new file mode 100644 index 000000000..d3e354ab8 --- /dev/null +++ b/data/scripts/spells/runes/stalagmite.lua @@ -0,0 +1,31 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STONES) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 0.4) + 2 + local max = (level / 5) + (maglevel * 1.59) + 10 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(77) +rune:name("Stalagmite") +rune:runeId(2292) +rune:allowFarUse(true) +rune:charges(10) +rune:level(24) +rune:magicLevel(3) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:needTarget(true) -- True = Solid / False = Creature +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/stone_shower.lua b/data/scripts/spells/runes/stone_shower.lua new file mode 100644 index 000000000..6492e8e2f --- /dev/null +++ b/data/scripts/spells/runes/stone_shower.lua @@ -0,0 +1,31 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STONES) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH) +combat:setArea(createCombatArea(AREA_CIRCLE3X3)) + +function onGetFormulaValues(player, level, magicLevel) + local min = (level / 5) + (magicLevel * 1) + 6 + local max = (level / 5) + (magicLevel * 2.6) + 16 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(116) +rune:name("Stone Shower") +rune:runeId(2288) +rune:allowFarUse(true) +rune:charges(4) +rune:level(28) +rune:magicLevel(4) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/sudden_death.lua b/data/scripts/spells/runes/sudden_death.lua new file mode 100644 index 000000000..52af5bae4 --- /dev/null +++ b/data/scripts/spells/runes/sudden_death.lua @@ -0,0 +1,31 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 4.605) + 28 + local max = (level / 5) + (maglevel * 7.395) + 46 + return -min, -max +end +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(21) +rune:name("Sudden Death") +rune:runeId(2268) +rune:allowFarUse(true) +rune:charges(3) +rune:level(45) +rune:magicLevel(15) +rune:cooldown(1 * 1000) +rune:groupCooldown(900) +rune:needTarget(true) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/thunderstorm.lua b/data/scripts/spells/runes/thunderstorm.lua new file mode 100644 index 000000000..e3bbfbbcb --- /dev/null +++ b/data/scripts/spells/runes/thunderstorm.lua @@ -0,0 +1,31 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) +combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL) +combat:setArea(createCombatArea(AREA_CIRCLE3X3)) + +function onGetFormulaValues(player, level, magicLevel) + local min = (level / 5) + (magicLevel * 1) + 6 + local max = (level / 5) + (magicLevel * 2.6) + 16 + return -min, -max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + return combat:execute(creature, var) +end + +rune:group("attack") +rune:id(117) +rune:name("Thunderstorm") +rune:runeId(2315) +rune:allowFarUse(true) +rune:charges(4) +rune:level(28) +rune:magicLevel(4) +rune:cooldown(2 * 1000) +rune:groupCooldown(2 * 1000) +rune:register() \ No newline at end of file diff --git a/data/scripts/spells/runes/ultimate_healing_rune.lua b/data/scripts/spells/runes/ultimate_healing_rune.lua new file mode 100644 index 000000000..e5a1c3957 --- /dev/null +++ b/data/scripts/spells/runes/ultimate_healing_rune.lua @@ -0,0 +1,41 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) +combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, 1) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) + +function onGetFormulaValues(player, level, maglevel) + local min = (level / 5) + (maglevel * 7.3) + 42 + local max = (level / 5) + (maglevel * 12.4) + 90 + return min, max +end + +combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") + +local rune = Spell("rune") + +function rune.onCastSpell(creature, var, isHotkey) + if Monster(var:getNumber(1073762188)) then + creature:sendCancelMessage("Sorry, not possible.") + creature:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + else + return combat:execute(creature, var) + end +end + +rune:group("healing") +rune:id(5) +rune:name("Ultimate Healing Rune") +rune:runeId(2273) +rune:allowFarUse(true) +rune:charges(1) +rune:level(24) +rune:magicLevel(4) +rune:cooldown(1 * 1000) +rune:groupCooldown(1 * 1000) +rune:isAggressive(false) +rune:needTarget(true) +rune:isBlocking(true) -- True = Solid / False = Creature +rune:register() \ No newline at end of file diff --git a/data/scripts/runes/wild_growth.lua b/data/scripts/spells/runes/wild_growth.lua similarity index 94% rename from data/scripts/runes/wild_growth.lua rename to data/scripts/spells/runes/wild_growth.lua index 90971b9d7..afec608ee 100644 --- a/data/scripts/runes/wild_growth.lua +++ b/data/scripts/spells/runes/wild_growth.lua @@ -24,5 +24,5 @@ spell:runeId(2269) spell:charges(2) spell:isBlocking(true, true) spell:allowFarUse(true) -spell:vocation("druid;true", "elder druid") +spell:vocation("druid;true", "elder druid;true") spell:register() diff --git a/data/scripts/spells/summon/druid_familiar.lua b/data/scripts/spells/summon/druid_familiar.lua new file mode 100644 index 000000000..eca1e7991 --- /dev/null +++ b/data/scripts/spells/summon/druid_familiar.lua @@ -0,0 +1,89 @@ +local spell = Spell("instant") + +local familiar = { + [VOCATION.BASE_ID.DRUID] = {name = "Druid familiar"} +} + +local timer = { + [1] = {storage=Storage.PetSummonEvent10, countdown=10, message = "10 seconds"}, + [2] = {storage=Storage.PetSummonEvent60, countdown=60, message = "one minute"} +} + +local function sendMessageFunction(pid, message) + if Player(pid) then + Player(pid):sendTextMessage(MESSAGE_LOOT, "Your summon will disappear in less than " .. message) + end +end + +local function removePet(creatureId, playerId) + local creature = Creature(creatureId) + local player = Player(playerId) + if not creature or not player then + return true + end + creature:remove() + for sendMessage = 1, #timer do + player:setStorageValue(timer[sendMessage].storage, -1) + end +end + +function spell.onCastSpell(player, variant) + if not player or not isPremium(player) then + player:getPosition():sendMagicEffect(CONST_ME_POFF) + player:sendCancelMessage("You need a premium account.") + return false + end + + if #player:getSummons() >= 1 then + player:sendCancelMessage("You can't have other summons.") + player:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + local vocation = familiar[player:getVocation():getBaseId()] + local familiarName + + if vocation then + familiarName = vocation.name + end + + if not familiarName then + player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + player:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + local myFamiliar = Game.createMonster(familiarName, player:getPosition(), true, false) + if not myFamiliar then + player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + player:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + player:addSummon(myFamiliar) + myFamiliar:setOutfit({lookType = player:getFamiliarLooktype()}) + --myFamiliar:reload() + myFamiliar:registerEvent("FamiliarDeath") + local deltaSpeed = math.max(player:getSpeed() - myFamiliar:getBaseSpeed(), 0) + myFamiliar:changeSpeed(deltaSpeed) + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + myFamiliar:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + player:setStorageValue(Storage.PetSummon, os.time() + 15*60) -- 15 minutes from now + addEvent(removePet, 15*60*1000, myFamiliar:getId(), player:getId()) + for sendMessage = 1, #timer do + player:setStorageValue(timer[sendMessage].storage,addEvent(sendMessageFunction, (15*60-timer[sendMessage].countdown)*1000, player:getId(),timer[sendMessage].message)) + end + return true +end + +spell:group("support") +spell:id(197) +spell:name("Druid familiar") +spell:words("utevo gran res dru") +spell:level(200) +spell:mana(3000) +spell:cooldown(30 * 60 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("druid;true", "elder druid;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/summon/knight_familiar.lua b/data/scripts/spells/summon/knight_familiar.lua new file mode 100644 index 000000000..e6ff8f2c2 --- /dev/null +++ b/data/scripts/spells/summon/knight_familiar.lua @@ -0,0 +1,89 @@ +local spell = Spell("instant") + +local familiar = { + [VOCATION.BASE_ID.KNIGHT] = {name = "Knight familiar"} +} + +local timer = { + [1] = {storage=Storage.PetSummonEvent10, countdown=10, message = "10 seconds"}, + [2] = {storage=Storage.PetSummonEvent60, countdown=60, message = "one minute"} +} + +local function sendMessageFunction(pid, message) + if Player(pid) then + Player(pid):sendTextMessage(MESSAGE_LOOT, "Your summon will disappear in less than " .. message) + end +end + +local function removePet(creatureId, playerId) + local creature = Creature(creatureId) + local player = Player(playerId) + if not creature or not player then + return true + end + creature:remove() + for sendMessage = 1, #timer do + player:setStorageValue(timer[sendMessage].storage, -1) + end +end + +function spell.onCastSpell(player, variant) + if not player or not isPremium(player) then + player:getPosition():sendMagicEffect(CONST_ME_POFF) + player:sendCancelMessage("You need a premium account.") + return false + end + + if #player:getSummons() >= 1 then + player:sendCancelMessage("You can't have other summons.") + player:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + local vocation = familiar[player:getVocation():getBaseId()] + local familiarName + + if vocation then + familiarName = vocation.name + end + + if not familiarName then + player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + player:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + local myFamiliar = Game.createMonster(familiarName, player:getPosition(), true, false) + if not myFamiliar then + player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + player:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + player:addSummon(myFamiliar) + myFamiliar:setOutfit({lookType = player:getFamiliarLooktype()}) + --myFamiliar:reload() + myFamiliar:registerEvent("FamiliarDeath") + local deltaSpeed = math.max(player:getSpeed() - myFamiliar:getBaseSpeed(), 0) + myFamiliar:changeSpeed(deltaSpeed) + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + myFamiliar:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + player:setStorageValue(Storage.PetSummon, os.time() + 15*60) -- 15 minutes from now + addEvent(removePet, 15*60*1000, myFamiliar:getId(), player:getId()) + for sendMessage = 1, #timer do + player:setStorageValue(timer[sendMessage].storage,addEvent(sendMessageFunction, (15*60-timer[sendMessage].countdown)*1000, player:getId(),timer[sendMessage].message)) + end + return true +end + +spell:group("support") +spell:id(194) +spell:name("Knight familiar") +spell:words("utevo gran res eq") +spell:level(200) +spell:mana(1000) +spell:cooldown(30 * 60 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("knight;true", "elite knight;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/summon/paladin_familiar.lua b/data/scripts/spells/summon/paladin_familiar.lua new file mode 100644 index 000000000..8e5c2189c --- /dev/null +++ b/data/scripts/spells/summon/paladin_familiar.lua @@ -0,0 +1,89 @@ +local spell = Spell("instant") + +local familiar = { + [VOCATION.BASE_ID.PALADIN] = {name = "Paladin familiar"} +} + +local timer = { + [1] = {storage=Storage.PetSummonEvent10, countdown=10, message = "10 seconds"}, + [2] = {storage=Storage.PetSummonEvent60, countdown=60, message = "one minute"} +} + +local function sendMessageFunction(pid, message) + if Player(pid) then + Player(pid):sendTextMessage(MESSAGE_LOOT, "Your summon will disappear in less than " .. message) + end +end + +local function removePet(creatureId, playerId) + local creature = Creature(creatureId) + local player = Player(playerId) + if not creature or not player then + return true + end + creature:remove() + for sendMessage = 1, #timer do + player:setStorageValue(timer[sendMessage].storage, -1) + end +end + +function spell.onCastSpell(player, variant) + if not player or not isPremium(player) then + player:getPosition():sendMagicEffect(CONST_ME_POFF) + player:sendCancelMessage("You need a premium account.") + return false + end + + if #player:getSummons() >= 1 then + player:sendCancelMessage("You can't have other summons.") + player:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + local vocation = familiar[player:getVocation():getBaseId()] + local familiarName + + if vocation then + familiarName = vocation.name + end + + if not familiarName then + player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + player:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + local myFamiliar = Game.createMonster(familiarName, player:getPosition(), true, false) + if not myFamiliar then + player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + player:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + player:addSummon(myFamiliar) + myFamiliar:setOutfit({lookType = player:getFamiliarLooktype()}) + --myFamiliar:reload() + myFamiliar:registerEvent("FamiliarDeath") + local deltaSpeed = math.max(player:getSpeed() - myFamiliar:getBaseSpeed(), 0) + myFamiliar:changeSpeed(deltaSpeed) + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + myFamiliar:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + player:setStorageValue(Storage.PetSummon, os.time() + 15*60) -- 15 minutes from now + addEvent(removePet, 15*60*1000, myFamiliar:getId(), player:getId()) + for sendMessage = 1, #timer do + player:setStorageValue(timer[sendMessage].storage,addEvent(sendMessageFunction, (15*60-timer[sendMessage].countdown)*1000, player:getId(),timer[sendMessage].message)) + end + return true +end + +spell:group("support") +spell:id(195) +spell:name("Paladin familiar") +spell:words("utevo gran res sac") +spell:level(200) +spell:mana(2000) +spell:cooldown(30 * 60 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("paladin;true", "royal paladin;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/summon/sorcerer_familiar.lua b/data/scripts/spells/summon/sorcerer_familiar.lua new file mode 100644 index 000000000..4df86ff47 --- /dev/null +++ b/data/scripts/spells/summon/sorcerer_familiar.lua @@ -0,0 +1,89 @@ +local spell = Spell("instant") + +local familiar = { + [VOCATION.BASE_ID.SORCERER] = {name = "Sorcerer familiar"} +} + +local timer = { + [1] = {storage=Storage.PetSummonEvent10, countdown=10, message = "10 seconds"}, + [2] = {storage=Storage.PetSummonEvent60, countdown=60, message = "one minute"} +} + +local function sendMessageFunction(pid, message) + if Player(pid) then + Player(pid):sendTextMessage(MESSAGE_LOOT, "Your summon will disappear in less than " .. message) + end +end + +local function removePet(creatureId, playerId) + local creature = Creature(creatureId) + local player = Player(playerId) + if not creature or not player then + return true + end + creature:remove() + for sendMessage = 1, #timer do + player:setStorageValue(timer[sendMessage].storage, -1) + end +end + +function spell.onCastSpell(player, variant) + if not player or not isPremium(player) then + player:getPosition():sendMagicEffect(CONST_ME_POFF) + player:sendCancelMessage("You need a premium account.") + return false + end + + if #player:getSummons() >= 1 then + player:sendCancelMessage("You can't have other summons.") + player:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + local vocation = familiar[player:getVocation():getBaseId()] + local familiarName + + if vocation then + familiarName = vocation.name + end + + if not familiarName then + player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + player:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + local myFamiliar = Game.createMonster(familiarName, player:getPosition(), true, false) + if not myFamiliar then + player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + player:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + player:addSummon(myFamiliar) + myFamiliar:setOutfit({lookType = player:getFamiliarLooktype()}) + --myFamiliar:reload() + myFamiliar:registerEvent("FamiliarDeath") + local deltaSpeed = math.max(player:getSpeed() - myFamiliar:getBaseSpeed(), 0) + myFamiliar:changeSpeed(deltaSpeed) + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + myFamiliar:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + player:setStorageValue(Storage.PetSummon, os.time() + 15*60) -- 15 minutes from now + addEvent(removePet, 15*60*1000, myFamiliar:getId(), player:getId()) + for sendMessage = 1, #timer do + player:setStorageValue(timer[sendMessage].storage,addEvent(sendMessageFunction, (15*60-timer[sendMessage].countdown)*1000, player:getId(),timer[sendMessage].message)) + end + return true +end + +spell:group("support") +spell:id(196) +spell:name("Sorcerer familiar") +spell:words("utevo gran res ven") +spell:level(200) +spell:mana(3000) +spell:cooldown(30 * 60 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/summon/summon_creature.lua b/data/scripts/spells/summon/summon_creature.lua new file mode 100644 index 000000000..e65c2ce58 --- /dev/null +++ b/data/scripts/spells/summon/summon_creature.lua @@ -0,0 +1,61 @@ +local spell = Spell("instant") + +function spell.onCastSpell(player, variant) + local monsterName = variant:getString() + local monsterType = MonsterType(monsterName) + + if not monsterType then + player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + player:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + if not getPlayerFlagValue(player, PlayerFlag_CanSummonAll) then + if not monsterType:isSummonable() then + player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + player:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + if #player:getSummons() >= 2 then + player:sendCancelMessage("You cannot summon more players.") + player:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + end + + local manaCost = monsterType:getManaCost() + if player:getMana() < manaCost and not getPlayerFlagValue(player, PlayerFlag_HasInfiniteMana) then + player:sendCancelMessage(RETURNVALUE_NOTENOUGHMANA) + player:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + local position = player:getPosition() + local summon = Game.createMonster(monsterName, position, true, false) + if not summon then + player:sendCancelMessage(RETURNVALUE_NOTENOUGHROOM) + position:sendMagicEffect(CONST_ME_POFF) + return false + end + + player:addMana(-manaCost) + player:addManaSpent(manaCost) + player:addSummon(summon) + summon:reload() + position:sendMagicEffect(CONST_ME_MAGIC_BLUE) + summon:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + return true +end + +spell:group("support") +spell:id(9) +spell:name("Summon Creature") +spell:words("utevo res") +spell:level(25) +spell:hasParams(true) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("druid;true", "sorcerer;true", "elder druid;true", "master sorcerer;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/support/blood_rage.lua b/data/scripts/spells/support/blood_rage.lua new file mode 100644 index 000000000..5f2658178 --- /dev/null +++ b/data/scripts/spells/support/blood_rage.lua @@ -0,0 +1,36 @@ +local condition = Condition(CONDITION_ATTRIBUTES) +condition:setParameter(CONDITION_PARAM_SUBID, 5) +condition:setParameter(CONDITION_PARAM_TICKS, 10000) +condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, 135) +condition:setParameter(CONDITION_PARAM_BUFF_DAMAGERECEIVED, 115) +condition:setParameter(CONDITION_PARAM_DISABLE_DEFENSE, true) +condition:setParameter(CONDITION_PARAM_BUFF_SPELL, true) + +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + if creature:getCondition(CONDITION_ATTRIBUTES, CONDITIONID_COMBAT, 5) then + creature:removeCondition(CONDITION_ATTRIBUTES, CONDITIONID_COMBAT, 5) + end + return combat:execute(creature, var) +end + +spell:name("Blood Rage") +spell:words("utito tempo") +spell:group("support") +spell:vocation("knight;true", "elite knight;true") +spell:id(133) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(60) +spell:mana(290) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/support/cancel_invisibility.lua b/data/scripts/spells/support/cancel_invisibility.lua new file mode 100644 index 000000000..6f97b870c --- /dev/null +++ b/data/scripts/spells/support/cancel_invisibility.lua @@ -0,0 +1,25 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_INVISIBLE) +combat:setArea(createCombatArea(AREA_CIRCLE3X3)) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Cancel Invisibility") +spell:words("exana ina") +spell:group("support") +spell:vocation("paladin;true", "royal paladin;true") +spell:id(90) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(26) +spell:mana(200) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/support/cancel_magic_shield.lua b/data/scripts/spells/support/cancel_magic_shield.lua new file mode 100644 index 000000000..acbc1a9b4 --- /dev/null +++ b/data/scripts/spells/support/cancel_magic_shield.lua @@ -0,0 +1,25 @@ + +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + creature:removeCondition(CONDITION_MANASHIELD) + return combat:execute(creature, var) +end + +spell:group("support") +spell:id(245) +spell:name("Cancel Magic Shield") +spell:words("exana vita") +spell:level(14) +spell:mana(50) +spell:isAggressive(false) +spell:isSelfTarget(true) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:needLearn(false) +spell:vocation("druid;true", "sorcerer;true", "elder druid;true", "master sorcerer;true") +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/support/challenge.lua b/data/scripts/spells/support/challenge.lua new file mode 100644 index 000000000..889e07344 --- /dev/null +++ b/data/scripts/spells/support/challenge.lua @@ -0,0 +1,29 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setArea(createCombatArea(AREA_SQUARE1X1)) + +function onTargetCreature(creature, target) + return doChallengeCreature(creature, target) +end + +combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Challenge") +spell:words("exeta res") +spell:group("support") +spell:vocation("elite knight;true") +spell:id(93) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(20) +spell:mana(30) +spell:isAggressive(false) +spell:isPremium(true) +Spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/support/charge.lua b/data/scripts/spells/support/charge.lua new file mode 100644 index 000000000..0eaea988c --- /dev/null +++ b/data/scripts/spells/support/charge.lua @@ -0,0 +1,44 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +local condition = Condition(CONDITION_HASTE) +condition:setParameter(CONDITION_PARAM_TICKS, 5000) +condition:setFormula(0.9, -72, 0.9, -72) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + local summons = creature:getSummons() + if summons and type(summons) == 'table' and #summons > 0 then + for i = 1, #summons do + local summon = summons[i] + local summon_t = summon:getType() + if summon_t and summon_t:isPet() then + local deltaSpeed = math.max(creature:getBaseSpeed() - summon:getBaseSpeed(), 0) + local PetSpeed = ((summon:getBaseSpeed() + deltaSpeed) * 0.9) - 72 + local PetHaste = createConditionObject(CONDITION_HASTE) + setConditionParam(PetHaste, CONDITION_PARAM_TICKS, 5000) + setConditionParam(PetHaste, CONDITION_PARAM_SPEED, PetSpeed) + summon:addCondition(PetHaste) + end + end + end + return combat:execute(creature, variant) +end + +spell:name("Charge") +spell:words("utani tempo hur") +spell:group("support") +spell:vocation("knight;true", "elite knight;true") +spell:id(131) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(25) +spell:mana(100) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/support/chivalrous_challenge.lua b/data/scripts/spells/support/chivalrous_challenge.lua new file mode 100644 index 000000000..09e79e3a8 --- /dev/null +++ b/data/scripts/spells/support/chivalrous_challenge.lua @@ -0,0 +1,107 @@ +local function getDiagonalDistance(pos1, pos2) + local dstX = math.abs(pos1.x - pos2.x) + local dstY = math.abs(pos1.y - pos2.y) + if dstX > dstY then + return 14 * dstY + 10 * (dstX - dstY) + else + return 14 * dstX + 10 * (dstY - dstX) + end +end +local function chain(player) + local creatures = Game.getSpectators(player:getPosition(), false, false, 9, 9, 6, 6) + local totalChain = 0 + local monsters = {} + local meleeMonsters = {} + for _, creature in pairs(creatures) do + if creature:isMonster() then + if creature:getType():isRewardBoss() then + return -1 + elseif creature:getMaster() == nil and creature:getType():getTargetDistance() > 1 then + table.insert(monsters, creature) + elseif creature:getMaster() == nil then + table.insert(meleeMonsters, creature) + end + end + end + + local counter = 1 + local tempSize = #monsters + if tempSize < 5 and #meleeMonsters > 0 then + for i = tempSize, 5 do + if meleeMonsters[counter] ~= nil then + table.insert(monsters, meleeMonsters[counter]) + counter = counter + 1 + end + end + end + + local lastChain = player + local lastChainPosition = player:getPosition() + local closestMonster, closestMonsterIndex, closestMonsterPosition + local path, tempPosition, updateLastChain + while (totalChain < 5 and #monsters > 0) do + closestMonster = nil + for index, monster in pairs(monsters) do + tempPosition = monster:getPosition() + if not closestMonster or getDiagonalDistance(lastChain:getPosition(), tempPosition) < getDiagonalDistance(lastChain:getPosition(), closestMonsterPosition) then + closestMonster = monster + closestMonsterIndex = index + closestMonsterPosition = tempPosition + end + end + table.remove(monsters, closestMonsterIndex) + updateLastChain = false + if lastChainPosition:getDistance(closestMonsterPosition) == 1 then + updateLastChain = true + else + path = lastChainPosition:getPathTo(closestMonsterPosition, 0, 1, true, true, 9) + if path and #path > 0 then + for i=1, #path do + lastChainPosition:getNextPosition(path[i], 1) + lastChainPosition:sendMagicEffect(CONST_ME_CHIVALRIOUS_CHALLENGE) + end + updateLastChain = true + end + end + if updateLastChain then + closestMonsterPosition:sendMagicEffect(CONST_ME_CHIVALRIOUS_CHALLENGE) + closestMonster:changeTargetDistance(1) + doChallengeCreature(player, closestMonster) + lastChain = closestMonster + lastChainPosition = closestMonsterPosition + totalChain = totalChain + 1 + end + end + return totalChain +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + local total = chain(creature) + if total > 0 then + return true + elseif total == -1 then + creature:sendCancelMessage("You can't use this spell if there's a boss.") + creature:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + else + creature:sendCancelMessage("There are no monsters.") + creature:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end +end + +spell:group("support") +spell:id(237) +spell:name("Chivalrous Challenge") +spell:words("exeta amp res") +spell:level(150) +spell:mana(80) +spell:isAggressive(false) +spell:isPremium(true) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:vocation("knight;true", "elite knight;true") +spell:needLearn(false) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/support/creature_illusion.lua b/data/scripts/spells/support/creature_illusion.lua new file mode 100644 index 000000000..2c953fbe0 --- /dev/null +++ b/data/scripts/spells/support/creature_illusion.lua @@ -0,0 +1,39 @@ +local condition = Condition(CONDITION_OUTFIT) +condition:setTicks(180000) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + local returnValue = RETURNVALUE_NOERROR + local monsterType = MonsterType(variant:getString()) + if not monsterType then + returnValue = RETURNVALUE_CREATUREDOESNOTEXIST + elseif not getPlayerFlagValue(creature, PlayerFlag_CanIllusionAll) and not monsterType:isIllusionable() then + returnValue = RETURNVALUE_NOTPOSSIBLE + end + + if returnValue ~= RETURNVALUE_NOERROR then + creature:sendCancelMessage(returnValue) + creature:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + condition:setOutfit(monsterType:getOutfit()) + creature:addCondition(condition) + creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) + return true +end + +spell:name("Creature Illusion") +spell:words("utevo res ina") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:id(38) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(23) +spell:mana(100) +spell:hasParams(true) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/support/divine_dazzle.lua b/data/scripts/spells/support/divine_dazzle.lua new file mode 100644 index 000000000..72ab4e414 --- /dev/null +++ b/data/scripts/spells/support/divine_dazzle.lua @@ -0,0 +1,91 @@ +local function getDiagonalDistance(pos1, pos2) + local dstX = math.abs(pos1.x - pos2.x) + local dstY = math.abs(pos1.y - pos2.y) + if dstX > dstY then + return 14 * dstY + 10 * (dstX - dstY) + else + return 14 * dstX + 10 * (dstY - dstX) + end +end +local function chain(player) + local creatures = Game.getSpectators(player:getPosition(), false, false, 6, 6, 6, 6) + local totalChain = 0 + local monsters = {} + for _, creature in pairs(creatures) do + if creature:isMonster() then + if creature:getType():isRewardBoss() then + return -1 + elseif creature:getMaster() == nil and creature:getType():getTargetDistance() > 1 then + table.insert(monsters, creature) + end + end + end + local lastChain = player + local lastChainPosition = player:getPosition() + local closestMonster, closestMonsterIndex, closestMonsterPosition + local path, tempPosition, updateLastChain + while (totalChain < 3 and #monsters > 0) do + closestMonster = nil + for index, monster in pairs(monsters) do + tempPosition = monster:getPosition() + if not closestMonster or getDiagonalDistance(lastChain:getPosition(), tempPosition) < getDiagonalDistance(lastChain:getPosition(), closestMonsterPosition) then + closestMonster = monster + closestMonsterIndex = index + closestMonsterPosition = tempPosition + end + end + table.remove(monsters, closestMonsterIndex) + updateLastChain = false + if lastChainPosition:getDistance(closestMonsterPosition) == 1 then + updateLastChain = true + else + path = lastChainPosition:getPathTo(closestMonsterPosition, 0, 1, true, true, 9) + if path and #path > 0 then + for i=1, #path do + lastChainPosition:getNextPosition(path[i], 1) + lastChainPosition:sendMagicEffect(CONST_ME_DIVINE_DAZZLE) + end + updateLastChain = true + end + end + if updateLastChain then + closestMonsterPosition:sendMagicEffect(CONST_ME_DIVINE_DAZZLE) + closestMonster:changeTargetDistance(1) + lastChain = closestMonster + lastChainPosition = closestMonsterPosition + totalChain = totalChain + 1 + end + end + return totalChain +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + local total = chain(creature) + if total > 0 then + return true + elseif total == -1 then + creature:sendCancelMessage("You can't use this spell if there's a boss.") + creature:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + else + creature:sendCancelMessage("There are no ranged monsters.") + creature:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end +end + +spell:group("support") +spell:id(238) +spell:name("Divine Dazzle") +spell:words("exana amp res") +spell:level(250) +spell:mana(80) +spell:isAggressive(false) +spell:isPremium(true) +spell:cooldown(16 * 1000) +spell:groupCooldown(2 * 1000) +spell:vocation("paladin;true", "royal paladin;true") +spell:needLearn(false) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/support/expose_weakness.lua b/data/scripts/spells/support/expose_weakness.lua new file mode 100644 index 000000000..68f9a72d0 --- /dev/null +++ b/data/scripts/spells/support/expose_weakness.lua @@ -0,0 +1,45 @@ +local condition = Condition(CONDITION_ATTRIBUTES) +condition:setParameter(CONDITION_PARAM_TICKS, 16000) +condition:setParameter(CONDITION_PARAM_BUFF_DAMAGERECEIVED, 105) + +function onTargetCreature(creature, target) + local player = creature:getPlayer() + + if target:isPlayer() then + return false + end + if target:getMaster() then + return true + end + + target:addCondition(condition) + return true +end + +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) +combat:setArea(createCombatArea(AREA_CIRCLE3X3)) +combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var, isHotkey) + local target = creature:getTarget() + if target then + var = Variant(target) + end + return combat:execute(creature, var) +end + +spell:group("support") +spell:id(243) +spell:name("Expose Weakness") +spell:words("exori moe") +spell:level(275) +spell:mana(400) +spell:isSelfTarget(true) +spell:cooldown(12 * 1000) +spell:groupCooldown(2 * 1000) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:needLearn(false) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/support/find_person.lua b/data/scripts/spells/support/find_person.lua new file mode 100644 index 000000000..6c30a5f2f --- /dev/null +++ b/data/scripts/spells/support/find_person.lua @@ -0,0 +1,91 @@ +local LEVEL_LOWER = 1 +local LEVEL_SAME = 2 +local LEVEL_HIGHER = 3 + +local DISTANCE_BESIDE = 1 +local DISTANCE_CLOSE = 2 +local DISTANCE_FAR = 3 +local DISTANCE_VERYFAR = 4 + +local directions = { + [DIRECTION_NORTH] = "north", + [DIRECTION_SOUTH] = "south", + [DIRECTION_EAST] = "east", + [DIRECTION_WEST] = "west", + [DIRECTION_NORTHEAST] = "north-east", + [DIRECTION_NORTHWEST] = "north-west", + [DIRECTION_SOUTHEAST] = "south-east", + [DIRECTION_SOUTHWEST] = "south-west" +} + +local messages = { + [DISTANCE_BESIDE] = { + [LEVEL_LOWER] = "is below you", + [LEVEL_SAME] = "is standing next to you", + [LEVEL_HIGHER] = "is above you" + }, + [DISTANCE_CLOSE] = { + [LEVEL_LOWER] = "is on a lower level to the", + [LEVEL_SAME] = "is to the", + [LEVEL_HIGHER] = "is on a higher level to the" + }, + [DISTANCE_FAR] = "is far to the", + [DISTANCE_VERYFAR] = "is very far to the" +} + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + local target = Player(variant:getString()) + if not target or target:getGroup():getAccess() and not creature:getGroup():getAccess() then + creature:sendCancelMessage(RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE) + creature:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + local targetPosition = target:getPosition() + local creaturePosition = creature:getPosition() + local positionDifference = { + x = creaturePosition.x - targetPosition.x, + y = creaturePosition.y - targetPosition.y, + z = creaturePosition.z - targetPosition.z + } + + local maxPositionDifference, direction = math.max(math.abs(positionDifference.x), math.abs(positionDifference.y)) + if maxPositionDifference >= 5 then + local positionTangent = positionDifference.x ~= 0 and positionDifference.y / positionDifference.x or 10 + if math.abs(positionTangent) < 0.4142 then + direction = positionDifference.x > 0 and DIRECTION_WEST or DIRECTION_EAST + elseif math.abs(positionTangent) < 2.4142 then + direction = positionTangent > 0 and (positionDifference.y > 0 and DIRECTION_NORTHWEST or DIRECTION_SOUTHEAST) or positionDifference.x > 0 and DIRECTION_SOUTHWEST or DIRECTION_NORTHEAST + else + direction = positionDifference.y > 0 and DIRECTION_NORTH or DIRECTION_SOUTH + end + end + + local level = positionDifference.z > 0 and LEVEL_HIGHER or positionDifference.z < 0 and LEVEL_LOWER or LEVEL_SAME + local distance = maxPositionDifference < 5 and DISTANCE_BESIDE or maxPositionDifference < 101 and DISTANCE_CLOSE or maxPositionDifference < 275 and DISTANCE_FAR or DISTANCE_VERYFAR + local message = messages[distance][level] or messages[distance] + if distance ~= DISTANCE_BESIDE then + message = message .. " " .. directions[direction] + end + + creature:sendTextMessage(MESSAGE_LOOK, target:getName() .. " " .. message .. ".") + creaturePosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) + return true +end + +spell:name("Find Person") +spell:words("exiva") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "knight;true", "elite knight;true", "paladin;true", "royal paladin;true", "sorcerer;true", "master sorcerer;true") +spell:id(20) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(8) +spell:mana(20) +spell:hasParams(true) +spell:hasPlayerNameParam(true) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/support/food.lua b/data/scripts/spells/support/food.lua new file mode 100644 index 000000000..ac0d63dc4 --- /dev/null +++ b/data/scripts/spells/support/food.lua @@ -0,0 +1,35 @@ +local foods = { + 2666, -- meat + 2671, -- ham + 2681, -- grape + 2674, -- apple + 2689, -- bread + 2690, -- roll + 2696 -- cheese +} + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + if math.random(0, 1) == 1 then + creature:addItem(foods[math.random(#foods)]) + end + + creature:addItem(foods[math.random(#foods)]) + creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) + return true +end + +spell:name("Food") +spell:words("exevo pan") +spell:group("support") +spell:vocation("druid;true", "elder druid;true") +spell:id(42) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(14) +spell:mana(120) +spell:soul(1) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/support/great_light.lua b/data/scripts/spells/support/great_light.lua new file mode 100644 index 000000000..996801113 --- /dev/null +++ b/data/scripts/spells/support/great_light.lua @@ -0,0 +1,29 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +local condition = Condition(CONDITION_LIGHT) +condition:setParameter(CONDITION_PARAM_LIGHT_LEVEL, 8) +condition:setParameter(CONDITION_PARAM_LIGHT_COLOR, 215) +condition:setParameter(CONDITION_PARAM_TICKS, (11 * 60 + 35) * 1000) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Great Light") +spell:words("utevo gran lux") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "knight;true", "elite knight;true", "paladin;true", "royal paladin;true", "sorcerer;true", "master sorcerer;true") +spell:id(11) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(13) +spell:mana(60) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/support/haste.lua b/data/scripts/spells/support/haste.lua new file mode 100644 index 000000000..044722a23 --- /dev/null +++ b/data/scripts/spells/support/haste.lua @@ -0,0 +1,44 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +local condition = Condition(CONDITION_HASTE) +condition:setParameter(CONDITION_PARAM_TICKS, 33000) +condition:setFormula(0.3, -24, 0.3, -24) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + local summons = creature:getSummons() + if summons and type(summons) == 'table' and #summons > 0 then + for i = 1, #summons do + local summon = summons[i] + local summon_t = summon:getType() + if summon_t and summon_t:isPet() then + local deltaSpeed = math.max(creature:getBaseSpeed() - summon:getBaseSpeed(), 0) + local PetSpeed = ((summon:getBaseSpeed() + deltaSpeed) * 0.3) - 24 + local PetHaste = createConditionObject(CONDITION_HASTE) + setConditionParam(PetHaste, CONDITION_PARAM_TICKS, 33000) + setConditionParam(PetHaste, CONDITION_PARAM_SPEED, PetSpeed) + summon:addCondition(PetHaste) + end + end + end + return combat:execute(creature, variant) +end + +spell:name("Haste") +spell:words("utani hur") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "knight;true", "elite knight;true", "paladin;true", "royal paladin;true", "sorcerer;true", "master sorcerer;true") +spell:id(6) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(14) +spell:mana(60) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/support/invisible.lua b/data/scripts/spells/support/invisible.lua new file mode 100644 index 000000000..5588a85d0 --- /dev/null +++ b/data/scripts/spells/support/invisible.lua @@ -0,0 +1,27 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +local condition = Condition(CONDITION_INVISIBLE) +condition:setParameter(CONDITION_PARAM_TICKS, 200000) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Invisibility") +spell:words("utana vid") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:id(45) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(35) +spell:mana(440) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/support/levitate.lua b/data/scripts/spells/support/levitate.lua new file mode 100644 index 000000000..1b0eb4ed8 --- /dev/null +++ b/data/scripts/spells/support/levitate.lua @@ -0,0 +1,47 @@ +local function levitate(creature, parameter) + local fromPosition = creature:getPosition() + + if parameter == "up" and fromPosition.z ~= 8 or parameter == "down" and fromPosition.z ~= 7 then + local toPosition = creature:getPosition() + toPosition:getNextPosition(creature:getDirection()) + + local tile = Tile(parameter == "up" and Position(fromPosition.x, fromPosition.y, fromPosition.z - 1) or toPosition) + if not tile or not tile:getGround() and not tile:hasFlag(parameter == "up" and TILESTATE_IMMOVABLEBLOCKSOLID or TILESTATE_BLOCKSOLID) then + tile = Tile(toPosition.x, toPosition.y, toPosition.z + (parameter == "up" and -1 or 1)) + + if tile and tile:getGround() and not tile:hasFlag(bit.bor(TILESTATE_IMMOVABLEBLOCKSOLID, TILESTATE_FLOORCHANGE)) then + return creature:move(tile, bit.bor(FLAG_IGNOREBLOCKITEM, FLAG_IGNOREBLOCKCREATURE)) + end + end + end + return RETURNVALUE_NOTPOSSIBLE +end + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + local returnValue = levitate(creature, variant:getString():lower()) + if returnValue ~= RETURNVALUE_NOERROR then + creature:sendCancelMessage(returnValue) + creature:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + + creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + return true +end + +spell:name("Levitate") +spell:words("exani hur") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "knight;true", "elite knight;true", "paladin;true", "royal paladin;true", "sorcerer;true", "master sorcerer;true") +spell:id(81) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(12) +spell:mana(50) +spell:hasParams(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/support/light.lua b/data/scripts/spells/support/light.lua new file mode 100644 index 000000000..b933c51b5 --- /dev/null +++ b/data/scripts/spells/support/light.lua @@ -0,0 +1,29 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +local condition = Condition(CONDITION_LIGHT) +condition:setParameter(CONDITION_PARAM_LIGHT_LEVEL, 6) +condition:setParameter(CONDITION_PARAM_LIGHT_COLOR, 215) +condition:setParameter(CONDITION_PARAM_TICKS, (6 * 60 + 10) * 1000) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Light") +spell:words("utevo lux") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "knight;true", "elite knight;true", "paladin;true", "royal paladin;true", "sorcerer;true", "master sorcerer;true") +spell:id(10) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(8) +spell:mana(20) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/support/magic_rope.lua b/data/scripts/spells/support/magic_rope.lua new file mode 100644 index 000000000..0ed2e4203 --- /dev/null +++ b/data/scripts/spells/support/magic_rope.lua @@ -0,0 +1,37 @@ +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local position = creature:getPosition() + position:sendMagicEffect(CONST_ME_POFF) + + local tile = Tile(position) + if not tile:isRopeSpot() then + creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) + return false + end + + tile = Tile(position:moveUpstairs()) + if not tile then + creature:sendCancelMessage(RETURNVALUE_NOTENOUGHROOM) + return false + end + + creature:teleportTo(position, false) + position:sendMagicEffect(CONST_ME_TELEPORT) + return true +end + +spell:name("Magic Rope") +spell:words("exani tera") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "knight;true", "elite knight;true", "paladin;true", "royal paladin;true", "sorcerer;true", "master sorcerer;true") +spell:id(76) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(9) +spell:mana(20) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/support/magic_shield.lua b/data/scripts/spells/support/magic_shield.lua new file mode 100644 index 000000000..5ba7ccc18 --- /dev/null +++ b/data/scripts/spells/support/magic_shield.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local condition = Condition(CONDITION_MANASHIELD) + condition:setParameter(CONDITION_PARAM_TICKS, 180000) + local player = creature:getPlayer() + if player then + condition:setParameter(CONDITION_PARAM_MANASHIELD, math.min(player:getMaxMana(), 300 + 7.6 * player:getLevel() + 7 * player:getMagicLevel())) + end + creature:addCondition(condition) + return combat:execute(creature, var) +end + +spell:name("Magic Shield") +spell:words("utamo vita") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:id(44) +spell:cooldown(14 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(14) +spell:mana(50) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/support/protector.lua b/data/scripts/spells/support/protector.lua new file mode 100644 index 000000000..8a4cab53f --- /dev/null +++ b/data/scripts/spells/support/protector.lua @@ -0,0 +1,36 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +local skill = Condition(CONDITION_ATTRIBUTES) +skill:setParameter(CONDITION_PARAM_SUBID, 5) +skill:setParameter(CONDITION_PARAM_TICKS, 13000) +skill:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, 220) +skill:setParameter(CONDITION_PARAM_BUFF_DAMAGEDEALT, 65) +skill:setParameter(CONDITION_PARAM_BUFF_DAMAGERECEIVED, 85) +skill:setParameter(CONDITION_PARAM_BUFF_SPELL, true) +combat:addCondition(skill) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + if creature:getCondition(CONDITION_ATTRIBUTES, CONDITIONID_COMBAT, 5) then + creature:removeCondition(CONDITION_ATTRIBUTES, CONDITIONID_COMBAT, 5) + end + return combat:execute(creature, variant) +end + +spell:name("Protector") +spell:words("utamo tempo") +spell:group("support") +spell:vocation("knight;true", "elite knight;true") +spell:id(132) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(55) +spell:mana(200) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/support/sap_strength.lua b/data/scripts/spells/support/sap_strength.lua new file mode 100644 index 000000000..b083941c0 --- /dev/null +++ b/data/scripts/spells/support/sap_strength.lua @@ -0,0 +1,45 @@ +local condition = Condition(CONDITION_ATTRIBUTES) +condition:setParameter(CONDITION_PARAM_TICKS, 16000) +condition:setParameter(CONDITION_PARAM_BUFF_DAMAGEDEALT, 90) + +function onTargetCreature(creature, target) + local player = creature:getPlayer() + + if target:isPlayer() then + return false + end + if target:getMaster() then + return true + end + + target:addCondition(condition) + return true +end + +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) +combat:setArea(createCombatArea(AREA_CIRCLE3X3)) +combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var, isHotkey) + local target = creature:getTarget() + if target then + var = Variant(target) + end + return combat:execute(creature, var) +end + +spell:group("support") +spell:id(244) +spell:name("Sap Strength") +spell:words("exori kor") +spell:level(275) +spell:mana(300) +spell:isSelfTarget(true) +spell:cooldown(8 * 1000) +spell:groupCooldown(2 * 1000) +spell:vocation("sorcerer;true", "master sorcerer;true") +spell:needLearn(false) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/support/sharpshooter.lua b/data/scripts/spells/support/sharpshooter.lua new file mode 100644 index 000000000..97716ceee --- /dev/null +++ b/data/scripts/spells/support/sharpshooter.lua @@ -0,0 +1,47 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) + +local skill = Condition(CONDITION_ATTRIBUTES) +skill:setParameter(CONDITION_PARAM_SUBID, 6) +skill:setParameter(CONDITION_PARAM_TICKS, 10000) +skill:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, 140) +skill:setParameter(CONDITION_PARAM_DISABLE_DEFENSE, true) +skill:setParameter(CONDITION_PARAM_BUFF_SPELL, true) +combat:addCondition(skill) + +local speed = Condition(CONDITION_PARALYZE) +speed:setParameter(CONDITION_PARAM_TICKS, 10000) +speed:setFormula(-0.7, 56, -0.7, 56) +combat:addCondition(speed) + +local exhaustHealGroup = Condition(CONDITION_SPELLGROUPCOOLDOWN) +exhaustHealGroup:setParameter(CONDITION_PARAM_SUBID, 2) +exhaustHealGroup:setParameter(CONDITION_PARAM_TICKS, 10000) +combat:addCondition(exhaustHealGroup) + +local exhaustSupportGroup = Condition(CONDITION_SPELLGROUPCOOLDOWN) +exhaustSupportGroup:setParameter(CONDITION_PARAM_SUBID, 3) +exhaustSupportGroup:setParameter(CONDITION_PARAM_TICKS, 10000) +combat:addCondition(exhaustSupportGroup) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, variant) + return combat:execute(creature, variant) +end + +spell:name("Sharpshooter") +spell:words("utito tempo san") +spell:group("support", "healing") +spell:vocation("paladin;true", "royal paladin;true") +spell:id(135) +spell:cooldown(2 * 1000) +spell:groupCooldown(10 * 1000, 10 * 1000) +spell:level(60) +spell:mana(450) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(false) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/support/strong_haste.lua b/data/scripts/spells/support/strong_haste.lua new file mode 100644 index 000000000..99d3fd430 --- /dev/null +++ b/data/scripts/spells/support/strong_haste.lua @@ -0,0 +1,44 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) + +local condition = Condition(CONDITION_HASTE) +condition:setParameter(CONDITION_PARAM_TICKS, 22000) +condition:setFormula(0.7, -56, 0.7, -56) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summons = creature:getSummons() + if summons and type(summons) == 'table' and #summons > 0 then + for i = 1, #summons do + local summon = summons[i] + local summon_t = summon:getType() + if summon_t and summon_t:isPet() then + local deltaSpeed = math.max(creature:getBaseSpeed() - summon:getBaseSpeed(), 0) + local PetSpeed = ((summon:getBaseSpeed() + deltaSpeed) * 0.7) - 56 + local PetHaste = createConditionObject(CONDITION_HASTE) + setConditionParam(PetHaste, CONDITION_PARAM_TICKS, 22000) + setConditionParam(PetHaste, CONDITION_PARAM_SPEED, PetSpeed) + summon:addCondition(PetHaste) + end + end + end + return combat:execute(creature, var) +end + +spell:name("Strong Haste") +spell:words("utani gran hur") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:id(39) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(20) +spell:mana(100) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() \ No newline at end of file diff --git a/data/scripts/spells/support/swift_foot.lua b/data/scripts/spells/support/swift_foot.lua new file mode 100644 index 000000000..08217d2dc --- /dev/null +++ b/data/scripts/spells/support/swift_foot.lua @@ -0,0 +1,57 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) + +local exhaust = Condition(CONDITION_EXHAUST_COMBAT) +exhaust:setParameter(CONDITION_PARAM_TICKS, 10000) +combat:addCondition(exhaust) + +local condition = Condition(CONDITION_HASTE) +condition:setParameter(CONDITION_PARAM_TICKS, 10000) +condition:setFormula(0.8, -72, 0.8, -72) +combat:addCondition(condition) + +local exhaustAttackGroup = Condition(CONDITION_SPELLGROUPCOOLDOWN) +exhaustAttackGroup:setParameter(CONDITION_PARAM_SUBID, 1) +exhaustAttackGroup:setParameter(CONDITION_PARAM_TICKS, 10000) +combat:addCondition(exhaustAttackGroup) + +local disable = Condition(CONDITION_PACIFIED) +disable:setParameter(CONDITION_PARAM_TICKS, 10000) +combat:addCondition(disable) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + local summons = creature:getSummons() + if summons and type(summons) == 'table' and #summons > 0 then + for i = 1, #summons do + local summon = summons[i] + local summon_t = summon:getType() + if summon_t and summon_t:isPet() then + local deltaSpeed = math.max(creature:getBaseSpeed() - summon:getBaseSpeed(), 0) + local PetSpeed = ((summon:getBaseSpeed() + deltaSpeed) * 0.8) - 72 + local PetHaste = createConditionObject(CONDITION_HASTE) + setConditionParam(PetHaste, CONDITION_PARAM_TICKS, 10000) + setConditionParam(PetHaste, CONDITION_PARAM_SPEED, PetSpeed) + summon:addCondition(PetHaste) + end + end + end + return combat:execute(creature, var) +end + +spell:name("Swift Foot") +spell:words("utamo tempo san") +spell:group("support") +spell:vocation("paladin;true", "royal paladin;true") +spell:id(134) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(55) +spell:mana(400) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() diff --git a/data/scripts/spells/support/ultimate_light.lua b/data/scripts/spells/support/ultimate_light.lua new file mode 100644 index 000000000..9780cfc7b --- /dev/null +++ b/data/scripts/spells/support/ultimate_light.lua @@ -0,0 +1,30 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) +combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) + +local condition = Condition(CONDITION_LIGHT) +condition:setParameter(CONDITION_PARAM_LIGHT_LEVEL, 8) +condition:setParameter(CONDITION_PARAM_LIGHT_COLOR, 215) +condition:setParameter(CONDITION_PARAM_TICKS, (60 * 33 + 10) * 1000) +combat:addCondition(condition) + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("Ultimate Light") +spell:words("utevo vis lux") +spell:group("support") +spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true") +spell:id(75) +spell:cooldown(2 * 1000) +spell:groupCooldown(2 * 1000) +spell:level(26) +spell:mana(140) +spell:isSelfTarget(true) +spell:isAggressive(false) +spell:isPremium(true) +spell:needLearn(false) +spell:register() \ No newline at end of file diff --git a/data/scripts/talkactions/god/reload.lua b/data/scripts/talkactions/god/reload.lua index cc92e6e94..985403319 100644 --- a/data/scripts/talkactions/god/reload.lua +++ b/data/scripts/talkactions/god/reload.lua @@ -32,9 +32,6 @@ local reloadTypes = { ["scripts"] = RELOAD_TYPE_SCRIPTS, - ["spell"] = RELOAD_TYPE_SPELLS, - ["spells"] = RELOAD_TYPE_SPELLS, - ["stage"] = RELOAD_TYPE_STAGES, ["stages"] = RELOAD_TYPE_STAGES, diff --git a/data/spells/lib/spells.lua b/data/spells/lib/spells.lua deleted file mode 100644 index 6a54a3e4f..000000000 --- a/data/spells/lib/spells.lua +++ /dev/null @@ -1,506 +0,0 @@ ---Pre-made areas - ---Waves -AREA_SHORTWAVE3 = { -{1, 1, 1}, -{1, 1, 1}, -{0, 3, 0} -} - -AREA_WAVE10 = { -{1, 1, 1, 1, 1, 1, 1}, -{0, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 0, 0}, -{0, 0, 0, 3, 0, 0, 0} -} - -AREA_WAVE11 = { -{1, 1, 1, 1, 1, 1, 1}, -{0, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 0, 0, 0}, -{0, 0, 0, 3, 0, 0, 0} -} - -AREA_WAVE12 = { -{0, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 0, 0, 0}, -{0, 0, 0, 3, 0, 0, 0} -} - -AREA_WAVE13 = { -{1, 1, 1, 1, 1, 1, 1}, -{1, 1, 1, 1, 1, 1, 1}, -{0, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 0, 0, 0}, -{0, 0, 0, 3, 0, 0, 0} -} - -AREA_WAVE4 = { -{1, 1, 1, 1, 1}, -{0, 1, 1, 1, 0}, -{0, 1, 1, 1, 0}, -{0, 0, 3, 0, 0} -} - -AREA_WAVE5 = { -{1, 1, 1, 1, 1}, -{0, 1, 1, 1, 0}, -{0, 1, 1, 1, 0}, -{0, 1, 1, 1, 0}, -{0, 0, 1, 0, 0}, -{0, 0, 3, 0, 0} -} - -AREA_WAVE6 = { -{0, 0, 0, 0, 0}, -{0, 1, 3, 1, 0}, -{0, 0, 0, 0, 0} -} - -AREA_WAVE7 = { -{1, 1, 1, 1, 1}, -{1, 1, 1, 1, 1}, -{0, 1, 1, 1, 0}, -{0, 1, 1, 1, 0}, -{0, 0, 3, 0, 0} -} - -AREA_SQUAREWAVE5 = { -{1, 1, 1}, -{1, 1, 1}, -{1, 1, 1}, -{0, 1, 0}, -{0, 3, 0} -} - -AREA_SQUAREWAVE6 = { -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} -} - -AREA_SQUAREWAVE7 = { -{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} -} - ---Diagonal waves -AREADIAGONAL_WAVE4 = { -{0, 0, 0, 0, 1, 0}, -{0, 0, 0, 1, 1, 0}, -{0, 0, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 0}, -{1, 1, 1, 1, 1, 0}, -{0, 0, 0, 0, 0, 3} -} - -AREADIAGONAL_SQUAREWAVE5 = { -{1, 1, 1, 0, 0}, -{1, 1, 1, 0, 0}, -{1, 1, 1, 0, 0}, -{0, 0, 0, 1, 0}, -{0, 0, 0, 0, 3} -} - -AREADIAGONAL_WAVE6 = { -{0, 0, 1}, -{0, 3, 0}, -{1, 0, 0} -} - -AREADIAGONAL_WAVE7 = { -{0, 0, 0, 0, 0, 1, 0}, -{0, 0, 0, 0, 1, 1, 0}, -{0, 0, 0, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 0}, -{1, 1, 1, 1, 1, 1, 0}, -{0, 0, 0, 0, 0, 0, 3} -} - ---Beams -AREA_BEAM1 = { -{3} -} - -AREA_BEAM5 = { -{1}, -{1}, -{1}, -{1}, -{3} -} - -AREA_BEAM7 = { -{1}, -{1}, -{1}, -{1}, -{1}, -{1}, -{3} -} - -AREA_BEAM8 = { -{1}, -{1}, -{1}, -{1}, -{1}, -{1}, -{1}, -{3} -} - ---Diagonal Beams -AREADIAGONAL_BEAM5 = { -{1, 0, 0, 0, 0}, -{0, 1, 0, 0, 0}, -{0, 0, 1, 0, 0}, -{0, 0, 0, 1, 0}, -{0, 0, 0, 0, 3} -} - -AREADIAGONAL_BEAM7 = { -{1, 0, 0, 0, 0, 0, 0}, -{0, 1, 0, 0, 0, 0, 0}, -{0, 0, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 0, 0}, -{0, 0, 0, 0, 0, 1, 0}, -{0, 0, 0, 0, 0, 0, 3} -} - ---Circles -AREA_CIRCLE2X2 = { -{0, 1, 1, 1, 0}, -{1, 1, 1, 1, 1}, -{1, 1, 3, 1, 1}, -{1, 1, 1, 1, 1}, -{0, 1, 1, 1, 0} -} - -AREA_CIRCLE3X3 = { -{0, 0, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 0}, -{1, 1, 1, 1, 1, 1, 1}, -{1, 1, 1, 3, 1, 1, 1}, -{1, 1, 1, 1, 1, 1, 1}, -{0, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 0, 0} -} - -AREA_CIRCLE3X32 = { -{1, 1, 1, 1, 1, 1, 1}, -{1, 1, 1, 1, 1, 1, 1}, -{1, 1, 1, 1, 1, 1, 1}, -{1, 1, 1, 3, 1, 1, 1}, -{1, 1, 1, 1, 1, 1, 1}, -{1, 1, 1, 1, 1, 1, 1}, -{1, 1, 1, 1, 1, 1, 1} -} - -AREA_CIRCLE3X33 = { -{1, 1, 1, 1, 1, 1, 1}, -{1, 1, 1, 1, 1, 1, 1}, -{1, 1, 0, 0, 1, 1, 1}, -{1, 1, 0, 3, 1, 1, 1}, -{1, 1, 0, 1, 1, 1, 1}, -{1, 1, 1, 1, 1, 1, 1}, -{1, 1, 1, 1, 1, 1, 1} -} - --- Crosses -AREA_CIRCLE1X1 = { -{0, 1, 0}, -{1, 3, 1}, -{0, 1, 0} -} - -AREA_CIRCLE5X5 = { -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0} -} - -AREA_CIRCLE5X5V2 = { -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} -} - -AREA_CIRCLE6X6 = { -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0} -} - ---Squares -AREA_SQUARE1X1 = { -{1, 1, 1}, -{1, 3, 1}, -{1, 1, 1} -} - --- Walls -AREA_WALLFIELD = { -{1, 1, 3, 1, 1} -} - -AREADIAGONAL_WALLFIELD = { -{0, 0, 0, 0, 1}, -{0, 0, 0, 1, 1}, -{0, 1, 3, 1, 0}, -{1, 1, 0, 0, 0}, -{1, 0, 0, 0, 0}, -} - --- Walls Energy -AREA_WALLFIELD_ENERGY = { -{1, 1, 1, 3, 1, 1, 1} -} - -AREADIAGONAL_WALLFIELD_ENERGY = { -{0, 0, 0, 0, 0, 0, 1}, -{0, 0, 0, 0, 0, 1, 1}, -{0, 0, 0, 0, 1, 1, 0}, -{0, 0, 1, 3, 1, 0, 0}, -{0, 1, 1, 0, 0, 0, 0}, -{0, 1, 0, 0, 0, 0, 0}, -{1, 0, 0, 0, 0, 0, 0}, -} - --- Spells-only arrays - ---This HUGE array contains all corpses of the game, until protocol 8.0 --- It is used on animate dead rune and on undead legion spell. No unmoveable corpses are there. -CORPSES = { -2806,2807,2808,2809,2810,2811,2812,2813,2814,2815,2816,2817,2818,2819,2820,2821,2822,2823, -2824,2825,2826,2827,2828,2829,2830,2831,2832,2833,2834,2835,2836,2837,2838,2839,2840,2841, -2842,2843,2844,2845,2846,2847,2848,2849,2850,2851,2852,2853,2854,2855,2856,2857,2858,2859, -2879,2880,2881,2882,2883,2884,2885,2886,2887,2888,2889,2890,2891,2892,2893,2894,2895,2896, -2897,2898,2899,2900,2901,2902,2903,2904,2905,2906,2907,2908,2909,2910,2911,2912,2913,2914, -2915,2916,2917,2918,2919,2920,2921,2922,2923,2924,2925,2926,2927,2928,2929,2930,2931,2932, -2933,2934,2935,2936,2937,2938,2939,2940,2941,2942,2943,2944,2945,2946,2947,2948,2949,2950, -2951,2952,2953,2954,2955,2956,2957,2958,2959,2960,2961,2962,2963,2964,2965,2966,2967,2968, -2969,2970,2971,2972,2973,2974,2975,2976,2977,2978,2979,2980,2981,2982,2983,2984,2985,2986, -2987,2988,2989,2990,2991,2992,2993,2994,2995,2996,2997,2998,2999,3000,3001,3002,3003,3004, -3005,3006,3007,3008,3009,3010,3011,3012,3013,3014,3015,3016,3017,3018,3019,3020,3021,3022, -3023,3024,3025,3026,3027,3028,3029,3030,3031,3032,3033,3034,3035,3036,3037,3038,3039,3040, -3041,3042,3043,3044,3045,3046,3047,3048,3049,3050,3051,3052,3053,3054,3055,3056,3057,3058, -3059,3060,3061,3062,3063,3064,3065,3066,3067,3068,3069,3070,3071,3072,3073,3074,3075,3076, -3077,3078,3079,3080,3081,3082,3083,3084,3085,3086,3087,3088,3089,3090,3091,3092,3093,3094, -3095,3096,3097,3098,3099,3100,3101,3102,3103,3104,3105,3106,3107,3108,3109,3110,3111,3112, -3113,3114,3115,3116,3117,3118,3119,3120,3121,3128,3129,3130,3131,3132,3133,3134,4252,4253, -4254,4255,4256,4257,4258,4259,4260,4261,4262,4263,4264,4265,4266,4267,4268,4269,4270,4271, -4272,4273,4274,4275,4276,4277,4278,4279,4280,4281,4282,4283,4284,4285,4286,4287,4288,4289, -4290,4291,4292,4293,4294,4295,4296,4297,4298,4299,4300,4301,4302,4303,4304,4305,4306,4307, -4308,4309,4310,4311,4312,4313,4314,4315,4316,4317,4318,4319,4320,4321,4322,4323,4324,4325, -4326,4327,5522,5523,5524,5525,5526,5527,5528,5529,5530,5531,5532,5533,5534,5535,5536,5537, -5538,5540,5541,5542,5565,5566,5567,5568,5625,5626,5627,5628,5629,5630,5666,5667,5668,5688, -5689,5690,5727,5728,5729,5762,5765,5766,5767,5931,5932,5933,5934,5935,5936,5965,6022,6082, -6083,6084,6303,6304,6305,6307,6308,6309,6310,6313,6314,6315,6317,6318,6319,6321,6322,6323, -6325,6326,6327,6328,6329,6330,6333,6334,6335,6337,6338,6339,6341,6342,6343,6345,6346,6347, -6349,6350,6351,6355,6365,6366,6367,6520,6521,6522,6560,7092,7093,7094,7256,7257,7258,7283, -7284,7285,7317,7318,7319,7321,7322,7323,7325,7326,7328,7329,7331,7332,7333,7335,7336,7337, -7339,7340,7341,7345,7346,7347,7623,7624,7625,7626,7627,7629,7630,7631,7638,7639,7640,7741, -7742,7743,7848,7849,7908,7927,7928,7929,7931,7970,7971,8272} - --- This array contains all destroyable field items -FIELDS = {1487,1488,1489,1490,1491,1492,1493,1494,1495,1496,1500,1501,1502,1503,1504} - --- The numbered-keys represents the damage values, and their table --- contains the minimum and maximum number of rounds of those damage values. -RANGE = { -[1] = {19, 20}, [2] = {10, 10}, [3] = {6, 7}, [4] = {4, 5}, [5] = {3, 4}, -[6] = {3, 4}, [7] = {2, 3}, [8] = {2, 3}, [9] = {2, 3}, [10] = {1, 2}, -[11] = {1, 2}, [12] = {1, 2}, [13] = {1, 2}, [14] = {1, 2}, [15] = {1, 2}, -[16] = {1, 2}, [17] = {1, 2}, [18] = {1, 2}, [19] = {1, 2} -} - -function Creature:addDamageCondition(target, conditionType, listType, damage, time, rounds) - if target:isImmune(conditionType) then - return false - end - - local condition = Condition(conditionType) - condition:setParameter(CONDITION_PARAM_OWNER, self:getId()) - condition:setParameter(CONDITION_PARAM_DELAYED, true) - - if listType == 0 then - local exponent, value = -10, 0 - while value < damage do - value = math.floor(10 * math.pow(1.2, exponent) + 0.5) - condition:addDamage(1, time or 4000, -value) - - if value >= damage then - local permille = math.random(10, 1200) / 1000 - condition:addDamage(1, time or 4000, -math.max(1, math.floor(value * permille + 0.5))) - else - exponent = exponent + 1 - end - end - elseif listType == 1 then - rounds = rounds or RANGE - if rounds[damage] then - condition:addDamage(math.random(1, rounds[damage][2]), time or 4000, -damage) - damage = damage - 1 - end - - while damage > 0 do - condition:addDamage(rounds[damage] and math.random(rounds[damage][1], rounds[damage][2]) or 1, time or 4000, -damage) - damage = damage - (damage > 21 and math.floor(damage / 20) + math.random(0, 1) or 1) - end - elseif listType == 2 then - for _ = 1, rounds do - condition:addDamage(1, math.random(time[1], time[2]) * 1000, -damage) - end - end - - target:addCondition(condition) - return true -end - -function Player:addPartyCondition(combat, variant, condition, baseMana) - local party = self:getParty() - if not party then - self:sendCancelMessage(RETURNVALUE_NOPARTYMEMBERSINRANGE) - self:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end - - local members = party:getMembers() - members[#members + 1] = party:getLeader() - - local position = self:getPosition() - local affectedMembers = {} - for _, member in ipairs(members) do - if member:getPosition():getDistance(position) <= 36 then - affectedMembers[#affectedMembers + 1] = member - end - end - - if #affectedMembers <= 1 then - self:sendCancelMessage(RETURNVALUE_NOPARTYMEMBERSINRANGE) - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - local mana = math.ceil(math.pow(0.9, #affectedMembers - 1) * baseMana * #affectedMembers) - if self:getMana() < mana then - self:sendCancelMessage(RETURNVALUE_NOTENOUGHMANA) - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - if not combat:execute(self, variant) then - self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - self:addMana(baseMana - mana, false) - self:addManaSpent(mana - baseMana) - - for _, member in ipairs(affectedMembers) do - member:addCondition(condition) - end - return true -end - -function Player:conjureItem(reagentId, conjureId, conjureCount, effect) - if not conjureCount and conjureId ~= 0 then - local itemType = ItemType(conjureId) - if itemType:getId() == 0 then - return false - end - - local charges = itemType:getCharges() - if charges ~= 0 then - conjureCount = charges - end - end - - if reagentId ~= 0 and not self:removeItem(reagentId, 1, -1) then - self:sendCancelMessage(RETURNVALUE_YOUNEEDAMAGICITEMTOCASTSPELL) - self:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end - - local item = self:addItem(conjureId, conjureCount) - if not item then - self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - self:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end - - if item:hasAttribute(ITEM_ATTRIBUTE_DURATION) then - item:decay() - end - - self:getPosition():sendMagicEffect(item:getType():isRune() and CONST_ME_MAGIC_RED or effect) - return true -end diff --git a/data/spells/scripts/attack/annihilation.lua b/data/spells/scripts/attack/annihilation.lua deleted file mode 100644 index 5223d83b2..000000000 --- a/data/spells/scripts/attack/annihilation.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE) -combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) -combat:setParameter(COMBAT_PARAM_USECHARGES, 1) - -function onGetFormulaValues(player, skill, attack, factor) - local skillTotal = skill * attack - local levelTotal = player:getLevel() / 5 - return -(((skillTotal * 0.17) + 13) + (levelTotal)) * 1.28, -(((skillTotal * 0.20) + 34) + (levelTotal)) * 1.28 -- TODO : Use New Real Formula instead of an % -end - -combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/apprentices strike.lua b/data/spells/scripts/attack/apprentices strike.lua deleted file mode 100644 index 7c35d13ce..000000000 --- a/data/spells/scripts/attack/apprentices strike.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 0.4) + 3 - local max = (level / 5) + (maglevel * 0.7) + 5 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/avalanche.lua b/data/spells/scripts/attack/avalanche.lua deleted file mode 100644 index 3320838c0..000000000 --- a/data/spells/scripts/attack/avalanche.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE) -combat:setArea(createCombatArea(AREA_CIRCLE3X3)) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 1.2) + 7 - local max = (level / 5) + (maglevel * 2.8) + 17 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, variant, isHotkey) - return combat:execute(creature, variant) -end diff --git a/data/spells/scripts/attack/berserk.lua b/data/spells/scripts/attack/berserk.lua deleted file mode 100644 index d4b4f5b8d..000000000 --- a/data/spells/scripts/attack/berserk.lua +++ /dev/null @@ -1,21 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) -combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) -combat:setParameter(COMBAT_PARAM_USECHARGES, 1) -combat:setArea(createCombatArea(AREA_SQUARE1X1)) - -function onGetFormulaValues(player, skill, attack, factor) - local level = player:getLevel() - - local min = (level / 5) + (skill + attack) * 0.5 - local max = (level / 5) + (skill + attack) * 1.5 - - return -min * 1.1, -max * 1.1 -- TODO : Use New Real Formula instead of an % -end - -combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/brutal strike.lua b/data/spells/scripts/attack/brutal strike.lua deleted file mode 100644 index 8cdcf6d7b..000000000 --- a/data/spells/scripts/attack/brutal strike.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE) -combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) -combat:setParameter(COMBAT_PARAM_USECHARGES, 1) - -function onGetFormulaValues(player, skill, attack, factor) - local skillTotal = skill * attack - local levelTotal = player:getLevel() / 5 - return -(((skillTotal * 0.02) + 4) + (levelTotal)) * 1.28, -(((skillTotal * 0.04) + 9) + (levelTotal)) * 1.28 -- TODO : Use New Real Formula instead of an % -end - -combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/buzz.lua b/data/spells/scripts/attack/buzz.lua deleted file mode 100644 index 0b8f55883..000000000 --- a/data/spells/scripts/attack/buzz.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 0.4) + 3 - local max = (level / 5) + (maglevel * 0.7) + 5 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/chill_out.lua b/data/spells/scripts/attack/chill_out.lua deleted file mode 100644 index 83dae7c47..000000000 --- a/data/spells/scripts/attack/chill_out.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) -combat:setArea(createCombatArea(AREA_WAVE4, AREADIAGONAL_WAVE4)) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 0.3) + 2 - local max = (level / 5) + (maglevel * 0.6) + 4 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/curse.lua b/data/spells/scripts/attack/curse.lua deleted file mode 100644 index 79cab1909..000000000 --- a/data/spells/scripts/attack/curse.lua +++ /dev/null @@ -1,30 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) - -local condition = Condition(CONDITION_CURSED) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) - -condition:addDamage(1, 3000, -45) -condition:addDamage(1, 3000, -40) -condition:addDamage(1, 3000, -35) -condition:addDamage(1, 3000, -34) -condition:addDamage(2, 3000, -33) -condition:addDamage(2, 3000, -32) -condition:addDamage(2, 3000, -31) -condition:addDamage(2, 3000, -30) -condition:addDamage(3, 3000, -29) -condition:addDamage(3, 3000, -25) -condition:addDamage(3, 3000, -24) -condition:addDamage(4, 3000, -23) -condition:addDamage(4, 3000, -20) -condition:addDamage(5, 3000, -19) -condition:addDamage(5, 3000, -15) -condition:addDamage(6, 3000, -10) -condition:addDamage(10, 3000, -5) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/death strike.lua b/data/spells/scripts/attack/death strike.lua deleted file mode 100644 index 74056fd1f..000000000 --- a/data/spells/scripts/attack/death strike.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 1.403) + 8 - local max = (level / 5) + (maglevel * 2.203) + 13 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/divine caldera.lua b/data/spells/scripts/attack/divine caldera.lua deleted file mode 100644 index a4bef7003..000000000 --- a/data/spells/scripts/attack/divine caldera.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA) -combat:setArea(createCombatArea(AREA_CIRCLE3X3)) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 4) - local max = (level / 5) + (maglevel * 6) - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/divine missile.lua b/data/spells/scripts/attack/divine missile.lua deleted file mode 100644 index 9f974ad44..000000000 --- a/data/spells/scripts/attack/divine missile.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 1.79) + 11 - local max = (level / 5) + (maglevel * 3) + 18 - return -min, -max -end -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/electrify.lua b/data/spells/scripts/attack/electrify.lua deleted file mode 100644 index bc3d73964..000000000 --- a/data/spells/scripts/attack/electrify.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - -local condition = Condition(CONDITION_ENERGY) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(25, 3000, -45) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/energy beam.lua b/data/spells/scripts/attack/energy beam.lua deleted file mode 100644 index b330c251e..000000000 --- a/data/spells/scripts/attack/energy beam.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) -combat:setArea(createCombatArea(AREA_BEAM5, AREADIAGONAL_BEAM5)) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 2.5) - local max = (level / 5) + (maglevel * 4) - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/energy bomb.lua b/data/spells/scripts/attack/energy bomb.lua deleted file mode 100644 index 60a275c7b..000000000 --- a/data/spells/scripts/attack/energy bomb.lua +++ /dev/null @@ -1,10 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL) -combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_ENERGYFIELD_PVP) -combat:setArea(createCombatArea(AREA_SQUARE1X1)) - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/energy field.lua b/data/spells/scripts/attack/energy field.lua deleted file mode 100644 index 55fb4e68c..000000000 --- a/data/spells/scripts/attack/energy field.lua +++ /dev/null @@ -1,9 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL) -combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_ENERGYFIELD_PVP) - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/energy strike.lua b/data/spells/scripts/attack/energy strike.lua deleted file mode 100644 index 73f967ed5..000000000 --- a/data/spells/scripts/attack/energy strike.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 1.403) + 8 - local max = (level / 5) + (maglevel * 2.203) + 13 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/energy wall.lua b/data/spells/scripts/attack/energy wall.lua deleted file mode 100644 index abadfc798..000000000 --- a/data/spells/scripts/attack/energy wall.lua +++ /dev/null @@ -1,10 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL) -combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_ENERGYFIELD_PVP) -combat:setArea(createCombatArea(AREA_WALLFIELD_ENERGY, AREADIAGONAL_WALLFIELD_ENERGY)) - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/energy wave.lua b/data/spells/scripts/attack/energy wave.lua deleted file mode 100644 index 4eb27b28e..000000000 --- a/data/spells/scripts/attack/energy wave.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) -combat:setArea(createCombatArea(AREA_SQUAREWAVE5, AREADIAGONAL_SQUAREWAVE5)) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 4.5) - local max = (level / 5) + (maglevel * 9) - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, variant) - return combat:execute(creature, variant) -end diff --git a/data/spells/scripts/attack/envenom.lua b/data/spells/scripts/attack/envenom.lua deleted file mode 100644 index 92a65961c..000000000 --- a/data/spells/scripts/attack/envenom.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH) - -local condition = Condition(CONDITION_POISON) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(25, 3000, -45) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/eternal winter.lua b/data/spells/scripts/attack/eternal winter.lua deleted file mode 100644 index e4ac1fa34..000000000 --- a/data/spells/scripts/attack/eternal winter.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO) -combat:setArea(createCombatArea(AREA_CIRCLE5X5)) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 6) - local max = (level / 5) + (maglevel * 12) - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, variant) - return combat:execute(creature, variant) -end diff --git a/data/spells/scripts/attack/ethereal spear.lua b/data/spells/scripts/attack/ethereal spear.lua deleted file mode 100644 index ad5b90c57..000000000 --- a/data/spells/scripts/attack/ethereal spear.lua +++ /dev/null @@ -1,20 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ETHEREALSPEAR) -combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) - -function onGetFormulaValues(player, skill, attack, factor) - local level = player:getLevel() - - local min = (level / 5) + (skill + 25) / 3 - local max = (level / 5) + skill + 25 - - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/explosion.lua b/data/spells/scripts/attack/explosion.lua deleted file mode 100644 index 3e47abd16..000000000 --- a/data/spells/scripts/attack/explosion.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EXPLOSION) -combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) -combat:setArea(createCombatArea(AREA_CIRCLE1X1)) - -function onGetFormulaValues(player, level, maglevel) - local min = 0 - local max = (level / 5) + (maglevel * 4.8) - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/fierce berserk.lua b/data/spells/scripts/attack/fierce berserk.lua deleted file mode 100644 index fbef4c684..000000000 --- a/data/spells/scripts/attack/fierce berserk.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) -combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) -combat:setParameter(COMBAT_PARAM_USECHARGES, 1) -combat:setArea(createCombatArea(AREA_SQUARE1X1)) - -function onGetFormulaValues(player, skill, attack, factor) - local level = player:getLevel() - - local min = (level / 5) + (skill + 2 * attack) * 1.1 - local max = (level / 5) + (skill + 2 * attack) * 3 - - return -min * 1.1, -max * 1.1 -- TODO : Use New Real Formula instead of an % -end - - -combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/fire bomb.lua b/data/spells/scripts/attack/fire bomb.lua deleted file mode 100644 index 9e982efaa..000000000 --- a/data/spells/scripts/attack/fire bomb.lua +++ /dev/null @@ -1,10 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) -combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_FIREFIELD_PVP_FULL) -combat:setArea(createCombatArea(AREA_SQUARE1X1)) - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/fire field.lua b/data/spells/scripts/attack/fire field.lua deleted file mode 100644 index e214679eb..000000000 --- a/data/spells/scripts/attack/fire field.lua +++ /dev/null @@ -1,9 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) -combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_FIREFIELD_PVP_FULL) - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/fire wall.lua b/data/spells/scripts/attack/fire wall.lua deleted file mode 100644 index 203444ef6..000000000 --- a/data/spells/scripts/attack/fire wall.lua +++ /dev/null @@ -1,10 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) -combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_FIREFIELD_PVP_FULL) -combat:setArea(createCombatArea(AREA_WALLFIELD, AREADIAGONAL_WALLFIELD)) - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/fire wave.lua b/data/spells/scripts/attack/fire wave.lua deleted file mode 100644 index 6c4fe1173..000000000 --- a/data/spells/scripts/attack/fire wave.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) - -local area = createCombatArea(AREA_WAVE4, AREADIAGONAL_WAVE4) -combat:setArea(area) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 1.25) + 4 - local max = (level / 5) + (maglevel * 2) + 12 - return -min, -max -end -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/fireball.lua b/data/spells/scripts/attack/fireball.lua deleted file mode 100644 index ebe135252..000000000 --- a/data/spells/scripts/attack/fireball.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 1.81) + 10 - local max = (level / 5) + (maglevel * 3) + 18 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/flame strike.lua b/data/spells/scripts/attack/flame strike.lua deleted file mode 100644 index 0a130d61f..000000000 --- a/data/spells/scripts/attack/flame strike.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 1.403) + 8 - local max = (level / 5) + (maglevel * 2.203) + 13 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/front sweep.lua b/data/spells/scripts/attack/front sweep.lua deleted file mode 100644 index a2cc47b9e..000000000 --- a/data/spells/scripts/attack/front sweep.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) -combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) -combat:setParameter(COMBAT_PARAM_USECHARGES, 1) -combat:setArea(createCombatArea(AREA_WAVE6, AREADIAGONAL_WAVE6)) - -function onGetFormulaValues(player, skill, attack, factor) - local skillTotal = skill * attack - local levelTotal = player:getLevel() / 5 - return -(((skillTotal * 0.04) + 31) + (levelTotal)) * 1.1, -(((skillTotal * 0.08) + 45) + (levelTotal)) * 1.1 -- TODO : Use New Real Formula instead of an % -end - -combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/great energy beam.lua b/data/spells/scripts/attack/great energy beam.lua deleted file mode 100644 index 749eef386..000000000 --- a/data/spells/scripts/attack/great energy beam.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) -combat:setArea(createCombatArea(AREA_BEAM8)) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 4) - local max = (level / 5) + (maglevel * 7) - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/great fire wave.lua b/data/spells/scripts/attack/great fire wave.lua deleted file mode 100644 index 033d61779..000000000 --- a/data/spells/scripts/attack/great fire wave.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) - -local area = createCombatArea(AREA_WAVE7, AREADIAGONAL_WAVE7) -combat:setArea(area) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 2.8) + 16 - local max = (level / 5) + (maglevel * 4.4) + 28 -- TODO: Formulas (TibiaWiki says ~Strong Flame Strike but we need more acurracy) - return -min, -max -end -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/great fireball.lua b/data/spells/scripts/attack/great fireball.lua deleted file mode 100644 index fbddf57eb..000000000 --- a/data/spells/scripts/attack/great fireball.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) -combat:setArea(createCombatArea(AREA_CIRCLE3X3)) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 1.2) + 7 - local max = (level / 5) + (maglevel * 2.8) + 17 - return -min, -max -end -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/groundshaker.lua b/data/spells/scripts/attack/groundshaker.lua deleted file mode 100644 index 39ceeaf0b..000000000 --- a/data/spells/scripts/attack/groundshaker.lua +++ /dev/null @@ -1,21 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER) -combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) -combat:setParameter(COMBAT_PARAM_USECHARGES, 1) -combat:setArea(createCombatArea(AREA_CIRCLE3X3)) - -function onGetFormulaValues(player, skill, attack, factor) - local level = player:getLevel() - - local min = (level / 5) + (skill + attack) * 0.5 - local max = (level / 5) + (skill + attack) * 1.1 - - return -min * 1.28, -max * 1.28 -- TODO : Use New Real Formula instead of an % -end - -combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/heavy magic missile.lua b/data/spells/scripts/attack/heavy magic missile.lua deleted file mode 100644 index a2652c6be..000000000 --- a/data/spells/scripts/attack/heavy magic missile.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 0.4) + 2 - local max = (level / 5) + (maglevel * 1.59) + 10 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/hells core.lua b/data/spells/scripts/attack/hells core.lua deleted file mode 100644 index f31becd4d..000000000 --- a/data/spells/scripts/attack/hells core.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) -combat:setArea(createCombatArea(AREA_CIRCLE5X5)) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 10) - local max = (level / 5) + (maglevel * 14) - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, variant) - return combat:execute(creature, variant) -end diff --git a/data/spells/scripts/attack/holy flash.lua b/data/spells/scripts/attack/holy flash.lua deleted file mode 100644 index 719c857e4..000000000 --- a/data/spells/scripts/attack/holy flash.lua +++ /dev/null @@ -1,12 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY) - -local condition = Condition(CONDITION_DAZZLED) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(math.random(7,11), 3000, -20) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/holy missile.lua b/data/spells/scripts/attack/holy missile.lua deleted file mode 100644 index 86c93ae31..000000000 --- a/data/spells/scripts/attack/holy missile.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 1.79) + 11 - local max = (level / 5) + (maglevel * 3.75) + 24 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/ice strike.lua b/data/spells/scripts/attack/ice strike.lua deleted file mode 100644 index 46c394ad6..000000000 --- a/data/spells/scripts/attack/ice strike.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLICE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 1.403) + 8 - local max = (level / 5) + (maglevel * 2.203) + 13 - return -min, -max -end - - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/ice wave.lua b/data/spells/scripts/attack/ice wave.lua deleted file mode 100644 index bdc9bfbd5..000000000 --- a/data/spells/scripts/attack/ice wave.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) -combat:setArea(createCombatArea(AREA_WAVE4, AREADIAGONAL_WAVE4)) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 0.81) + 4 - local max = (level / 5) + (maglevel * 2) + 12 - return -min, -max -end -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/icicle.lua b/data/spells/scripts/attack/icicle.lua deleted file mode 100644 index 0f08e538f..000000000 --- a/data/spells/scripts/attack/icicle.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 1.81) + 10 - local max = (level / 5) + (maglevel * 3) + 18 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/ignite.lua b/data/spells/scripts/attack/ignite.lua deleted file mode 100644 index 1027d6371..000000000 --- a/data/spells/scripts/attack/ignite.lua +++ /dev/null @@ -1,12 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(25, 3000, -45) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/inflict wound.lua b/data/spells/scripts/attack/inflict wound.lua deleted file mode 100644 index 9e4ca6513..000000000 --- a/data/spells/scripts/attack/inflict wound.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, 1) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE) -combat:setParameter(COMBATPARAM_USECHARGES, 1) - -local condition = Condition(CONDITION_BLEEDING) -condition:setParameter(CONDITION_PARAM_DELAYED, 10) -condition:addDamage(15, 2000, -50) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/light magic missile.lua b/data/spells/scripts/attack/light magic missile.lua deleted file mode 100644 index 8bb14104f..000000000 --- a/data/spells/scripts/attack/light magic missile.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 0.4) + 2 - local max = (level / 5) + (maglevel * 0.81) + 4 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/light stone shower.lua b/data/spells/scripts/attack/light stone shower.lua deleted file mode 100644 index 53579533e..000000000 --- a/data/spells/scripts/attack/light stone shower.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STONES) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH) -combat:setArea(createCombatArea(AREA_CIRCLE1X1)) - -function onGetFormulaValues(player, level, maglevel) - level = math.min(level, 20) - maglevel = math.min(maglevel, 20) - local min = (level / 5) + (maglevel * 0.3) + 2 - local max = (level / 5) + (maglevel * 0.45) + 3 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, variant, isHotkey) - return combat:execute(creature, variant) -end diff --git a/data/spells/scripts/attack/lightest magic missile.lua b/data/spells/scripts/attack/lightest magic missile.lua deleted file mode 100644 index 1794ea5e7..000000000 --- a/data/spells/scripts/attack/lightest magic missile.lua +++ /dev/null @@ -1,14 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - -function onGetFormulaValues(player, level, maglevel) - return -3, -5 -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/lightest missile.lua b/data/spells/scripts/attack/lightest missile.lua deleted file mode 100644 index 7b23ba65e..000000000 --- a/data/spells/scripts/attack/lightest missile.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 0.4) + 3 - local max = (level / 5) + (maglevel * 0.8) + 5 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/lightning.lua b/data/spells/scripts/attack/lightning.lua deleted file mode 100644 index 9126bdc7d..000000000 --- a/data/spells/scripts/attack/lightning.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 2.2) + 12 - local max = (level / 5) + (maglevel * 3.4) + 21 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/mud_attack.lua b/data/spells/scripts/attack/mud_attack.lua deleted file mode 100644 index 56081526d..000000000 --- a/data/spells/scripts/attack/mud_attack.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_CARNIPHILA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLEARTH) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 0.4) + 3 - local max = (level / 5) + (maglevel * 0.7) + 5 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/physical strike.lua b/data/spells/scripts/attack/physical strike.lua deleted file mode 100644 index d6c28d437..000000000 --- a/data/spells/scripts/attack/physical strike.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EXPLOSION) -combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 1.403) + 8 - local max = (level / 5) + (maglevel * 2.203) + 13 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/poison bomb.lua b/data/spells/scripts/attack/poison bomb.lua deleted file mode 100644 index daebbaa9c..000000000 --- a/data/spells/scripts/attack/poison bomb.lua +++ /dev/null @@ -1,10 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) -combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_POISONFIELD_PVP) -combat:setArea(createCombatArea(AREA_SQUARE1X1)) - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/poison field.lua b/data/spells/scripts/attack/poison field.lua deleted file mode 100644 index 30c235c91..000000000 --- a/data/spells/scripts/attack/poison field.lua +++ /dev/null @@ -1,9 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) -combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_POISONFIELD_PVP) - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/poison wall.lua b/data/spells/scripts/attack/poison wall.lua deleted file mode 100644 index be2fece91..000000000 --- a/data/spells/scripts/attack/poison wall.lua +++ /dev/null @@ -1,10 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) -combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_POISONFIELD_PVP) -combat:setArea(createCombatArea(AREA_WALLFIELD, AREADIAGONAL_WALLFIELD)) - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/practise fire wave.lua b/data/spells/scripts/attack/practise fire wave.lua deleted file mode 100644 index 2beca088d..000000000 --- a/data/spells/scripts/attack/practise fire wave.lua +++ /dev/null @@ -1,14 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) -combat:setArea(createCombatArea(AREA_WAVE4, AREADIAGONAL_WAVE4)) - -function onGetFormulaValues(player, level, maglevel) - return -8, -11 -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/rage of the skies.lua b/data/spells/scripts/attack/rage of the skies.lua deleted file mode 100644 index 71b5a22b8..000000000 --- a/data/spells/scripts/attack/rage of the skies.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BIGCLOUDS) -combat:setArea(createCombatArea(AREA_CIRCLE6X6)) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 7) - local max = (level / 5) + (maglevel * 14) - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, variant) - return combat:execute(creature, variant) -end diff --git a/data/spells/scripts/attack/scorch.lua b/data/spells/scripts/attack/scorch.lua deleted file mode 100644 index 084324e73..000000000 --- a/data/spells/scripts/attack/scorch.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) -combat:setArea(createCombatArea(AREA_WAVE4, AREADIAGONAL_WAVE4)) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 0.3) + 2 - local max = (level / 5) + (maglevel * 0.6) + 4 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/soul fire.lua b/data/spells/scripts/attack/soul fire.lua deleted file mode 100644 index d99c0110f..000000000 --- a/data/spells/scripts/attack/soul fire.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(10, 2000, -10) -combat:addCondition(condition) - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/stalagmite.lua b/data/spells/scripts/attack/stalagmite.lua deleted file mode 100644 index 33d34780a..000000000 --- a/data/spells/scripts/attack/stalagmite.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STONES) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 0.4) + 2 - local max = (level / 5) + (maglevel * 1.59) + 10 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/stone shower.lua b/data/spells/scripts/attack/stone shower.lua deleted file mode 100644 index 50011f8b6..000000000 --- a/data/spells/scripts/attack/stone shower.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STONES) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH) -combat:setArea(createCombatArea(AREA_CIRCLE3X3)) - -function onGetFormulaValues(player, level, magicLevel) - local min = (level / 5) + (magicLevel * 1) + 6 - local max = (level / 5) + (magicLevel * 2.6) + 16 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, variant, isHotkey) - return combat:execute(creature, variant) -end diff --git a/data/spells/scripts/attack/strong energy strike.lua b/data/spells/scripts/attack/strong energy strike.lua deleted file mode 100644 index b99005306..000000000 --- a/data/spells/scripts/attack/strong energy strike.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 2.8) + 16 - local max = (level / 5) + (maglevel * 4.4) + 28 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/strong ethereal spear.lua b/data/spells/scripts/attack/strong ethereal spear.lua deleted file mode 100644 index 7a0a97ad2..000000000 --- a/data/spells/scripts/attack/strong ethereal spear.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ETHEREALSPEAR) -combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) - -function onGetFormulaValues(player, skill, attack, factor) - local levelTotal = player:getLevel() / 5 - return -(((2 * skill + attack / 2500) * 2.30) + (levelTotal) + 7), -(((2 * skill + attack / 1875) * 3.30) + (levelTotal) + 13) -end - -combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/strong flame strike.lua b/data/spells/scripts/attack/strong flame strike.lua deleted file mode 100644 index ecf29f39f..000000000 --- a/data/spells/scripts/attack/strong flame strike.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 2.8) + 16 - local max = (level / 5) + (maglevel * 4.4) + 28 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/strong ice strike.lua b/data/spells/scripts/attack/strong ice strike.lua deleted file mode 100644 index 5ab6cca75..000000000 --- a/data/spells/scripts/attack/strong ice strike.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLICE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 2.8) + 16 - local max = (level / 5) + (maglevel * 4.4) + 28 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/strong ice wave.lua b/data/spells/scripts/attack/strong ice wave.lua deleted file mode 100644 index 16f42158a..000000000 --- a/data/spells/scripts/attack/strong ice wave.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) -combat:setArea(createCombatArea(AREA_SHORTWAVE3)) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 4.5) + 20 - local max = (level / 5) + (maglevel * 7.6) + 48 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/strong terra strike.lua b/data/spells/scripts/attack/strong terra strike.lua deleted file mode 100644 index 3019d64bd..000000000 --- a/data/spells/scripts/attack/strong terra strike.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_CARNIPHILA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLEARTH) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 2.8) + 16 - local max = (level / 5) + (maglevel * 4.4) + 28 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/sudden death.lua b/data/spells/scripts/attack/sudden death.lua deleted file mode 100644 index e7387e887..000000000 --- a/data/spells/scripts/attack/sudden death.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 4.605) + 28 - local max = (level / 5) + (maglevel * 7.395) + 46 - return -min, -max -end -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/terra strike.lua b/data/spells/scripts/attack/terra strike.lua deleted file mode 100644 index b7c905a17..000000000 --- a/data/spells/scripts/attack/terra strike.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_CARNIPHILA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLEARTH) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 1.403) + 8 - local max = (level / 5) + (maglevel * 2.203) + 13 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/terra wave.lua b/data/spells/scripts/attack/terra wave.lua deleted file mode 100644 index 6fd62c569..000000000 --- a/data/spells/scripts/attack/terra wave.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) -combat:setArea(createCombatArea(AREA_SQUAREWAVE5, AREADIAGONAL_SQUAREWAVE5)) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 3.5) - local max = (level / 5) + (maglevel * 7) - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, variant) - return combat:execute(creature, variant) -end diff --git a/data/spells/scripts/attack/thunderstorm.lua b/data/spells/scripts/attack/thunderstorm.lua deleted file mode 100644 index 7e8ee63f2..000000000 --- a/data/spells/scripts/attack/thunderstorm.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL) -combat:setArea(createCombatArea(AREA_CIRCLE3X3)) - -function onGetFormulaValues(player, level, magicLevel) - local min = (level / 5) + (magicLevel * 1) + 6 - local max = (level / 5) + (magicLevel * 2.6) + 16 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, variant, isHotkey) - return combat:execute(creature, variant) -end diff --git a/data/spells/scripts/attack/ultimate energy strike.lua b/data/spells/scripts/attack/ultimate energy strike.lua deleted file mode 100644 index ba58f08ad..000000000 --- a/data/spells/scripts/attack/ultimate energy strike.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 4.5) + 35 - local max = (level / 5) + (maglevel * 7.3) + 55 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/ultimate flame strike.lua b/data/spells/scripts/attack/ultimate flame strike.lua deleted file mode 100644 index ce62c517f..000000000 --- a/data/spells/scripts/attack/ultimate flame strike.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 4.5) + 35 - local max = (level / 5) + (maglevel * 7.3) + 55 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/ultimate ice strike.lua b/data/spells/scripts/attack/ultimate ice strike.lua deleted file mode 100644 index 30b69596f..000000000 --- a/data/spells/scripts/attack/ultimate ice strike.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLICE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 4.5) + 35 - local max = (level / 5) + (maglevel * 7.3) + 55 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/ultimate terra strike.lua b/data/spells/scripts/attack/ultimate terra strike.lua deleted file mode 100644 index b1aad4dda..000000000 --- a/data/spells/scripts/attack/ultimate terra strike.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_CARNIPHILA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLEARTH) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 4.5) + 35 - local max = (level / 5) + (maglevel * 7.3) + 55 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/whirlwind throw.lua b/data/spells/scripts/attack/whirlwind throw.lua deleted file mode 100644 index ffa71d96c..000000000 --- a/data/spells/scripts/attack/whirlwind throw.lua +++ /dev/null @@ -1,21 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE) -combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) -combat:setParameter(COMBAT_PARAM_USECHARGES, 1) - -function onGetFormulaValues(player, skill, attack, factor) - local level = player:getLevel() - - local min = (level / 5) + (skill + attack) / 3 - local max = (level / 5) + skill + attack - - return -min * 1.28, -max * 1.28 -- TODO : Use New Real Formula instead of an % -end - -combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/attack/wrath of nature.lua b/data/spells/scripts/attack/wrath of nature.lua deleted file mode 100644 index 3295b7ee6..000000000 --- a/data/spells/scripts/attack/wrath of nature.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) -combat:setArea(createCombatArea(AREA_CIRCLE6X6)) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 5) - local max = (level / 5) + (maglevel * 10) - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, variant) - return combat:execute(creature, variant) -end diff --git a/data/spells/scripts/conjuring/Conjure_Wand_of_Darkness.lua b/data/spells/scripts/conjuring/Conjure_Wand_of_Darkness.lua deleted file mode 100644 index 135d7f2e3..000000000 --- a/data/spells/scripts/conjuring/Conjure_Wand_of_Darkness.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(0, 29060, 1, CONST_ME_MAGIC_BLUE) -end diff --git a/data/spells/scripts/conjuring/animate_dead_rune.lua b/data/spells/scripts/conjuring/animate_dead_rune.lua deleted file mode 100644 index d377f8a81..000000000 --- a/data/spells/scripts/conjuring/animate_dead_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2316, 1) -end diff --git a/data/spells/scripts/conjuring/arrow_call.lua b/data/spells/scripts/conjuring/arrow_call.lua deleted file mode 100644 index 061a908b8..000000000 --- a/data/spells/scripts/conjuring/arrow_call.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(0, 23839, 3, CONST_ME_MAGIC_BLUE) -end diff --git a/data/spells/scripts/conjuring/avalanche_rune.lua b/data/spells/scripts/conjuring/avalanche_rune.lua deleted file mode 100644 index 551e66984..000000000 --- a/data/spells/scripts/conjuring/avalanche_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2274, 4) -end diff --git a/data/spells/scripts/conjuring/blank_rune.lua b/data/spells/scripts/conjuring/blank_rune.lua deleted file mode 100644 index 6edf7f2c4..000000000 --- a/data/spells/scripts/conjuring/blank_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(0, 2260, 1) -end diff --git a/data/spells/scripts/conjuring/chameleon_rune.lua b/data/spells/scripts/conjuring/chameleon_rune.lua deleted file mode 100644 index eeaef4300..000000000 --- a/data/spells/scripts/conjuring/chameleon_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2291, 1) -end diff --git a/data/spells/scripts/conjuring/conjure_arrow.lua b/data/spells/scripts/conjuring/conjure_arrow.lua deleted file mode 100644 index c930588e3..000000000 --- a/data/spells/scripts/conjuring/conjure_arrow.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(0, 2544, 10, CONST_ME_MAGIC_BLUE) -end diff --git a/data/spells/scripts/conjuring/conjure_bolt.lua b/data/spells/scripts/conjuring/conjure_bolt.lua deleted file mode 100644 index 13acd1092..000000000 --- a/data/spells/scripts/conjuring/conjure_bolt.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(0, 2543, 5, CONST_ME_MAGIC_BLUE) -end diff --git a/data/spells/scripts/conjuring/conjure_explosive_arrow.lua b/data/spells/scripts/conjuring/conjure_explosive_arrow.lua deleted file mode 100644 index fda0294a5..000000000 --- a/data/spells/scripts/conjuring/conjure_explosive_arrow.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(0, 2546, 8, CONST_ME_MAGIC_BLUE) -end diff --git a/data/spells/scripts/conjuring/conjure_piercing_bolt.lua b/data/spells/scripts/conjuring/conjure_piercing_bolt.lua deleted file mode 100644 index b9c11801a..000000000 --- a/data/spells/scripts/conjuring/conjure_piercing_bolt.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(0, 7363, 5, CONST_ME_MAGIC_BLUE) -end diff --git a/data/spells/scripts/conjuring/conjure_poisoned_arrow.lua b/data/spells/scripts/conjuring/conjure_poisoned_arrow.lua deleted file mode 100644 index cf3ab9ea9..000000000 --- a/data/spells/scripts/conjuring/conjure_poisoned_arrow.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(0, 2545, 7, CONST_ME_MAGIC_BLUE) -end diff --git a/data/spells/scripts/conjuring/conjure_power_bolt.lua b/data/spells/scripts/conjuring/conjure_power_bolt.lua deleted file mode 100644 index bd2448564..000000000 --- a/data/spells/scripts/conjuring/conjure_power_bolt.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(0, 2547, 10, CONST_ME_MAGIC_BLUE) -end diff --git a/data/spells/scripts/conjuring/conjure_sniper_arrow.lua b/data/spells/scripts/conjuring/conjure_sniper_arrow.lua deleted file mode 100644 index a286d5245..000000000 --- a/data/spells/scripts/conjuring/conjure_sniper_arrow.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(0, 7364, 5, CONST_ME_MAGIC_BLUE) -end diff --git a/data/spells/scripts/conjuring/convince_creature_rune.lua b/data/spells/scripts/conjuring/convince_creature_rune.lua deleted file mode 100644 index b250a7dd0..000000000 --- a/data/spells/scripts/conjuring/convince_creature_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2290, 1) -end diff --git a/data/spells/scripts/conjuring/cure_poison_rune.lua b/data/spells/scripts/conjuring/cure_poison_rune.lua deleted file mode 100644 index 2456b8843..000000000 --- a/data/spells/scripts/conjuring/cure_poison_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2266, 1) -end diff --git a/data/spells/scripts/conjuring/destroy_field_rune.lua b/data/spells/scripts/conjuring/destroy_field_rune.lua deleted file mode 100644 index 4ce3fd34f..000000000 --- a/data/spells/scripts/conjuring/destroy_field_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2261, 3) -end diff --git a/data/spells/scripts/conjuring/disintegrate_rune.lua b/data/spells/scripts/conjuring/disintegrate_rune.lua deleted file mode 100644 index ec5ec6790..000000000 --- a/data/spells/scripts/conjuring/disintegrate_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2310, 3) -end diff --git a/data/spells/scripts/conjuring/enchant_spear.lua b/data/spells/scripts/conjuring/enchant_spear.lua deleted file mode 100644 index b534cef26..000000000 --- a/data/spells/scripts/conjuring/enchant_spear.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2389, 7367, 1, CONST_ME_MAGIC_GREEN) -end diff --git a/data/spells/scripts/conjuring/enchant_staff.lua b/data/spells/scripts/conjuring/enchant_staff.lua deleted file mode 100644 index cd794822b..000000000 --- a/data/spells/scripts/conjuring/enchant_staff.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2401, 2433, 1, CONST_ME_MAGIC_GREEN) -end diff --git a/data/spells/scripts/conjuring/energy_bomb_rune.lua b/data/spells/scripts/conjuring/energy_bomb_rune.lua deleted file mode 100644 index 470977f24..000000000 --- a/data/spells/scripts/conjuring/energy_bomb_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2262, 2) -end diff --git a/data/spells/scripts/conjuring/energy_field_rune.lua b/data/spells/scripts/conjuring/energy_field_rune.lua deleted file mode 100644 index 77a9b0248..000000000 --- a/data/spells/scripts/conjuring/energy_field_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2277, 3) -end diff --git a/data/spells/scripts/conjuring/energy_wall_rune.lua b/data/spells/scripts/conjuring/energy_wall_rune.lua deleted file mode 100644 index fa6d968fc..000000000 --- a/data/spells/scripts/conjuring/energy_wall_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2279, 4) -end diff --git a/data/spells/scripts/conjuring/explosion_rune.lua b/data/spells/scripts/conjuring/explosion_rune.lua deleted file mode 100644 index 483f619a0..000000000 --- a/data/spells/scripts/conjuring/explosion_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2313, 6) -end diff --git a/data/spells/scripts/conjuring/fire_bomb_rune.lua b/data/spells/scripts/conjuring/fire_bomb_rune.lua deleted file mode 100644 index 4beda3584..000000000 --- a/data/spells/scripts/conjuring/fire_bomb_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2305, 2) -end diff --git a/data/spells/scripts/conjuring/fire_field_rune.lua b/data/spells/scripts/conjuring/fire_field_rune.lua deleted file mode 100644 index 96c1fe3d0..000000000 --- a/data/spells/scripts/conjuring/fire_field_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2301, 3) -end diff --git a/data/spells/scripts/conjuring/fire_wall_rune.lua b/data/spells/scripts/conjuring/fire_wall_rune.lua deleted file mode 100644 index 2186343aa..000000000 --- a/data/spells/scripts/conjuring/fire_wall_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2303, 4) -end diff --git a/data/spells/scripts/conjuring/fireball_rune.lua b/data/spells/scripts/conjuring/fireball_rune.lua deleted file mode 100644 index bdcb120e2..000000000 --- a/data/spells/scripts/conjuring/fireball_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2302, 5) -end diff --git a/data/spells/scripts/conjuring/great_fireball_rune.lua b/data/spells/scripts/conjuring/great_fireball_rune.lua deleted file mode 100644 index 1842809f2..000000000 --- a/data/spells/scripts/conjuring/great_fireball_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2304, 4) -end diff --git a/data/spells/scripts/conjuring/heavy_magic_missile_rune.lua b/data/spells/scripts/conjuring/heavy_magic_missile_rune.lua deleted file mode 100644 index 786c3b1e6..000000000 --- a/data/spells/scripts/conjuring/heavy_magic_missile_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2311, 10) -end diff --git a/data/spells/scripts/conjuring/holy_missile_rune.lua b/data/spells/scripts/conjuring/holy_missile_rune.lua deleted file mode 100644 index b4931f09d..000000000 --- a/data/spells/scripts/conjuring/holy_missile_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2295, 5) -end diff --git a/data/spells/scripts/conjuring/icicle_rune.lua b/data/spells/scripts/conjuring/icicle_rune.lua deleted file mode 100644 index 3ff841c26..000000000 --- a/data/spells/scripts/conjuring/icicle_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2271, 5) -end diff --git a/data/spells/scripts/conjuring/intense_healing_rune.lua b/data/spells/scripts/conjuring/intense_healing_rune.lua deleted file mode 100644 index 9080b9a38..000000000 --- a/data/spells/scripts/conjuring/intense_healing_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2265, 1) -end diff --git a/data/spells/scripts/conjuring/light_magic_missile_rune.lua b/data/spells/scripts/conjuring/light_magic_missile_rune.lua deleted file mode 100644 index 6018747fb..000000000 --- a/data/spells/scripts/conjuring/light_magic_missile_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2287, 10) -end diff --git a/data/spells/scripts/conjuring/light_stone_shower_rune.lua b/data/spells/scripts/conjuring/light_stone_shower_rune.lua deleted file mode 100644 index 5f275853c..000000000 --- a/data/spells/scripts/conjuring/light_stone_shower_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 23722, 4) -end diff --git a/data/spells/scripts/conjuring/lightest_magic_missile_rune.lua b/data/spells/scripts/conjuring/lightest_magic_missile_rune.lua deleted file mode 100644 index 8391fde48..000000000 --- a/data/spells/scripts/conjuring/lightest_magic_missile_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(0, 2287, 10, CONST_ME_MAGIC_BLUE) -end diff --git a/data/spells/scripts/conjuring/lightest_missile_rune.lua b/data/spells/scripts/conjuring/lightest_missile_rune.lua deleted file mode 100644 index 3da065341..000000000 --- a/data/spells/scripts/conjuring/lightest_missile_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 23723, 10) -end diff --git a/data/spells/scripts/conjuring/magic_wall_rune.lua b/data/spells/scripts/conjuring/magic_wall_rune.lua deleted file mode 100644 index d0964d695..000000000 --- a/data/spells/scripts/conjuring/magic_wall_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2293, 3) -end diff --git a/data/spells/scripts/conjuring/paralyze_rune.lua b/data/spells/scripts/conjuring/paralyze_rune.lua deleted file mode 100644 index 88c1b9f49..000000000 --- a/data/spells/scripts/conjuring/paralyze_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2278, 1) -end diff --git a/data/spells/scripts/conjuring/poison_bomb_rune.lua b/data/spells/scripts/conjuring/poison_bomb_rune.lua deleted file mode 100644 index 2bfd33595..000000000 --- a/data/spells/scripts/conjuring/poison_bomb_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2286, 2) -end diff --git a/data/spells/scripts/conjuring/poison_field_rune.lua b/data/spells/scripts/conjuring/poison_field_rune.lua deleted file mode 100644 index 3c82f9188..000000000 --- a/data/spells/scripts/conjuring/poison_field_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2285, 3) -end diff --git a/data/spells/scripts/conjuring/poison_wall_rune.lua b/data/spells/scripts/conjuring/poison_wall_rune.lua deleted file mode 100644 index 841903b62..000000000 --- a/data/spells/scripts/conjuring/poison_wall_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2289, 4) -end diff --git a/data/spells/scripts/conjuring/soulfire_rune.lua b/data/spells/scripts/conjuring/soulfire_rune.lua deleted file mode 100644 index 95b19785c..000000000 --- a/data/spells/scripts/conjuring/soulfire_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2308, 3) -end diff --git a/data/spells/scripts/conjuring/stalagmite_rune.lua b/data/spells/scripts/conjuring/stalagmite_rune.lua deleted file mode 100644 index 4b8ee41da..000000000 --- a/data/spells/scripts/conjuring/stalagmite_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2292, 10) -end diff --git a/data/spells/scripts/conjuring/stone_shower_rune.lua b/data/spells/scripts/conjuring/stone_shower_rune.lua deleted file mode 100644 index 094f74afb..000000000 --- a/data/spells/scripts/conjuring/stone_shower_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2288, 4) -end diff --git a/data/spells/scripts/conjuring/sudden_death_rune.lua b/data/spells/scripts/conjuring/sudden_death_rune.lua deleted file mode 100644 index 6e23bb319..000000000 --- a/data/spells/scripts/conjuring/sudden_death_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2268, 3) -end diff --git a/data/spells/scripts/conjuring/thunderstorm_rune.lua b/data/spells/scripts/conjuring/thunderstorm_rune.lua deleted file mode 100644 index 4a2e6e92f..000000000 --- a/data/spells/scripts/conjuring/thunderstorm_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2315, 4) -end diff --git a/data/spells/scripts/conjuring/ultimate_healing_rune.lua b/data/spells/scripts/conjuring/ultimate_healing_rune.lua deleted file mode 100644 index 7481442f1..000000000 --- a/data/spells/scripts/conjuring/ultimate_healing_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2273, 1) -end diff --git a/data/spells/scripts/conjuring/wild_growth_rune.lua b/data/spells/scripts/conjuring/wild_growth_rune.lua deleted file mode 100644 index af73e35dd..000000000 --- a/data/spells/scripts/conjuring/wild_growth_rune.lua +++ /dev/null @@ -1,3 +0,0 @@ -function onCastSpell(creature, variant) - return creature:conjureItem(2260, 2269, 2) -end diff --git a/data/spells/scripts/healing/antidote rune.lua b/data/spells/scripts/healing/antidote rune.lua deleted file mode 100644 index 157ba14c6..000000000 --- a/data/spells/scripts/healing/antidote rune.lua +++ /dev/null @@ -1,8 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_POISON) - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/antidote.lua b/data/spells/scripts/healing/antidote.lua deleted file mode 100644 index d7fa024c2..000000000 --- a/data/spells/scripts/healing/antidote.lua +++ /dev/null @@ -1,8 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_POISON) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/bruise_bane.lua b/data/spells/scripts/healing/bruise_bane.lua deleted file mode 100644 index 88ef3b28a..000000000 --- a/data/spells/scripts/healing/bruise_bane.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 1.3) + 6 - local max = (level / 5) + (maglevel * 3) + 12 - return min, max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/cure bleeding.lua b/data/spells/scripts/healing/cure bleeding.lua deleted file mode 100644 index 51425c239..000000000 --- a/data/spells/scripts/healing/cure bleeding.lua +++ /dev/null @@ -1,8 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_BLEEDING) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/cure burning.lua b/data/spells/scripts/healing/cure burning.lua deleted file mode 100644 index cef48b89e..000000000 --- a/data/spells/scripts/healing/cure burning.lua +++ /dev/null @@ -1,8 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_FIRE) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/cure curse.lua b/data/spells/scripts/healing/cure curse.lua deleted file mode 100644 index 53e69c377..000000000 --- a/data/spells/scripts/healing/cure curse.lua +++ /dev/null @@ -1,8 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_CURSED) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/cure electrification.lua b/data/spells/scripts/healing/cure electrification.lua deleted file mode 100644 index 431bc948f..000000000 --- a/data/spells/scripts/healing/cure electrification.lua +++ /dev/null @@ -1,8 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_ENERGY) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/divine healing.lua b/data/spells/scripts/healing/divine healing.lua deleted file mode 100644 index 58779e2c7..000000000 --- a/data/spells/scripts/healing/divine healing.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 18.5) - local max = (level / 5) + (maglevel * 25) - return min, max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/fair wound cleansing.lua b/data/spells/scripts/healing/fair wound cleansing.lua deleted file mode 100644 index 77b4bf754..000000000 --- a/data/spells/scripts/healing/fair wound cleansing.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 2.5) + (maglevel * 8) + 50 - local max = (level / 2.5) + (maglevel * 16.9) + 102 -- TODO: Formulas (TibiaWiki says x2 but need more acurracy) - return min, max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/heal friend.lua b/data/spells/scripts/healing/heal friend.lua deleted file mode 100644 index c6b41d04d..000000000 --- a/data/spells/scripts/healing/heal friend.lua +++ /dev/null @@ -1,23 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 10) - local max = (level / 5) + (maglevel * 14) - return min, max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - if creature:isPlayer() and var:getNumber() == creature:getId() then - creature:sendCancelMessage("You can't cast this spell to yourself.") - creature:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - else - return combat:execute(creature, var) - end -end diff --git a/data/spells/scripts/healing/heal monsters 9x9.lua b/data/spells/scripts/healing/heal monsters 9x9.lua deleted file mode 100644 index 0a52ea2e7..000000000 --- a/data/spells/scripts/healing/heal monsters 9x9.lua +++ /dev/null @@ -1,27 +0,0 @@ -function onTargetCreature(creature, target) - local player = creature:getPlayer() - local min = 0 - local max = 1000 - local master = target:getMaster() - - if target:isPlayer() then - return true - end - if master then - return true - end - - doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) - return true -end - -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) -combat:setArea(createCombatArea(AREA_CIRCLE6X6)) -combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/heal monsters.lua b/data/spells/scripts/healing/heal monsters.lua deleted file mode 100644 index 116188b0c..000000000 --- a/data/spells/scripts/healing/heal monsters.lua +++ /dev/null @@ -1,27 +0,0 @@ -function onTargetCreature(creature, target) - local player = creature:getPlayer() - local min = 100 - local max = 300 - local master = target:getMaster() - - if target:isPlayer() then - return true - end - if master then - return true - end - - doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) - return true -end - -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) -combat:setArea(createCombatArea(AREA_CIRCLE3X3)) -combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/intense healing rune.lua b/data/spells/scripts/healing/intense healing rune.lua deleted file mode 100644 index 08cb9087e..000000000 --- a/data/spells/scripts/healing/intense healing rune.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, 1) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 3.2) + 20 - local max = (level / 5) + (maglevel * 5.4) + 40 - return min, max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/intense healing.lua b/data/spells/scripts/healing/intense healing.lua deleted file mode 100644 index a4ec0d147..000000000 --- a/data/spells/scripts/healing/intense healing.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 3.184) + 20 - local max = (level / 5) + (maglevel * 5.59) + 35 - return min, max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/intense recovery.lua b/data/spells/scripts/healing/intense recovery.lua deleted file mode 100644 index d04a92d45..000000000 --- a/data/spells/scripts/healing/intense recovery.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -local condition = Condition(CONDITION_REGENERATION) -condition:setParameter(CONDITION_PARAM_SUBID, 1) -condition:setParameter(CONDITION_PARAM_BUFF_SPELL, 1) -condition:setParameter(CONDITION_PARAM_TICKS, 1 * 60 * 1000) -condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 40) -condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 3000) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/intense wound cleansing.lua b/data/spells/scripts/healing/intense wound cleansing.lua deleted file mode 100644 index 392740be4..000000000 --- a/data/spells/scripts/healing/intense wound cleansing.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 70) + 438 - local max = (level / 5) + (maglevel * 92) + 544 - return min, max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/light healing.lua b/data/spells/scripts/healing/light healing.lua deleted file mode 100644 index 05d07ab0f..000000000 --- a/data/spells/scripts/healing/light healing.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 1.4) + 8 - local max = (level / 5) + (maglevel * 1.795) + 11 - return min, max -end -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/magic_patch.lua b/data/spells/scripts/healing/magic_patch.lua deleted file mode 100644 index ba3085d6e..000000000 --- a/data/spells/scripts/healing/magic_patch.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 0.4) + 3 - local max = (level / 5) + (maglevel * 0.6) + 4 - return min, max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/mass healing.lua b/data/spells/scripts/healing/mass healing.lua deleted file mode 100644 index 0807b14f8..000000000 --- a/data/spells/scripts/healing/mass healing.lua +++ /dev/null @@ -1,27 +0,0 @@ -function onTargetCreature(creature, target) - local player = creature:getPlayer() - local min = ((player:getLevel() / 5) + (player:getMagicLevel() * 5.7) + 26) - local max = ((player:getLevel() / 5) + (player:getMagicLevel() * 10.43) + 62) - - local bosses = {"leiden", "ravennous hunger", "dorokoll the mystic", "eshtaba the conjurer", "eliz the unyielding", "mezlon the defiler", "malkhar deathbringer", "containment crystal"} - local master = target:getMaster() - if target:isMonster() and not master or master and master:isMonster() then - if (not isInArray(bosses, target:getName():lower())) then - return true - end - end - - doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) - return true -end - -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) -combat:setArea(createCombatArea(AREA_CIRCLE3X3)) -combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/nature's embrace.lua b/data/spells/scripts/healing/nature's embrace.lua deleted file mode 100644 index 86c72b646..000000000 --- a/data/spells/scripts/healing/nature's embrace.lua +++ /dev/null @@ -1,23 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 2.5) + (maglevel * 20) - local max = (level / 2.5) + (maglevel * 28) -- TODO: Formulas (TibiaWiki says x2 but need more acurracy) - return min, max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - if creature:isPlayer() and var:getNumber() == creature:getId() then - creature:sendCancelMessage("You can't cast this spell to yourself.") - creature:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - else - return combat:execute(creature, var) - end -end diff --git a/data/spells/scripts/healing/practise healing.lua b/data/spells/scripts/healing/practise healing.lua deleted file mode 100644 index f5f99ae1a..000000000 --- a/data/spells/scripts/healing/practise healing.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) - -function onGetFormulaValues(player, level, maglevel) - return 4, 7 -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/recovery.lua b/data/spells/scripts/healing/recovery.lua deleted file mode 100644 index 954cfdd2c..000000000 --- a/data/spells/scripts/healing/recovery.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -local condition = Condition(CONDITION_REGENERATION) -condition:setParameter(CONDITION_PARAM_SUBID, 1) -condition:setParameter(CONDITION_PARAM_BUFF_SPELL, 1) -condition:setParameter(CONDITION_PARAM_TICKS, 1 * 60 * 1000) -condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 20) -condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 3000) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/restoration.lua b/data/spells/scripts/healing/restoration.lua deleted file mode 100644 index 4b88f6187..000000000 --- a/data/spells/scripts/healing/restoration.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level * 1.4 / 5) + (maglevel * 9.22 * 1.4) + 44 * 1.4 - local max = (level * 1.4 / 5) + (maglevel * 10.79 * 1.4) + 79 * 1.4 -- TODO: Formulas (Right now using 40% extra on Ultimate Healing with closer min and max values to the avg) - return min, max -end -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/salvation.lua b/data/spells/scripts/healing/salvation.lua deleted file mode 100644 index 6bbd53545..000000000 --- a/data/spells/scripts/healing/salvation.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 12) + 75 - local max = (level / 5) + (maglevel * 20) + 125 - return min, max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/ultimate healing rune.lua b/data/spells/scripts/healing/ultimate healing rune.lua deleted file mode 100644 index 82c4d115b..000000000 --- a/data/spells/scripts/healing/ultimate healing rune.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, 1) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 7.3) + 42 - local max = (level / 5) + (maglevel * 12.4) + 90 - return min, max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var, isHotkey) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/ultimate healing.lua b/data/spells/scripts/healing/ultimate healing.lua deleted file mode 100644 index 64e3b7106..000000000 --- a/data/spells/scripts/healing/ultimate healing.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 7.22) + 44 - local max = (level / 5) + (maglevel * 12.79) + 79 - return min, max -end -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/healing/wound cleansing.lua b/data/spells/scripts/healing/wound cleansing.lua deleted file mode 100644 index 4003bbf21..000000000 --- a/data/spells/scripts/healing/wound cleansing.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 4) + 25 - local max = (level / 5) + (maglevel * 7.95) + 51 - return min, max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/house/edit_door_list.lua b/data/spells/scripts/house/edit_door_list.lua deleted file mode 100644 index 495dbbdc4..000000000 --- a/data/spells/scripts/house/edit_door_list.lua +++ /dev/null @@ -1,16 +0,0 @@ -function onCastSpell(creature, variant) - local creaturePos = creature:getPosition() - creaturePos:getNextPosition(creature:getDirection()) - local tile = Tile(creaturePos) - local house = tile and tile:getHouse() - local doorId = house and house:getDoorIdByPosition(creaturePos) - if not doorId or not house:canEditAccessList(doorId, creature) then - creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - creature:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end - - creature:setEditHouse(house, doorId) - creature:sendHouseWindow(house, doorId) - return true -end diff --git a/data/spells/scripts/house/edit_guest_list.lua b/data/spells/scripts/house/edit_guest_list.lua deleted file mode 100644 index f5f904cda..000000000 --- a/data/spells/scripts/house/edit_guest_list.lua +++ /dev/null @@ -1,15 +0,0 @@ -function onCastSpell(player, variant) - local house = player:getTile():getHouse() - if not house then - return false - end - - if house:canEditAccessList(GUEST_LIST, player) then - player:setEditHouse(house, GUEST_LIST) - player:sendHouseWindow(house, GUEST_LIST) - else - player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - player:getPosition():sendMagicEffect(CONST_ME_POFF) - end - return true -end diff --git a/data/spells/scripts/house/edit_subowner_list.lua b/data/spells/scripts/house/edit_subowner_list.lua deleted file mode 100644 index d955e84ef..000000000 --- a/data/spells/scripts/house/edit_subowner_list.lua +++ /dev/null @@ -1,15 +0,0 @@ -function onCastSpell(player, variant) - local house = player:getTile():getHouse() - if not house then - return false - end - - if house:canEditAccessList(SUBOWNER_LIST, player) then - player:setEditHouse(house, SUBOWNER_LIST) - player:sendHouseWindow(house, SUBOWNER_LIST) - else - player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - player:getPosition():sendMagicEffect(CONST_ME_POFF) - end - return true -end diff --git a/data/spells/scripts/house/kick.lua b/data/spells/scripts/house/kick.lua deleted file mode 100644 index 38fff2998..000000000 --- a/data/spells/scripts/house/kick.lua +++ /dev/null @@ -1,11 +0,0 @@ -function onCastSpell(player, variant) - local targetPlayer = Player(variant:getString()) or player - local guest = targetPlayer:getTile():getHouse() - local owner = player:getTile():getHouse() - if not owner or not guest or not guest:kickPlayer(player, targetPlayer) then - player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - player:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end - return true -end diff --git a/data/spells/scripts/monster/abyssador paralyze.lua b/data/spells/scripts/monster/abyssador paralyze.lua deleted file mode 100644 index f696ae837..000000000 --- a/data/spells/scripts/monster/abyssador paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EXPLOSION) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.70, 0, -0.85, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/abyssador poison wave.lua b/data/spells/scripts/monster/abyssador poison wave.lua deleted file mode 100644 index 1ade9c93a..000000000 --- a/data/spells/scripts/monster/abyssador poison wave.lua +++ /dev/null @@ -1,19 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE) - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PLANTATTACK) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - - local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/abyssador skill reducer 1.lua b/data/spells/scripts/monster/abyssador skill reducer 1.lua deleted file mode 100644 index 01a2d040c..000000000 --- a/data/spells/scripts/monster/abyssador skill reducer 1.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = {} - -for i = 20, 55 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 15000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE1X1) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(20, 55)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/abyssador skill reducer 2.lua b/data/spells/scripts/monster/abyssador skill reducer 2.lua deleted file mode 100644 index 42dac97e1..000000000 --- a/data/spells/scripts/monster/abyssador skill reducer 2.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = {} - -for i = 50, 90 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 15000) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE1X1) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(50, 90)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/aftershock wave.lua b/data/spells/scripts/monster/aftershock wave.lua deleted file mode 100644 index 9321913a4..000000000 --- a/data/spells/scripts/monster/aftershock wave.lua +++ /dev/null @@ -1,10 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) - -local area = createCombatArea(AREA_WAVE11) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ancient scarab paralyze.lua b/data/spells/scripts/monster/ancient scarab paralyze.lua deleted file mode 100644 index f5723af77..000000000 --- a/data/spells/scripts/monster/ancient scarab paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) - - local condition = Condition(CONDITION_PARALYZE) - combat:setParameter(CONDITION_PARAM_TICKS, 25000) - combat:setFormula(-0.45, 0, -0.75, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/annihilon paralyze.lua b/data/spells/scripts/monster/annihilon paralyze.lua deleted file mode 100644 index 7b16aecea..000000000 --- a/data/spells/scripts/monster/annihilon paralyze.lua +++ /dev/null @@ -1,16 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SNOWBALL) - - local condition = Condition(CONDITION_PARALYZE) - combat:setParameter(CONDITION_PARAM_TICKS, 20000) - combat:setFormula(-0.55, 0, -0.75, 0) - combat:addCondition(condition) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/annihilon skill reducer.lua b/data/spells/scripts/monster/annihilon skill reducer.lua deleted file mode 100644 index 44d43fbfc..000000000 --- a/data/spells/scripts/monster/annihilon skill reducer.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = {} - -for i = 40, 55 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 10000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(40, 55)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/anomaly break.lua b/data/spells/scripts/monster/anomaly break.lua deleted file mode 100644 index 4c8202bf8..000000000 --- a/data/spells/scripts/monster/anomaly break.lua +++ /dev/null @@ -1,27 +0,0 @@ -local function anomalyBreak(pos) - local upConer = {x = pos.x - 1, y = pos.y - 1, z = pos.z} -- upLeftCorner - local downConer = {x = pos.x + 1, y = pos.y + 1, z = pos.z} -- downRightCorner - - for i=upConer.x, downConer.x do - for j=upConer.y, downConer.y do - for k= upConer.z, downConer.z do - local room = {x=i, y=j, z=k} - local tile = Tile(room) - if tile then - if tile:getItemById(1499) then - tile:getItemById(1499):remove() - Position(room):sendMagicEffect(3) - elseif tile:getItemById(1497) then - tile:getItemById(1497):remove() - Position(room):sendMagicEffect(3) - end - end - end - end - end -end - -function onCastSpell(creature, var) - local pos = creature:getPosition() - anomalyBreak(pos) -end diff --git a/data/spells/scripts/monster/anomaly wave.lua b/data/spells/scripts/monster/anomaly wave.lua deleted file mode 100644 index d9fa8eae4..000000000 --- a/data/spells/scripts/monster/anomaly wave.lua +++ /dev/null @@ -1,10 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) - -local area = createCombatArea(AREA_WAVE12) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/apprentice sheng summon.lua b/data/spells/scripts/monster/apprentice sheng summon.lua deleted file mode 100644 index 2011fc0dd..000000000 --- a/data/spells/scripts/monster/apprentice sheng summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Hyaena", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/arachir the ancient one summon.lua b/data/spells/scripts/monster/arachir the ancient one summon.lua deleted file mode 100644 index 1e6faaba5..000000000 --- a/data/spells/scripts/monster/arachir the ancient one summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Lich", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/arachnophobica wavedice.lua b/data/spells/scripts/monster/arachnophobica wavedice.lua deleted file mode 100644 index e44c4ab49..000000000 --- a/data/spells/scripts/monster/arachnophobica wavedice.lua +++ /dev/null @@ -1,20 +0,0 @@ -local combat = createCombatObject() -setCombatParam(combat, COMBAT_PARAM_TYPE, CONDITION_DROWN) -setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_CRAPS) - - arr = { - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - setCombatArea(combat, area) - - -function onCastSpell(cid, var) - return doCombat(cid, combat, var) -end diff --git a/data/spells/scripts/monster/arachnophobica waveenergy.lua b/data/spells/scripts/monster/arachnophobica waveenergy.lua deleted file mode 100644 index f5a7e36e6..000000000 --- a/data/spells/scripts/monster/arachnophobica waveenergy.lua +++ /dev/null @@ -1,20 +0,0 @@ -local combat = createCombatObject() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) - - arr = { - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - setCombatArea(combat, area) - - -function onCastSpell(cid, var) - return doCombat(cid, combat, var) -end diff --git a/data/spells/scripts/monster/arkhothep curse.lua b/data/spells/scripts/monster/arkhothep curse.lua deleted file mode 100644 index 3a9a146b4..000000000 --- a/data/spells/scripts/monster/arkhothep curse.lua +++ /dev/null @@ -1,41 +0,0 @@ -local combat = {} - -for i = 2, 5 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for j = 1, 33 do - damage = damage * 1.2 - condition:addDamage(1, 4000, -damage) - end - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(2, 5)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/arkhothep paralyze.lua b/data/spells/scripts/monster/arkhothep paralyze.lua deleted file mode 100644 index d2242b542..000000000 --- a/data/spells/scripts/monster/arkhothep paralyze.lua +++ /dev/null @@ -1,31 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.75, 0, -0.95, 0) - combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/arkhothep summon.lua b/data/spells/scripts/monster/arkhothep summon.lua deleted file mode 100644 index d7e131343..000000000 --- a/data/spells/scripts/monster/arkhothep summon.lua +++ /dev/null @@ -1,38 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) - -arr = { -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -} - -local area = createCombatArea(arr) -combat:setArea(area) - -local maxsummons = 6 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 6 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Ancient Scarab", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/arthei summon.lua b/data/spells/scripts/monster/arthei summon.lua deleted file mode 100644 index 06a5effe6..000000000 --- a/data/spells/scripts/monster/arthei summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 4 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 4 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Vampire", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ashfalor summon.lua b/data/spells/scripts/monster/ashfalor summon.lua deleted file mode 100644 index 1109bb030..000000000 --- a/data/spells/scripts/monster/ashfalor summon.lua +++ /dev/null @@ -1,62 +0,0 @@ -local summons = { - [1] = {name = "Demon Skeleton"}, - [2] = {name = "Bonebeast"}, - [3] = {name = "Banshee"}, - [4] = {name = "Blightwalker"}, - [5] = {name = "Crypt Shambler"}, - [6] = {name = "Ghoul"}, - [7] = {name = "Lich"}, - [8] = {name = "Mummy"}, - [9] = {name = "Zombie"}, - [10] = {name = "Ghost"}, - [11] = {name = "Enraged Soul"}, - [12] = {name = "Vampire"}, - [13] = {name = "Vampire Bride"}, - [14] = {name = "Vampire Viscount"}, - [15] = {name = "Pirate Ghost"}, - [16] = {name = "Souleater"}, - [17] = {name = "Tarnished Spirit"}, - [18] = {name = "White Shade"}, - [19] = {name = "Vicious Manbat"} -} - -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat:setArea(area) - -local maxsummons = 25 - -function onCastSpell(creature, var) -creature:say("RISE MY SERVANTS! RISE!!", TALKTYPE_ORANGE_2) - - local summoncount = creature:getSummons() - local creaturePos = creature:getPosition() - if #summoncount < 25 then - for i = 1, maxsummons do - local mid = Game.createMonster(summons[math.random(#summons)].name, Position(creaturePos.x + math.random(-3, 3), creaturePos.y + math.random(-3, 3), creaturePos.z)) - if not mid then - return - end - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/askarak wave.lua b/data/spells/scripts/monster/askarak wave.lua deleted file mode 100644 index 99204f4a2..000000000 --- a/data/spells/scripts/monster/askarak wave.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/azerus electrify.lua b/data/spells/scripts/monster/azerus electrify.lua deleted file mode 100644 index cf04341ef..000000000 --- a/data/spells/scripts/monster/azerus electrify.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_YELLOWENERGY) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL) - -local condition = Condition(CONDITION_ENERGY) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(10, 10000, -25) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/azerus skill reducer 1.lua b/data/spells/scripts/monster/azerus skill reducer 1.lua deleted file mode 100644 index 50e214e48..000000000 --- a/data/spells/scripts/monster/azerus skill reducer 1.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = {} - -for i = 40, 50 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 15000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(40, 50)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/azerus skill reducer 2.lua b/data/spells/scripts/monster/azerus skill reducer 2.lua deleted file mode 100644 index a0db0ce62..000000000 --- a/data/spells/scripts/monster/azerus skill reducer 2.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = {} - -for i = 40, 55 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 15000) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(40, 55)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/azerus skill reducer 3.lua b/data/spells/scripts/monster/azerus skill reducer 3.lua deleted file mode 100644 index 770c9d459..000000000 --- a/data/spells/scripts/monster/azerus skill reducer 3.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = {} - -for i = 45, 55 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 15000) - condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(45, 55)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/azerus soulfire 1.lua b/data/spells/scripts/monster/azerus soulfire 1.lua deleted file mode 100644 index fa2712bc8..000000000 --- a/data/spells/scripts/monster/azerus soulfire 1.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(20, 9000, -10) - -local area = createCombatArea(AREA_CIRCLE3X3) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/azerus soulfire 2.lua b/data/spells/scripts/monster/azerus soulfire 2.lua deleted file mode 100644 index a5854e6c3..000000000 --- a/data/spells/scripts/monster/azerus soulfire 2.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(20, 9000, -10) - -local area = createCombatArea(AREA_CIRCLE3X3) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/azerus summon 1.lua b/data/spells/scripts/monster/azerus summon 1.lua deleted file mode 100644 index 7112388e9..000000000 --- a/data/spells/scripts/monster/azerus summon 1.lua +++ /dev/null @@ -1,38 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER) - -arr = { -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -} - -local area = createCombatArea(arr) -combat:setArea(area) - -local maxsummons = 6 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 6 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Rift Worm", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/azerus summon 2.lua b/data/spells/scripts/monster/azerus summon 2.lua deleted file mode 100644 index efef3eb13..000000000 --- a/data/spells/scripts/monster/azerus summon 2.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BIGCLOUDS) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) - -local maxsummons = 4 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 4 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Rift Brood", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/azerus summon 3.lua b/data/spells/scripts/monster/azerus summon 3.lua deleted file mode 100644 index ba875d463..000000000 --- a/data/spells/scripts/monster/azerus summon 3.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) - -local maxsummons = 4 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 4 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Rift Scythe", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/azerus summon 4.lua b/data/spells/scripts/monster/azerus summon 4.lua deleted file mode 100644 index 23654ee53..000000000 --- a/data/spells/scripts/monster/azerus summon 4.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 4 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 4 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("War Golem", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/bane of light paralyze.lua b/data/spells/scripts/monster/bane of light paralyze.lua deleted file mode 100644 index 2df69d164..000000000 --- a/data/spells/scripts/monster/bane of light paralyze.lua +++ /dev/null @@ -1,30 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.45, 0, -0.8, 0) - combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/banshee paralyze.lua b/data/spells/scripts/monster/banshee paralyze.lua deleted file mode 100644 index 25fc3e1ed..000000000 --- a/data/spells/scripts/monster/banshee paralyze.lua +++ /dev/null @@ -1,11 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.65, 0, -0.9, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/barbarian brutetamer skill reducer.lua b/data/spells/scripts/monster/barbarian brutetamer skill reducer.lua deleted file mode 100644 index 844902a4c..000000000 --- a/data/spells/scripts/monster/barbarian brutetamer skill reducer.lua +++ /dev/null @@ -1,20 +0,0 @@ -local combat = {} - -for i = 90, 99 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SNOWBALL) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 8000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(90, 99)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/betrayed wraith paralyze.lua b/data/spells/scripts/monster/betrayed wraith paralyze.lua deleted file mode 100644 index 152ad9076..000000000 --- a/data/spells/scripts/monster/betrayed wraith paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 3000) - condition:setFormula(-0.85, 0, -0.95, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/betrayed wraith skill reducer.lua b/data/spells/scripts/monster/betrayed wraith skill reducer.lua deleted file mode 100644 index 5fefe60b1..000000000 --- a/data/spells/scripts/monster/betrayed wraith skill reducer.lua +++ /dev/null @@ -1,29 +0,0 @@ -local combat = {} - -for i = 1, 20 do -combat[i] = Combat() -combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_YELLOW_RINGS) - -local condition = Condition(CONDITION_ATTRIBUTES) -condition:setParameter(CONDITION_PARAM_TICKS, 8000) -condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - -local area = createCombatArea({ - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0} -}) - -combat[i]:setArea(area) -combat[i]:addCondition(condition) - -end - -function onCastSpell(creature, var) - return combat[math.random(1, 20)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/bibby bloodbath paralyze.lua b/data/spells/scripts/monster/bibby bloodbath paralyze.lua deleted file mode 100644 index 04abf1480..000000000 --- a/data/spells/scripts/monster/bibby bloodbath paralyze.lua +++ /dev/null @@ -1,15 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.35, 0, -0.55, 0) - combat:addCondition(condition) - - local area = createCombatArea(AREA_SQUARE1X1) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/big boss trolliver summon.lua b/data/spells/scripts/monster/big boss trolliver summon.lua deleted file mode 100644 index 6013ec83c..000000000 --- a/data/spells/scripts/monster/big boss trolliver summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 5 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 5 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Troll Champion", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/big death wave.lua b/data/spells/scripts/monster/big death wave.lua deleted file mode 100644 index 520855c54..000000000 --- a/data/spells/scripts/monster/big death wave.lua +++ /dev/null @@ -1,10 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - -local area = createCombatArea(AREA_WAVE11) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/big energy purple wave.lua b/data/spells/scripts/monster/big energy purple wave.lua deleted file mode 100644 index e53cb0ebf..000000000 --- a/data/spells/scripts/monster/big energy purple wave.lua +++ /dev/null @@ -1,10 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) - -local area = createCombatArea(AREA_WAVE11) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/big energy purple wave2.lua b/data/spells/scripts/monster/big energy purple wave2.lua deleted file mode 100644 index 5b0869eb3..000000000 --- a/data/spells/scripts/monster/big energy purple wave2.lua +++ /dev/null @@ -1,10 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) - -local area = createCombatArea(AREA_WAVE11) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/big energy wave.lua b/data/spells/scripts/monster/big energy wave.lua deleted file mode 100644 index 8496b3ca9..000000000 --- a/data/spells/scripts/monster/big energy wave.lua +++ /dev/null @@ -1,10 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) - -local area = createCombatArea(AREA_WAVE11) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/big explosion wave.lua b/data/spells/scripts/monster/big explosion wave.lua deleted file mode 100644 index b8fe969f7..000000000 --- a/data/spells/scripts/monster/big explosion wave.lua +++ /dev/null @@ -1,10 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA) - -local area = createCombatArea(AREA_WAVE11) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/big lifedrain wave.lua b/data/spells/scripts/monster/big lifedrain wave.lua deleted file mode 100644 index f3b9d92c3..000000000 --- a/data/spells/scripts/monster/big lifedrain wave.lua +++ /dev/null @@ -1,10 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_LIFEDRAIN) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - -local area = createCombatArea(AREA_WAVE11) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/big skill reducer.lua b/data/spells/scripts/monster/big skill reducer.lua deleted file mode 100644 index 601cda87b..000000000 --- a/data/spells/scripts/monster/big skill reducer.lua +++ /dev/null @@ -1,34 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) - -local condition = Condition(CONDITION_ATTRIBUTES) -condition:setParameter(CONDITION_PARAM_TICKS, 6000) -condition:setParameter(CONDITION_PARAM_SKILL_DISTANCE, -15) -condition:setParameter(CONDITION_PARAM_SKILL_SHIELD, -15) -condition:setParameter(CONDITION_PARAM_SKILL_MELEE, -15) -condition:setParameter(CONDITION_PARAM_STAT_MAGICPOINTS, -15) - -arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - -local area = createCombatArea(arr) - -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/blightwalker curse.lua b/data/spells/scripts/monster/blightwalker curse.lua deleted file mode 100644 index 7601c351a..000000000 --- a/data/spells/scripts/monster/blightwalker curse.lua +++ /dev/null @@ -1,41 +0,0 @@ -local combat = {} - -for i = 1, 1 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for j = 1, 26 do - damage = damage * 1.2 - condition:addDamage(1, 4000, -damage) - end - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(1, 1)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/blightwalker paralyze.lua b/data/spells/scripts/monster/blightwalker paralyze.lua deleted file mode 100644 index 3308fff4d..000000000 --- a/data/spells/scripts/monster/blightwalker paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 25000) - condition:setFormula(-0.7, 0, -0.9, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/blood hand paralyze.lua b/data/spells/scripts/monster/blood hand paralyze.lua deleted file mode 100644 index a7999655a..000000000 --- a/data/spells/scripts/monster/blood hand paralyze.lua +++ /dev/null @@ -1,15 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 3000) - condition:setFormula(-0.45, 0, -0.65, 0) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/bog raider paralyze.lua b/data/spells/scripts/monster/bog raider paralyze.lua deleted file mode 100644 index 37e773021..000000000 --- a/data/spells/scripts/monster/bog raider paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.40, 0, -0.50, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/bonebeast paralyze.lua b/data/spells/scripts/monster/bonebeast paralyze.lua deleted file mode 100644 index 5c27a9a84..000000000 --- a/data/spells/scripts/monster/bonebeast paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 25000) - condition:setFormula(-0.3, 0, -0.5, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/boogey summon.lua b/data/spells/scripts/monster/boogey summon.lua deleted file mode 100644 index ddbbcfbd1..000000000 --- a/data/spells/scripts/monster/boogey summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Demon Skeleton", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/braindeath paralyze.lua b/data/spells/scripts/monster/braindeath paralyze.lua deleted file mode 100644 index 1d1126157..000000000 --- a/data/spells/scripts/monster/braindeath paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.65, 0, -0.85, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/breach brood reducer.lua b/data/spells/scripts/monster/breach brood reducer.lua deleted file mode 100644 index 68a4bcbf9..000000000 --- a/data/spells/scripts/monster/breach brood reducer.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_BURSTARROW) - -local condition = Condition(CONDITION_ATTRIBUTES) -condition:setParameter(CONDITION_PARAM_TICKS, 10000) -condition:setParameter(CONDITION_PARAM_STAT_MAGICPOINTS, -15) - -local area = createCombatArea(AREA_SQUARE1X1) - -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/brimstone bug paralyze.lua b/data/spells/scripts/monster/brimstone bug paralyze.lua deleted file mode 100644 index b7013b339..000000000 --- a/data/spells/scripts/monster/brimstone bug paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 25000) - condition:setFormula(-0.65, 0, -0.80, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/brimstone bug wave.lua b/data/spells/scripts/monster/brimstone bug wave.lua deleted file mode 100644 index 0444cc69b..000000000 --- a/data/spells/scripts/monster/brimstone bug wave.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_YELLOW_RINGS) - - arr = { - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/bullwark paralyze.lua b/data/spells/scripts/monster/bullwark paralyze.lua deleted file mode 100644 index ae91638df..000000000 --- a/data/spells/scripts/monster/bullwark paralyze.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 5000) -condition:setFormula(-0.55, 0, -0.7, 0) -combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/bullwark summon.lua b/data/spells/scripts/monster/bullwark summon.lua deleted file mode 100644 index cfbf46326..000000000 --- a/data/spells/scripts/monster/bullwark summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 4 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 4 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Moohtant", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/burning gladiator firering.lua b/data/spells/scripts/monster/burning gladiator firering.lua deleted file mode 100644 index c962773cb..000000000 --- a/data/spells/scripts/monster/burning gladiator firering.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) -arr = { -{0, 1, 1, 1, 0}, -{1, 0, 0, 0, 1}, -{1, 0, 2, 0, 1}, -{1, 0, 0, 0, 1}, -{0, 1, 1, 1, 0} -} - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/burning gladiator firex.lua b/data/spells/scripts/monster/burning gladiator firex.lua deleted file mode 100644 index 0fbf7545d..000000000 --- a/data/spells/scripts/monster/burning gladiator firex.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) -arr = { -{1, 0, 1}, -{0, 2, 0}, -{1, 0, 1} -} - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/canopic jar heal.lua b/data/spells/scripts/monster/canopic jar heal.lua deleted file mode 100644 index 5c645887e..000000000 --- a/data/spells/scripts/monster/canopic jar heal.lua +++ /dev/null @@ -1,51 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onTargetCreature(creature, target) - local hp = (creature:getHealth()/creature:getMaxHealth())*100 - local min = 4000 - local max = 5000 - - local master = target:getMaster() - if target:isPlayer() and not master - or master and master:isPlayer() then - return true - end - if hp > 75 then - doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) - elseif hp < 75 and hp > 50 then - doTargetCombatHealth(0, target, COMBAT_HEALING, min*0.5, max*0.5, CONST_ME_NONE) - elseif hp < 50 and hp > 25 then - doTargetCombatHealth(0, target, COMBAT_HEALING, min*0.25, max*0.25, CONST_ME_NONE) - elseif hp < 25 then - doTargetCombatHealth(0, target, COMBAT_HEALING, min*0.10, max*0.10, CONST_ME_NONE) - end - - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/carniphila paralyze.lua b/data/spells/scripts/monster/carniphila paralyze.lua deleted file mode 100644 index d2243ed31..000000000 --- a/data/spells/scripts/monster/carniphila paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.45, 0, -0.75, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/chakoya freeze.lua b/data/spells/scripts/monster/chakoya freeze.lua deleted file mode 100644 index e3cc2641e..000000000 --- a/data/spells/scripts/monster/chakoya freeze.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK) - -local condition = Condition(CONDITION_FREEZING) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(2, 8000, -8) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/charge vortex.lua b/data/spells/scripts/monster/charge vortex.lua deleted file mode 100644 index 83690256f..000000000 --- a/data/spells/scripts/monster/charge vortex.lua +++ /dev/null @@ -1,47 +0,0 @@ -local mathCount = 0 - -local positions = {} - -local function createVortex() - local storedPositions = { - {x = 32264, y = 31253, z = 14}, - {x = 32269, y = 31258, z = 14}, - {x = 32275, y = 31255, z = 14}, - {x = 32280, y = 31253, z = 14}, - {x = 32271, y = 31248, z = 14}, - {x = 32264, y = 31245, z = 14}, - {x = 32270, y = 31240, z = 14}, - {x = 32269, y = 31253, z = 14}, - {x = 32275, y = 31245, z = 14}, - {x = 32276, y = 31250, z = 14}, - {x = 32266, y = 31249, z = 14}, - } - - if mathCount == 0 then - positions = storedPositions - end - - local r1 = math.random(#positions) - - local tile = Tile(positions[r1]) - - if tile then - local ground = tile:getGround() - if ground then - ground:transform(25550) - addEvent(function() - ground:transform(25705) - end, 10*1000) -- 10*1000 = 10 SECONDS - mathCount = mathCount + 1 - table.remove(positions, r1) - end - end - - if mathCount == 11 then - mathCount = 0 - end -end - -function onCastSpell(creature, var) - createVortex() -end diff --git a/data/spells/scripts/monster/charged energy elemental electrify.lua b/data/spells/scripts/monster/charged energy elemental electrify.lua deleted file mode 100644 index bcf32b426..000000000 --- a/data/spells/scripts/monster/charged energy elemental electrify.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) - -local condition = Condition(CONDITION_ENERGY) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(4, 10000, -25) - -local area = createCombatArea(AREA_CIRCLE3X3) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/chizzoron the distorter paralyze.lua b/data/spells/scripts/monster/chizzoron the distorter paralyze.lua deleted file mode 100644 index 912f20d8c..000000000 --- a/data/spells/scripts/monster/chizzoron the distorter paralyze.lua +++ /dev/null @@ -1,15 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.60, 0, -0.85, 0) - combat:addCondition(condition) - - local area = createCombatArea(AREA_CIRCLE3X3) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/chizzoron the distorter summon.lua b/data/spells/scripts/monster/chizzoron the distorter summon.lua deleted file mode 100644 index b6b6e956d..000000000 --- a/data/spells/scripts/monster/chizzoron the distorter summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Lizard Dragon Priest2", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/choking fear drown.lua b/data/spells/scripts/monster/choking fear drown.lua deleted file mode 100644 index b7075b5f5..000000000 --- a/data/spells/scripts/monster/choking fear drown.lua +++ /dev/null @@ -1,31 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BUBBLES) - -arr = { -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -} - -local condition = Condition(CONDITION_DROWN) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(50, 5000, -20) - -local area = createCombatArea(arr) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/choking fear paralyze.lua b/data/spells/scripts/monster/choking fear paralyze.lua deleted file mode 100644 index edfd62b3d..000000000 --- a/data/spells/scripts/monster/choking fear paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SLEEP) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.6, 0, -0.8, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/cliff strider electrify.lua b/data/spells/scripts/monster/cliff strider electrify.lua deleted file mode 100644 index 6ddb3a7ae..000000000 --- a/data/spells/scripts/monster/cliff strider electrify.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL) - -local condition = Condition(CONDITION_ENERGY) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(20, 10000, -25) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/cliff strider skill reducer.lua b/data/spells/scripts/monster/cliff strider skill reducer.lua deleted file mode 100644 index 49bb73e5e..000000000 --- a/data/spells/scripts/monster/cliff strider skill reducer.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = {} - -for i = 15, 45 do -combat[i] = Combat() -combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - -local condition = Condition(CONDITION_ATTRIBUTES) -condition:setParameter(CONDITION_PARAM_TICKS, 4000) -condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat[i]:setArea(area) -combat[i]:addCondition(condition) - -end - -function onCastSpell(creature, var) - return combat[math.random(15, 45)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/coldheart paralyze.lua b/data/spells/scripts/monster/coldheart paralyze.lua deleted file mode 100644 index 6b6cf75a7..000000000 --- a/data/spells/scripts/monster/coldheart paralyze.lua +++ /dev/null @@ -1,15 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.5, 0, -0.75, 0) - combat:addCondition(condition) - - local area = createCombatArea(AREA_SQUARE1X1) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/corym vanguard wave.lua b/data/spells/scripts/monster/corym vanguard wave.lua deleted file mode 100644 index 317919d1f..000000000 --- a/data/spells/scripts/monster/corym vanguard wave.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/crystal spider paralyze 1.lua b/data/spells/scripts/monster/crystal spider paralyze 1.lua deleted file mode 100644 index 6a75c6100..000000000 --- a/data/spells/scripts/monster/crystal spider paralyze 1.lua +++ /dev/null @@ -1,32 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.25, 0, -0.4, 0) -combat:addCondition(condition) - -arr = { -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -} - -local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/crystal spider paralyze 2.lua b/data/spells/scripts/monster/crystal spider paralyze 2.lua deleted file mode 100644 index 9abcb5532..000000000 --- a/data/spells/scripts/monster/crystal spider paralyze 2.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SNOWBALL) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.5, 0, -0.6, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/crystal wolf wave.lua b/data/spells/scripts/monster/crystal wolf wave.lua deleted file mode 100644 index 482a5d80c..000000000 --- a/data/spells/scripts/monster/crystal wolf wave.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STONES) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/cults of tibia armor buff.lua b/data/spells/scripts/monster/cults of tibia armor buff.lua deleted file mode 100644 index 28ee37e12..000000000 --- a/data/spells/scripts/monster/cults of tibia armor buff.lua +++ /dev/null @@ -1,32 +0,0 @@ -local combat = {} - -for i = 130, 150 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 6000) - condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - -arr = { -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0} -} - - local area = createCombatArea(arr) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(130, 150)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/dark torturer skill reducer.lua b/data/spells/scripts/monster/dark torturer skill reducer.lua deleted file mode 100644 index 850dafd06..000000000 --- a/data/spells/scripts/monster/dark torturer skill reducer.lua +++ /dev/null @@ -1,36 +0,0 @@ -local combat = {} - -for i = 1, 40 do -combat[i] = Combat() -combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_PURPLE) - -local condition = Condition(CONDITION_ATTRIBUTES) -condition:setParameter(CONDITION_PARAM_TICKS, 4000) -condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - -local area = createCombatArea({ - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0} -}) - -combat[i]:setArea(area) -combat[i]:addCondition(condition) - -end - -function onCastSpell(creature, var) - return combat[math.random(1, 40)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/death blob curse.lua b/data/spells/scripts/monster/death blob curse.lua deleted file mode 100644 index 5e462ada6..000000000 --- a/data/spells/scripts/monster/death blob curse.lua +++ /dev/null @@ -1,24 +0,0 @@ -local combat = {} - -for i = 2, 2 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for j = 1, 18 do - damage = damage * 1.2 - condition:addDamage(1, 4000, -damage) - end - - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(2, 2)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/death priest shargon curse.lua b/data/spells/scripts/monster/death priest shargon curse.lua deleted file mode 100644 index 18b087312..000000000 --- a/data/spells/scripts/monster/death priest shargon curse.lua +++ /dev/null @@ -1,23 +0,0 @@ -local combat = {} - -for i = 1.12, 1.12 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for j = 1, 32 do - damage = damage * 1.2 - condition:addDamage(1, 4000, -damage) - end - - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(1.12, 1.12)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/death priest shargon dazzle.lua b/data/spells/scripts/monster/death priest shargon dazzle.lua deleted file mode 100644 index 5fc553bb1..000000000 --- a/data/spells/scripts/monster/death priest shargon dazzle.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - -local condition = Condition(CONDITION_DAZZLED) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(20, 10000, -20) -combat:addCondition(condition) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/death priest shargon summon.lua b/data/spells/scripts/monster/death priest shargon summon.lua deleted file mode 100644 index 5a4e63ca3..000000000 --- a/data/spells/scripts/monster/death priest shargon summon.lua +++ /dev/null @@ -1,13 +0,0 @@ -local maxsummons = 2 - -function onCastSpell(creature, var) -local summoncount = creature:getSummons() - if #summoncount < 2 then - local mon = Game.createMonster("Lesser Death Minion", creature:getPosition(), true, true) - if not mon then - return - end - mon:setMaster(creature) - end - return true -end diff --git a/data/spells/scripts/monster/deathbringer drown.lua b/data/spells/scripts/monster/deathbringer drown.lua deleted file mode 100644 index 6405437a9..000000000 --- a/data/spells/scripts/monster/deathbringer drown.lua +++ /dev/null @@ -1,26 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) - - arr = { - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local condition = Condition(CONDITION_DROWN) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(20, 5000, -20) - -local area = createCombatArea(arr) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/deathstrike freeze.lua b/data/spells/scripts/monster/deathstrike freeze.lua deleted file mode 100644 index 3029e514b..000000000 --- a/data/spells/scripts/monster/deathstrike freeze.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - -local condition = Condition(CONDITION_FREEZING) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(30, 8000, -8) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/deathstrike manadrain.lua b/data/spells/scripts/monster/deathstrike manadrain.lua deleted file mode 100644 index 5530e5686..000000000 --- a/data/spells/scripts/monster/deathstrike manadrain.lua +++ /dev/null @@ -1,20 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_MANADRAIN) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/deathstrike paralyze.lua b/data/spells/scripts/monster/deathstrike paralyze.lua deleted file mode 100644 index e32e2d454..000000000 --- a/data/spells/scripts/monster/deathstrike paralyze.lua +++ /dev/null @@ -1,31 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.45, 0, -0.75, 0) - combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/deepling spellsinger skill reducer.lua b/data/spells/scripts/monster/deepling spellsinger skill reducer.lua deleted file mode 100644 index 6bdecb78c..000000000 --- a/data/spells/scripts/monster/deepling spellsinger skill reducer.lua +++ /dev/null @@ -1,21 +0,0 @@ -local combat = {} - -for i = 35, 65 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 8000) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - - local area = createCombatArea(AREA_BEAM1) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(35, 65)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/defiler paralyze 1.lua b/data/spells/scripts/monster/defiler paralyze 1.lua deleted file mode 100644 index 34beec63d..000000000 --- a/data/spells/scripts/monster/defiler paralyze 1.lua +++ /dev/null @@ -1,32 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.85, 0, -0.90, 0) -combat:addCondition(condition) - -arr = { -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -} - -local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/defiler paralyze 2.lua b/data/spells/scripts/monster/defiler paralyze 2.lua deleted file mode 100644 index e62eb5bbf..000000000 --- a/data/spells/scripts/monster/defiler paralyze 2.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.85, 0, -0.90, 0) -combat:addCondition(condition) - - -local area = createCombatArea(AREA_SQUARE1X1) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/defiler paralyze 3.lua b/data/spells/scripts/monster/defiler paralyze 3.lua deleted file mode 100644 index c44fd6db3..000000000 --- a/data/spells/scripts/monster/defiler paralyze 3.lua +++ /dev/null @@ -1,28 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.85, 0, -0.90, 0) -combat:addCondition(condition) - - arr = { - {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/demon outcast skill reducer.lua b/data/spells/scripts/monster/demon outcast skill reducer.lua deleted file mode 100644 index 4765f68e6..000000000 --- a/data/spells/scripts/monster/demon outcast skill reducer.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = {} - -for i = 20, 25 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLASHARROW) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 10000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(20, 25)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/demon paralyze.lua b/data/spells/scripts/monster/demon paralyze.lua deleted file mode 100644 index 2ac024081..000000000 --- a/data/spells/scripts/monster/demon paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 25000) - condition:setFormula(-0.3, 0, -0.45, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/demon summon.lua b/data/spells/scripts/monster/demon summon.lua deleted file mode 100644 index cdc666500..000000000 --- a/data/spells/scripts/monster/demon summon.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) - -local maxsummons = 1 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 1 then - mid = Game.createMonster("Fire Elemental", { x=creature:getPosition().x+math.random(-1, 1), y=creature:getPosition().y+math.random(-1, 1), z=creature:getPosition().z }) - if not mid then - return - end - mid:setMaster(creature) - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/destruction summon.lua b/data/spells/scripts/monster/destruction summon.lua deleted file mode 100644 index e00f775b1..000000000 --- a/data/spells/scripts/monster/destruction summon.lua +++ /dev/null @@ -1,27 +0,0 @@ -local destructionSummonDelay = false - -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) - -local function removeDelay() - destructionSummonDelay = false -end - -function onCastSpell(creature, var) - - if destructionSummonDelay == false then - if destructionSummon < 3 then - Game.createMonster("Disruption", {x=creature:getPosition().x+math.random(-1, 1), y=creature:getPosition().y+math.random(-1, 1), z=creature:getPosition().z}, false, true) - destructionSummon = destructionSummon + 1 - - destructionSummonDelay = true - addEvent(removeDelay, 15000) - end - end - - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/devourer paralyze.lua b/data/spells/scripts/monster/devourer paralyze.lua deleted file mode 100644 index 8db155e6b..000000000 --- a/data/spells/scripts/monster/devourer paralyze.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.55, 0, -0.75, 0) -combat:addCondition(condition) - - -local area = createCombatArea(AREA_SQUARE1X1) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/devourer summon.lua b/data/spells/scripts/monster/devourer summon.lua deleted file mode 100644 index fd2371264..000000000 --- a/data/spells/scripts/monster/devourer summon.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) - -function onCastSpell(creature, var) - - local creatures = {"Greed", "Frenzy", "Disruption"} - local monster = creatures[math.random(#creatures)] - - if devourerSummon < 3 then - Game.createMonster(monster, {x=creature:getPosition().x+math.random(-1, 1), y=creature:getPosition().y+math.random(-1, 1), z=creature:getPosition().z}, false, true) - devourerSummon = devourerSummon + 1 - end - - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/devourer wave.lua b/data/spells/scripts/monster/devourer wave.lua deleted file mode 100644 index 07df1fe3e..000000000 --- a/data/spells/scripts/monster/devourer wave.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) - - arr = { - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/devovorga curse.lua b/data/spells/scripts/monster/devovorga curse.lua deleted file mode 100644 index 8a3f8c7b8..000000000 --- a/data/spells/scripts/monster/devovorga curse.lua +++ /dev/null @@ -1,41 +0,0 @@ -local combat = {} - -for i = 1, 3 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for j = 1, 35 do - damage = damage * 1.2 - condition:addDamage(1, 4000, -damage) - end - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(2, 5)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/dharalion skill reducer.lua b/data/spells/scripts/monster/dharalion skill reducer.lua deleted file mode 100644 index 6ec5c8c5b..000000000 --- a/data/spells/scripts/monster/dharalion skill reducer.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = {} - -for i = 10, 35 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(10, 35)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/diabolic imp skill reducer.lua b/data/spells/scripts/monster/diabolic imp skill reducer.lua deleted file mode 100644 index a557f1f68..000000000 --- a/data/spells/scripts/monster/diabolic imp skill reducer.lua +++ /dev/null @@ -1,20 +0,0 @@ -local combat = {} - -for i = 5, 20 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 6000) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - - local area = createCombatArea(AREA_BEAM1) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(5, 20)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/diblis the fair summon.lua b/data/spells/scripts/monster/diblis the fair summon.lua deleted file mode 100644 index be40599bc..000000000 --- a/data/spells/scripts/monster/diblis the fair summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 4 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 4 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Banshee", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/dipthrah skill reducer.lua b/data/spells/scripts/monster/dipthrah skill reducer.lua deleted file mode 100644 index 0851db575..000000000 --- a/data/spells/scripts/monster/dipthrah skill reducer.lua +++ /dev/null @@ -1,20 +0,0 @@ -local combat = {} - -for i = 45, 65 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 80000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE3X3) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(45, 65)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/dire penguin paralyze.lua b/data/spells/scripts/monster/dire penguin paralyze.lua deleted file mode 100644 index 4f84198e7..000000000 --- a/data/spells/scripts/monster/dire penguin paralyze.lua +++ /dev/null @@ -1,15 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 6000) - condition:setFormula(-0.24, 0, -0.29, 0) - combat:addCondition(condition) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/dirtbeard summon.lua b/data/spells/scripts/monster/dirtbeard summon.lua deleted file mode 100644 index e21f5a559..000000000 --- a/data/spells/scripts/monster/dirtbeard summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_RED) - -local area = createCombatArea(AREA_CIRCLE3X3) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Pirate Marauder", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/diseased paralyze.lua b/data/spells/scripts/monster/diseased paralyze.lua deleted file mode 100644 index a7c04ad60..000000000 --- a/data/spells/scripts/monster/diseased paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.40, 0, -0.50, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/djinn cancel invisibility.lua b/data/spells/scripts/monster/djinn cancel invisibility.lua deleted file mode 100644 index c3ef04068..000000000 --- a/data/spells/scripts/monster/djinn cancel invisibility.lua +++ /dev/null @@ -1,9 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_INVISIBLE) - -local area = createCombatArea(AREA_CIRCLE3X3) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/djinn electrify 2.lua b/data/spells/scripts/monster/djinn electrify 2.lua deleted file mode 100644 index 024f76a5f..000000000 --- a/data/spells/scripts/monster/djinn electrify 2.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) - -local condition = Condition(CONDITION_ENERGY) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(3, 10000, -25) -combat:addCondition(condition) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/djinn electrify.lua b/data/spells/scripts/monster/djinn electrify.lua deleted file mode 100644 index 55b566901..000000000 --- a/data/spells/scripts/monster/djinn electrify.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - -local condition = Condition(CONDITION_ENERGY) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(3, 10000, -25) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/djinn paralyze.lua b/data/spells/scripts/monster/djinn paralyze.lua deleted file mode 100644 index ffb990ab1..000000000 --- a/data/spells/scripts/monster/djinn paralyze.lua +++ /dev/null @@ -1,11 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.4, 0, -0.75, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/doctor perhaps summon.lua b/data/spells/scripts/monster/doctor perhaps summon.lua deleted file mode 100644 index bc5acfae7..000000000 --- a/data/spells/scripts/monster/doctor perhaps summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Zombie", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/dragonling paralyze.lua b/data/spells/scripts/monster/dragonling paralyze.lua deleted file mode 100644 index b1f914114..000000000 --- a/data/spells/scripts/monster/dragonling paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 25000) - condition:setFormula(-0.6, 0, -0.75, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/dragonling wave.lua b/data/spells/scripts/monster/dragonling wave.lua deleted file mode 100644 index 546e96149..000000000 --- a/data/spells/scripts/monster/dragonling wave.lua +++ /dev/null @@ -1,20 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) - - arr = { - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/draken abomination curse.lua b/data/spells/scripts/monster/draken abomination curse.lua deleted file mode 100644 index 13b70ffb5..000000000 --- a/data/spells/scripts/monster/draken abomination curse.lua +++ /dev/null @@ -1,24 +0,0 @@ -local combat = {} - -for i = 15, 30 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for j = 1, 8 do - damage = damage * 1.2 - condition:addDamage(1, 4000, -damage) - end - - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(15, 30)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/draken abomination summon.lua b/data/spells/scripts/monster/draken abomination summon.lua deleted file mode 100644 index adcbfa46b..000000000 --- a/data/spells/scripts/monster/draken abomination summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Death Blob", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/draken elite soulfire.lua b/data/spells/scripts/monster/draken elite soulfire.lua deleted file mode 100644 index 2bac7cd97..000000000 --- a/data/spells/scripts/monster/draken elite soulfire.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(20, 9000, -10) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/dread intruder wave.lua b/data/spells/scripts/monster/dread intruder wave.lua deleted file mode 100644 index ba09d85f6..000000000 --- a/data/spells/scripts/monster/dread intruder wave.lua +++ /dev/null @@ -1,10 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) - -local area = createCombatArea(AREA_SQUAREWAVE6) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/dreadbeast skill reducer.lua b/data/spells/scripts/monster/dreadbeast skill reducer.lua deleted file mode 100644 index a21653c42..000000000 --- a/data/spells/scripts/monster/dreadbeast skill reducer.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = {} - -for i = 70, 80 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_YELLOWENERGY) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(70, 80)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/dreadbeast summon.lua b/data/spells/scripts/monster/dreadbeast summon.lua deleted file mode 100644 index 1d2cb52d1..000000000 --- a/data/spells/scripts/monster/dreadbeast summon.lua +++ /dev/null @@ -1,27 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -function onCastSpell(creature, var) -local t, spectator = Game.getSpectators(creature:getPosition(), false, false, 50, 50, 50, 50) - local check = 0 - if #t ~= nil then - for i = 1, #t do - spectator = t[i] - if spectator:getName() == "Dreadbeast" then - check = check + 1 - end - end - end - if (check < 10) then - local summon = Game.createMonster("Dreadbeast", creature:getPosition(), true, false) - if summon then - end - summon:setMaster(creature) - else - end -return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/dreadwing curse.lua b/data/spells/scripts/monster/dreadwing curse.lua deleted file mode 100644 index 038abc2c5..000000000 --- a/data/spells/scripts/monster/dreadwing curse.lua +++ /dev/null @@ -1,34 +0,0 @@ -local combat = {} - -for i = 1, 1 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_PURPLE) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for j = 1, 15 do - damage = damage * 1.2 - condition:addDamage(1, 4000, -damage) - end - - local area = createCombatArea({ - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - }) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(1, 1)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/dreadwing skill reducer.lua b/data/spells/scripts/monster/dreadwing skill reducer.lua deleted file mode 100644 index 84198218e..000000000 --- a/data/spells/scripts/monster/dreadwing skill reducer.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = {} - -for i = 30, 60 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_RED) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 10000) - condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(30, 60)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/drillworm paralyze.lua b/data/spells/scripts/monster/drillworm paralyze.lua deleted file mode 100644 index 58fb8608c..000000000 --- a/data/spells/scripts/monster/drillworm paralyze.lua +++ /dev/null @@ -1,26 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 10000) - condition:setFormula(-0.35, 0, -0.65, 0) - combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/dryad paralyze.lua b/data/spells/scripts/monster/dryad paralyze.lua deleted file mode 100644 index 2a72b2568..000000000 --- a/data/spells/scripts/monster/dryad paralyze.lua +++ /dev/null @@ -1,15 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.25, 0, -0.4, 0) - combat:addCondition(condition) - - local area = createCombatArea(AREA_CIRCLE3X3) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/dwarf henchman drown.lua b/data/spells/scripts/monster/dwarf henchman drown.lua deleted file mode 100644 index 0bd7dd604..000000000 --- a/data/spells/scripts/monster/dwarf henchman drown.lua +++ /dev/null @@ -1,12 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) - -local condition = Condition(CONDITION_DROWN) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(4, 5000, -20) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/dworc paralyze.lua b/data/spells/scripts/monster/dworc paralyze.lua deleted file mode 100644 index 9ec719dc7..000000000 --- a/data/spells/scripts/monster/dworc paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.5, 0, -0.75, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/elder bonelord paralyze.lua b/data/spells/scripts/monster/elder bonelord paralyze.lua deleted file mode 100644 index 44f35f747..000000000 --- a/data/spells/scripts/monster/elder bonelord paralyze.lua +++ /dev/null @@ -1,11 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.65, 0, -0.85, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/elder mummy paralyze.lua b/data/spells/scripts/monster/elder mummy paralyze.lua deleted file mode 100644 index 69be4dd31..000000000 --- a/data/spells/scripts/monster/elder mummy paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.7, 0, -0.85, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/elder wyrm electrify.lua b/data/spells/scripts/monster/elder wyrm electrify.lua deleted file mode 100644 index f29113bb4..000000000 --- a/data/spells/scripts/monster/elder wyrm electrify.lua +++ /dev/null @@ -1,26 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) - -local condition = Condition(CONDITION_ENERGY) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(10, 10000, -25) -combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/elder wyrm wave.lua b/data/spells/scripts/monster/elder wyrm wave.lua deleted file mode 100644 index 5515cf220..000000000 --- a/data/spells/scripts/monster/elder wyrm wave.lua +++ /dev/null @@ -1,20 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_LIFEDRAIN) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLACKSMOKE) - - arr = { - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/emperor summon.lua b/data/spells/scripts/monster/emperor summon.lua deleted file mode 100644 index 01b899359..000000000 --- a/data/spells/scripts/monster/emperor summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_PURPLE) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Draken Warmaster", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/energized raging mage skill reducer.lua b/data/spells/scripts/monster/energized raging mage skill reducer.lua deleted file mode 100644 index ec831606b..000000000 --- a/data/spells/scripts/monster/energized raging mage skill reducer.lua +++ /dev/null @@ -1,14 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) - -local area = createCombatArea(AREA_CIRCLE6X6) -combat:setArea(area) - -local condition = Condition(CONDITION_ATTRIBUTES) -condition:setParameter(CONDITION_PARAM_TICKS, 6000) -condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, 50) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/energy elemental electrify.lua b/data/spells/scripts/monster/energy elemental electrify.lua deleted file mode 100644 index 524e7bfb7..000000000 --- a/data/spells/scripts/monster/energy elemental electrify.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) - -local condition = Condition(CONDITION_ENERGY) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(7, 10000, -25) - -local area = createCombatArea(AREA_CIRCLE3X3) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/energy overlord paralyze.lua b/data/spells/scripts/monster/energy overlord paralyze.lua deleted file mode 100644 index 8fe601a73..000000000 --- a/data/spells/scripts/monster/energy overlord paralyze.lua +++ /dev/null @@ -1,31 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PLANTATTACK) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.3, 0, -0.65, 0) - combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/energy pulse explosion.lua b/data/spells/scripts/monster/energy pulse explosion.lua deleted file mode 100644 index d03f243dc..000000000 --- a/data/spells/scripts/monster/energy pulse explosion.lua +++ /dev/null @@ -1,26 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) - -arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var), creature:remove() -end diff --git a/data/spells/scripts/monster/enslaved dwarf skill reducer 1.lua b/data/spells/scripts/monster/enslaved dwarf skill reducer 1.lua deleted file mode 100644 index 852d7e31b..000000000 --- a/data/spells/scripts/monster/enslaved dwarf skill reducer 1.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = {} - -for i = 20, 65 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 6000) - condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(20, 65)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/enslaved dwarf skill reducer 2.lua b/data/spells/scripts/monster/enslaved dwarf skill reducer 2.lua deleted file mode 100644 index 691bb075a..000000000 --- a/data/spells/scripts/monster/enslaved dwarf skill reducer 2.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = {} - -for i = 35, 75 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 6000) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE1X1) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(35, 75)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/eruption of destruction explosion.lua b/data/spells/scripts/monster/eruption of destruction explosion.lua deleted file mode 100644 index 0cd505ea3..000000000 --- a/data/spells/scripts/monster/eruption of destruction explosion.lua +++ /dev/null @@ -1,84 +0,0 @@ -local vocation = { - VOCATION.BASE_ID.SORCERER, - VOCATION.BASE_ID.DRUID, - VOCATION.BASE_ID.PALADIN, - VOCATION.BASE_ID.KNIGHT -} - -local area = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - -local createArea = createCombatArea(area) - -local combat = Combat() -combat:setArea(createArea) - -function onTargetTile(creature, pos) - local creatureTable = {} - local n, i = Tile({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 - if n ~= 0 then - local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid - while v ~= 0 do - if isCreature(v) == true then - table.insert(creatureTable, v) - if n == #creatureTable then - break - end - end - i = i + 1 - v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid - end - end - if #creatureTable ~= nil and #creatureTable > 0 then - for r = 1, #creatureTable do - if creatureTable[r] ~= creature then - local min = 4000 - local max = 6000 - local player = Player(creatureTable[r]) - - if isPlayer(creatureTable[r]) == true and table.contains(vocation, player:getVocation():getBaseId()) then - doTargetCombatHealth(creature, creatureTable[r], COMBAT_FIREDAMAGE, -min, -max, CONST_ME_NONE) - elseif isMonster(creatureTable[r]) == true then - doTargetCombatHealth(creature, creatureTable[r], COMBAT_FIREDAMAGE, -min, -max, CONST_ME_NONE) - end - end - end - end - pos:sendMagicEffect(CONST_ME_FIREAREA) - creature:remove() - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") - -local function delayedCastSpell(cid, var) - local creature = Creature(cid) - if not creature then - return - end - if creature:getHealth() >= 1 then - local master = creature:getMaster() - master:addHealth(math.random(20000, 30000), true, true) - Game.createMonster('demon', creature:getPosition(), true, true) - return combat:execute(creature, positionToVariant(creature:getPosition())) - end - return -end - -function onCastSpell(creature, var) - addEvent(delayedCastSpell, 7000, creature:getId(), var) - return true -end diff --git a/data/spells/scripts/monster/essence of darkness curse.lua b/data/spells/scripts/monster/essence of darkness curse.lua deleted file mode 100644 index 5b96bb375..000000000 --- a/data/spells/scripts/monster/essence of darkness curse.lua +++ /dev/null @@ -1,24 +0,0 @@ -local combat = {} - -for i = 2, 2 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for j = 1, 3 do - damage = damage * 1.2 - condition:addDamage(1, 4000, -damage) - end - - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(2, 2)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/essence of darkness paralyze.lua b/data/spells/scripts/monster/essence of darkness paralyze.lua deleted file mode 100644 index c5ca5b66f..000000000 --- a/data/spells/scripts/monster/essence of darkness paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 5000) - condition:setFormula(-0.2, 0, -0.3, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/evil sheep lord summon.lua b/data/spells/scripts/monster/evil sheep lord summon.lua deleted file mode 100644 index 6eb9d9a60..000000000 --- a/data/spells/scripts/monster/evil sheep lord summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HEARTS) - -local area = createCombatArea(AREA_CIRCLE3X3) -combat:setArea(area) - -local maxsummons = 3 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 3 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Evil Sheep", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/explosion wave.lua b/data/spells/scripts/monster/explosion wave.lua deleted file mode 100644 index 72723bd65..000000000 --- a/data/spells/scripts/monster/explosion wave.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) -arr = { -{1, 1, 1}, -{1, 1, 1}, -{0, 1, 0}, -{0, 3, 0} -} - - local area = createCombatArea(arr) - combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/feroxa summon.lua b/data/spells/scripts/monster/feroxa summon.lua deleted file mode 100644 index c4215ea04..000000000 --- a/data/spells/scripts/monster/feroxa summon.lua +++ /dev/null @@ -1,45 +0,0 @@ -local summons = { - [1] = {name = "Werewolf"} -} - -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat:setArea(area) - -local maxsummons = 10 - -function onCastSpell(creature, var) -creature:say("RISE MY SERVANTS! RISE!!", TALKTYPE_MONSTER_SAY) - - local summoncount = creature:getSummons() - local creaturePos = creature:getPosition() - if #summoncount < 10 then - for i = 1, maxsummons do - local mid = Game.createMonster(summons[math.random(#summons)].name, Position(creaturePos.x + math.random(-3, 3), creaturePos.y + math.random(-3, 3), creaturePos.z)) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ferumbras electrify.lua b/data/spells/scripts/monster/ferumbras electrify.lua deleted file mode 100644 index c8fdc2329..000000000 --- a/data/spells/scripts/monster/ferumbras electrify.lua +++ /dev/null @@ -1,31 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) - -local condition = Condition(CONDITION_ENERGY) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(20, 10000, -25) -combat:addCondition(condition) - -arr = { -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -} - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ferumbras soulfire.lua b/data/spells/scripts/monster/ferumbras soulfire.lua deleted file mode 100644 index 5eab6980d..000000000 --- a/data/spells/scripts/monster/ferumbras soulfire.lua +++ /dev/null @@ -1,32 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(50, 9000, -10) -combat:addCondition(condition) - -arr = { -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -} - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/feverish citizen drunk.lua b/data/spells/scripts/monster/feverish citizen drunk.lua deleted file mode 100644 index 1a7a8353f..000000000 --- a/data/spells/scripts/monster/feverish citizen drunk.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) - -local condition = Condition(CONDITION_DRUNK) -condition:setParameter(CONDITION_PARAM_TICKS, 25000) -combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/feversleep skill reducer.lua b/data/spells/scripts/monster/feversleep skill reducer.lua deleted file mode 100644 index 061994fde..000000000 --- a/data/spells/scripts/monster/feversleep skill reducer.lua +++ /dev/null @@ -1,36 +0,0 @@ -local combat = {} - -for i = 35, 60 do -combat[i] = Combat() -combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_YELLOW_RINGS) - -local condition = Condition(CONDITION_ATTRIBUTES) -condition:setParameter(CONDITION_PARAM_TICKS, 8000) -condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) -condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - -arr = { -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -} - -local area = createCombatArea(arr) - combat[i]:setArea(area) - combat[i]:addCondition(condition) - -end - -function onCastSpell(creature, var) - return combat[math.random(35, 60)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/fire overlord paralyze.lua b/data/spells/scripts/monster/fire overlord paralyze.lua deleted file mode 100644 index 462976a01..000000000 --- a/data/spells/scripts/monster/fire overlord paralyze.lua +++ /dev/null @@ -1,31 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.3, 0, -0.65, 0) - combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/fire overlord soulfire.lua b/data/spells/scripts/monster/fire overlord soulfire.lua deleted file mode 100644 index f442bed1a..000000000 --- a/data/spells/scripts/monster/fire overlord soulfire.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(50, 9000, -10) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/firestarter soulfire.lua b/data/spells/scripts/monster/firestarter soulfire.lua deleted file mode 100644 index 3c2133a17..000000000 --- a/data/spells/scripts/monster/firestarter soulfire.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLAMMINGARROW) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(10, 9000, -10) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/flamecaller zazrak summon.lua b/data/spells/scripts/monster/flamecaller zazrak summon.lua deleted file mode 100644 index 7efd3fff0..000000000 --- a/data/spells/scripts/monster/flamecaller zazrak summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 3 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 3 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Fire Elemental", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/forest fury skill reducer 1.lua b/data/spells/scripts/monster/forest fury skill reducer 1.lua deleted file mode 100644 index 443c69786..000000000 --- a/data/spells/scripts/monster/forest fury skill reducer 1.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = {} - -for i = 40, 50 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_LARGEROCK) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 7000) - condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(40, 50)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/forest fury skill reducer 2.lua b/data/spells/scripts/monster/forest fury skill reducer 2.lua deleted file mode 100644 index 11b8b5818..000000000 --- a/data/spells/scripts/monster/forest fury skill reducer 2.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = {} - -for i = 50, 65 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HUNTINGSPEAR) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 7000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(50, 65)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/frazzlemaw paralyze.lua b/data/spells/scripts/monster/frazzlemaw paralyze.lua deleted file mode 100644 index 87ea9c58f..000000000 --- a/data/spells/scripts/monster/frazzlemaw paralyze.lua +++ /dev/null @@ -1,30 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.6, 0, -0.8, 0) - combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/freed soul spell.lua b/data/spells/scripts/monster/freed soul spell.lua deleted file mode 100644 index 513086451..000000000 --- a/data/spells/scripts/monster/freed soul spell.lua +++ /dev/null @@ -1,38 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) - -combat:setArea(createCombatArea({ -{0, 0, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 0}, -{1, 1, 1, 1, 1, 1, 1}, -{1, 1, 1, 3, 1, 1, 1}, -{1, 1, 1, 1, 1, 1, 1}, -{0, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 0, 0} -})) - -function spellCallback(param) - local tile = Tile(Position(param.pos)) - if tile then - if tile:getTopCreature() and tile:getTopCreature():isMonster() then - if tile:getTopCreature():getName():lower() == "the souldespoiler" then - tile:getTopCreature():addHealth( - math.random(500, 2000)) - end - end - end -end - -function onTargetTile(cid, pos) - local param = {} - param.cid = cid - param.pos = pos - param.count = 0 - spellCallback(param) -end - -setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/frost dragon paralyze 1.lua b/data/spells/scripts/monster/frost dragon paralyze 1.lua deleted file mode 100644 index 30433f856..000000000 --- a/data/spells/scripts/monster/frost dragon paralyze 1.lua +++ /dev/null @@ -1,15 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.35, 0, -0.45, 0) - combat:addCondition(condition) - - local area = createCombatArea(AREA_SQUARE1X1) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/frost dragon paralyze 2.lua b/data/spells/scripts/monster/frost dragon paralyze 2.lua deleted file mode 100644 index 24ceddedc..000000000 --- a/data/spells/scripts/monster/frost dragon paralyze 2.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.35, 0, -0.5, 0) -combat:addCondition(condition) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/frost dragon paralyze 3.lua b/data/spells/scripts/monster/frost dragon paralyze 3.lua deleted file mode 100644 index 2d03c5157..000000000 --- a/data/spells/scripts/monster/frost dragon paralyze 3.lua +++ /dev/null @@ -1,25 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.6, 0, -0.8, 0) -combat:addCondition(condition) - -local area = createCombatArea({ - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0} -}) -combat:setArea(area) -combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/frozen minion beam.lua b/data/spells/scripts/monster/frozen minion beam.lua deleted file mode 100644 index 9a5bfda35..000000000 --- a/data/spells/scripts/monster/frozen minion beam.lua +++ /dev/null @@ -1,25 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setArea(createCombatArea(AREA_BEAM7)) - -function onTargetCreature(creature, target) - local min = 200 - local max = 700 - - local master = target:getMaster() - if target:isPlayer() and not master - or master and master:isPlayer() then - doTargetCombatHealth(0, target, COMBAT_ICEDAMAGE, min, max, CONST_ME_NONE) - return true - end - - doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/frozen minion heal.lua b/data/spells/scripts/monster/frozen minion heal.lua deleted file mode 100644 index 7ad5a7977..000000000 --- a/data/spells/scripts/monster/frozen minion heal.lua +++ /dev/null @@ -1,24 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setArea(createCombatArea(AREA_CIRCLE2X2)) - -function onTargetCreature(creature, target) - local min = 100 - local max = 200 - - local master = target:getMaster() - if target:isPlayer() and not master - or master and master:isPlayer() then - return true - end - - doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/frozen minion wave.lua b/data/spells/scripts/monster/frozen minion wave.lua deleted file mode 100644 index 6d5ab1261..000000000 --- a/data/spells/scripts/monster/frozen minion wave.lua +++ /dev/null @@ -1,35 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onTargetCreature(creature, target) - local min = 200 - local max = 700 - - local master = target:getMaster() - if target:isPlayer() and not master - or master and master:isPlayer() then - doTargetCombatHealth(0, target, COMBAT_ICEDAMAGE, min, max, CONST_ME_NONE) - return true - end - - doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/fury paralyze.lua b/data/spells/scripts/monster/fury paralyze.lua deleted file mode 100644 index 1a848c939..000000000 --- a/data/spells/scripts/monster/fury paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_THROWINGSTAR) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 10000) - condition:setFormula(-0.25, 0, -0.35, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/fury skill reducer 1.lua b/data/spells/scripts/monster/fury skill reducer 1.lua deleted file mode 100644 index 697590274..000000000 --- a/data/spells/scripts/monster/fury skill reducer 1.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = {} - -for i = 65, 80 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_YELLOW) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 5000) - condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE3X3) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(65, 80)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/fury skill reducer 2.lua b/data/spells/scripts/monster/fury skill reducer 2.lua deleted file mode 100644 index 7d6186896..000000000 --- a/data/spells/scripts/monster/fury skill reducer 2.lua +++ /dev/null @@ -1,20 +0,0 @@ -local combat = {} - -for i = 45, 60 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_YELLOW) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 5000) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE3X3) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(45, 60)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/furyosa deathball.lua b/data/spells/scripts/monster/furyosa deathball.lua deleted file mode 100644 index 760e1ecec..000000000 --- a/data/spells/scripts/monster/furyosa deathball.lua +++ /dev/null @@ -1,31 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - -arr = { -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -} - - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - if creature:getHealth() < creature:getMaxHealth() * 0.4 then - creature:say("Back in black!", TALKTYPE_ORANGE_1) - return combat:execute(creature, var) - end - return false -end diff --git a/data/spells/scripts/monster/furyosa heal.lua b/data/spells/scripts/monster/furyosa heal.lua deleted file mode 100644 index 1df8de9c6..000000000 --- a/data/spells/scripts/monster/furyosa heal.lua +++ /dev/null @@ -1,15 +0,0 @@ -local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) -condition:setParameter(CONDITION_PARAM_SUBID, 88888) -condition:setParameter(CONDITION_PARAM_TICKS, 15 * 60 * 1000) -condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) -condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 15 * 60 * 1000) - -function onCastSpell(creature, var) - if creature:getHealth() < creature:getMaxHealth() * 0.2 and not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then - creature:addCondition(condition) - creature:addHealth(10000) - else - return - end - return true -end diff --git a/data/spells/scripts/monster/furyosa manadrain.lua b/data/spells/scripts/monster/furyosa manadrain.lua deleted file mode 100644 index 2e1355606..000000000 --- a/data/spells/scripts/monster/furyosa manadrain.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_MANADRAIN) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/furyosa skill reducer.lua b/data/spells/scripts/monster/furyosa skill reducer.lua deleted file mode 100644 index bb9b8edfe..000000000 --- a/data/spells/scripts/monster/furyosa skill reducer.lua +++ /dev/null @@ -1,34 +0,0 @@ -local combat = {} - -for i = 40, 50 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_YELLOW) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 10000) - condition:setParameter(CONDITION_PARAM_STAT_MAGICPOINTSPERCENT, i) - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(40, 50)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/furyosa soulfire.lua b/data/spells/scripts/monster/furyosa soulfire.lua deleted file mode 100644 index 367dab8ff..000000000 --- a/data/spells/scripts/monster/furyosa soulfire.lua +++ /dev/null @@ -1,26 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(30, 9000, -10) -combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/furyosa summon.lua b/data/spells/scripts/monster/furyosa summon.lua deleted file mode 100644 index b971605e1..000000000 --- a/data/spells/scripts/monster/furyosa summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) - -local maxsummons = 4 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 4 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Fury", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/gaz'haragoth death.lua b/data/spells/scripts/monster/gaz'haragoth death.lua deleted file mode 100644 index 089126d1d..000000000 --- a/data/spells/scripts/monster/gaz'haragoth death.lua +++ /dev/null @@ -1,79 +0,0 @@ -local vocation = { - VOCATION.BASE_ID.SORCERER, - VOCATION.BASE_ID.DRUID, - VOCATION.BASE_ID.PALADIN, - VOCATION.BASE_ID.KNIGHT -} - -local area = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - -local createArea = createCombatArea(area) - -local combat = Combat() -combat:setArea(createArea) - -function onTargetTile(creature, pos) - local creatureTable = {} - local n, i = Tile({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 - if n ~= 0 then - local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid - while v ~= 0 do - if isCreature(v) == true then - table.insert(creatureTable, v) - if n == #creatureTable then - break - end - end - i = i + 1 - v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid - end - end - if #creatureTable ~= nil and #creatureTable > 0 then - for r = 1, #creatureTable do - if creatureTable[r] ~= creature then - local min = 30000 - local max = 30000 - local player = Player(creatureTable[r]) - - if isPlayer(creatureTable[r]) == true and table.contains(vocation, player:getVocation():getBaseId()) then - doTargetCombatHealth(creature, creatureTable[r], COMBAT_ENERGYDAMAGE, -min, -max, CONST_ME_NONE) - elseif isMonster(creatureTable[r]) == true then - doTargetCombatHealth(creature, creatureTable[r], COMBAT_ENERGYDAMAGE, -min, -max, CONST_ME_NONE) - end - end - end - end - pos:sendMagicEffect(CONST_ME_PURPLEENERGY) - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") - -local function delayedCastSpell(cid, var) - local creature = Creature(cid) - if not creature then - return - end - creature:say("Gaz'haragoth calls down: DEATH AND DOOM!", TALKTYPE_ORANGE_2) - return combat:execute(creature, positionToVariant(creature:getPosition())) -end - -function onCastSpell(creature, var) - creature:say("Gaz'haragoth begins to channel DEATH AND DOOM into the area! RUN!", TALKTYPE_ORANGE_2) - addEvent(delayedCastSpell, 5000, creature:getId(), var) - return true -end diff --git a/data/spells/scripts/monster/gaz'haragoth iceball.lua b/data/spells/scripts/monster/gaz'haragoth iceball.lua deleted file mode 100644 index 3cba4941b..000000000 --- a/data/spells/scripts/monster/gaz'haragoth iceball.lua +++ /dev/null @@ -1,28 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) - -arr = { -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -} - - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) -creature:say("Chill out!", TALKTYPE_ORANGE_1) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/gaz'haragoth paralyze.lua b/data/spells/scripts/monster/gaz'haragoth paralyze.lua deleted file mode 100644 index f1dc39c4f..000000000 --- a/data/spells/scripts/monster/gaz'haragoth paralyze.lua +++ /dev/null @@ -1,30 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.55, 0, -0.85, 0) - combat:addCondition(condition) - -arr = { -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -} - local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/gaz'haragoth summon.lua b/data/spells/scripts/monster/gaz'haragoth summon.lua deleted file mode 100644 index 41481dcd0..000000000 --- a/data/spells/scripts/monster/gaz'haragoth summon.lua +++ /dev/null @@ -1,27 +0,0 @@ -function onCastSpell(creature, var) -local t, spectator = Game.getSpectators(creature:getPosition(), false, false, 5, 5, 5, 5) - local check = 0 - if #t ~= nil then - for i = 1, #t do - spectator = t[i] - if spectator:getName() == "Minion Of Gaz'haragoth" then - check = check + 1 - end - end - end - local hp = (creature:getHealth()/creature:getMaxHealth())* 100 - if ((check < 2) and hp <= 95) or ((check < 4) and hp <= 75) or ((check < 6) and hp <= 55) or ((check < 10) and hp <= 35) then - for j = 1, 5 do - creature:say("Minions! Follow my call!", TALKTYPE_ORANGE_1) - end - for k = 1, 2 do - local monster = Game.createMonster("minion of gaz'haragoth", creature:getPosition(), true, false) - if not monster then - return - end - creature:getPosition():sendMagicEffect(CONST_ME_SOUND_RED) - end - else - end -return true -end diff --git a/data/spells/scripts/monster/generator.lua b/data/spells/scripts/monster/generator.lua deleted file mode 100644 index fa8d74abf..000000000 --- a/data/spells/scripts/monster/generator.lua +++ /dev/null @@ -1,13 +0,0 @@ -local generator = { - [1] = {pos = Position(33708, 32042, 15)}, - [2] = {pos = Position(33714, 32042, 15)}, - [3] = {pos = Position(33708, 32051, 15)}, - [4] = {pos = Position(33714, 32051, 15)} -} -function onCastSpell(creature, var) - local rand = math.random(1, 4) - local generators = generator[rand] - local monster = Game.createMonster('glooth-generator', generators.pos, true, true) - monster:say('THE GLOOTH GENERATOR CHARGES UP FOR A LETHAL EXPLOSION!', TALKTYPE_MONSTER_YELL) - return -end diff --git a/data/spells/scripts/monster/ghastly dragon curse.lua b/data/spells/scripts/monster/ghastly dragon curse.lua deleted file mode 100644 index 1bd13daf0..000000000 --- a/data/spells/scripts/monster/ghastly dragon curse.lua +++ /dev/null @@ -1,33 +0,0 @@ -local combat = {} - -for i = 40, 170 do - for j = 1, 3 do - local index = ((i - 40) * 3) + j - combat[index] = Combat() - combat[index]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[index]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - combat[index]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for k = 1, 4 do - damage = damage * 1.2 - condition:addDamage(1, 4000, -damage) - end - if j > 1 then - damage = damage * 1.2 - condition:addDamage(1, 4000, -damage) - if j > 2 then - condition:addDamage(1, 4000, -(damage * 1.2)) - end - end - combat[index]:addCondition(condition) - end -end - -function onCastSpell(creature, var) - return combat[math.random(#combat)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ghastly dragon paralyze.lua b/data/spells/scripts/monster/ghastly dragon paralyze.lua deleted file mode 100644 index 2e4438fec..000000000 --- a/data/spells/scripts/monster/ghastly dragon paralyze.lua +++ /dev/null @@ -1,11 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BATS) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.8, 0, -0.9, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ghastly dragon wave.lua b/data/spells/scripts/monster/ghastly dragon wave.lua deleted file mode 100644 index 6fb24ae16..000000000 --- a/data/spells/scripts/monster/ghastly dragon wave.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ghazbaran paralyze.lua b/data/spells/scripts/monster/ghazbaran paralyze.lua deleted file mode 100644 index d99e602c9..000000000 --- a/data/spells/scripts/monster/ghazbaran paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_THROWINGKNIFE) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 10000) - condition:setFormula(-0.75, 0, -0.90, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ghazbaran skill reducer 1.lua b/data/spells/scripts/monster/ghazbaran skill reducer 1.lua deleted file mode 100644 index 5c333ec8f..000000000 --- a/data/spells/scripts/monster/ghazbaran skill reducer 1.lua +++ /dev/null @@ -1,34 +0,0 @@ -local combat = {} - -for i = 0, 15 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 10000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - - arr = { - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(0, 15)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ghazbaran skill reducer 2.lua b/data/spells/scripts/monster/ghazbaran skill reducer 2.lua deleted file mode 100644 index f0331ea6e..000000000 --- a/data/spells/scripts/monster/ghazbaran skill reducer 2.lua +++ /dev/null @@ -1,34 +0,0 @@ -local combat = {} - -for i = 0, 15 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 10000) - condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - - arr = { - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(0, 15)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ghazbaran summon.lua b/data/spells/scripts/monster/ghazbaran summon.lua deleted file mode 100644 index 97cb6a049..000000000 --- a/data/spells/scripts/monster/ghazbaran summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) - -local maxsummons = 4 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 4 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Deathslicer", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ghoulish hyaena wave.lua b/data/spells/scripts/monster/ghoulish hyaena wave.lua deleted file mode 100644 index 067b9bf8b..000000000 --- a/data/spells/scripts/monster/ghoulish hyaena wave.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) - -local condition = Condition(CONDITION_POISON) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(1, 4000, -3) -condition:addDamage(9, 4000, -2) -condition:addDamage(21, 4000, -1) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/glooth anemone summon.lua b/data/spells/scripts/monster/glooth anemone summon.lua deleted file mode 100644 index c6b512c97..000000000 --- a/data/spells/scripts/monster/glooth anemone summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 1 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 1 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Glooth Blob", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/glooth battery heal.lua b/data/spells/scripts/monster/glooth battery heal.lua deleted file mode 100644 index e052ec48d..000000000 --- a/data/spells/scripts/monster/glooth battery heal.lua +++ /dev/null @@ -1,26 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -function onTargetCreature(creature, target) - local min = 50 - local max = 500 - - local master = target:getMaster() - if target:isPlayer() and not master - or master and master:isPlayer() then - return true - end - - doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/glooth bomb walkthrough.lua b/data/spells/scripts/monster/glooth bomb walkthrough.lua deleted file mode 100644 index a0d787b8d..000000000 --- a/data/spells/scripts/monster/glooth bomb walkthrough.lua +++ /dev/null @@ -1,34 +0,0 @@ -local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) -condition:setParameter(CONDITION_PARAM_SUBID, 88888) -condition:setParameter(CONDITION_PARAM_TICKS, 10 * 1000) -condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) -condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 10 * 1000) - -local function changeSpeeds(cid, var) - local creature = Creature(cid) - if not creature then - return - end - creature:changeSpeed(creature:getBaseSpeed()) -end - -function onCastSpell(creature, var) - local nextPosition = creature:getPosition() - local speed = creature:getSpeed() - local tile = Tile(nextPosition.x, nextPosition.y - 1, nextPosition.z) - local topCreature = tile:getTopCreature() - if not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then - creature:addCondition(condition) - creature:teleportTo(Position(nextPosition.x, nextPosition.y - 1, nextPosition.z), true) - creature:changeSpeed(-speed) - addEvent(changeSpeeds, 11 * 1000, creature:getId(), var) - if not topCreature then - return - end - if topCreature:isPlayer() then - topCreature:teleportTo(Position(nextPosition.x, nextPosition.y - 3, nextPosition.z), true) - else - end - end - return true -end diff --git a/data/spells/scripts/monster/glooth fairy healing.lua b/data/spells/scripts/monster/glooth fairy healing.lua deleted file mode 100644 index ea1278695..000000000 --- a/data/spells/scripts/monster/glooth fairy healing.lua +++ /dev/null @@ -1,17 +0,0 @@ -local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) -condition:setParameter(CONDITION_PARAM_SUBID, 88888) -condition:setParameter(CONDITION_PARAM_TICKS, 30 * 1000) -condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) -condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 30 * 1000) - -function onCastSpell(creature, var) - if creature:getHealth() < creature:getMaxHealth() * 0.1 and not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then - creature:addCondition(condition) - addEvent(function(cid) - creature:addHealth(math.random(7500, 8000)) - creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - return true - end, 10 * 1000, creature:getId()) - end - return true -end diff --git a/data/spells/scripts/monster/glooth fairy paralyze.lua b/data/spells/scripts/monster/glooth fairy paralyze.lua deleted file mode 100644 index 8b1724913..000000000 --- a/data/spells/scripts/monster/glooth fairy paralyze.lua +++ /dev/null @@ -1,32 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.6, 0, -0.8, 0) -combat:addCondition(condition) - -arr = { -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -} - -local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/glooth fairy skill reducer.lua b/data/spells/scripts/monster/glooth fairy skill reducer.lua deleted file mode 100644 index 2aae6b49e..000000000 --- a/data/spells/scripts/monster/glooth fairy skill reducer.lua +++ /dev/null @@ -1,29 +0,0 @@ -local combat = {} - -for i = 40, 60 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 6000) - condition:setParameter(CONDITION_PARAM_STAT_MAGICPOINTSPERCENT, i) - - local arr = { - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - - local area = createCombatArea(arr) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(40, 60)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/glooth-generator summon.lua b/data/spells/scripts/monster/glooth-generator summon.lua deleted file mode 100644 index 3d584a2b1..000000000 --- a/data/spells/scripts/monster/glooth-generator summon.lua +++ /dev/null @@ -1,13 +0,0 @@ -function onCastSpell(creature, var) - addEvent(function(cid) - local creature = Creature(cid) - if not creature then - return - end - Game.createMonster("Energy Pulse", creature:getPosition(), true, true) - creature:say("The fully charged generator explodes in a blast!", TALKTYPE_ORANGE_2) - creature:remove() - return true - end, 14000, creature:getId()) -return true -end diff --git a/data/spells/scripts/monster/gnomevil drunk.lua b/data/spells/scripts/monster/gnomevil drunk.lua deleted file mode 100644 index 45f3da09e..000000000 --- a/data/spells/scripts/monster/gnomevil drunk.lua +++ /dev/null @@ -1,21 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) - -local condition = Condition(CONDITION_DRUNK) -condition:setParameter(CONDITION_PARAM_TICKS, 25000) -combat:addCondition(condition) - - arr = { - {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/gnomevil electrify.lua b/data/spells/scripts/monster/gnomevil electrify.lua deleted file mode 100644 index df3dae43e..000000000 --- a/data/spells/scripts/monster/gnomevil electrify.lua +++ /dev/null @@ -1,26 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA) - -local condition = Condition(CONDITION_ENERGY) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(36, 10000, -25) -combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/gnomevil skill reducer 1.lua b/data/spells/scripts/monster/gnomevil skill reducer 1.lua deleted file mode 100644 index b96f626e3..000000000 --- a/data/spells/scripts/monster/gnomevil skill reducer 1.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = {} - -for i = 10, 45 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 10000) - condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(10, 45)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/gnomevil skill reducer 2.lua b/data/spells/scripts/monster/gnomevil skill reducer 2.lua deleted file mode 100644 index b84ccbbf8..000000000 --- a/data/spells/scripts/monster/gnomevil skill reducer 2.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = {} - -for i = 15, 45 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 10000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(15, 45)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/gnomevil soulfire.lua b/data/spells/scripts/monster/gnomevil soulfire.lua deleted file mode 100644 index dd803af96..000000000 --- a/data/spells/scripts/monster/gnomevil soulfire.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(159, 9000, -10) -combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/gnorre chyllson drown.lua b/data/spells/scripts/monster/gnorre chyllson drown.lua deleted file mode 100644 index 9350ac4ec..000000000 --- a/data/spells/scripts/monster/gnorre chyllson drown.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY) - -local condition = Condition(CONDITION_DROWN) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(20, 5000, -20) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/gnorre chyllson paralyze.lua b/data/spells/scripts/monster/gnorre chyllson paralyze.lua deleted file mode 100644 index 80a993a7c..000000000 --- a/data/spells/scripts/monster/gnorre chyllson paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SNOWBALL) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.1, 0, -0.2, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/gnorre chyllson skill reducer.lua b/data/spells/scripts/monster/gnorre chyllson skill reducer.lua deleted file mode 100644 index d95563b33..000000000 --- a/data/spells/scripts/monster/gnorre chyllson skill reducer.lua +++ /dev/null @@ -1,21 +0,0 @@ -local combat = {} - -for i = 45, 55 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 3000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE3X3) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(45, 55)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/grand mother foulscale summon.lua b/data/spells/scripts/monster/grand mother foulscale summon.lua deleted file mode 100644 index f4f35869c..000000000 --- a/data/spells/scripts/monster/grand mother foulscale summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_BLUE) - -local area = createCombatArea(AREA_CIRCLE3X3) -combat:setArea(area) - -local maxsummons = 4 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 4 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Dragon Hatchling", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/grandfather tridian paralyze.lua b/data/spells/scripts/monster/grandfather tridian paralyze.lua deleted file mode 100644 index 8f4b51042..000000000 --- a/data/spells/scripts/monster/grandfather tridian paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.50, 0, -0.90, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/greater jar summon.lua b/data/spells/scripts/monster/greater jar summon.lua deleted file mode 100644 index a2fe58ba1..000000000 --- a/data/spells/scripts/monster/greater jar summon.lua +++ /dev/null @@ -1,20 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) - -local area = createCombatArea(AREA_CIRCLE3X3) -combat:setArea(area) - -local maxsummons = 1 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 1 then - mid = Game.createMonster("Elder Mummy", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/haunted treeling paralyze.lua b/data/spells/scripts/monster/haunted treeling paralyze.lua deleted file mode 100644 index b35657692..000000000 --- a/data/spells/scripts/monster/haunted treeling paralyze.lua +++ /dev/null @@ -1,25 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.55, 0, -0.75, 0) -combat:addCondition(condition) - - arr = { - {1}, - {1}, - {1}, - {1}, - {1}, - {3} - } - -local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/haunter curse.lua b/data/spells/scripts/monster/haunter curse.lua deleted file mode 100644 index 0a10d6396..000000000 --- a/data/spells/scripts/monster/haunter curse.lua +++ /dev/null @@ -1,24 +0,0 @@ -local combat = {} - -for i = 2, 2 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for j = 1, 19 do - damage = damage * 1.2 - condition:addDamage(1, 4000, -damage) - end - - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(2, 2)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/haunter electrify.lua b/data/spells/scripts/monster/haunter electrify.lua deleted file mode 100644 index 30f3b105a..000000000 --- a/data/spells/scripts/monster/haunter electrify.lua +++ /dev/null @@ -1,12 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - -local condition = Condition(CONDITION_ENERGY) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(10, 10000, -25) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/hell hole summon.lua b/data/spells/scripts/monster/hell hole summon.lua deleted file mode 100644 index ab0d8a8b1..000000000 --- a/data/spells/scripts/monster/hell hole summon.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - -local maxsummons = 4 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 4 then - mid = Game.createMonster("Deathspawn", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/hellfire fighter soulfire.lua b/data/spells/scripts/monster/hellfire fighter soulfire.lua deleted file mode 100644 index 2bbb5718a..000000000 --- a/data/spells/scripts/monster/hellfire fighter soulfire.lua +++ /dev/null @@ -1,31 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(20, 9000, -10) - -arr = { -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -} - -local area = createCombatArea(arr) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/hellgorak skill reducer.lua b/data/spells/scripts/monster/hellgorak skill reducer.lua deleted file mode 100644 index b6365a397..000000000 --- a/data/spells/scripts/monster/hellgorak skill reducer.lua +++ /dev/null @@ -1,34 +0,0 @@ -local combat = {} - -for i = 20, 40 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(20, 40)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/hellspawn soulfire.lua b/data/spells/scripts/monster/hellspawn soulfire.lua deleted file mode 100644 index c20816857..000000000 --- a/data/spells/scripts/monster/hellspawn soulfire.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(26, 9000, -10) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/hideous fungus paralyze.lua b/data/spells/scripts/monster/hideous fungus paralyze.lua deleted file mode 100644 index a0c52c79f..000000000 --- a/data/spells/scripts/monster/hideous fungus paralyze.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) - - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.40, 0, -0.80, 0) -combat:addCondition(condition) - - -local area = createCombatArea(AREA_CIRCLE2X2) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/hideous fungus poison.lua b/data/spells/scripts/monster/hideous fungus poison.lua deleted file mode 100644 index f20d3d238..000000000 --- a/data/spells/scripts/monster/hideous fungus poison.lua +++ /dev/null @@ -1,24 +0,0 @@ -local combat = {} - -for i = 25, 30 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON) - - local condition = Condition(CONDITION_POISON) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - condition:addDamage(10, 4000, -i) - condition:addDamage(10, 4000, -i + 1) - condition:addDamage(10, 4000, -i + 2) - condition:addDamage(10, 4000, -i + 3) - condition:addDamage(10, 4000, -i + 4) - - - local area = createCombatArea(AREA_SQUARE1X1) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(25, 30)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/hideous fungus summon.lua b/data/spells/scripts/monster/hideous fungus summon.lua deleted file mode 100644 index 4c66250be..000000000 --- a/data/spells/scripts/monster/hideous fungus summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Humorless Fungus", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/hirintror freeze.lua b/data/spells/scripts/monster/hirintror freeze.lua deleted file mode 100644 index 7b63cd1df..000000000 --- a/data/spells/scripts/monster/hirintror freeze.lua +++ /dev/null @@ -1,31 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO) - - local condition = Condition(CONDITION_FREEZING) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - condition:addDamage(25, 8000, -8) - combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/hirintror heal.lua b/data/spells/scripts/monster/hirintror heal.lua deleted file mode 100644 index d4fc56fce..000000000 --- a/data/spells/scripts/monster/hirintror heal.lua +++ /dev/null @@ -1,15 +0,0 @@ -local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) -condition:setParameter(CONDITION_PARAM_SUBID, 88888) -condition:setParameter(CONDITION_PARAM_TICKS, 15 * 60 * 1000) -condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) -condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 15 * 60 * 1000) - -function onCastSpell(creature, var) - if creature:getHealth() < creature:getMaxHealth() * 0.2 and not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then - creature:addCondition(condition) - creature:addHealth(1000) - else - return false - end -return true -end diff --git a/data/spells/scripts/monster/hirintror skill reducer.lua b/data/spells/scripts/monster/hirintror skill reducer.lua deleted file mode 100644 index 7681e9752..000000000 --- a/data/spells/scripts/monster/hirintror skill reducer.lua +++ /dev/null @@ -1,21 +0,0 @@ -local combat = {} - -for i = 20, 40 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 15000) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - - local area = createCombatArea(AREA_SQUARE1X1) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(20, 40)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/hirintror summon.lua b/data/spells/scripts/monster/hirintror summon.lua deleted file mode 100644 index 6de11a6ae..000000000 --- a/data/spells/scripts/monster/hirintror summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) - -local area = createCombatArea(AREA_CIRCLE3X3) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Ice Golem", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/hive pore summon.lua b/data/spells/scripts/monster/hive pore summon.lua deleted file mode 100644 index b3d0f0538..000000000 --- a/data/spells/scripts/monster/hive pore summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 3 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 3 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Lesser Swarmer", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/horadron heal.lua b/data/spells/scripts/monster/horadron heal.lua deleted file mode 100644 index 876db5b7d..000000000 --- a/data/spells/scripts/monster/horadron heal.lua +++ /dev/null @@ -1,42 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onTargetCreature(creature, target) - local min = 400 - local max = 700 - - local master = target:getMaster() - if target:isPlayer() and not master - or master and master:isPlayer() then - return true - end - - doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/horadron paralyze.lua b/data/spells/scripts/monster/horadron paralyze.lua deleted file mode 100644 index 18107c151..000000000 --- a/data/spells/scripts/monster/horadron paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.50, 0, -0.75, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/horestis paralyze.lua b/data/spells/scripts/monster/horestis paralyze.lua deleted file mode 100644 index 96c243a42..000000000 --- a/data/spells/scripts/monster/horestis paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.75, 0, -0.90, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/hot dog soulfire.lua b/data/spells/scripts/monster/hot dog soulfire.lua deleted file mode 100644 index 60cab987f..000000000 --- a/data/spells/scripts/monster/hot dog soulfire.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(20, 9000, -10) - -local area = createCombatArea(AREA_CIRCLE1X1) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/hot dog wave.lua b/data/spells/scripts/monster/hot dog wave.lua deleted file mode 100644 index 634dfd0c2..000000000 --- a/data/spells/scripts/monster/hot dog wave.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/humongous fungus paralyze.lua b/data/spells/scripts/monster/humongous fungus paralyze.lua deleted file mode 100644 index 43a399708..000000000 --- a/data/spells/scripts/monster/humongous fungus paralyze.lua +++ /dev/null @@ -1,24 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.55, 0, -0.80, 0) -combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/humongous fungus poison.lua b/data/spells/scripts/monster/humongous fungus poison.lua deleted file mode 100644 index 1bf66f1e0..000000000 --- a/data/spells/scripts/monster/humongous fungus poison.lua +++ /dev/null @@ -1,33 +0,0 @@ -local combat = {} - -for i = 25, 30 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) - - local condition = Condition(CONDITION_POISON) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - condition:addDamage(10, 4000, -i) - condition:addDamage(10, 4000, -i + 1) - condition:addDamage(10, 4000, -i + 2) - condition:addDamage(10, 4000, -i + 3) - condition:addDamage(10, 4000, -i + 4) - - arr = { - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - - local area = createCombatArea(arr) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(25, 30)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/hunger summon.lua b/data/spells/scripts/monster/hunger summon.lua deleted file mode 100644 index 31b08d604..000000000 --- a/data/spells/scripts/monster/hunger summon.lua +++ /dev/null @@ -1,27 +0,0 @@ -local hungerSummonDelay = false - -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) - -local function removeDelay() - hungerSummonDelay = false -end - -function onCastSpell(creature, var) - - if hungerSummonDelay == false then - if hungerSummon < 3 then - Game.createMonster("Greed", {x=creature:getPosition().x+math.random(-1, 1), y=creature:getPosition().y+math.random(-1, 1), z=creature:getPosition().z}, false, true) - hungerSummon = hungerSummon + 1 - - hungerSummonDelay = true - addEvent(removeDelay, 15000) - end - end - - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ice golem paralyze.lua b/data/spells/scripts/monster/ice golem paralyze.lua deleted file mode 100644 index dbf195981..000000000 --- a/data/spells/scripts/monster/ice golem paralyze.lua +++ /dev/null @@ -1,27 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.35, 0, -0.45, 0) -combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ice golem skill reducer.lua b/data/spells/scripts/monster/ice golem skill reducer.lua deleted file mode 100644 index 7681e9752..000000000 --- a/data/spells/scripts/monster/ice golem skill reducer.lua +++ /dev/null @@ -1,21 +0,0 @@ -local combat = {} - -for i = 20, 40 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 15000) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - - local area = createCombatArea(AREA_SQUARE1X1) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(20, 40)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ice overlord freeze.lua b/data/spells/scripts/monster/ice overlord freeze.lua deleted file mode 100644 index b2f7bec81..000000000 --- a/data/spells/scripts/monster/ice overlord freeze.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE) - -local condition = Condition(CONDITION_FREEZING) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(30, 8000, -8) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ice overlord paralyze.lua b/data/spells/scripts/monster/ice overlord paralyze.lua deleted file mode 100644 index 86a7086fb..000000000 --- a/data/spells/scripts/monster/ice overlord paralyze.lua +++ /dev/null @@ -1,31 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.3, 0, -0.65, 0) - combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ice witch paralyze.lua b/data/spells/scripts/monster/ice witch paralyze.lua deleted file mode 100644 index 02d4f2584..000000000 --- a/data/spells/scripts/monster/ice witch paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.55, 0, -0.75, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ice_crystal_bomb.lua b/data/spells/scripts/monster/ice_crystal_bomb.lua deleted file mode 100644 index 5a3154bc9..000000000 --- a/data/spells/scripts/monster/ice_crystal_bomb.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, 44) -combat:setParameter(COMBAT_PARAM_EFFECT, 53) -combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1) -combat:setParameter(COMBAT_PARAM_USECHARGES, 1) -combat:setArea(createCombatArea(AREA_CIRCLE2X2)) - -function onGetFormulaValues(player, skill, attack, factor) - local skillTotal = skill * attack - local levelTotal = player:getLevel() / 5 - return -(((skillTotal * 0.02) + 4) + (levelTotal)), -(((skillTotal * 0.03) + 6) + (levelTotal)) -end - -combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/icecle heal.lua b/data/spells/scripts/monster/icecle heal.lua deleted file mode 100644 index 19129d6e1..000000000 --- a/data/spells/scripts/monster/icecle heal.lua +++ /dev/null @@ -1,24 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:setArea(createCombatArea(AREA_CIRCLE3X3)) - -function onTargetCreature(creature, target) - local min = 400 - local max = 600 - - local master = target:getMaster() - if target:isPlayer() and not master - or master and master:isPlayer() then - return true - end - - doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/incineron soulfire.lua b/data/spells/scripts/monster/incineron soulfire.lua deleted file mode 100644 index bc53e76ce..000000000 --- a/data/spells/scripts/monster/incineron soulfire.lua +++ /dev/null @@ -1,31 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(20, 9000, -10) - -arr = { -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -} - -local area = createCombatArea(arr) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/infected weeper summon.lua b/data/spells/scripts/monster/infected weeper summon.lua deleted file mode 100644 index c3c3e113b..000000000 --- a/data/spells/scripts/monster/infected weeper summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) - -local maxsummons = 1 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 1 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Parasite", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ironblight freeze.lua b/data/spells/scripts/monster/ironblight freeze.lua deleted file mode 100644 index e8a25b1d5..000000000 --- a/data/spells/scripts/monster/ironblight freeze.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE) - -local condition = Condition(CONDITION_FREEZING) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(30, 8000, -8) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ironblight skill reducer.lua b/data/spells/scripts/monster/ironblight skill reducer.lua deleted file mode 100644 index 0fa6a50cf..000000000 --- a/data/spells/scripts/monster/ironblight skill reducer.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = {} - -for i = 30, 70 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 4000) - condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(30, 70)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/jaul paralyze.lua b/data/spells/scripts/monster/jaul paralyze.lua deleted file mode 100644 index 2f469c772..000000000 --- a/data/spells/scripts/monster/jaul paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BUBBLES) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 10000) - condition:setFormula(-0.55, 0, -0.85, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/jewelry chest summon.lua b/data/spells/scripts/monster/jewelry chest summon.lua deleted file mode 100644 index 798a89b2e..000000000 --- a/data/spells/scripts/monster/jewelry chest summon.lua +++ /dev/null @@ -1,24 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 5 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 5 then - for i = 1, maxsummons - #summoncount do - creature:addHealth(500) - creature:getPosition():sendMagicEffect(12) - local mid = Game.createMonster("Chest Guard", { x=creature:getPosition().x+math.random(-2, 2), y=creature:getPosition().y+math.random(-2, 2), z=creature:getPosition().z }) - if not mid then - return - end - mid:say("FREEZE! LET ME SEE YOUR HANDS UP!", TALKTYPE_ORANGE_2) - end - end -return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/killer rabbit summon.lua b/data/spells/scripts/monster/killer rabbit summon.lua deleted file mode 100644 index 11c273a13..000000000 --- a/data/spells/scripts/monster/killer rabbit summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Killer Rabbit Summon", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/koshei the deathless curse.lua b/data/spells/scripts/monster/koshei the deathless curse.lua deleted file mode 100644 index f36250d67..000000000 --- a/data/spells/scripts/monster/koshei the deathless curse.lua +++ /dev/null @@ -1,24 +0,0 @@ -local combat = {} - -for i = 1, 1 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for j = 1, 19 do - damage = damage * 1.25 - condition:addDamage(1, 4000, -damage) - end - - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(1, 1)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/koshei the deathless paralyze.lua b/data/spells/scripts/monster/koshei the deathless paralyze.lua deleted file mode 100644 index b7ebb0323..000000000 --- a/data/spells/scripts/monster/koshei the deathless paralyze.lua +++ /dev/null @@ -1,11 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.6, 0, -0.85, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/kraknaknork explosion wave.lua b/data/spells/scripts/monster/kraknaknork explosion wave.lua deleted file mode 100644 index 9b9054323..000000000 --- a/data/spells/scripts/monster/kraknaknork explosion wave.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/kraknaknork ice wave.lua b/data/spells/scripts/monster/kraknaknork ice wave.lua deleted file mode 100644 index 1a93d8dd7..000000000 --- a/data/spells/scripts/monster/kraknaknork ice wave.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) - - arr = { - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/kraknaknork paralyze.lua b/data/spells/scripts/monster/kraknaknork paralyze.lua deleted file mode 100644 index 27ab798b5..000000000 --- a/data/spells/scripts/monster/kraknaknork paralyze.lua +++ /dev/null @@ -1,11 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 2000) - condition:setFormula(-0.25, 0, -0.35, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/kraknaknork poison wave.lua b/data/spells/scripts/monster/kraknaknork poison wave.lua deleted file mode 100644 index 95257e4d5..000000000 --- a/data/spells/scripts/monster/kraknaknork poison wave.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lancer beetle curse.lua b/data/spells/scripts/monster/lancer beetle curse.lua deleted file mode 100644 index cf7ac5637..000000000 --- a/data/spells/scripts/monster/lancer beetle curse.lua +++ /dev/null @@ -1,23 +0,0 @@ -local combat = {} - -for i = 1, 1 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for j = 1, 22 do - damage = damage * 1.2 - condition:addDamage(1, 4000, -damage) - end - - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(1, 1)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lancer beetle skill reducer.lua b/data/spells/scripts/monster/lancer beetle skill reducer.lua deleted file mode 100644 index e114af216..000000000 --- a/data/spells/scripts/monster/lancer beetle skill reducer.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = {} - -for i = 10, 30 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYPOISON) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 15000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(10, 30)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lava golem soulfire.lua b/data/spells/scripts/monster/lava golem soulfire.lua deleted file mode 100644 index 39086b052..000000000 --- a/data/spells/scripts/monster/lava golem soulfire.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(40, 9000, -10) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lava golem soulfire2.lua b/data/spells/scripts/monster/lava golem soulfire2.lua deleted file mode 100644 index f207ffbcb..000000000 --- a/data/spells/scripts/monster/lava golem soulfire2.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(40, 9000, -10) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/leaf golem paralyze.lua b/data/spells/scripts/monster/leaf golem paralyze.lua deleted file mode 100644 index c15470f1c..000000000 --- a/data/spells/scripts/monster/leaf golem paralyze.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.25, 0, -0.45, 0) -combat:addCondition(condition) - - -local area = createCombatArea(AREA_SQUARE1X1) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lersatio summon.lua b/data/spells/scripts/monster/lersatio summon.lua deleted file mode 100644 index ca73d88b0..000000000 --- a/data/spells/scripts/monster/lersatio summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BATS) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 3 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 3 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Vampire", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lethal lissy skill reducer.lua b/data/spells/scripts/monster/lethal lissy skill reducer.lua deleted file mode 100644 index 6fd1771b1..000000000 --- a/data/spells/scripts/monster/lethal lissy skill reducer.lua +++ /dev/null @@ -1,20 +0,0 @@ -local combat = {} - -for i = 10, 25 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_PURPLE) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 10000) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - - local area = createCombatArea(AREA_BEAM1) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(10, 25)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lich paralyze.lua b/data/spells/scripts/monster/lich paralyze.lua deleted file mode 100644 index 6eb669952..000000000 --- a/data/spells/scripts/monster/lich paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.75, 0, -0.85, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lisa heal.lua b/data/spells/scripts/monster/lisa heal.lua deleted file mode 100644 index 47e5a9a73..000000000 --- a/data/spells/scripts/monster/lisa heal.lua +++ /dev/null @@ -1,19 +0,0 @@ -local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) -condition:setParameter(CONDITION_PARAM_SUBID, 88888) -condition:setParameter(CONDITION_PARAM_TICKS, 6 * 1000) -condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) -condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 6 * 1000) - -function onCastSpell(creature, var) - if creature:getHealth() < creature:getMaxHealth() * 0.07 and not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then - creature:say("Lisa takes a final breath before she's healing up!", TALKTYPE_ORANGE_1) - creature:addCondition(condition) - addEvent(function(cid) - creature:addHealth(math.random(18000, 23000)) - creature:say("Lisa healed up!", TALKTYPE_ORANGE_1) - creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - return true - end, 6 * 1000, creature:getId()) - end - return true -end diff --git a/data/spells/scripts/monster/lisa paralyze.lua b/data/spells/scripts/monster/lisa paralyze.lua deleted file mode 100644 index 89fa8e498..000000000 --- a/data/spells/scripts/monster/lisa paralyze.lua +++ /dev/null @@ -1,15 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.55, 0, -0.75, 0) - combat:addCondition(condition) - - local area = createCombatArea(AREA_CIRCLE3X3) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lisa skill reducer.lua b/data/spells/scripts/monster/lisa skill reducer.lua deleted file mode 100644 index 85e8e2b38..000000000 --- a/data/spells/scripts/monster/lisa skill reducer.lua +++ /dev/null @@ -1,84 +0,0 @@ -local combat = {} - -for i = 60, 75 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLEARTH) - - local condition1 = Condition(CONDITION_ATTRIBUTES) - condition1:setParameter(CONDITION_PARAM_TICKS, 7000) - condition1:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition1:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - condition1:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - - local condition2 = Condition(CONDITION_ATTRIBUTES) - condition2:setParameter(CONDITION_PARAM_TICKS, 7000) - condition2:setParameter(CONDITION_PARAM_STAT_MAGICPOINTSPERCENT, i) - - local condition3 = Condition(CONDITION_ATTRIBUTES) - condition3:setParameter(CONDITION_PARAM_TICKS, 7000) - condition3:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - condition3:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - - arr = { - {0, 0, 0, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 1, 1, 1}, - {1, 1, 1, 1, 3, 1, 1, 1, 1}, - {1, 1, 1, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 0, 0, 0} - } - - local area = createCombatArea(arr) - combat[i]:setArea(area) - - - function onTargetTile(creature, pos) - local creatureTable = {} - local n, i = Tile({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 - if n ~= 0 then - local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid - while v ~= 0 do - if isCreature(v) == true then - table.insert(creatureTable, v) - if n == #creatureTable then - break - end - end - i = i + 1 - v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid - end - end - if #creatureTable ~= nil and #creatureTable > 0 then - for r = 1, #creatureTable do - if creatureTable[r] ~= creature then - local player = Player(creatureTable[r]) - local vocationClientId = player:getVocation():getBaseId() - - if isPlayer(creatureTable[r]) == true - and table.contains({VOCATION.BASE_ID.SORCERER, VOCATION.BASE_ID.DRUID}, vocationClientId) then - player:addCondition(condition2) - elseif isPlayer(creatureTable[r]) == true - and table.contains({VOCATION.BASE_ID.PALADIN}, vocationClientId) then - player:addCondition(condition3) - elseif isPlayer(creatureTable[r]) == true - and table.contains({VOCATION.BASE_ID.KNIGHT}, vocationClientId) then - player:addCondition(condition1) - elseif isMonster(creatureTable[r]) == true then - end - end - end - end - pos:sendMagicEffect(CONST_ME_SMALLPLANTS) - return true - end - - combat[i]:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") - -end - -function onCastSpell(creature, var) - return combat[math.random(60, 75)]:execute(creature, var) -end \ No newline at end of file diff --git a/data/spells/scripts/monster/lisa summon.lua b/data/spells/scripts/monster/lisa summon.lua deleted file mode 100644 index 5dac153bb..000000000 --- a/data/spells/scripts/monster/lisa summon.lua +++ /dev/null @@ -1,21 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) - -local maxsummons = 4 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 4 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Glooth Anemone2", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lisa wave.lua b/data/spells/scripts/monster/lisa wave.lua deleted file mode 100644 index 2f9f5b579..000000000 --- a/data/spells/scripts/monster/lisa wave.lua +++ /dev/null @@ -1,18 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE) - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - - local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lizard dragon priest summon.lua b/data/spells/scripts/monster/lizard dragon priest summon.lua deleted file mode 100644 index 345f60e2b..000000000 --- a/data/spells/scripts/monster/lizard dragon priest summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Dragon Hatchling", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lizard gate guardian summon.lua b/data/spells/scripts/monster/lizard gate guardian summon.lua deleted file mode 100644 index b25835342..000000000 --- a/data/spells/scripts/monster/lizard gate guardian summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Lizard Chosen", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lizard magistratus curse.lua b/data/spells/scripts/monster/lizard magistratus curse.lua deleted file mode 100644 index bb44b9ef2..000000000 --- a/data/spells/scripts/monster/lizard magistratus curse.lua +++ /dev/null @@ -1,24 +0,0 @@ -local combat = {} - -for i = 2, 2 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for j = 1, 20 do - damage = damage * 1.2 - condition:addDamage(1, 4000, -damage) - end - - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(2, 2)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lizard wave 2.lua b/data/spells/scripts/monster/lizard wave 2.lua deleted file mode 100644 index cbed884fd..000000000 --- a/data/spells/scripts/monster/lizard wave 2.lua +++ /dev/null @@ -1,20 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lizard wave.lua b/data/spells/scripts/monster/lizard wave.lua deleted file mode 100644 index 14415cc1f..000000000 --- a/data/spells/scripts/monster/lizard wave.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lloyd wave.lua b/data/spells/scripts/monster/lloyd wave.lua deleted file mode 100644 index befa9e79d..000000000 --- a/data/spells/scripts/monster/lloyd wave.lua +++ /dev/null @@ -1,21 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, 179) - -arr = { - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} -} - - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lloyd wave2.lua b/data/spells/scripts/monster/lloyd wave2.lua deleted file mode 100644 index f2478e5a4..000000000 --- a/data/spells/scripts/monster/lloyd wave2.lua +++ /dev/null @@ -1,21 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, 179) - -arr = { - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} -} - - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lloyd wave3.lua b/data/spells/scripts/monster/lloyd wave3.lua deleted file mode 100644 index fbfa6dc1b..000000000 --- a/data/spells/scripts/monster/lloyd wave3.lua +++ /dev/null @@ -1,21 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, 179) - -arr = { - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} -} - - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lord of the elements paralyze.lua b/data/spells/scripts/monster/lord of the elements paralyze.lua deleted file mode 100644 index f077d1365..000000000 --- a/data/spells/scripts/monster/lord of the elements paralyze.lua +++ /dev/null @@ -1,32 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STONES) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.50, 0, -0.75, 0) -combat:addCondition(condition) - -arr = { -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -} - -local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lord of the elements skill reducer.lua b/data/spells/scripts/monster/lord of the elements skill reducer.lua deleted file mode 100644 index 4bc78ef2e..000000000 --- a/data/spells/scripts/monster/lord of the elements skill reducer.lua +++ /dev/null @@ -1,36 +0,0 @@ -local combat = {} - -for i = 65, 85 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 10000) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - - arr = { - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(65, 85)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lord of the elements soulfire.lua b/data/spells/scripts/monster/lord of the elements soulfire.lua deleted file mode 100644 index bc7a5f030..000000000 --- a/data/spells/scripts/monster/lord of the elements soulfire.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLAMMINGARROW) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(50, 9000, -10) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lord of the elements summon.lua b/data/spells/scripts/monster/lord of the elements summon.lua deleted file mode 100644 index 13f578d9a..000000000 --- a/data/spells/scripts/monster/lord of the elements summon.lua +++ /dev/null @@ -1,43 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - - if creature:getOutfit().lookType == 11 then - local mid = Game.createMonster("roaring water elemental", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - elseif creature:getOutfit().lookType == 285 then - local mid = Game.createMonster("jagged earth elemental", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - elseif creature:getOutfit().lookType == 290 then - local mid = Game.createMonster("overcharged energy elemental", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - elseif creature:getOutfit().lookType == 243 then - local mid = Game.createMonster("blistering fire elemental", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - end -return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lost berserker skill reducer.lua b/data/spells/scripts/monster/lost berserker skill reducer.lua deleted file mode 100644 index fc0685cdc..000000000 --- a/data/spells/scripts/monster/lost berserker skill reducer.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = {} - -for i = 15, 55 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 7000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE1X1) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(15, 55)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lost soul paralyze.lua b/data/spells/scripts/monster/lost soul paralyze.lua deleted file mode 100644 index 1dcf45c5f..000000000 --- a/data/spells/scripts/monster/lost soul paralyze.lua +++ /dev/null @@ -1,31 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.6, 0, -0.75, 0) - combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/lost thrower skill reducer.lua b/data/spells/scripts/monster/lost thrower skill reducer.lua deleted file mode 100644 index 7425f9a42..000000000 --- a/data/spells/scripts/monster/lost thrower skill reducer.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = {} - -for i = 20, 60 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 8000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE1X1) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(20, 60)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/madareth pillar skill reducer.lua b/data/spells/scripts/monster/madareth pillar skill reducer.lua deleted file mode 100644 index f57cc2824..000000000 --- a/data/spells/scripts/monster/madareth pillar skill reducer.lua +++ /dev/null @@ -1,24 +0,0 @@ -local combat = {} - -for i = 5, 10 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 15000) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - - local condition2 = Condition(CONDITION_PARALYZE) - condition2:setParameter(CONDITION_PARAM_TICKS, 20000) - condition2:setFormula(-0.7, 0, -0.9, 0) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat[i]:setArea(area) - combat[i]:addCondition(condition) - combat[i]:addCondition(condition2) -end - -function onCastSpell(creature, var) - return combat[math.random(5, 10)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/madareth skill reducer.lua b/data/spells/scripts/monster/madareth skill reducer.lua deleted file mode 100644 index ad4f968f7..000000000 --- a/data/spells/scripts/monster/madareth skill reducer.lua +++ /dev/null @@ -1,31 +0,0 @@ -local combat = {} - -for i = 20, 40 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - - arr = { - {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - - local area = createCombatArea(arr) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(20, 40)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/magic pillar summon.lua b/data/spells/scripts/monster/magic pillar summon.lua deleted file mode 100644 index 0bb131ff4..000000000 --- a/data/spells/scripts/monster/magic pillar summon.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - -local maxsummons = 3 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 3 then - mid = Game.createMonster("Demon2", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/magma crawler skill reducer.lua b/data/spells/scripts/monster/magma crawler skill reducer.lua deleted file mode 100644 index 6f57dc4c7..000000000 --- a/data/spells/scripts/monster/magma crawler skill reducer.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = {} - -for i = 15, 55 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 7000) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE1X1) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(15, 55)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/magma crawler soulfire 2.lua b/data/spells/scripts/monster/magma crawler soulfire 2.lua deleted file mode 100644 index 2bac7cd97..000000000 --- a/data/spells/scripts/monster/magma crawler soulfire 2.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(20, 9000, -10) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/magma crawler soulfire.lua b/data/spells/scripts/monster/magma crawler soulfire.lua deleted file mode 100644 index 45fc009e6..000000000 --- a/data/spells/scripts/monster/magma crawler soulfire.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(20, 9000, -10) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/magma crawler wave.lua b/data/spells/scripts/monster/magma crawler wave.lua deleted file mode 100644 index 024030746..000000000 --- a/data/spells/scripts/monster/magma crawler wave.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/mahrdis soulfire.lua b/data/spells/scripts/monster/mahrdis soulfire.lua deleted file mode 100644 index a9f981462..000000000 --- a/data/spells/scripts/monster/mahrdis soulfire.lua +++ /dev/null @@ -1,24 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(50, 9000, -10) - -local area = createCombatArea({ - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0} -}) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/mamma longlegs paralyze.lua b/data/spells/scripts/monster/mamma longlegs paralyze.lua deleted file mode 100644 index af5af557d..000000000 --- a/data/spells/scripts/monster/mamma longlegs paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 25000) - condition:setFormula(-0.5, 0, -0.8, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/man in the cave summon.lua b/data/spells/scripts/monster/man in the cave summon.lua deleted file mode 100644 index 20defe273..000000000 --- a/data/spells/scripts/monster/man in the cave summon.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GIFT_WRAPS) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - mid = Game.createMonster("Monk", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/massive energy elemental electrify.lua b/data/spells/scripts/monster/massive energy elemental electrify.lua deleted file mode 100644 index 64ccb0857..000000000 --- a/data/spells/scripts/monster/massive energy elemental electrify.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) - -local condition = Condition(CONDITION_ENERGY) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(10, 10000, -25) - -local area = createCombatArea(AREA_CIRCLE3X3) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/massive fire elemental soulfire.lua b/data/spells/scripts/monster/massive fire elemental soulfire.lua deleted file mode 100644 index 8e0befd43..000000000 --- a/data/spells/scripts/monster/massive fire elemental soulfire.lua +++ /dev/null @@ -1,31 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(20, 9000, -10) - -arr = { -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -} - -local area = createCombatArea(arr) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/mawhawk summon.lua b/data/spells/scripts/monster/mawhawk summon.lua deleted file mode 100644 index a524e3d81..000000000 --- a/data/spells/scripts/monster/mawhawk summon.lua +++ /dev/null @@ -1,23 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) - -local area = createCombatArea(AREA_CIRCLE1X1) -combat:setArea(area) - -local maxsummons = 4 - -function onCastSpell(creature, var) -creature:say("Watch my maws!", TALKTYPE_ORANGE_1) - local summoncount = creature:getSummons() - if #summoncount < 4 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Guzzlemaw", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/mawhawk ue.lua b/data/spells/scripts/monster/mawhawk ue.lua deleted file mode 100644 index 827f40026..000000000 --- a/data/spells/scripts/monster/mawhawk ue.lua +++ /dev/null @@ -1,89 +0,0 @@ -local vocation = { - VOCATION.BASE_ID.SORCERER, - VOCATION.BASE_ID.DRUID, - VOCATION.BASE_ID.PALADIN, - VOCATION.BASE_ID.KNIGHT -} - -local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) -condition:setParameter(CONDITION_PARAM_SUBID, 88888) -condition:setParameter(CONDITION_PARAM_TICKS, 10 * 60 * 1000) -condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) -condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 10 * 60 * 1000) - -local area = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -} - -local createArea = createCombatArea(area) - -local combat = Combat() -combat:setArea(createArea) - -function onTargetTile(creature, pos) - local creatureTable = {} - local n, i = Tile({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 - if n ~= 0 then - local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid - while v ~= 0 do - if isCreature(v) == true then - table.insert(creatureTable, v) - if n == #creatureTable then - break - end - end - i = i + 1 - v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid - end - end - if #creatureTable ~= nil and #creatureTable > 0 then - for r = 1, #creatureTable do - if creatureTable[r] ~= creature then - local min = 1500 - local max = 1700 - local player = Player(creatureTable[r]) - - if isPlayer(creatureTable[r]) == true and table.contains(vocation, player:getVocation():getBaseId()) then - doTargetCombatHealth(creature, creatureTable[r], COMBAT_FIREDAMAGE, -min, -max, CONST_ME_NONE) - elseif isMonster(creatureTable[r]) == true then - doTargetCombatHealth(creature, creatureTable[r], COMBAT_FIREDAMAGE, -min, -max, CONST_ME_NONE) - end - end - end - end - pos:sendMagicEffect(CONST_ME_FIREAREA) - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") - -local function delayedCastSpell(cid, var) - local creature = Creature(cid) - if not creature then - return - end - return combat:execute(creature, positionToVariant(creature:getPosition())) -end - -function onCastSpell(creature, var) - if creature:getHealth() < creature:getMaxHealth() * 0.1 and not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then - creature:addCondition(condition) - addEvent(delayedCastSpell, 5000, creature:getId(), var) - creature:say("Better flee now.", TALKTYPE_ORANGE_1) - else - return - end - return true -end diff --git a/data/spells/scripts/monster/maxxen teleport.lua b/data/spells/scripts/monster/maxxen teleport.lua deleted file mode 100644 index c7f6dc24c..000000000 --- a/data/spells/scripts/monster/maxxen teleport.lua +++ /dev/null @@ -1,6 +0,0 @@ -function onCastSpell(creature, var) - creature:getPosition():sendMagicEffect(CONST_ME_POFF) - creature:teleportTo(Position(math.random(33704, 33718), math.random(32040, 32053), 15)) - creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - return -end diff --git a/data/spells/scripts/monster/mazoran fire.lua b/data/spells/scripts/monster/mazoran fire.lua deleted file mode 100644 index 7657a2f8f..000000000 --- a/data/spells/scripts/monster/mazoran fire.lua +++ /dev/null @@ -1,956 +0,0 @@ -local Montains = {4468, 4469, 4470, 4471, 4472, 4473, 4474, 4475, 4476, 4477, 4478, 4479, 1387} - -local tiles = {9068, 9069, 9070, 9071, 9072, 9073} -local itemsRoom = { - {itemid = 23868, position = Position(33589,32691, 14)}, - {itemid = 23868, position = Position(33588,32686, 14)}, - {itemid = 23868, position = Position(33583,32699, 14)}, - {itemid = 23868, position = Position(33579,32691, 14)}, - {itemid = 23868, position = Position(33576,32685, 14)}, - {itemid = 23868, position = Position(33589,32695, 14)}, - {itemid = 23868, position = Position(33588,32692, 14)}, - {itemid = 23868, position = Position(33588,32695, 14)}, - {itemid = 23868, position = Position(33586,32692, 14)}, - {itemid = 23868, position = Position(33590,32696, 14)}, - {itemid = 23868, position = Position(33572,32690, 14)}, - {itemid = 23868, position = Position(33594,32688, 14)}, - {itemid = 23868, position = Position(33572,32690, 14)}, - {itemid = 23868, position = Position(33574,32690, 14)}, - {itemid = 23868, position = Position(33582,32687, 14)}, - {itemid = 23868, position = Position(33593,32693, 14)}, - {itemid = 23867, position = Position(33592,32689, 14)}, - {itemid = 23867, position = Position(33578,32689, 14)}, - {itemid = 23867, position = Position(33576,32686, 14)}, - {itemid = 23867, position = Position(33579,32682, 14)}, - {itemid = 23867, position = Position(33580,32695, 14)}, - {itemid = 23867, position = Position(33583,32687, 14)}, - {itemid = 23867, position = Position(33583,32698, 14)}, - {itemid = 23867, position = Position(33583,32689, 14)}, - {itemid = 23867, position = Position(33575,32685, 14)}, - {itemid = 23867, position = Position(33582,32682, 14)}, - {itemid = 23866, position = Position(33587,32690, 14)}, - {itemid = 23866, position = Position(33575,32689, 14)}, - {itemid = 23866, position = Position(33578,32693, 14)}, - {itemid = 23866, position = Position(33587,32688, 14)}, - {itemid = 23866, position = Position(33579,32687, 14)}, - {itemid = 23866, position = Position(33594,32695, 14)}, - {itemid = 23866, position = Position(33585,32694, 14)}, - {itemid = 23866, position = Position(33582,32686, 14)}, - {itemid = 23866, position = Position(33583,32688, 14)}, - {itemid = 23866, position = Position(33592,32686, 14)}, - {itemid = 23866, position = Position(33580,32692, 14)}, - {itemid = 23866, position = Position(33574,32685, 14)}, - {itemid = 23865, position = Position(33581,32692, 14)}, - {itemid = 23865, position = Position(33581,32686, 14)}, - {itemid = 23865, position = Position(33587,32692, 14)}, - {itemid = 23865, position = Position(33579,32685, 14)}, - {itemid = 23865, position = Position(33593,32686, 14)}, - {itemid = 23865, position = Position(33586,32687, 14)}, - {itemid = 23865, position = Position(33584,32696, 14)}, - {itemid = 23865, position = Position(33581,32680, 14)}, - {itemid = 23865, position = Position(33585,32696, 14)}, - {itemid = 23865, position = Position(33581,32681, 14)}, - {itemid = 23865, position = Position(33591,32684, 14)}, - {itemid = 23865, position = Position(33579,32681, 14)}, - {itemid = 23865, position = Position(33588,32687, 14)}, - {itemid = 23865, position = Position(33583,32690, 14)}, - {itemid = 23864, position = Position(33591,32688, 14)}, - {itemid = 23864, position = Position(33578,32692, 14)}, - {itemid = 23864, position = Position(33587,32689, 14)}, - {itemid = 23864, position = Position(33588,32684, 14)}, - {itemid = 23864, position = Position(33576,32687, 14)}, - {itemid = 23864, position = Position(33577,32692, 14)}, - {itemid = 23864, position = Position(33580,32686, 14)}, - {itemid = 23864, position = Position(33592,32688, 14)}, - {itemid = 23864, position = Position(33593,32683, 14)}, - {itemid = 23863, position = Position(33593,32694, 14)}, - {itemid = 23863, position = Position(33585,32688, 14)}, - {itemid = 23863, position = Position(33592,32691, 14)}, - {itemid = 23863, position = Position(33591,32692, 14)}, - {itemid = 23863, position = Position(33583,32684, 14)}, - {itemid = 23863, position = Position(33594,32694, 14)}, - {itemid = 23863, position = Position(33589,32692, 14)}, - {itemid = 23863, position = Position(33594,32687, 14)}, - {itemid = 23863, position = Position(33578,32685, 14)}, - {itemid = 23862, position = Position(33582,32683, 14)}, - {itemid = 23862, position = Position(33579,32690, 14)}, - {itemid = 23862, position = Position(33591,32697, 14)}, - {itemid = 23862, position = Position(33592,32690, 14)}, - {itemid = 23862, position = Position(33575,32688, 14)}, - {itemid = 23862, position = Position(33585,32695, 14)}, - {itemid = 23862, position = Position(33593,32684, 14)}, - {itemid = 23861, position = Position(33592,32684, 14)}, - {itemid = 23861, position = Position(33592,32692, 14)}, - {itemid = 23861, position = Position(33585,32690, 14)}, - {itemid = 23861, position = Position(33576,32692, 14)}, - {itemid = 23861, position = Position(33576,32688, 14)}, - {itemid = 23861, position = Position(33573,32690, 14)}, - {itemid = 23861, position = Position(33584,32682, 14)}, - {itemid = 23861, position = Position(33589,32684, 14)}, - {itemid = 23861, position = Position(33591,32696, 14)}, - {itemid = 23861, position = Position(33578,32688, 14)}, - {itemid = 23861, position = Position(33579,32696, 14)}, - {itemid = 23861, position = Position(33587,32691, 14)}, - {itemid = 23861, position = Position(33579,32683, 14)}, - {itemid = 23861, position = Position(33574,32691, 14)}, - {itemid = 23861, position = Position(33590,32688, 14)}, - {itemid = 23861, position = Position(33589,32688, 14)}, - {itemid = 23860, position = Position(33585,32687, 14)}, - {itemid = 23860, position = Position(33586,32690, 14)}, - {itemid = 23860, position = Position(33588,32696, 14)}, - {itemid = 23860, position = Position(33579,32688, 14)}, - {itemid = 23860, position = Position(33594,32690, 14)}, - {itemid = 23860, position = Position(33579,32692, 14)}, - {itemid = 23860, position = Position(33579,32695, 14)}, - {itemid = 23860, position = Position(33593,32690, 14)}, - {itemid = 23860, position = Position(33590,32691, 14)}, - {itemid = 23860, position = Position(33589,32693, 14)}, - {itemid = 23860, position = Position(33588,32690, 14)}, - {itemid = 23860, position = Position(33586,32693, 14)}, - {itemid = 23860, position = Position(33593,32687, 14)}, - {itemid = 23860, position = Position(33587,32686, 14)}, - {itemid = 23860, position = Position(33578,32684, 14)}, - {itemid = 23860, position = Position(33588,32685, 14)}, - {itemid = 23859, position = Position(33583,32700, 14)}, - {itemid = 23859, position = Position(33591,32686, 14)}, - {itemid = 23859, position = Position(33582,32684, 14)}, - {itemid = 23859, position = Position(33588,32688, 14)}, - {itemid = 23859, position = Position(33579,32686, 14)}, - {itemid = 23859, position = Position(33578,32683, 14)}, - {itemid = 23858, position = Position(33578,32694, 14)}, - {itemid = 23858, position = Position(33583,32696, 14)}, - {itemid = 23858, position = Position(33585,32693, 14)}, - {itemid = 23858, position = Position(33589,32690, 14)}, - {itemid = 23858, position = Position(33582,32692, 14)}, - {itemid = 23858, position = Position(33585,32689, 14)}, - {itemid = 23858, position = Position(33585,32680, 14)}, - {itemid = 23858, position = Position(33586,32686, 14)}, - {itemid = 23858, position = Position(33585,32681, 14)}, - {itemid = 23857, position = Position(33590,32695, 14)}, - {itemid = 23857, position = Position(33575,32691, 14)}, - {itemid = 23857, position = Position(33591,32698, 14)}, - {itemid = 23857, position = Position(33578,32695, 14)}, - {itemid = 23857, position = Position(33592,32685, 14)}, - {itemid = 23857, position = Position(33583,32685, 14)}, - {itemid = 23857, position = Position(33576,32691, 14)}, - {itemid = 23857, position = Position(33583,32697, 14)}, - {itemid = 23857, position = Position(33590,32684, 14)}, - {itemid = 23857, position = Position(33584,32689, 14)}, - {itemid = 23857, position = Position(33582,32681, 14)}, - {itemid = 23857, position = Position(33585,32682, 14)}, - {itemid = 23857, position = Position(33584,32683, 14)}, - {itemid = 9073, position = Position(33584,32688, 14)}, - {itemid = 9073, position = Position(33572,32688, 14)}, - {itemid = 9073, position = Position(33586,32700, 14)}, - {itemid = 9073, position = Position(33580,32698, 14)}, - {itemid = 9073, position = Position(33590,32697, 14)}, - {itemid = 9073, position = Position(33581,32693, 14)}, - {itemid = 9073, position = Position(33581,32690, 14)}, - {itemid = 9073, position = Position(33591,32682, 14)}, - {itemid = 9073, position = Position(33587,32680, 14)}, - {itemid = 9073, position = Position(33572,32692, 14)}, - {itemid = 9073, position = Position(33586,32695, 14)}, - {itemid = 9073, position = Position(33583,32695, 14)}, - {itemid = 9073, position = Position(33587,32695, 14)}, - {itemid = 9073, position = Position(33587,32696, 14)}, - {itemid = 9073, position = Position(33581,32700, 14)}, - {itemid = 9073, position = Position(33573,32686, 14)}, - {itemid = 9073, position = Position(33583,32681, 14)}, - {itemid = 9073, position = Position(33597,32690, 14)}, - {itemid = 9073, position = Position(33582,32695, 14)}, - {itemid = 9073, position = Position(33591,32699, 14)}, - {itemid = 9073, position = Position(33581,32689, 14)}, - {itemid = 9073, position = Position(33581,32687, 14)}, - {itemid = 9073, position = Position(33572,32692, 14)}, - {itemid = 9073, position = Position(33574,32689, 14)}, - {itemid = 9073, position = Position(33594,32683, 14)}, - {itemid = 9073, position = Position(33573,32694, 14)}, - {itemid = 9073, position = Position(33579,32698, 14)}, - {itemid = 9073, position = Position(33593,32697, 14)}, - {itemid = 9073, position = Position(33580,32687, 14)}, - {itemid = 9073, position = Position(33580,32690, 14)}, - {itemid = 9073, position = Position(33580,32689, 14)}, - {itemid = 9073, position = Position(33597,32687, 14)}, - {itemid = 9073, position = Position(33593,32682, 14)}, - {itemid = 9073, position = Position(33591,32690, 14)}, - {itemid = 9073, position = Position(33583,32692, 14)}, - {itemid = 9073, position = Position(33586,32683, 14)}, - {itemid = 9073, position = Position(33584,32695, 14)}, - {itemid = 9073, position = Position(33573,32693, 14)}, - {itemid = 9073, position = Position(33579,32689, 14)}, - {itemid = 9073, position = Position(33584,32693, 14)}, - {itemid = 9073, position = Position(33592,32693, 14)}, - {itemid = 9073, position = Position(33572,32688, 14)}, - {itemid = 9073, position = Position(33573,32686, 14)}, - {itemid = 9073, position = Position(33584,32697, 14)}, - {itemid = 9073, position = Position(33583,32694, 14)}, - {itemid = 9073, position = Position(33586,32685, 14)}, - {itemid = 9073, position = Position(33587,32700, 14)}, - {itemid = 9073, position = Position(33596,32689, 14)}, - {itemid = 9073, position = Position(33576,32697, 14)}, - {itemid = 9073, position = Position(33589,32697, 14)}, - {itemid = 9073, position = Position(33589,32696, 14)}, - {itemid = 9073, position = Position(33574,32695, 14)}, - {itemid = 9073, position = Position(33589,32698, 14)}, - {itemid = 9073, position = Position(33593,32689, 14)}, - {itemid = 9073, position = Position(33589,32699, 14)}, - {itemid = 9073, position = Position(33590,32681, 14)}, - {itemid = 9073, position = Position(33595,32693, 14)}, - {itemid = 9073, position = Position(33591,32694, 14)}, - {itemid = 9073, position = Position(33576,32695, 14)}, - {itemid = 9073, position = Position(33576,32696, 14)}, - {itemid = 9073, position = Position(33595,32691, 14)}, - {itemid = 9073, position = Position(33595,32687, 14)}, - {itemid = 9073, position = Position(33577,32696, 14)}, - {itemid = 9073, position = Position(33577,32698, 14)}, - {itemid = 9073, position = Position(33577,32697, 14)}, - {itemid = 9073, position = Position(33575,32696, 14)}, - {itemid = 9073, position = Position(33577,32689, 14)}, - {itemid = 9073, position = Position(33596,32685, 14)}, - {itemid = 9073, position = Position(33575,32683, 14)}, - {itemid = 9073, position = Position(33575,32694, 14)}, - {itemid = 9073, position = Position(33593,32688, 14)}, - {itemid = 9073, position = Position(33590,32694, 14)}, - {itemid = 9073, position = Position(33595,32696, 14)}, - {itemid = 9073, position = Position(33575,32686, 14)}, - {itemid = 9073, position = Position(33588,32682, 14)}, - {itemid = 9073, position = Position(33573,32692, 14)}, - {itemid = 9073, position = Position(33596,32691, 14)}, - {itemid = 9072, position = Position(33596,32690, 14)}, - {itemid = 9072, position = Position(33589,32689, 14)}, - {itemid = 9072, position = Position(33578,32690, 14)}, - {itemid = 9072, position = Position(33581,32691, 14)}, - {itemid = 9072, position = Position(33585,32697, 14)}, - {itemid = 9072, position = Position(33574,32692, 14)}, - {itemid = 9072, position = Position(33574,32686, 14)}, - {itemid = 9072, position = Position(33577,32682, 14)}, - {itemid = 9072, position = Position(33583,32686, 14)}, - {itemid = 9072, position = Position(33587,32683, 14)}, - {itemid = 9072, position = Position(33586,32698, 14)}, - {itemid = 9072, position = Position(33590,32680, 14)}, - {itemid = 9072, position = Position(33575,32692, 14)}, - {itemid = 9072, position = Position(33588,32689, 14)}, - {itemid = 9072, position = Position(33578,32682, 14)}, - {itemid = 9071, position = Position(33591,32685, 14)}, - {itemid = 9071, position = Position(33589,32687, 14)}, - {itemid = 9071, position = Position(33594,32692, 14)}, - {itemid = 9071, position = Position(33595,32690, 14)}, - {itemid = 9071, position = Position(33576,32694, 14)}, - {itemid = 9071, position = Position(33585,32685, 14)}, - {itemid = 9071, position = Position(33597,32691, 14)}, - {itemid = 9071, position = Position(33585,32679, 14)}, - {itemid = 9071, position = Position(33581,32682, 14)}, - {itemid = 9071, position = Position(33590,32689, 14)}, - {itemid = 9071, position = Position(33585,32683, 14)}, - {itemid = 9071, position = Position(33582,32694, 14)}, - {itemid = 9071, position = Position(33590,32698, 14)}, - {itemid = 9071, position = Position(33587,32699, 14)}, - {itemid = 9071, position = Position(33578,32691, 14)}, - {itemid = 9071, position = Position(33586,32694, 14)}, - {itemid = 9070, position = Position(33586,32691, 14)}, - {itemid = 9070, position = Position(33581,32688, 14)}, - {itemid = 9070, position = Position(33590,32682, 14)}, - {itemid = 9070, position = Position(33588,32699, 14)}, - {itemid = 9070, position = Position(33588,32697, 14)}, - {itemid = 9070, position = Position(33590,32699, 14)}, - {itemid = 9070, position = Position(33586,32697, 14)}, - {itemid = 9070, position = Position(33584,32681, 14)}, - {itemid = 9070, position = Position(33576,32682, 14)}, - {itemid = 9070, position = Position(33587,32684, 14)}, - {itemid = 9070, position = Position(33581,32696, 14)}, - {itemid = 9070, position = Position(33585,32692, 14)}, - {itemid = 9070, position = Position(33584,32691, 14)}, - {itemid = 9070, position = Position(33587,32685, 14)}, - {itemid = 9070, position = Position(33584,32692, 14)}, - {itemid = 9070, position = Position(33590,32693, 14)}, - {itemid = 9070, position = Position(33576,32684, 14)}, - {itemid = 9070, position = Position(33597,32692, 14)}, - {itemid = 9070, position = Position(33577,32688, 14)}, - {itemid = 9070, position = Position(33588,32680, 14)}, - {itemid = 9069, position = Position(33593,32696, 14)}, - {itemid = 9069, position = Position(33574,32688, 14)}, - {itemid = 9069, position = Position(33594,32686, 14)}, - {itemid = 9069, position = Position(33579,32699, 14)}, - {itemid = 9069, position = Position(33574,32693, 14)}, - {itemid = 9069, position = Position(33584,32690, 14)}, - {itemid = 9069, position = Position(33584,32699, 14)}, - {itemid = 9069, position = Position(33596,32687, 14)}, - {itemid = 9069, position = Position(33592,32682, 14)}, - {itemid = 9069, position = Position(33575,32687, 14)}, - {itemid = 9069, position = Position(33587,32697, 14)}, - {itemid = 9069, position = Position(33592,32695, 14)}, - {itemid = 9069, position = Position(33591,32681, 14)}, - {itemid = 9069, position = Position(33580,32696, 14)}, - {itemid = 9069, position = Position(33577,32694, 14)}, - {itemid = 9069, position = Position(33582,32685, 14)}, - {itemid = 9069, position = Position(33582,32691, 14)}, - {itemid = 9069, position = Position(33578,32696, 14)}, - {itemid = 9069, position = Position(33585,32684, 14)}, - {itemid = 9069, position = Position(33590,32690, 14)}, - {itemid = 9068, position = Position(33583,32682, 14)}, - {itemid = 9068, position = Position(33584,32685, 14)}, - {itemid = 9068, position = Position(33591,32687, 14)}, - {itemid = 9068, position = Position(33584,32684, 14)}, - {itemid = 9068, position = Position(33584,32686, 14)}, - {itemid = 9068, position = Position(33587,32694, 14)}, - {itemid = 9068, position = Position(33584,32687, 14)}, - {itemid = 9068, position = Position(33590,32692, 14)}, - {itemid = 9068, position = Position(33587,32698, 14)}, - {itemid = 9068, position = Position(33592,32698, 14)}, - {itemid = 9068, position = Position(33590,32683, 14)}, - {itemid = 9068, position = Position(33583,32683, 14)}, - {itemid = 9068, position = Position(33588,32683, 14)}, - {itemid = 9068, position = Position(33583,32680, 14)}, - {itemid = 9068, position = Position(33592,32697, 14)}, - {itemid = 9068, position = Position(33583,32693, 14)}, - {itemid = 9068, position = Position(33590,32686, 14)}, - {itemid = 9068, position = Position(33587,32687, 14)}, - {itemid = 9068, position = Position(33590,32687, 14)}, - {itemid = 9068, position = Position(33583,32691, 14)}, - {itemid = 9068, position = Position(33590,32685, 14)}, - {itemid = 9068, position = Position(33587,32693, 14)}, - {itemid = 9068, position = Position(33584,32680, 14)}, - {itemid = 9068, position = Position(33588,32681, 14)}, - {itemid = 9068, position = Position(33584,32679, 14)}, - {itemid = 9068, position = Position(33594,32685, 14)}, - {itemid = 9068, position = Position(33592,32696, 14)}, - {itemid = 9068, position = Position(33586,32681, 14)}, - {itemid = 9068, position = Position(33587,32682, 14)}, - {itemid = 9068, position = Position(33589,32686, 14)}, - {itemid = 9068, position = Position(33589,32685, 14)}, - {itemid = 9068, position = Position(33589,32683, 14)}, - {itemid = 9068, position = Position(33589,32682, 14)}, - {itemid = 9068, position = Position(33585,32691, 14)}, - {itemid = 9068, position = Position(33588,32698, 14)}, - {itemid = 9068, position = Position(33593,32695, 14)}, - {itemid = 9068, position = Position(33593,32685, 14)}, - {itemid = 9068, position = Position(33591,32691, 14)}, - {itemid = 9068, position = Position(33586,32688, 14)}, - {itemid = 9068, position = Position(33586,32684, 14)}, - {itemid = 9068, position = Position(33593,32698, 14)}, - {itemid = 9068, position = Position(33586,32679, 14)}, - {itemid = 9068, position = Position(33589,32680, 14)}, - {itemid = 9068, position = Position(33586,32680, 14)}, - {itemid = 9068, position = Position(33585,32698, 14)}, - {itemid = 9068, position = Position(33589,32681, 14)}, - {itemid = 9068, position = Position(33588,32700, 14)}, - {itemid = 9068, position = Position(33585,32700, 14)}, - {itemid = 9068, position = Position(33591,32683, 14)}, - {itemid = 9068, position = Position(33585,32699, 14)}, - {itemid = 9068, position = Position(33591,32689, 14)}, - {itemid = 9068, position = Position(33585,32686, 14)}, - {itemid = 9068, position = Position(33592,32687, 14)}, - {itemid = 9068, position = Position(33584,32694, 14)}, - {itemid = 9068, position = Position(33588,32691, 14)}, - {itemid = 9068, position = Position(33592,32694, 14)}, - {itemid = 9068, position = Position(33592,32683, 14)}, - {itemid = 9068, position = Position(33593,32692, 14)}, - {itemid = 9068, position = Position(33591,32693, 14)}, - {itemid = 9068, position = Position(33589,32700, 14)}, - {itemid = 9068, position = Position(33587,32681, 14)}, - {itemid = 9068, position = Position(33586,32682, 14)}, - {itemid = 9068, position = Position(33586,32689, 14)}, - {itemid = 9068, position = Position(33586,32699, 14)}, - {itemid = 9068, position = Position(33584,32698, 14)}, - {itemid = 9068, position = Position(33588,32694, 14)}, - {itemid = 9068, position = Position(33593,32691, 14)}, - {itemid = 9068, position = Position(33591,32695, 14)}, - {itemid = 9068, position = Position(33588,32693, 14)}, - {itemid = 9068, position = Position(33589,32694, 14)}, - {itemid = 9068, position = Position(33594,32684, 14)}, - {itemid = 9068, position = Position(33584,32700, 14)}, - {itemid = 9068, position = Position(33586,32696, 14)}, - {itemid = 9068, position = Position(33583,32679, 14)}, - {itemid = 9068, position = Position(33597,32693, 14)}, - {itemid = 9068, position = Position(33582,32700, 14)}, - {itemid = 9068, position = Position(33581,32697, 14)}, - {itemid = 9068, position = Position(33581,32695, 14)}, - {itemid = 9068, position = Position(33581,32698, 14)}, - {itemid = 9068, position = Position(33580,32684, 14)}, - {itemid = 9068, position = Position(33581,32699, 14)}, - {itemid = 9068, position = Position(33577,32691, 14)}, - {itemid = 9068, position = Position(33581,32694, 14)}, - {itemid = 9068, position = Position(33577,32690, 14)}, - {itemid = 9068, position = Position(33595,32689, 14)}, - {itemid = 9068, position = Position(33580,32685, 14)}, - {itemid = 9068, position = Position(33594,32691, 14)}, - {itemid = 9068, position = Position(33575,32684, 14)}, - {itemid = 9068, position = Position(33574,32694, 14)}, - {itemid = 9068, position = Position(33580,32681, 14)}, - {itemid = 9068, position = Position(33580,32680, 14)}, - {itemid = 9068, position = Position(33574,32687, 14)}, - {itemid = 9068, position = Position(33577,32693, 14)}, - {itemid = 9068, position = Position(33582,32680, 14)}, - {itemid = 9068, position = Position(33582,32679, 14)}, - {itemid = 9068, position = Position(33594,32689, 14)}, - {itemid = 9068, position = Position(33580,32683, 14)}, - {itemid = 9068, position = Position(33580,32682, 14)}, - {itemid = 9068, position = Position(33580,32693, 14)}, - {itemid = 9068, position = Position(33577,32687, 14)}, - {itemid = 9068, position = Position(33581,32685, 14)}, - {itemid = 9068, position = Position(33576,32689, 14)}, - {itemid = 9068, position = Position(33576,32690, 14)}, - {itemid = 9068, position = Position(33580,32691, 14)}, - {itemid = 9068, position = Position(33580,32688, 14)}, - {itemid = 9068, position = Position(33577,32684, 14)}, - {itemid = 9068, position = Position(33580,32699, 14)}, - {itemid = 9068, position = Position(33595,32692, 14)}, - {itemid = 9068, position = Position(33577,32683, 14)}, - {itemid = 9068, position = Position(33580,32697, 14)}, - {itemid = 9068, position = Position(33576,32693, 14)}, - {itemid = 9068, position = Position(33577,32686, 14)}, - {itemid = 9068, position = Position(33581,32679, 14)}, - {itemid = 9068, position = Position(33595,32694, 14)}, - {itemid = 9068, position = Position(33581,32684, 14)}, - {itemid = 9068, position = Position(33575,32693, 14)}, - {itemid = 9068, position = Position(33575,32690, 14)}, - {itemid = 9068, position = Position(33576,32683, 14)}, - {itemid = 9068, position = Position(33581,32683, 14)}, - {itemid = 9068, position = Position(33577,32685, 14)}, - {itemid = 9068, position = Position(33595,32695, 14)}, - {itemid = 9068, position = Position(33594,32693, 14)}, - {itemid = 9068, position = Position(33575,32695, 14)}, - {itemid = 9068, position = Position(33595,32688, 14)}, - {itemid = 9068, position = Position(33577,32695, 14)}, - {itemid = 9068, position = Position(33574,32684, 14)}, - {itemid = 9068, position = Position(33582,32690, 14)}, - {itemid = 9068, position = Position(33579,32684, 14)}, - {itemid = 9068, position = Position(33573,32687, 14)}, - {itemid = 9068, position = Position(33597,32688, 14)}, - {itemid = 9068, position = Position(33578,32698, 14)}, - {itemid = 9068, position = Position(33582,32689, 14)}, - {itemid = 9068, position = Position(33573,32688, 14)}, - {itemid = 9068, position = Position(33596,32695, 14)}, - {itemid = 9068, position = Position(33578,32697, 14)}, - {itemid = 9068, position = Position(33596,32686, 14)}, - {itemid = 9068, position = Position(33597,32689, 14)}, - {itemid = 9068, position = Position(33579,32680, 14)}, - {itemid = 9068, position = Position(33582,32698, 14)}, - {itemid = 9068, position = Position(33582,32699, 14)}, - {itemid = 9068, position = Position(33572,32689, 14)}, - {itemid = 9068, position = Position(33594,32697, 14)}, - {itemid = 9068, position = Position(33582,32697, 14)}, - {itemid = 9068, position = Position(33594,32696, 14)}, - {itemid = 9068, position = Position(33582,32696, 14)}, - {itemid = 9068, position = Position(33582,32693, 14)}, - {itemid = 9068, position = Position(33572,32691, 14)}, - {itemid = 9068, position = Position(33572,32689, 14)}, - {itemid = 9068, position = Position(33582,32688, 14)}, - {itemid = 9068, position = Position(33596,32694, 14)}, - {itemid = 9068, position = Position(33573,32688, 14)}, - {itemid = 9068, position = Position(33595,32686, 14)}, - {itemid = 9068, position = Position(33579,32693, 14)}, - {itemid = 9068, position = Position(33573,32687, 14)}, - {itemid = 9068, position = Position(33573,32689, 14)}, - {itemid = 9068, position = Position(33573,32691, 14)}, - {itemid = 9068, position = Position(33578,32681, 14)}, - {itemid = 9068, position = Position(33596,32688, 14)}, - {itemid = 9068, position = Position(33579,32697, 14)}, - {itemid = 9068, position = Position(33596,32692, 14)}, - {itemid = 9068, position = Position(33579,32694, 14)}, - {itemid = 9068, position = Position(33578,32687, 14)}, - {itemid = 9068, position = Position(33572,32691, 14)}, - {itemid = 9068, position = Position(33578,32686, 14)}, - {itemid = 9068, position = Position(33595,32684, 14)}, - {itemid = 9068, position = Position(33596,32693, 14)}, - {itemid = 9068, position = Position(33595,32685, 14)}, - {itemid = 9068, position = Position(33580,32694, 14)}, - {itemid = 7090, position = Position(33585,32688, 14)}, - {itemid = 7090, position = Position(33586,32693, 14)}, - {itemid = 7090, position = Position(33586,32687, 14)}, - {itemid = 7090, position = Position(33588,32696, 14)}, - {itemid = 7090, position = Position(33578,32689, 14)}, - {itemid = 7090, position = Position(33579,32688, 14)}, - {itemid = 7090, position = Position(33579,32683, 14)}, - {itemid = 7090, position = Position(33585,32696, 14)}, - {itemid = 7090, position = Position(33576,32688, 14)}, - {itemid = 7090, position = Position(33590,32691, 14)}, - {itemid = 7090, position = Position(33593,32684, 14)}, - {itemid = 7090, position = Position(33575,32689, 14)}, - {itemid = 7090, position = Position(33592,32692, 14)}, - {itemid = 7090, position = Position(33589,32693, 14)}, - {itemid = 7090, position = Position(33585,32682, 14)}, - {itemid = 7089, position = Position(33593,32687, 14)}, - {itemid = 7089, position = Position(33591,32698, 14)}, - {itemid = 7089, position = Position(33578,32685, 14)}, - {itemid = 7089, position = Position(33578,32695, 14)}, - {itemid = 7089, position = Position(33583,32685, 14)}, - {itemid = 7089, position = Position(33590,32696, 14)}, - {itemid = 7089, position = Position(33584,32683, 14)}, - {itemid = 7089, position = Position(33593,32694, 14)}, - {itemid = 7089, position = Position(33574,32691, 14)}, - {itemid = 7089, position = Position(33582,32684, 14)}, - {itemid = 7089, position = Position(33579,32696, 14)}, - {itemid = 7089, position = Position(33582,32687, 14)}, - {itemid = 7089, position = Position(33581,32681, 14)}, - {itemid = 7089, position = Position(33594,32688, 14)}, - {itemid = 7089, position = Position(33585,32690, 14)}, - {itemid = 7089, position = Position(33576,32692, 14)}, - {itemid = 7089, position = Position(33589,32691, 14)}, - {itemid = 7088, position = Position(33583,32687, 14)}, - {itemid = 7088, position = Position(33589,32692, 14)}, - {itemid = 7088, position = Position(33579,32685, 14)}, - {itemid = 7088, position = Position(33579,32690, 14)}, - {itemid = 7088, position = Position(33592,32688, 14)}, - {itemid = 7088, position = Position(33586,32690, 14)}, - {itemid = 7088, position = Position(33582,32686, 14)}, - {itemid = 7088, position = Position(33594,32687, 14)}, - {itemid = 7088, position = Position(33572,32692, 14)}, - {itemid = 7088, position = Position(33587,32700, 14)}, - {itemid = 7088, position = Position(33591,32696, 14)}, - {itemid = 7088, position = Position(33582,32681, 14)}, - {itemid = 7088, position = Position(33582,32692, 14)}, - {itemid = 7088, position = Position(33576,32691, 14)}, - {itemid = 7088, position = Position(33583,32684, 14)}, - {itemid = 7088, position = Position(33585,32680, 14)}, - {itemid = 7088, position = Position(33573,32693, 14)}, - {itemid = 7088, position = Position(33589,32690, 14)}, - {itemid = 7088, position = Position(33594,32694, 14)}, - {itemid = 7088, position = Position(33585,32689, 14)}, - {itemid = 7088, position = Position(33580,32695, 14)}, - {itemid = 7088, position = Position(33585,32693, 14)}, - {itemid = 7088, position = Position(33576,32685, 14)}, - {itemid = 7088, position = Position(33590,32695, 14)}, - {itemid = 7088, position = Position(33593,32686, 14)}, - {itemid = 7088, position = Position(33574,32690, 14)}, - {itemid = 7088, position = Position(33593,32683, 14)}, - {itemid = 7088, position = Position(33579,32681, 14)}, - {itemid = 7088, position = Position(33594,32690, 14)}, - {itemid = 7088, position = Position(33572,32692, 14)}, - {itemid = 7087, position = Position(33586,32700, 14)}, - {itemid = 7087, position = Position(33593,32693, 14)}, - {itemid = 7087, position = Position(33587,32688, 14)}, - {itemid = 7087, position = Position(33583,32696, 14)}, - {itemid = 7087, position = Position(33586,32692, 14)}, - {itemid = 7087, position = Position(33591,32692, 14)}, - {itemid = 7087, position = Position(33588,32695, 14)}, - {itemid = 7087, position = Position(33591,32686, 14)}, - {itemid = 7087, position = Position(33575,32688, 14)}, - {itemid = 7087, position = Position(33584,32682, 14)}, - {itemid = 7087, position = Position(33586,32686, 14)}, - {itemid = 7087, position = Position(33578,32683, 14)}, - {itemid = 7087, position = Position(33585,32687, 14)}, - {itemid = 7087, position = Position(33588,32684, 14)}, - {itemid = 7087, position = Position(33578,32688, 14)}, - {itemid = 7087, position = Position(33588,32684, 14)}, - {itemid = 7086, position = Position(33587,32690, 14)}, - {itemid = 7086, position = Position(33588,32684, 14)}, - {itemid = 7086, position = Position(33575,32688, 14)}, - {itemid = 7086, position = Position(33587,32688, 14)}, - {itemid = 7086, position = Position(33578,32688, 14)}, - {itemid = 7086, position = Position(33578,32683, 14)}, - {itemid = 7086, position = Position(33592,32684, 14)}, - {itemid = 7086, position = Position(33588,32684, 14)}, - {itemid = 7086, position = Position(33588,32695, 14)}, - {itemid = 7086, position = Position(33592,32690, 14)}, - {itemid = 7086, position = Position(33578,32692, 14)}, - {itemid = 7086, position = Position(33579,32695, 14)}, - {itemid = 7086, position = Position(33579,32686, 14)}, - {itemid = 7086, position = Position(33583,32689, 14)}, - {itemid = 7086, position = Position(33583,32696, 14)}, - {itemid = 7086, position = Position(33584,32682, 14)}, - {itemid = 7086, position = Position(33586,32686, 14)}, - {itemid = 7086, position = Position(33585,32687, 14)}, - {itemid = 7086, position = Position(33586,32692, 14)}, - {itemid = 7085, position = Position(33589,32690, 14)}, - {itemid = 7085, position = Position(33594,32687, 14)}, - {itemid = 7085, position = Position(33591,32696, 14)}, - {itemid = 7085, position = Position(33588,32686, 14)}, - {itemid = 7085, position = Position(33579,32695, 14)}, - {itemid = 7085, position = Position(33592,32684, 14)}, - {itemid = 7085, position = Position(33582,32686, 14)}, - {itemid = 7085, position = Position(33578,32692, 14)}, - {itemid = 7085, position = Position(33576,32691, 14)}, - {itemid = 7085, position = Position(33582,32681, 14)}, - {itemid = 7085, position = Position(33576,32685, 14)}, - {itemid = 7085, position = Position(33574,32690, 14)}, - {itemid = 7085, position = Position(33594,32694, 14)}, - {itemid = 7085, position = Position(33583,32684, 14)}, - {itemid = 7085, position = Position(33590,32695, 14)}, - {itemid = 7085, position = Position(33583,32687, 14)}, - {itemid = 7085, position = Position(33593,32686, 14)}, - {itemid = 7085, position = Position(33592,32688, 14)}, - {itemid = 7085, position = Position(33585,32689, 14)}, - {itemid = 7085, position = Position(33589,32692, 14)}, - {itemid = 7085, position = Position(33579,32685, 14)}, - {itemid = 7084, position = Position(33592,32690, 14)}, - {itemid = 7084, position = Position(33574,32691, 14)}, - {itemid = 7084, position = Position(33585,32690, 14)}, - {itemid = 7084, position = Position(33579,32692, 14)}, - {itemid = 7084, position = Position(33587,32692, 14)}, - {itemid = 7084, position = Position(33578,32685, 14)}, - {itemid = 7084, position = Position(33583,32689, 14)}, - {itemid = 7084, position = Position(33589,32691, 14)}, - {itemid = 7084, position = Position(33592,32686, 14)}, - {itemid = 7084, position = Position(33593,32687, 14)}, - {itemid = 7084, position = Position(33590,32696, 14)}, - {itemid = 7084, position = Position(33579,32686, 14)}, - {itemid = 7084, position = Position(33581,32681, 14)}, - {itemid = 7084, position = Position(33576,32692, 14)}, - {itemid = 7084, position = Position(33593,32694, 14)}, - {itemid = 7084, position = Position(33588,32688, 14)}, - {itemid = 7084, position = Position(33582,32687, 14)}, - {itemid = 7084, position = Position(33578,32695, 14)}, - {itemid = 7084, position = Position(33587,32690, 14)}, - {itemid = 7084, position = Position(33582,32684, 14)}, - {itemid = 7083, position = Position(33588,32688, 14)}, - {itemid = 7083, position = Position(33579,32692, 14)}, - {itemid = 7083, position = Position(33593,32684, 14)}, - {itemid = 7083, position = Position(33579,32688, 14)}, - {itemid = 7083, position = Position(33579,32683, 14)}, - {itemid = 7083, position = Position(33592,32692, 14)}, - {itemid = 7083, position = Position(33592,32686, 14)}, - {itemid = 7083, position = Position(33576,32688, 14)}, - {itemid = 7083, position = Position(33585,32696, 14)}, - {itemid = 7083, position = Position(33585,32682, 14)}, - {itemid = 7083, position = Position(33588,32686, 14)}, - {itemid = 7083, position = Position(33587,32692, 14)}, - {itemid = 7083, position = Position(33586,32687, 14)}, - {itemid = 7082, position = Position(33585,32681, 14)}, - {itemid = 7082, position = Position(33589,32693, 14)}, - {itemid = 7082, position = Position(33576,32687, 14)}, - {itemid = 7082, position = Position(33585,32688, 14)}, - {itemid = 7082, position = Position(33593,32683, 14)}, - {itemid = 7082, position = Position(33582,32683, 14)}, - {itemid = 7082, position = Position(33581,32680, 14)}, - {itemid = 7082, position = Position(33592,32690, 14)}, - {itemid = 7082, position = Position(33592,32689, 14)}, - {itemid = 7082, position = Position(33583,32690, 14)}, - {itemid = 7082, position = Position(33583,32689, 14)}, - {itemid = 7082, position = Position(33583,32688, 14)}, - {itemid = 7082, position = Position(33592,32691, 14)}, - {itemid = 7082, position = Position(33585,32680, 14)}, - {itemid = 7082, position = Position(33592,32685, 14)}, - {itemid = 7082, position = Position(33583,32697, 14)}, - {itemid = 7082, position = Position(33582,32682, 14)}, - {itemid = 7082, position = Position(33575,32689, 14)}, - {itemid = 7082, position = Position(33591,32697, 14)}, - {itemid = 7082, position = Position(33583,32700, 14)}, - {itemid = 7082, position = Position(33583,32698, 14)}, - {itemid = 7082, position = Position(33583,32699, 14)}, - {itemid = 7082, position = Position(33585,32693, 14)}, - {itemid = 7082, position = Position(33576,32686, 14)}, - {itemid = 7082, position = Position(33594,32695, 14)}, - {itemid = 7082, position = Position(33579,32691, 14)}, - {itemid = 7082, position = Position(33578,32693, 14)}, - {itemid = 7082, position = Position(33578,32694, 14)}, - {itemid = 7082, position = Position(33579,32690, 14)}, - {itemid = 7082, position = Position(33579,32687, 14)}, - {itemid = 7082, position = Position(33588,32696, 14)}, - {itemid = 7082, position = Position(33578,32684, 14)}, - {itemid = 7082, position = Position(33578,32689, 14)}, - {itemid = 7082, position = Position(33586,32693, 14)}, - {itemid = 7082, position = Position(33579,32686, 14)}, - {itemid = 7082, position = Position(33585,32695, 14)}, - {itemid = 7082, position = Position(33578,32684, 14)}, - {itemid = 7082, position = Position(33588,32687, 14)}, - {itemid = 7082, position = Position(33579,32681, 14)}, - {itemid = 7082, position = Position(33588,32685, 14)}, - {itemid = 7082, position = Position(33585,32694, 14)}, - {itemid = 7082, position = Position(33579,32682, 14)}, - {itemid = 7082, position = Position(33587,32690, 14)}, - {itemid = 7082, position = Position(33587,32689, 14)}, - {itemid = 7082, position = Position(33587,32691, 14)}, - {itemid = 7081, position = Position(33591,32684, 14)}, - {itemid = 7081, position = Position(33580,32686, 14)}, - {itemid = 7081, position = Position(33575,32685, 14)}, - {itemid = 7081, position = Position(33594,32690, 14)}, - {itemid = 7081, position = Position(33588,32692, 14)}, - {itemid = 7081, position = Position(33588,32690, 14)}, - {itemid = 7081, position = Position(33581,32692, 14)}, - {itemid = 7081, position = Position(33591,32686, 14)}, - {itemid = 7081, position = Position(33584,32689, 14)}, - {itemid = 7081, position = Position(33574,32685, 14)}, - {itemid = 7081, position = Position(33586,32690, 14)}, - {itemid = 7081, position = Position(33591,32692, 14)}, - {itemid = 7081, position = Position(33587,32692, 14)}, - {itemid = 7081, position = Position(33572,32690, 14)}, - {itemid = 7081, position = Position(33582,32692, 14)}, - {itemid = 7081, position = Position(33572,32690, 14)}, - {itemid = 7081, position = Position(33591,32688, 14)}, - {itemid = 7081, position = Position(33592,32686, 14)}, - {itemid = 7081, position = Position(33583,32692, 14)}, - {itemid = 7081, position = Position(33573,32690, 14)}, - {itemid = 7081, position = Position(33583,32690, 14)}, - {itemid = 7081, position = Position(33579,32692, 14)}, - {itemid = 7081, position = Position(33581,32686, 14)}, - {itemid = 7081, position = Position(33575,32691, 14)}, - {itemid = 7081, position = Position(33588,32688, 14)}, - {itemid = 7081, position = Position(33587,32686, 14)}, - {itemid = 7081, position = Position(33580,32692, 14)}, - {itemid = 7081, position = Position(33590,32684, 14)}, - {itemid = 7081, position = Position(33589,32695, 14)}, - {itemid = 7081, position = Position(33593,32690, 14)}, - {itemid = 7081, position = Position(33580,32695, 14)}, - {itemid = 7081, position = Position(33589,32688, 14)}, - {itemid = 7081, position = Position(33577,32692, 14)}, - {itemid = 7081, position = Position(33584,32696, 14)}, - {itemid = 7081, position = Position(33589,32684, 14)}, - {itemid = 7081, position = Position(33590,32688, 14)}, - {itemid = 7080, position = Position(33579,32687, 14)}, - {itemid = 7080, position = Position(33576,32687, 14)}, - {itemid = 7080, position = Position(33592,32685, 14)}, - {itemid = 7080, position = Position(33583,32692, 14)}, - {itemid = 7080, position = Position(33582,32683, 14)}, - {itemid = 7080, position = Position(33585,32681, 14)}, - {itemid = 7080, position = Position(33591,32697, 14)}, - {itemid = 7080, position = Position(33588,32685, 14)}, - {itemid = 7080, position = Position(33583,32698, 14)}, - {itemid = 7080, position = Position(33591,32698, 14)}, - {itemid = 7080, position = Position(33583,32697, 14)}, - {itemid = 7080, position = Position(33583,32690, 14)}, - {itemid = 7080, position = Position(33588,32686, 14)}, - {itemid = 7080, position = Position(33583,32688, 14)}, - {itemid = 7080, position = Position(33587,32689, 14)}, - {itemid = 7080, position = Position(33579,32682, 14)}, - {itemid = 7080, position = Position(33594,32688, 14)}, - {itemid = 7080, position = Position(33583,32685, 14)}, - {itemid = 7080, position = Position(33578,32693, 14)}, - {itemid = 7080, position = Position(33592,32691, 14)}, - {itemid = 7080, position = Position(33585,32694, 14)}, - {itemid = 7080, position = Position(33578,32694, 14)}, - {itemid = 7080, position = Position(33587,32691, 14)}, - {itemid = 7080, position = Position(33592,32689, 14)}, - {itemid = 7080, position = Position(33585,32695, 14)}, - {itemid = 7080, position = Position(33583,32699, 14)}, - {itemid = 7080, position = Position(33579,32691, 14)}, - {itemid = 7080, position = Position(33583,32700, 14)}, - {itemid = 7080, position = Position(33584,32683, 14)}, - {itemid = 7080, position = Position(33582,32682, 14)}, - {itemid = 7080, position = Position(33581,32680, 14)}, - {itemid = 7080, position = Position(33579,32696, 14)}, - {itemid = 7080, position = Position(33593,32693, 14)}, - {itemid = 7080, position = Position(33576,32686, 14)}, - {itemid = 7080, position = Position(33578,32684, 14)}, - {itemid = 7080, position = Position(33588,32687, 14)}, - {itemid = 7080, position = Position(33594,32695, 14)}, - {itemid = 7080, position = Position(33578,32684, 14)}, - {itemid = 7079, position = Position(33577,32692, 14)}, - {itemid = 7079, position = Position(33572,32690, 14)}, - {itemid = 7079, position = Position(33575,32685, 14)}, - {itemid = 7079, position = Position(33584,32689, 14)}, - {itemid = 7079, position = Position(33584,32696, 14)}, - {itemid = 7079, position = Position(33589,32684, 14)}, - {itemid = 7079, position = Position(33581,32686, 14)}, - {itemid = 7079, position = Position(33572,32690, 14)}, - {itemid = 7079, position = Position(33590,32691, 14)}, - {itemid = 7079, position = Position(33588,32690, 14)}, - {itemid = 7079, position = Position(33589,32688, 14)}, - {itemid = 7079, position = Position(33588,32692, 14)}, - {itemid = 7079, position = Position(33581,32692, 14)}, - {itemid = 7079, position = Position(33580,32692, 14)}, - {itemid = 7079, position = Position(33590,32688, 14)}, - {itemid = 7079, position = Position(33578,32692, 14)}, - {itemid = 7079, position = Position(33590,32684, 14)}, - {itemid = 7079, position = Position(33583,32692, 14)}, - {itemid = 7079, position = Position(33591,32688, 14)}, - {itemid = 7079, position = Position(33593,32690, 14)}, - {itemid = 7079, position = Position(33587,32686, 14)}, - {itemid = 7079, position = Position(33580,32686, 14)}, - {itemid = 7079, position = Position(33573,32690, 14)}, - {itemid = 7079, position = Position(33579,32695, 14)}, - {itemid = 7079, position = Position(33575,32691, 14)}, - {itemid = 7079, position = Position(33574,32685, 14)}, - {itemid = 7079, position = Position(33589,32695, 14)}, - {itemid = 7079, position = Position(33591,32684, 14)}, - {itemid = 7079, position = Position(33592,32684, 14)}, - {itemid = 4479, position = Position(33591,32699, 14)}, - {itemid = 4479, position = Position(33596,32695, 14)}, - {itemid = 4479, position = Position(33589,32700, 14)}, - {itemid = 4479, position = Position(33597,32693, 14)}, - {itemid = 4479, position = Position(33595,32696, 14)}, - {itemid = 4479, position = Position(33593,32698, 14)}, - {itemid = 4479, position = Position(33594,32697, 14)}, - {itemid = 4478, position = Position(33586,32679, 14)}, - {itemid = 4478, position = Position(33590,32680, 14)}, - {itemid = 4478, position = Position(33593,32682, 14)}, - {itemid = 4478, position = Position(33597,32687, 14)}, - {itemid = 4478, position = Position(33596,32685, 14)}, - {itemid = 4478, position = Position(33595,32684, 14)}, - {itemid = 4478, position = Position(33594,32683, 14)}, - {itemid = 4478, position = Position(33591,32681, 14)}, - {itemid = 4477, position = Position(33572,32692, 14)}, - {itemid = 4477, position = Position(33574,32695, 14)}, - {itemid = 4477, position = Position(33575,32696, 14)}, - {itemid = 4477, position = Position(33576,32697, 14)}, - {itemid = 4477, position = Position(33577,32698, 14)}, - {itemid = 4477, position = Position(33581,32700, 14)}, - {itemid = 4477, position = Position(33579,32699, 14)}, - {itemid = 4477, position = Position(33572,32692, 14)}, - {itemid = 4477, position = Position(33573,32694, 14)}, - {itemid = 4476, position = Position(33572,32688, 14)}, - {itemid = 4476, position = Position(33574,32684, 14)}, - {itemid = 4476, position = Position(33572,32688, 14)}, - {itemid = 4476, position = Position(33578,32681, 14)}, - {itemid = 4476, position = Position(33573,32686, 14)}, - {itemid = 4476, position = Position(33581,32679, 14)}, - {itemid = 4476, position = Position(33575,32683, 14)}, - {itemid = 4476, position = Position(33573,32686, 14)}, - {itemid = 4476, position = Position(33579,32680, 14)}, - {itemid = 4476, position = Position(33576,32682, 14)}, - {itemid = 4475, position = Position(33581,32680, 14)}, - {itemid = 4475, position = Position(33573,32688, 14)}, - {itemid = 4475, position = Position(33578,32682, 14)}, - {itemid = 4475, position = Position(33579,32681, 14)}, - {itemid = 4475, position = Position(33576,32683, 14)}, - {itemid = 4475, position = Position(33573,32688, 14)}, - {itemid = 4475, position = Position(33574,32686, 14)}, - {itemid = 4475, position = Position(33575,32684, 14)}, - {itemid = 4474, position = Position(33586,32680, 14)}, - {itemid = 4474, position = Position(33593,32683, 14)}, - {itemid = 4474, position = Position(33594,32684, 14)}, - {itemid = 4474, position = Position(33596,32687, 14)}, - {itemid = 4474, position = Position(33595,32685, 14)}, - {itemid = 4474, position = Position(33591,32682, 14)}, - {itemid = 4474, position = Position(33590,32681, 14)}, - {itemid = 4473, position = Position(33581,32699, 14)}, - {itemid = 4473, position = Position(33574,32694, 14)}, - {itemid = 4473, position = Position(33573,32692, 14)}, - {itemid = 4473, position = Position(33576,32696, 14)}, - {itemid = 4473, position = Position(33577,32697, 14)}, - {itemid = 4473, position = Position(33579,32698, 14)}, - {itemid = 4473, position = Position(33575,32695, 14)}, - {itemid = 4472, position = Position(33572,32691, 14)}, - {itemid = 4472, position = Position(33574,32685, 14)}, - {itemid = 4472, position = Position(33573,32687, 14)}, - {itemid = 4472, position = Position(33573,32687, 14)}, - {itemid = 4472, position = Position(33572,32690, 14)}, - {itemid = 4472, position = Position(33573,32693, 14)}, - {itemid = 4472, position = Position(33572,32690, 14)}, - {itemid = 4472, position = Position(33572,32689, 14)}, - {itemid = 4472, position = Position(33572,32689, 14)}, - {itemid = 4472, position = Position(33572,32691, 14)}, - {itemid = 4471, position = Position(33587,32680, 14)}, - {itemid = 4471, position = Position(33589,32680, 14)}, - {itemid = 4471, position = Position(33588,32680, 14)}, - {itemid = 4471, position = Position(33585,32679, 14)}, - {itemid = 4471, position = Position(33577,32682, 14)}, - {itemid = 4471, position = Position(33584,32679, 14)}, - {itemid = 4471, position = Position(33582,32679, 14)}, - {itemid = 4471, position = Position(33583,32679, 14)}, - {itemid = 4471, position = Position(33592,32682, 14)}, - {itemid = 4471, position = Position(33580,32680, 14)}, - {itemid = 4470, position = Position(33589,32699, 14)}, - {itemid = 4470, position = Position(33594,32696, 14)}, - {itemid = 4470, position = Position(33591,32698, 14)}, - {itemid = 4470, position = Position(33596,32693, 14)}, - {itemid = 4470, position = Position(33593,32697, 14)}, - {itemid = 4470, position = Position(33595,32695, 14)}, - {itemid = 4469, position = Position(33586,32700, 14)}, - {itemid = 4469, position = Position(33590,32699, 14)}, - {itemid = 4469, position = Position(33584,32700, 14)}, - {itemid = 4469, position = Position(33583,32700, 14)}, - {itemid = 4469, position = Position(33580,32699, 14)}, - {itemid = 4469, position = Position(33592,32698, 14)}, - {itemid = 4469, position = Position(33578,32698, 14)}, - {itemid = 4469, position = Position(33582,32700, 14)}, - {itemid = 4469, position = Position(33588,32700, 14)}, - {itemid = 4469, position = Position(33585,32700, 14)}, - {itemid = 4469, position = Position(33587,32700, 14)}, - {itemid = 4468, position = Position(33597,32692, 14)}, - {itemid = 4468, position = Position(33597,32688, 14)}, - {itemid = 4468, position = Position(33596,32686, 14)}, - {itemid = 4468, position = Position(33596,32694, 14)}, - {itemid = 4468, position = Position(33597,32691, 14)}, - {itemid = 4468, position = Position(33597,32689, 14)}, - {itemid = 4468, position = Position(33597,32690, 14)}, - {itemid = 4466, position = Position(33596,32695, 14)}, - {itemid = 4458, position = Position(33584,32700, 14)}, - {itemid = 4458, position = Position(33585,32700, 14)}, - {itemid = 3623, position = Position(33588,32691, 14)}, - {itemid = 3623, position = Position(33595,32686, 14)}, - {itemid = 3622, position = Position(33586,32686, 14)}, - {itemid = 3622, position = Position(33583,32694, 14)}, - {itemid = 3622, position = Position(33591,32686, 14)}, - {itemid = 3622, position = Position(33581,32695, 14)}, - {itemid = 3622, position = Position(33592,32689, 14)}, - {itemid = 3621, position = Position(33581,32683, 14)}, - {itemid = 3621, position = Position(33591,32697, 14)}, - {itemid = 3614, position = Position(33579,32685, 14)}, - {itemid = 3614, position = Position(33578,32688, 14)}, - {itemid = 3614, position = Position(33593,32683, 14)}, - {itemid = 3614, position = Position(33579,32694, 14)}, - {itemid = 3613, position = Position(33592,32696, 14)}, - {itemid = 3613, position = Position(33585,32683, 14)}, - {itemid = 3613, position = Position(33586,32696, 14)}, - {itemid = 3613, position = Position(33582,32680, 14)}, - {itemid = 3612, position = Position(33588,32695, 14)}, - {itemid = 3612, position = Position(33579,32682, 14)}, - {itemid = 3612, position = Position(33596,32690, 14)}, - {itemid = 3612, position = Position(33583,32687, 14)}, - {itemid = 3612, position = Position(33582,32694, 14)}, - {itemid = 3611, position = Position(33591,32683, 14)}, - {itemid = 3611, position = Position(33577,32688, 14)}, - {itemid = 3611, position = Position(33578,32691, 14)}, - {itemid = 3611, position = Position(33590,32696, 14)}, - {itemid = 3611, position = Position(33588,32689, 14)}, - {itemid = 3611, position = Position(33577,32682, 14)}, - {itemid = 3611, position = Position(33583,32682, 14)}, - {itemid = 3611, position = Position(33590,32691, 14)}, - {itemid = 3611, position = Position(33575,32689, 14)}, - {itemid = 3610, position = Position(33581,32689, 14)} -} - -local function revertLava() - for i = 1, #itemsRoom do - local item = itemsRoom[i] - if isInArray(tiles, item.itemid) then - local ground = Tile(item.position):getGround() - local transformid = item.itemid - if ground then - ground:transform(transformid) - ground:setActionId(34201) - end - else - local tp = Game.createItem(item.itemid, 1, item.position) - tp:setActionId(34201) - end - end - return true -end -local function lavaGrounds (cid) - local creature = Creature(cid) - if not creature then return true end - local summoncount = creature:getSummons() - if #summoncount < 4 then - for i = 1, 4 do - local mid = Game.createMonster("Rage of Mazoran", Position(math.random(33576, 33593), math.random(32684, 32695), 14), true, true) - if not mid then - return - end - mid:setMaster(creature) - end - end - for x = 33572, 33598 do - for y = 32679, 32701 do - local position = Position(x, y, 14) - local tile = Tile(position) - if not tile then - return - end - local ground = tile:getGround() - if not ground then - return - end - local grounds = ground:getId() - if grounds ~= 919 then - local items = tile:getItems() - for i = 1, #items do - local item = items[i] - local itemId = item:getId() - if not isInArray(Montains, itemId) then - item:remove() - end - end - ground:transform(23863) - ground:setActionId(34200) - end - end - end - addEvent(revertLava, 5 * 1000) -end -function onCastSpell(creature, var) - creature:say('THE GROUND BEGINS TO HEAT UP RAPIDLY!', TALKTYPE_MONSTER_YELL) - addEvent(lavaGrounds, 3 * 1000, creature:getId()) - return -end diff --git a/data/spells/scripts/monster/mazoran summon.lua b/data/spells/scripts/monster/mazoran summon.lua deleted file mode 100644 index f20b733df..000000000 --- a/data/spells/scripts/monster/mazoran summon.lua +++ /dev/null @@ -1,13 +0,0 @@ -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 4 then - for i = 1, 4 do - local mid = Game.createMonster("Rage of Mazoran", Position(math.random(33576, 33593), math.random(32684, 32695), 14), true, true) - if not mid then - return - end - mid:setMaster(creature) - end - end - return -end diff --git a/data/spells/scripts/monster/medusa paralyze.lua b/data/spells/scripts/monster/medusa paralyze.lua deleted file mode 100644 index 76a43416e..000000000 --- a/data/spells/scripts/monster/medusa paralyze.lua +++ /dev/null @@ -1,33 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.45, 0, -0.5, 0) -combat:addCondition(condition) - -arr = { -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -} - -local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/mephiles skill reducer.lua b/data/spells/scripts/monster/mephiles skill reducer.lua deleted file mode 100644 index 241ad6459..000000000 --- a/data/spells/scripts/monster/mephiles skill reducer.lua +++ /dev/null @@ -1,20 +0,0 @@ -local combat = {} - -for i = 80, 95 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 6000) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - - local area = createCombatArea(AREA_BEAM1) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(80, 95)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/mephiles summon.lua b/data/spells/scripts/monster/mephiles summon.lua deleted file mode 100644 index 87a89bce7..000000000 --- a/data/spells/scripts/monster/mephiles summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Fire Devil", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/metal gargoyle curse.lua b/data/spells/scripts/monster/metal gargoyle curse.lua deleted file mode 100644 index ac9aa610d..000000000 --- a/data/spells/scripts/monster/metal gargoyle curse.lua +++ /dev/null @@ -1,23 +0,0 @@ -local combat = {} - -for i = 2.32, 2.32 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for j = 1, 23 do - damage = damage * 1.2 - condition:addDamage(1, 4000, -damage) - end - - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(2.32, 2.32)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/mindmasher drown.lua b/data/spells/scripts/monster/mindmasher drown.lua deleted file mode 100644 index c9c03be38..000000000 --- a/data/spells/scripts/monster/mindmasher drown.lua +++ /dev/null @@ -1,12 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BUBBLES) - -local condition = Condition(CONDITION_DROWN) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(20, 5000, -20) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/mindmasher summon.lua b/data/spells/scripts/monster/mindmasher summon.lua deleted file mode 100644 index 80d2bb099..000000000 --- a/data/spells/scripts/monster/mindmasher summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 4 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 4 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Mindmasher summon", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/minotaur amazon paralyze.lua b/data/spells/scripts/monster/minotaur amazon paralyze.lua deleted file mode 100644 index ee47404e2..000000000 --- a/data/spells/scripts/monster/minotaur amazon paralyze.lua +++ /dev/null @@ -1,23 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, 3) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 10000) -condition:setFormula(-0.4, 0, -0.7, 0) -combat:addCondition(condition) - - arr = { - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/minotaur wallbreaker walkthrough.lua b/data/spells/scripts/monster/minotaur wallbreaker walkthrough.lua deleted file mode 100644 index 5637b0378..000000000 --- a/data/spells/scripts/monster/minotaur wallbreaker walkthrough.lua +++ /dev/null @@ -1,34 +0,0 @@ -local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) -condition:setParameter(CONDITION_PARAM_SUBID, 88888) -condition:setParameter(CONDITION_PARAM_TICKS, 10 * 1000) -condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) -condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 10 * 1000) - -local function changeSpeeds(cid, var) - local creature = Creature(cid) - if not creature then - return - end - creature:changeSpeed(creature:getBaseSpeed()) -end - -function onCastSpell(creature, var) - local nextPosition = creature:getPosition() - local speed = creature:getSpeed() - local tile = Tile(nextPosition.x - 1, nextPosition.y, nextPosition.z) - local topCreature = tile:getTopCreature() - if not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then - creature:addCondition(condition) - creature:teleportTo(Position(nextPosition.x - 1, nextPosition.y, nextPosition.z), true) - creature:changeSpeed(-speed) - addEvent(changeSpeeds, 11 * 1000, creature:getId(), var) - if not topCreature then - return - end - if topCreature:isPlayer() then - topCreature:teleportTo(Position(nextPosition.x - 3, nextPosition.y, nextPosition.z), true) - else - end - end - return true -end diff --git a/data/spells/scripts/monster/monstor summon.lua b/data/spells/scripts/monster/monstor summon.lua deleted file mode 100644 index 23efaeefb..000000000 --- a/data/spells/scripts/monster/monstor summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) - -local area = createCombatArea(AREA_CIRCLE3X3) -combat:setArea(area) - -local maxsummons = 3 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 3 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Acid Blob", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/mooh'tah master skill reducer.lua b/data/spells/scripts/monster/mooh'tah master skill reducer.lua deleted file mode 100644 index 3004ecd02..000000000 --- a/data/spells/scripts/monster/mooh'tah master skill reducer.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 3000) - condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, -100) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/morgaroth paralyze.lua b/data/spells/scripts/monster/morgaroth paralyze.lua deleted file mode 100644 index 6e9d5079d..000000000 --- a/data/spells/scripts/monster/morgaroth paralyze.lua +++ /dev/null @@ -1,31 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_RED) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 30000) - condition:setFormula(-0.7, 0, -0.9, 0) - combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/morgaroth skill reducer 1.lua b/data/spells/scripts/monster/morgaroth skill reducer 1.lua deleted file mode 100644 index 3fd9159c1..000000000 --- a/data/spells/scripts/monster/morgaroth skill reducer 1.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = {} - -for i = 15, 30 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 15000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE3X3) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(15, 30)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/morgaroth skill reducer 2.lua b/data/spells/scripts/monster/morgaroth skill reducer 2.lua deleted file mode 100644 index 8d8e64dae..000000000 --- a/data/spells/scripts/monster/morgaroth skill reducer 2.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = {} - -for i = 15, 30 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 15000) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(15, 30)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/morgaroth summon.lua b/data/spells/scripts/monster/morgaroth summon.lua deleted file mode 100644 index 75d05307b..000000000 --- a/data/spells/scripts/monster/morgaroth summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 4 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 4 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Demon2", { x=creature:getPosition().x+math.random(-2, 2), y=creature:getPosition().y+math.random(-2, 2), z=creature:getPosition().z }) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/morik the gladiator summon.lua b/data/spells/scripts/monster/morik the gladiator summon.lua deleted file mode 100644 index 7802a74d9..000000000 --- a/data/spells/scripts/monster/morik the gladiator summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_GREEN) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Gladiator", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/mummy paralyze.lua b/data/spells/scripts/monster/mummy paralyze.lua deleted file mode 100644 index ee4ad1b11..000000000 --- a/data/spells/scripts/monster/mummy paralyze.lua +++ /dev/null @@ -1,11 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.7, 0, -0.85, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/munster summon.lua b/data/spells/scripts/monster/munster summon.lua deleted file mode 100644 index 568ded573..000000000 --- a/data/spells/scripts/monster/munster summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Rat", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/mutated bat curse.lua b/data/spells/scripts/monster/mutated bat curse.lua deleted file mode 100644 index 333319f77..000000000 --- a/data/spells/scripts/monster/mutated bat curse.lua +++ /dev/null @@ -1,38 +0,0 @@ -local combat = {} - -for i = 2, 4 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for j = 1, 9 do - damage = damage * 1.2 - condition:addDamage(1, 4000, -damage) - end - - local area = createCombatArea({ - {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - }) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(2, 4)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/mutated human paralyze.lua b/data/spells/scripts/monster/mutated human paralyze.lua deleted file mode 100644 index dc85f869a..000000000 --- a/data/spells/scripts/monster/mutated human paralyze.lua +++ /dev/null @@ -1,11 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 5000) - condition:setFormula(-0.05, 0, -0.15, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/mutated rat paralyze.lua b/data/spells/scripts/monster/mutated rat paralyze.lua deleted file mode 100644 index dfbf72c79..000000000 --- a/data/spells/scripts/monster/mutated rat paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.2, 0, -0.45, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/nightstalker paralyze.lua b/data/spells/scripts/monster/nightstalker paralyze.lua deleted file mode 100644 index 10e91fc0f..000000000 --- a/data/spells/scripts/monster/nightstalker paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SLEEP) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.7, 0, -0.9, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/obujos skill reducer 1.lua b/data/spells/scripts/monster/obujos skill reducer 1.lua deleted file mode 100644 index cfea1d0a8..000000000 --- a/data/spells/scripts/monster/obujos skill reducer 1.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = {} - -for i = 35, 50 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 15000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(35, 50)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/obujos skill reducer 2.lua b/data/spells/scripts/monster/obujos skill reducer 2.lua deleted file mode 100644 index c47a49ce7..000000000 --- a/data/spells/scripts/monster/obujos skill reducer 2.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = {} - -for i = 35, 60 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 15000) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(35, 60)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ocyakao freeze.lua b/data/spells/scripts/monster/ocyakao freeze.lua deleted file mode 100644 index be8320db4..000000000 --- a/data/spells/scripts/monster/ocyakao freeze.lua +++ /dev/null @@ -1,15 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA) - - local condition = Condition(CONDITION_FREEZING) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - condition:addDamage(25, 8000, -8) - combat:addCondition(condition) - - local area = createCombatArea(AREA_CIRCLE3X3) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/omrafir beam.lua b/data/spells/scripts/monster/omrafir beam.lua deleted file mode 100644 index 164e55def..000000000 --- a/data/spells/scripts/monster/omrafir beam.lua +++ /dev/null @@ -1,127 +0,0 @@ -local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) -condition:setParameter(CONDITION_PARAM_SUBID, 88888) -condition:setParameter(CONDITION_PARAM_TICKS, 5 * 1000) -condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) -condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 5 * 1000) - -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) -combat:setFormula(COMBAT_FORMULA_DAMAGE, -7000, 0, -10000, 0) - - arr1 = { -{0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -} - -local area1 = createCombatArea(arr1) -combat:setArea(area1) - ------------------------------------------------------------------------------ - -local combat2 = Combat() -combat2:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat2:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) -combat2:setFormula(COMBAT_FORMULA_DAMAGE, -7000, 0, -10000, 0) - - arr2 = { -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -} - -local area2 = createCombatArea(arr2) -combat2:setArea(area2) - --------------------------------------------------------------------------- - -local combat3 = Combat() -combat3:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat3:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) -combat3:setFormula(COMBAT_FORMULA_DAMAGE, -7000, 0, -10000, 0) - - arr3 = { -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -} - -local area3 = createCombatArea(arr3) -combat3:setArea(area3) - --------------------------------------------------------------------------- - -local combat4 = Combat() -combat4:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat4:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) -combat4:setFormula(COMBAT_FORMULA_DAMAGE, -7000, 0, -10000, 0) - - arr4 = { -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -} - -local area4 = createCombatArea(arr4) -combat4:setArea(area4) - --------------------------------------------------------------- - -function onCastSpell(creature, var) - if not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then - creature:say("OMRAFIR INHALES DEEPLY!", TALKTYPE_ORANGE_2) - creature:addCondition(condition) - addEvent(function(cid, var) - local creature = Creature(cid) - if not creature then - return - end - if creature:getDirection() == 0 then - combat:execute(creature, positionToVariant(creature:getPosition())) - elseif creature:getDirection() == 1 then - combat2:execute(creature, positionToVariant(creature:getPosition())) - elseif creature:getDirection() == 2 then - combat3:execute(creature, positionToVariant(creature:getPosition())) - elseif creature:getDirection() == 3 then - combat4:execute(creature, positionToVariant(creature:getPosition())) - end - creature:say("OMRAFIR BREATHES INFERNAL FIRE", TALKTYPE_ORANGE_2) -end, 4000, creature:getId(), var) - else - return - end - return true -end diff --git a/data/spells/scripts/monster/omrafir healing 2.lua b/data/spells/scripts/monster/omrafir healing 2.lua deleted file mode 100644 index ac0c6974d..000000000 --- a/data/spells/scripts/monster/omrafir healing 2.lua +++ /dev/null @@ -1,16 +0,0 @@ -function onCastSpell(creature, var) -local health, hp, cpos = math.random(7500, 9000), (creature:getHealth()/creature:getMaxHealth())*100, creature:getPosition() - - if creature:getName() == "Omrafir" and (hp < 99.99) then - local t = Tile(cpos) - if t == nil then - return - end - if t:getItemById(1487) or t:getItemById(1492) or t:getItemById(1500) then - creature:addHealth(health) - cpos:sendMagicEffect(CONST_ME_MAGIC_BLUE) - creature:say("Omrafir gains new strength from the fire", TALKTYPE_ORANGE_1) - else - end - end -end diff --git a/data/spells/scripts/monster/omrafir summon.lua b/data/spells/scripts/monster/omrafir summon.lua deleted file mode 100644 index dc63b955e..000000000 --- a/data/spells/scripts/monster/omrafir summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) - -local area = createCombatArea(AREA_CIRCLE3X3) -combat:setArea(area) - -local maxsummons = 4 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 4 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Flame Of Omrafir", { x=creature:getPosition().x+math.random(-2, 2), y=creature:getPosition().y+math.random(-2, 2), z=creature:getPosition().z }) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/omrafir wave.lua b/data/spells/scripts/monster/omrafir wave.lua deleted file mode 100644 index 14fdbcf04..000000000 --- a/data/spells/scripts/monster/omrafir wave.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/orewalker skill reducer 1.lua b/data/spells/scripts/monster/orewalker skill reducer 1.lua deleted file mode 100644 index 8f97b361c..000000000 --- a/data/spells/scripts/monster/orewalker skill reducer 1.lua +++ /dev/null @@ -1,26 +0,0 @@ -local combat = {} - -for i = 25, 45 do -combat[i] = Combat() -combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) - -local condition = Condition(CONDITION_ATTRIBUTES) -condition:setParameter(CONDITION_PARAM_TICKS, 15000) -condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - -local area = createCombatArea({ - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - }) - -combat[i]:setArea(area) -combat[i]:addCondition(condition) - -end - -function onCastSpell(creature, var) - return combat[math.random(25, 45)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/orewalker wave.lua b/data/spells/scripts/monster/orewalker wave.lua deleted file mode 100644 index 5a0b00b0e..000000000 --- a/data/spells/scripts/monster/orewalker wave.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_MANADRAIN) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/orshabaal skill reducer.lua b/data/spells/scripts/monster/orshabaal skill reducer.lua deleted file mode 100644 index be083e157..000000000 --- a/data/spells/scripts/monster/orshabaal skill reducer.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = {} - -for i = 30, 40 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE3X3) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(30, 40)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/outburst explode.lua b/data/spells/scripts/monster/outburst explode.lua deleted file mode 100644 index fb0ba5d83..000000000 --- a/data/spells/scripts/monster/outburst explode.lua +++ /dev/null @@ -1,75 +0,0 @@ -local function outExplode() - local upConer = {x = 32223, y = 31273, z = 14} -- upLeftCorner - local downConer = {x = 32246, y = 31297, z = 14} -- downRightCorner - - for i=upConer.x, downConer.x do - for j=upConer.y, downConer.y do - for k= upConer.z, downConer.z do - local room = {x=i, y=j, z=k} - local tile = Tile(room) - if tile then - local creatures = tile:getCreatures() - if creatures and #creatures > 0 then - for _, c in pairs(creatures) do - if isPlayer(c) then - c:teleportTo({x = 32234, y = 31280, z = 14}) - elseif isMonster(c) and c:getName() == "Charging Outburst" then - c:teleportTo({x = 32234, y = 31279, z = 14}) - end - end - end - end - end - end - end -end - -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) - -arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -} - -local area = createCombatArea(arr) -combat:setArea(area) - -local function delayedCastSpell(creature, var) - if not creature then - return - end - return combat:execute(creature, positionToVariant(creature:getPosition())) -end - -function removeOutburst(cid) - local creature = Creature(cid) - if not isCreature(creature) then return false end - creature:remove() -end - -function onCastSpell(creature, var) - local from = creature:getId() - - outExplode() - delayedCastSpell(creature, var) - chargingOutKilled = true - addEvent(removeOutburst, 1000, creature.uid) - - local monster = Game.createMonster("Outburst", {x = 32234, y = 31284, z = 14}, false, true) - monster:addHealth(-monster:getHealth() + outburstHealth, COMBAT_PHYSICALDAMAGE) - transferBossPoints(from, monster:getId()) - return true -end diff --git a/data/spells/scripts/monster/phantasm drown.lua b/data/spells/scripts/monster/phantasm drown.lua deleted file mode 100644 index 14c826626..000000000 --- a/data/spells/scripts/monster/phantasm drown.lua +++ /dev/null @@ -1,24 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) - -local condition = Condition(CONDITION_DROWN) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(20, 5000, -20) - -local area = createCombatArea({ - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0} -}) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/pirate corsair skill reducer.lua b/data/spells/scripts/monster/pirate corsair skill reducer.lua deleted file mode 100644 index 5e4d3a58d..000000000 --- a/data/spells/scripts/monster/pirate corsair skill reducer.lua +++ /dev/null @@ -1,20 +0,0 @@ -local combat = {} - -for i = 25, 55 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_PURPLE) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 7000) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - - local area = createCombatArea(AREA_BEAM1) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(25, 55)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/pixie skill reducer.lua b/data/spells/scripts/monster/pixie skill reducer.lua deleted file mode 100644 index fa9cfd564..000000000 --- a/data/spells/scripts/monster/pixie skill reducer.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PIXIE_EXPLOSION) - -local condition = Condition(CONDITION_ATTRIBUTES) -condition:setParameter(CONDITION_PARAM_TICKS, 6000) -condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, 30) -condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, 30) -condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, 30) - -local area = createCombatArea(AREA_CIRCLE2X2) - -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/plagirath bog.lua b/data/spells/scripts/monster/plagirath bog.lua deleted file mode 100644 index 295324212..000000000 --- a/data/spells/scripts/monster/plagirath bog.lua +++ /dev/null @@ -1,58 +0,0 @@ -local combat2 = Combat() -combat2:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) -combat2:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISON) -combat2:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) - - -arr = { -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -} - -local area = createCombatArea(arr) -combat2:setArea(area) - -function onGetFormulaValues(player, level, maglevel) - min = -1500 - max = -1500 - return min, max -end - -combat2:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -local function spellDamage(cid, target, var) - local creature = Creature(cid) - local target = Creature(target) - if not creature or not target then - return - end - if creature:getHealth() >= 1 and creature:getPosition():getDistance(target:getPosition()) < 20 then - return combat2:execute(creature, var) - end -end - -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) - -local condition = Condition(CONDITION_OUTFIT) -condition:setParameter(CONDITION_PARAM_TICKS, 10000) -condition:setOutfit({lookType = 299}) -combat:addCondition(condition) - -function onCastSpell(creature, var) - local target = creature:getTarget() - addEvent(spellDamage, 10 * 1000, creature:getId(), target:getId(), var) - return combat:execute(creature, var) -end \ No newline at end of file diff --git a/data/spells/scripts/monster/plagirath heal.lua b/data/spells/scripts/monster/plagirath heal.lua deleted file mode 100644 index 25490527f..000000000 --- a/data/spells/scripts/monster/plagirath heal.lua +++ /dev/null @@ -1,42 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -arr = { - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onTargetCreature(creature, target) - local min = 300 - local max = 700 - - local master = target:getMaster() - if target:isPlayer() and not master - or master and master:isPlayer() then - return true - end - - doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/plagirath summon.lua b/data/spells/scripts/monster/plagirath summon.lua deleted file mode 100644 index d5af28f4c..000000000 --- a/data/spells/scripts/monster/plagirath summon.lua +++ /dev/null @@ -1,14 +0,0 @@ -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - local maxsummons = 4 - if #summoncount < 4 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Disgusting Ooze", Position(math.random(33163, 33180), math.random(31497, 31506), 13), true, true) - if not mid then - return - end - mid:setMaster(creature) - end - end - return -end diff --git a/data/spells/scripts/monster/plaguesmith paralyze.lua b/data/spells/scripts/monster/plaguesmith paralyze.lua deleted file mode 100644 index c3ac4df83..000000000 --- a/data/spells/scripts/monster/plaguesmith paralyze.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.7, 0, -0.85, 0) -combat:addCondition(condition) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/plaguesmith wave.lua b/data/spells/scripts/monster/plaguesmith wave.lua deleted file mode 100644 index d022965a6..000000000 --- a/data/spells/scripts/monster/plaguesmith wave.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_LIFEDRAINDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_YELLOW_RINGS) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/priestess firering.lua b/data/spells/scripts/monster/priestess firering.lua deleted file mode 100644 index d97e6a9b4..000000000 --- a/data/spells/scripts/monster/priestess firering.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) -combat:setParameter(COMBAT_PARAM_SHOOT_EFFECT, CONST_ANI_FIRE) -arr = { -{1, 0, 1}, -{0, 2, 0}, -{1, 0, 1} -} - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/prince drazzak druid.lua b/data/spells/scripts/monster/prince drazzak druid.lua deleted file mode 100644 index c2445b747..000000000 --- a/data/spells/scripts/monster/prince drazzak druid.lua +++ /dev/null @@ -1,79 +0,0 @@ -local storage = 674531 - -local area = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -} - -local createArea = createCombatArea(area) - -local combat = Combat() -combat:setArea(createArea) - -function onTargetTile(creature, pos) - local creatureTable = {} - local n, i = Tile({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 - if n ~= 0 then - local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid - while v ~= 0 do - if isCreature(v) == true then - table.insert(creatureTable, v) - if n == #creatureTable then - break - end - end - i = i + 1 - v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid - end - end - if #creatureTable ~= nil and #creatureTable > 0 then - for r = 1, #creatureTable do - if creatureTable[r] ~= creature then - local min = 4000 - local max = 8000 - local player = Player(creatureTable[r]) - - if isPlayer(creatureTable[r]) == true - and table.contains({VOCATION.BASE_ID.DRUID}, player:getVocation():getBaseId()) then - doTargetCombatHealth(creature, creatureTable[r], COMBAT_POISONDAMAGE, -min, -max, CONST_ME_NONE) - elseif isMonster(creatureTable[r]) == true then - doTargetCombatHealth(creature, creatureTable[r], COMBAT_POISONDAMAGE, -min, -max, CONST_ME_NONE) - end - end - end - end - pos:sendMagicEffect(CONST_ME_POISONAREA) - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") - -local function delayedCastSpell(cid, var) - local creature = Creature(cid) - if not creature then - return - end - creature:say("DIE!", TALKTYPE_ORANGE_1) - return combat:execute(creature, positionToVariant(creature:getPosition())) -end - -function onCastSpell(creature, var) - local value = Game.getStorageValue(storage) - if(os.time()-value >= 4) then - creature:say("All DRUIDS must DIE!", TALKTYPE_ORANGE_1) - addEvent(delayedCastSpell, 4000, creature:getId(), var) - Game.setStorageValue(storage, os.time()) - end - return true -end diff --git a/data/spells/scripts/monster/prince drazzak knight.lua b/data/spells/scripts/monster/prince drazzak knight.lua deleted file mode 100644 index dc6e2e137..000000000 --- a/data/spells/scripts/monster/prince drazzak knight.lua +++ /dev/null @@ -1,63 +0,0 @@ -local storage = 674531 - -local area = createCombatArea(AREA_CIRCLE3X3) - -local combat = Combat() -combat:setArea(area) - -function onTargetTile(creature, pos) - local creatureTable = {} - local n, i = Tile({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 - if n ~= 0 then - local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid - while v ~= 0 do - if isCreature(v) == true then - table.insert(creatureTable, v) - if n == #creatureTable then - break - end - end - i = i + 1 - v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid - end - end - if #creatureTable ~= nil and #creatureTable > 0 then - for r = 1, #creatureTable do - if creatureTable[r] ~= creature then - local min = 4000 - local max = 8000 - local player = Player(creatureTable[r]) - - if isPlayer(creatureTable[r]) == true - and table.contains({VOCATION.BASE_ID.KNIGHT}, player:getVocation():getBaseId()) then - doTargetCombatHealth(creature, creatureTable[r], COMBAT_FIREDAMAGE, -min, -max, CONST_ME_NONE) - elseif isMonster(creatureTable[r]) == true then - doTargetCombatHealth(creature, creatureTable[r], COMBAT_FIREDAMAGE, -min, -max, CONST_ME_NONE) - end - end - end - end - pos:sendMagicEffect(CONST_ME_HITBYFIRE) - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") - -local function delayedCastSpell(cid, var) - local creature = Creature(cid) - if not creature then - return - end - creature:say("DIE!", TALKTYPE_ORANGE_1) - return combat:execute(creature, positionToVariant(creature:getPosition())) -end - -function onCastSpell(creature, var) -local value = Game.getStorageValue(storage) - if(os.time()-value >= 4) then - creature:say("All KNIGHTS must DIE!", TALKTYPE_ORANGE_1) - addEvent(delayedCastSpell, 4000, creature:getId(), var) - Game.setStorageValue(storage, os.time()) - end - return true -end diff --git a/data/spells/scripts/monster/prince drazzak paladin.lua b/data/spells/scripts/monster/prince drazzak paladin.lua deleted file mode 100644 index 5f4962b68..000000000 --- a/data/spells/scripts/monster/prince drazzak paladin.lua +++ /dev/null @@ -1,79 +0,0 @@ -local storage = 674531 - -local area = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - -local createArea = createCombatArea(area) - -local combat = Combat() -combat:setArea(createArea) - -function onTargetTile(creature, pos) - local creatureTable = {} - local n, i = Tile({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 - if n ~= 0 then - local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid - while v ~= 0 do - if isCreature(v) == true then - table.insert(creatureTable, v) - if n == #creatureTable then - break - end - end - i = i + 1 - v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid - end - end - if #creatureTable ~= nil and #creatureTable > 0 then - for r = 1, #creatureTable do - if creatureTable[r] ~= creature then - local min = 4000 - local max = 8000 - local player = Player(creatureTable[r]) - - if isPlayer(creatureTable[r]) == true - and table.contains({VOCATION.BASE_ID.PALADIN}, player:getVocation():getBaseId()) then - doTargetCombatHealth(creature, creatureTable[r], COMBAT_ENERGYDAMAGE, -min, -max, CONST_ME_NONE) - elseif isMonster(creatureTable[r]) == true then - doTargetCombatHealth(creature, creatureTable[r], COMBAT_ENERGYDAMAGE, -min, -max, CONST_ME_NONE) - end - end - end - end - pos:sendMagicEffect(CONST_ME_ENERGYHIT) - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") - -local function delayedCastSpell(cid, var) - local creature = Creature(cid) - if not creature then - return - end - creature:say("DIE!", TALKTYPE_ORANGE_1) - return combat:execute(creature, positionToVariant(creature:getPosition())) -end - -function onCastSpell(creature, var) -local value = Game.getStorageValue(storage) - if(os.time()-value >= 4) then - creature:say("All PALADINS must DIE!", TALKTYPE_ORANGE_1) - addEvent(delayedCastSpell, 4000, creature:getId(), var) - Game.setStorageValue(storage, os.time()) - end - return true -end diff --git a/data/spells/scripts/monster/prince drazzak sorcerer.lua b/data/spells/scripts/monster/prince drazzak sorcerer.lua deleted file mode 100644 index 1ae10beb8..000000000 --- a/data/spells/scripts/monster/prince drazzak sorcerer.lua +++ /dev/null @@ -1,79 +0,0 @@ -local storage = 674531 - -local area = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - -local createArea = createCombatArea(area) - -local combat = Combat() -combat:setArea(createArea) - -function onTargetTile(creature, pos) - local creatureTable = {} - local n, i = Tile({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 - if n ~= 0 then - local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid - while v ~= 0 do - if isCreature(v) == true then - table.insert(creatureTable, v) - if n == #creatureTable then - break - end - end - i = i + 1 - v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid - end - end - if #creatureTable ~= nil and #creatureTable > 0 then - for r = 1, #creatureTable do - if creatureTable[r] ~= creature then - local min = 4000 - local max = 8000 - local player = Player(creatureTable[r]) - - if isPlayer(creatureTable[r]) == true - and table.contains({VOCATION.BASE_ID.SORCERER}, player:getVocation():getBaseId()) then - doTargetCombatHealth(creature, creatureTable[r], COMBAT_DEATHDAMAGE, -min, -max, CONST_ME_NONE) - elseif isMonster(creatureTable[r]) == true then - doTargetCombatHealth(creature, creatureTable[r], COMBAT_DEATHDAMAGE, -min, -max, CONST_ME_NONE) - end - end - end - end - pos:sendMagicEffect(CONST_ME_MORTAREA) - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") - -local function delayedCastSpell(cid, var) - local creature = Creature(cid) - if not creature then - return - end - creature:say("DIE!", TALKTYPE_ORANGE_1) - return combat:execute(creature, positionToVariant(creature:getPosition())) -end - -function onCastSpell(creature, var) -local value = Game.getStorageValue(storage) - if(os.time()-value >= 4) then - creature:say("All SORCERERS must DIE!", TALKTYPE_ORANGE_1) - addEvent(delayedCastSpell, 4000, creature:getId(), var) - Game.setStorageValue(storage, os.time()) - end - return true -end diff --git a/data/spells/scripts/monster/prince drazzak summon.lua b/data/spells/scripts/monster/prince drazzak summon.lua deleted file mode 100644 index ea7cde971..000000000 --- a/data/spells/scripts/monster/prince drazzak summon.lua +++ /dev/null @@ -1,20 +0,0 @@ -function onCastSpell(creature, var) -local t, spectator = Game.getSpectators(Position(33528, 32335, 12), false, false, 20, 20, 20, 20) - local check = 0 - if #t ~= nil then - for i = 1, #t do - spectator = t[i] - if spectator:getName() == "Demon" then - check = check + 1 - end - end - end - if (check < 1) then - creature:say("CRUSH THEM ALL!", TALKTYPE_ORANGE_2) - Game.createMonster("Demon", Position(33528, 32330, 12)) - Game.createMonster("Demon", Position(33523, 32338, 12)) - Game.createMonster("Demon", Position(33532, 32337, 12)) - else - end -return true -end diff --git a/data/spells/scripts/monster/prince drazzak tp.lua b/data/spells/scripts/monster/prince drazzak tp.lua deleted file mode 100644 index b493ed8a6..000000000 --- a/data/spells/scripts/monster/prince drazzak tp.lua +++ /dev/null @@ -1,14 +0,0 @@ -function onCastSpell(creature, var) -local center, center2 = {x=33529, y=32334, z=12, stackpos=255}, {x=33528, y=32334, z=12, stackpos=255} - creature:say("GET OVER HERE!", TALKTYPE_ORANGE_2, false, 0, center2) - for x = 33519, 33538 do - for y = 32327, 32342 do - local a = Tile(Position({x = x, y = y, z = 12})):getTopCreature() - if a ~= 0 and isMonster(a) and creature:getName():lower() ~= "prince drazzak" or isPlayer(a) then - a:teleportTo(center, true) - creature:teleportTo(center2, true) - end - end - end -return true -end diff --git a/data/spells/scripts/monster/prince drazzak wave.lua b/data/spells/scripts/monster/prince drazzak wave.lua deleted file mode 100644 index c0668bb57..000000000 --- a/data/spells/scripts/monster/prince drazzak wave.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/pythius the rotten curse.lua b/data/spells/scripts/monster/pythius the rotten curse.lua deleted file mode 100644 index 58afb932d..000000000 --- a/data/spells/scripts/monster/pythius the rotten curse.lua +++ /dev/null @@ -1,24 +0,0 @@ -local combat = {} - -for i = 1, 1 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for j = 1, 33 do - damage = damage * 1.2 - condition:addDamage(1, 4000, -damage) - end - - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(1, 1)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/pythius the rotten paralyze.lua b/data/spells/scripts/monster/pythius the rotten paralyze.lua deleted file mode 100644 index 5540f338e..000000000 --- a/data/spells/scripts/monster/pythius the rotten paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.15, 0, -0.2, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/pythius the rotten summon.lua b/data/spells/scripts/monster/pythius the rotten summon.lua deleted file mode 100644 index bd3114852..000000000 --- a/data/spells/scripts/monster/pythius the rotten summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - -local area = createCombatArea(AREA_CIRCLE3X3) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Undead Gladiator", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/quara constrictor electrify.lua b/data/spells/scripts/monster/quara constrictor electrify.lua deleted file mode 100644 index 55b566901..000000000 --- a/data/spells/scripts/monster/quara constrictor electrify.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - -local condition = Condition(CONDITION_ENERGY) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(3, 10000, -25) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/quara constrictor freeze.lua b/data/spells/scripts/monster/quara constrictor freeze.lua deleted file mode 100644 index 6490e0e79..000000000 --- a/data/spells/scripts/monster/quara constrictor freeze.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) - -local condition = Condition(CONDITION_FREEZING) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(10, 8000, -8) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/rage summon.lua b/data/spells/scripts/monster/rage summon.lua deleted file mode 100644 index 97043354b..000000000 --- a/data/spells/scripts/monster/rage summon.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) - -function onCastSpell(creature, var) - - if rageSummon < 3 then - Game.createMonster("Frenzy", {x=creature:getPosition().x+math.random(-1, 1), y=creature:getPosition().y+math.random(-1, 1), z=creature:getPosition().z}, false, true) - rageSummon = rageSummon + 1 - end - - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ragiaz transform.lua b/data/spells/scripts/monster/ragiaz transform.lua deleted file mode 100644 index 2aa3c9a03..000000000 --- a/data/spells/scripts/monster/ragiaz transform.lua +++ /dev/null @@ -1,13 +0,0 @@ -function onCastSpell(creature, var) - local pos = creature:getPosition() - if pos.z ~= 13 then - return - end - pos:sendMagicEffect(172) - creature:say('Ragiaz encase himself in bones to regenerate.', TALKTYPE_MONSTER_SAY) - creature:teleportTo(Position(33487, 32333, 14)) - creature:addHealth(1000) - local capsule = Tile(Position(33485, 32333, 14)):getTopCreature() - capsule:teleportTo(pos) - return -end diff --git a/data/spells/scripts/monster/raging mage skill reducer 1.lua b/data/spells/scripts/monster/raging mage skill reducer 1.lua deleted file mode 100644 index d3824a6b3..000000000 --- a/data/spells/scripts/monster/raging mage skill reducer 1.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = {} - -for i = 35, 55 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 15000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(35, 55)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/raging mage skill reducer 2.lua b/data/spells/scripts/monster/raging mage skill reducer 2.lua deleted file mode 100644 index 83e7fc73f..000000000 --- a/data/spells/scripts/monster/raging mage skill reducer 2.lua +++ /dev/null @@ -1,36 +0,0 @@ -local combat = {} - -for i = 35, 55 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 15000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - combat[i]:addCondition(condition) - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - - -function onCastSpell(creature, var) - return combat[math.random(35, 55)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ravennousLavaLurkerWave2.lua b/data/spells/scripts/monster/ravennousLavaLurkerWave2.lua deleted file mode 100644 index 41ffef6b6..000000000 --- a/data/spells/scripts/monster/ravennousLavaLurkerWave2.lua +++ /dev/null @@ -1,35 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) - -combat:setArea(createCombatArea({ -{1}, -{1}, -{1}, -{1}, -{3}, -})) - -local monsters = { - "lost gnome", - "gnome pack crawler" -} - -function onTargetTile(cid, pos) - local tile = Tile(pos) - if tile then - local target = tile:getTopCreature() - if target and target:isMonster() then - if table.contains(monsters, target:getName():lower()) then - target:addHealth(-(math.random(0, 1000))) - end - end - end - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/razzagorn summon.lua b/data/spells/scripts/monster/razzagorn summon.lua deleted file mode 100644 index 2ed3c1570..000000000 --- a/data/spells/scripts/monster/razzagorn summon.lua +++ /dev/null @@ -1,9 +0,0 @@ -function onCastSpell(creature, var) - for i = 1, 4 do - local mid = Game.createMonster("Demon", Position(math.random(33416, 33431), math.random(32460, 32474), 14), true, true) - if not mid then - return - end - end - return -end diff --git a/data/spells/scripts/monster/reality reaver wave.lua b/data/spells/scripts/monster/reality reaver wave.lua deleted file mode 100644 index 55e6b0d85..000000000 --- a/data/spells/scripts/monster/reality reaver wave.lua +++ /dev/null @@ -1,10 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) - -local area = createCombatArea(AREA_SQUAREWAVE7) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/remorseless wave.lua b/data/spells/scripts/monster/remorseless wave.lua deleted file mode 100644 index dfce3e631..000000000 --- a/data/spells/scripts/monster/remorseless wave.lua +++ /dev/null @@ -1,44 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLACKSMOKE) - -combat:setArea(createCombatArea({ -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0} -})) - -function spellCallback(param) - local tile = Tile(Position(param.pos)) - if tile then - if tile:getTopCreature() and tile:getTopCreature():isPlayer() then - tile:getTopCreature():addHealth( - math.random(0, 600)) - elseif tile:getTopCreature() and tile:getTopCreature():isMonster() then - if tile:getTopCreature():getName():lower() == "stolen soul" then - tile:getTopCreature():addHealth( - math.random(700, 1500)) - end - end - end -end - -function onTargetTile(cid, pos) - local param = {} - param.cid = cid - param.pos = pos - param.count = 0 - spellCallback(param) -end - -setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/renegade knight.lua b/data/spells/scripts/monster/renegade knight.lua deleted file mode 100644 index 5826af0f7..000000000 --- a/data/spells/scripts/monster/renegade knight.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, 6) -combat:setArea(createCombatArea(AREA_SQUARE1X1)) - -local condition = Condition(COMBAT_PHYSICALDAMAGE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(3, 10000, -25) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/retching horror paralyze.lua b/data/spells/scripts/monster/retching horror paralyze.lua deleted file mode 100644 index 991b1d41d..000000000 --- a/data/spells/scripts/monster/retching horror paralyze.lua +++ /dev/null @@ -1,15 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.55, 0, -0.75, 0) - combat:addCondition(condition) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/rift brood electrify.lua b/data/spells/scripts/monster/rift brood electrify.lua deleted file mode 100644 index 83c38d309..000000000 --- a/data/spells/scripts/monster/rift brood electrify.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - -local condition = Condition(CONDITION_ENERGY) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(10, 10000, -25) -combat:addCondition(condition) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/root_branchy_rotten.lua b/data/spells/scripts/monster/root_branchy_rotten.lua deleted file mode 100644 index 4822d5ea0..000000000 --- a/data/spells/scripts/monster/root_branchy_rotten.lua +++ /dev/null @@ -1,11 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ROOTS) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_LEAFSTAR) - -local condition = Condition(CONDITION_ROOTED) -condition:setParameter(CONDITION_PARAM_TICKS, 3000) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/rot elemental paralyze.lua b/data/spells/scripts/monster/rot elemental paralyze.lua deleted file mode 100644 index 6a6e35f3e..000000000 --- a/data/spells/scripts/monster/rot elemental paralyze.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_GREEN) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.45, 0, -0.65, 0) -combat:addCondition(condition) - - -local area = createCombatArea(AREA_CIRCLE2X2) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/rupture wave.lua b/data/spells/scripts/monster/rupture wave.lua deleted file mode 100644 index dc7efd0ed..000000000 --- a/data/spells/scripts/monster/rupture wave.lua +++ /dev/null @@ -1,10 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) - -local area = createCombatArea(AREA_WAVE11) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/rustheap golem electrify.lua b/data/spells/scripts/monster/rustheap golem electrify.lua deleted file mode 100644 index fde210d34..000000000 --- a/data/spells/scripts/monster/rustheap golem electrify.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - -local condition = Condition(CONDITION_ENERGY) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(17, 10000, -25) -combat:addCondition(condition) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/rustheap golem wave.lua b/data/spells/scripts/monster/rustheap golem wave.lua deleted file mode 100644 index 3a7ae8653..000000000 --- a/data/spells/scripts/monster/rustheap golem wave.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_LIFEDRAIN) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLACKSMOKE) - - arr = { - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/salamander trainer summon.lua b/data/spells/scripts/monster/salamander trainer summon.lua deleted file mode 100644 index 22f0b9daf..000000000 --- a/data/spells/scripts/monster/salamander trainer summon.lua +++ /dev/null @@ -1,20 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_RED) - -local area = createCombatArea(AREA_CIRCLE1X1) -combat:setArea(area) - -local maxsummons = 1 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 1 then - mid = Game.createMonster("Troll-trained Salamander", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/sea serpent drown.lua b/data/spells/scripts/monster/sea serpent drown.lua deleted file mode 100644 index 8f43363e0..000000000 --- a/data/spells/scripts/monster/sea serpent drown.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_WATERSPLASH) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL) - -local condition = Condition(CONDITION_DROWN) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(6, 5000, -20) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/seacrest serpent wave.lua b/data/spells/scripts/monster/seacrest serpent wave.lua deleted file mode 100644 index 014c0cc48..000000000 --- a/data/spells/scripts/monster/seacrest serpent wave.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_WATERSPLASH) - - arr = { - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/serpent spawn paralyze.lua b/data/spells/scripts/monster/serpent spawn paralyze.lua deleted file mode 100644 index 260d6da80..000000000 --- a/data/spells/scripts/monster/serpent spawn paralyze.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.6, 0, -0.8, 0) -combat:addCondition(condition) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/shaburak wave.lua b/data/spells/scripts/monster/shaburak wave.lua deleted file mode 100644 index 96e3e0811..000000000 --- a/data/spells/scripts/monster/shaburak wave.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/shadow hound curse.lua b/data/spells/scripts/monster/shadow hound curse.lua deleted file mode 100644 index 84ce11871..000000000 --- a/data/spells/scripts/monster/shadow hound curse.lua +++ /dev/null @@ -1,31 +0,0 @@ -local combat = {} - -for i = 1, 1 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for j = 1, 12 do - damage = damage * 1.25 - condition:addDamage(1, 4000, -damage) - end - - local area = createCombatArea({ - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - }) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(1, 1)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/shargon heal.lua b/data/spells/scripts/monster/shargon heal.lua deleted file mode 100644 index 708434e85..000000000 --- a/data/spells/scripts/monster/shargon heal.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) - -function onCastSpell(creature, var) - local msg = "Shargon absorbs necromantic energy to regenerate!" - local spectators, spectator = Game.getSpectators(creature:getPosition(), false, false, 10, 10, 10, 10) - for i = 1, #spectators do - spectator = spectators[i] - if spectator:isMonster() and spectator:getName() == "Necromantic Energy" then - spectator:getPosition():sendMagicEffect(CONST_ME_POFF) - spectator:remove() - creature:say(msg, TALKTYPE_ORANGE_1) - creature:addHealth(65000) - creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - return true - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/shlorg paralyze.lua b/data/spells/scripts/monster/shlorg paralyze.lua deleted file mode 100644 index 3bff927b7..000000000 --- a/data/spells/scripts/monster/shlorg paralyze.lua +++ /dev/null @@ -1,15 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.40, 0, -0.55, 0) - - local area = createCombatArea(AREA_SQUARE1X1) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/shock head paralyze.lua b/data/spells/scripts/monster/shock head paralyze.lua deleted file mode 100644 index 027ad61cc..000000000 --- a/data/spells/scripts/monster/shock head paralyze.lua +++ /dev/null @@ -1,25 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.5, 0, -0.75, 0) -combat:addCondition(condition) - - local area = createCombatArea({ - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - }) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/shock head skill reducer 1.lua b/data/spells/scripts/monster/shock head skill reducer 1.lua deleted file mode 100644 index 075d25930..000000000 --- a/data/spells/scripts/monster/shock head skill reducer 1.lua +++ /dev/null @@ -1,34 +0,0 @@ -local combat = {} - -for i = 15, 30 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) - -arr = { -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, -} - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 6000) - condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - - local area = createCombatArea(arr) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(15, 30)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/shock head skill reducer 2.lua b/data/spells/scripts/monster/shock head skill reducer 2.lua deleted file mode 100644 index e93d51276..000000000 --- a/data/spells/scripts/monster/shock head skill reducer 2.lua +++ /dev/null @@ -1,30 +0,0 @@ -local combat = {} - -for i = 20, 50 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 6000) - condition:setParameter(CONDITION_PARAM_STAT_MAGICPOINTSPERCENT, i) - -arr = { -{0, 0, 0, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 0}, -{1, 1, 1, 1, 1, 1, 1, 1, 1}, -{1, 1, 1, 1, 3, 1, 1, 1, 1}, -{1, 1, 1, 1, 1, 1, 1, 1 ,1}, -{0, 1, 1, 1, 1, 1, 1, 1 ,0}, -{0, 0, 1, 1, 1, 1, 1, 0 ,0}, -{0, 0, 0, 1, 1, 1, 0, 0, 0} -} - - local area = createCombatArea(arr) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(20, 50)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/shulgrax summon.lua b/data/spells/scripts/monster/shulgrax summon.lua deleted file mode 100644 index e6230646f..000000000 --- a/data/spells/scripts/monster/shulgrax summon.lua +++ /dev/null @@ -1,19 +0,0 @@ -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 8 then - for i = 1, 4 do - local mid = Game.createMonster("Sin Devourer", Position(math.random(33478, 33491), math.random(32781, 32793), 13), true, true) - if not mid then - return - end - mid:setMaster(creature) - end - for i = 1, 4 do - local mid2 = Game.createMonster("Damned Soul", Position(math.random(33478, 33491), math.random(32781, 32793), 13), true, true) - if not mid2 then - return - end - end - end - return -end diff --git a/data/spells/scripts/monster/silencer skill reducer.lua b/data/spells/scripts/monster/silencer skill reducer.lua deleted file mode 100644 index d5dce1d50..000000000 --- a/data/spells/scripts/monster/silencer skill reducer.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = {} - -for i = 40, 70 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 7000) - condition:setParameter(CONDITION_PARAM_STAT_MAGICPOINTSPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(40, 70)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/single_cloud_chain.lua b/data/spells/scripts/monster/single_cloud_chain.lua deleted file mode 100644 index cc6d22186..000000000 --- a/data/spells/scripts/monster/single_cloud_chain.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STORM) - -function onCastSpell(creature, var) - local target = Creature(var.number) - if not target then return false end - local creaturePos = creature:getPosition() - local path = creaturePos:getPathTo(target:getPosition(), 0, 0, true, true, 8) - if not path or #path == 0 then return false end - for i=1, #path do - creaturePos:getNextPosition(path[i], 1) - creaturePos:sendMagicEffect(CONST_ME_STORM) - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/single_death_chain.lua b/data/spells/scripts/monster/single_death_chain.lua deleted file mode 100644 index 60efaec90..000000000 --- a/data/spells/scripts/monster/single_death_chain.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_WHITE_ENERGY_SPARK) - -function onCastSpell(creature, var) - local target = Creature(var.number) - if not target then return false end - local creaturePos = creature:getPosition() - local path = creaturePos:getPathTo(target:getPosition(), 0, 0, true, true, 8) - if not path or #path == 0 then return false end - for i=1, #path do - creaturePos:getNextPosition(path[i], 1) - creaturePos:sendMagicEffect(CONST_ME_WHITE_ENERGY_SPARK) - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/single_ice_chain.lua b/data/spells/scripts/monster/single_ice_chain.lua deleted file mode 100644 index 0f25da667..000000000 --- a/data/spells/scripts/monster/single_ice_chain.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLUE_ENERGY_SPARK) - -function onCastSpell(creature, var) - local target = Creature(var.number) - if not target then return false end - local creaturePos = creature:getPosition() - local path = creaturePos:getPathTo(target:getPosition(), 0, 0, true, true, 8) - if not path or #path == 0 then return false end - for i=1, #path do - creaturePos:getNextPosition(path[i], 1) - creaturePos:sendMagicEffect(CONST_ME_BLUE_ENERGY_SPARK) - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/sir valorcrest summon.lua b/data/spells/scripts/monster/sir valorcrest summon.lua deleted file mode 100644 index be6f73d62..000000000 --- a/data/spells/scripts/monster/sir valorcrest summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 4 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 4 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Vampire", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/slime puddle paralyze.lua b/data/spells/scripts/monster/slime puddle paralyze.lua deleted file mode 100644 index 0b537ebcc..000000000 --- a/data/spells/scripts/monster/slime puddle paralyze.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.85, 0, -0.90, 0) -combat:addCondition(condition) - - -local area = createCombatArea(AREA_SQUARE1X1) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/soulcatcher summon.lua b/data/spells/scripts/monster/soulcatcher summon.lua deleted file mode 100644 index 6b661bd8a..000000000 --- a/data/spells/scripts/monster/soulcatcher summon.lua +++ /dev/null @@ -1,11 +0,0 @@ -function onCastSpell(creature, var) - if creature:getCondition(CONDITION_POISON) or creature:getCondition(CONDITION_BLEEDING) then - local pos = creature:getPosition() - pos.y = pos.y - 1 - Game.createMonster('corrupted soul', pos, true, true) - creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - else - return - end - return true -end diff --git a/data/spells/scripts/monster/souleater drown.lua b/data/spells/scripts/monster/souleater drown.lua deleted file mode 100644 index be7c33895..000000000 --- a/data/spells/scripts/monster/souleater drown.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - -local condition = Condition(CONDITION_DROWN) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(10, 5000, -20) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/souleater wave.lua b/data/spells/scripts/monster/souleater wave.lua deleted file mode 100644 index 769e1f3a0..000000000 --- a/data/spells/scripts/monster/souleater wave.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_LIFEDRAINDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_RED) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/source of corruption wave.lua b/data/spells/scripts/monster/source of corruption wave.lua deleted file mode 100644 index c5f356328..000000000 --- a/data/spells/scripts/monster/source of corruption wave.lua +++ /dev/null @@ -1,36 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) - -combat:setArea(createCombatArea({ -{0, 0, 0, 0, 0}, -{0, 1, 3, 1, 0}, -{0, 0, 0, 0, 0} -})) - -function spellCallback(param) - local tile = Tile(Position(param.pos)) - if tile then - if tile:getTopCreature() and tile:getTopCreature():isPlayer() then - tile:getTopCreature():addHealth( - math.random(0, 600)) - elseif tile:getTopCreature() and tile:getTopCreature():isMonster() then - if tile:getTopCreature():getName():lower() == "stolen soul" then - tile:getTopCreature():addHealth( - math.random(700, 1500)) - end - end - end -end - -function onTargetTile(cid, pos) - local param = {} - param.cid = cid - param.pos = pos - param.count = 0 - spellCallback(param) -end - -setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/spawn of the welter heal.lua b/data/spells/scripts/monster/spawn of the welter heal.lua deleted file mode 100644 index c02329df8..000000000 --- a/data/spells/scripts/monster/spawn of the welter heal.lua +++ /dev/null @@ -1,42 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -arr = { - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onTargetCreature(creature, target) - local min = 200 - local max = 700 - - local master = target:getMaster() - if target:isPlayer() and not master - or master and master:isPlayer() then - return true - end - - doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/spawn of the welter heal2.lua b/data/spells/scripts/monster/spawn of the welter heal2.lua deleted file mode 100644 index ac9c3c737..000000000 --- a/data/spells/scripts/monster/spawn of the welter heal2.lua +++ /dev/null @@ -1,26 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -local area = createCombatArea(AREA_CIRCLE3X3) -combat:setArea(area) - -function onTargetCreature(creature, target) - local min = 200 - local max = 300 - - local master = target:getMaster() - if target:isPlayer() and not master - or master and master:isPlayer() then - return true - end - - doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/spectre drown.lua b/data/spells/scripts/monster/spectre drown.lua deleted file mode 100644 index 639d1211b..000000000 --- a/data/spells/scripts/monster/spectre drown.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) - -local condition = Condition(CONDITION_DROWN) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(20, 5000, -20) - -local area = createCombatArea(AREA_CIRCLE3X3) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/spirit of earth paralyze.lua b/data/spells/scripts/monster/spirit of earth paralyze.lua deleted file mode 100644 index 18e011045..000000000 --- a/data/spells/scripts/monster/spirit of earth paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SLEEP) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.6, 0, -0.65, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/spitter paralyze.lua b/data/spells/scripts/monster/spitter paralyze.lua deleted file mode 100644 index 8b4a50459..000000000 --- a/data/spells/scripts/monster/spitter paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.55, 0, -0.7, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/stampor skill reducer.lua b/data/spells/scripts/monster/stampor skill reducer.lua deleted file mode 100644 index 094ea22d6..000000000 --- a/data/spells/scripts/monster/stampor skill reducer.lua +++ /dev/null @@ -1,21 +0,0 @@ -local combat = {} - -for i = 60, 85 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 25000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - - local area = createCombatArea(AREA_BEAM1) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(60, 85)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/stone devourer paralyze.lua b/data/spells/scripts/monster/stone devourer paralyze.lua deleted file mode 100644 index 8ba310afe..000000000 --- a/data/spells/scripts/monster/stone devourer paralyze.lua +++ /dev/null @@ -1,29 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER) - - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.50, 0, -0.60, 0) -combat:addCondition(condition) - -arr = { -{0, 0, 0, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 0, 0}, -{0, 1, 1, 1, 1, 1, 1, 1, 0}, -{1, 1, 1, 1, 1, 1, 1, 1, 1}, -{1, 1, 1, 1, 3, 1, 1, 1, 1}, -{1, 1, 1, 1, 1, 1, 1, 1 ,1}, -{0, 1, 1, 1, 1, 1, 1, 1 ,0}, -{0, 0, 1, 1, 1, 1, 1, 0 ,0}, -{0, 0, 0, 1, 1, 1, 0, 0, 0} -} - -local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/summonchallenge.lua b/data/spells/scripts/monster/summonchallenge.lua deleted file mode 100644 index cbd3643b3..000000000 --- a/data/spells/scripts/monster/summonchallenge.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setArea(createCombatArea(AREA_CIRCLE2X2)) - -function onTargetCreature(creature, target) - return doChallengeCreature(creature, target) -end - -combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") - -function onCastSpell(creature, variant) - return combat:execute(creature, variant) -end diff --git a/data/spells/scripts/monster/svoren the mad paralyze.lua b/data/spells/scripts/monster/svoren the mad paralyze.lua deleted file mode 100644 index e081e3de6..000000000 --- a/data/spells/scripts/monster/svoren the mad paralyze.lua +++ /dev/null @@ -1,15 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_WHITE) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.75, 0, -0.85, 0) - combat:addCondition(condition) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/swampling paralyze.lua b/data/spells/scripts/monster/swampling paralyze.lua deleted file mode 100644 index 05cdd8877..000000000 --- a/data/spells/scripts/monster/swampling paralyze.lua +++ /dev/null @@ -1,20 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, 2) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 4000) -condition:setFormula(-0.1, 0, -0.1, 0) - -arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/tanjis skill reducer.lua b/data/spells/scripts/monster/tanjis skill reducer.lua deleted file mode 100644 index 3d32a5571..000000000 --- a/data/spells/scripts/monster/tanjis skill reducer.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = {} - -for i = 35, 60 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 15000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(35, 60)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/tarbaz tp.lua b/data/spells/scripts/monster/tarbaz tp.lua deleted file mode 100644 index 2986b9f9d..000000000 --- a/data/spells/scripts/monster/tarbaz tp.lua +++ /dev/null @@ -1,22 +0,0 @@ -local function teleport(fromPosition, toPosition) - for x = fromPosition.x, toPosition.x do - for y = fromPosition.y, toPosition.y do - for z = fromPosition.z, toPosition.z do - local creature = Tile(Position(x, y, z)):getTopCreature() - if creature then - if creature:isPlayer() then - creature:teleportTo(Position(33454, 32872, 12)) - end - end - end - end - end -end - - - - -function onCastSpell(creature, var) - teleport(Position(33449, 32834, 11), Position(33470, 32854, 11)) - return true -end diff --git a/data/spells/scripts/monster/tenebris summon.lua b/data/spells/scripts/monster/tenebris summon.lua deleted file mode 100644 index ef34648cd..000000000 --- a/data/spells/scripts/monster/tenebris summon.lua +++ /dev/null @@ -1,12 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - -function onCastSpell(creature, var) - local mid = Game.createMonster("shadow fiend", Position(math.random(32906, 32918), math.random(31594, 31604), 14)) - if not mid then - return - end - mid:say('The shadow fiend revives!', TALKTYPE_MONSTER_SAY) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/tenebris ultimate.lua b/data/spells/scripts/monster/tenebris ultimate.lua deleted file mode 100644 index b4907c53c..000000000 --- a/data/spells/scripts/monster/tenebris ultimate.lua +++ /dev/null @@ -1,94 +0,0 @@ -local vocation = { - VOCATION.BASE_ID.SORCERER, - VOCATION.BASE_ID.DRUID, - VOCATION.BASE_ID.PALADIN, - VOCATION.BASE_ID.KNIGHT -} - -area = { - {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0} -} - -local createArea = createCombatArea(area) - -local combat = Combat() -combat:setArea(createArea) - -function onTargetTile(creature, pos) - local creatureTable = {} - local n, i = Tile({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 - if n ~= 0 then - local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid - while v ~= 0 do - if isCreature(v) == true then - table.insert(creatureTable, v) - if n == #creatureTable then - break - end - end - i = i + 1 - v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid - end - end - if #creatureTable ~= nil and #creatureTable > 0 then - for r = 1, #creatureTable do - if creatureTable[r] ~= creature then - local min = 2200 - local max = 2500 - local player = Player(creatureTable[r]) - - if isPlayer(creatureTable[r]) == true and table.contains(vocation, player:getVocation():getBaseId()) then - doTargetCombatHealth(creature, creatureTable[r], COMBAT_DEATHDAMAGE, -min, -max, CONST_ME_NONE) - elseif isMonster(creatureTable[r]) == true then - doTargetCombatHealth(creature, creatureTable[r], COMBAT_DEATHDAMAGE, -min, -max, CONST_ME_NONE) - end - end - end - end - pos:sendMagicEffect(CONST_ME_MORTAREA) - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") - -local function delayedCastSpell(cid, var) - local creature = Creature(cid) - if not creature then - return - end - if creature:getHealth() >= 1 then - creature:setMoveLocked(false) - return combat:execute(creature, positionToVariant(creature:getPosition())) - end - return -end - -function onCastSpell(creature, var) - local specs, spec = Game.getSpectators(Position(32912, 31599, 14), false, false, 12, 12, 12, 12) - for i = 1, #specs do - spec = specs[i] - if spec:isPlayer() then - spec:teleportTo(Position(32912, 31599, 14)) - elseif spec:getName():lower() == 'lady tenebris' then - spec:teleportTo(Position(32912, 31599, 14)) - spec:setMoveLocked(true) - end - end - creature:say("LADY TENEBRIS BEGINS TO CHANNEL A POWERFULL SPELL! TAKE COVER!", TALKTYPE_MONSTER_YELL) - addEvent(delayedCastSpell, 4000, creature:getId(), var) - return true -end diff --git a/data/spells/scripts/monster/terofar curse.lua b/data/spells/scripts/monster/terofar curse.lua deleted file mode 100644 index 0883eed38..000000000 --- a/data/spells/scripts/monster/terofar curse.lua +++ /dev/null @@ -1,35 +0,0 @@ -local combat = {} -local condition2 = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) -condition2:setParameter(CONDITION_PARAM_SUBID, 88888) -condition2:setParameter(CONDITION_PARAM_TICKS, 15 * 60 * 1000) -condition2:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) -condition2:setParameter(CONDITION_PARAM_HEALTHTICKS, 15 * 60 * 1000) - -for i = 0.935, 0.935 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for j = 1, 38 do - damage = damage * 1.2 - condition:addDamage(1, 4000, -damage) - end - - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - if not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then - creature:addCondition(condition2) - creature:say("Terofar cast a greater death curse on you!", TALKTYPE_ORANGE_1) - else - return false - end -return combat[math.random(0.935, 0.935)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/terofar heal.lua b/data/spells/scripts/monster/terofar heal.lua deleted file mode 100644 index 0dca9ba80..000000000 --- a/data/spells/scripts/monster/terofar heal.lua +++ /dev/null @@ -1,42 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onTargetCreature(creature, target) - local min = 300 - local max = 500 - - local master = target:getMaster() - if target:isPlayer() and not master - or master and master:isPlayer() then - return true - end - - doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/terofar skill reducer 1.lua b/data/spells/scripts/monster/terofar skill reducer 1.lua deleted file mode 100644 index 554bb5cfd..000000000 --- a/data/spells/scripts/monster/terofar skill reducer 1.lua +++ /dev/null @@ -1,32 +0,0 @@ -local combat = {} - -for i = 1, 10 do -combat[i] = Combat() -combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - -local condition = Condition(CONDITION_ATTRIBUTES) -condition:setParameter(CONDITION_PARAM_TICKS, 15000) -condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) -condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) -condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) -condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - - local area = createCombatArea({ - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - }) - -combat[i]:setArea(area) -combat[i]:addCondition(condition) - -end - -function onCastSpell(creature, var) - return combat[math.random(1, 10)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/terofar skill reducer 2.lua b/data/spells/scripts/monster/terofar skill reducer 2.lua deleted file mode 100644 index 55b3b752b..000000000 --- a/data/spells/scripts/monster/terofar skill reducer 2.lua +++ /dev/null @@ -1,29 +0,0 @@ -local combat = {} - -for i = 1, 10 do -combat[i] = Combat() -combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) - -local condition = Condition(CONDITION_ATTRIBUTES) -condition:setParameter(CONDITION_PARAM_TICKS, 15000) -condition:setParameter(CONDITION_PARAM_STAT_MAGICPOINTSPERCENT, i) - - local area = createCombatArea({ - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - }) - -combat[i]:setArea(area) -combat[i]:addCondition(condition) - -end - -function onCastSpell(creature, var) - return combat[math.random(1, 10)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/thalas summon.lua b/data/spells/scripts/monster/thalas summon.lua deleted file mode 100644 index 9276aa882..000000000 --- a/data/spells/scripts/monster/thalas summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 8 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 8 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Slime Summon", { x=creature:getPosition().x+math.random(-2, 2), y=creature:getPosition().y+math.random(-2, 2), z=creature:getPosition().z }) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/the abomination paralyze.lua b/data/spells/scripts/monster/the abomination paralyze.lua deleted file mode 100644 index 0ddae56f1..000000000 --- a/data/spells/scripts/monster/the abomination paralyze.lua +++ /dev/null @@ -1,31 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.75, 0, -0.95, 0) - combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/the abomination summon.lua b/data/spells/scripts/monster/the abomination summon.lua deleted file mode 100644 index 94c0c37fd..000000000 --- a/data/spells/scripts/monster/the abomination summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 10 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 10 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Demon Skeleton", { x=creature:getPosition().x+math.random(-2, 2), y=creature:getPosition().y+math.random(-2, 2), z=creature:getPosition().z }) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/the blightfather summon.lua b/data/spells/scripts/monster/the blightfather summon.lua deleted file mode 100644 index ca305b066..000000000 --- a/data/spells/scripts/monster/the blightfather summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_PURPLE) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Lancer Beetle", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/the dark dancer summon.lua b/data/spells/scripts/monster/the dark dancer summon.lua deleted file mode 100644 index 9b2b3f71e..000000000 --- a/data/spells/scripts/monster/the dark dancer summon.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_PURPLE) - -local maxsummons = 3 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 3 then - mid = Game.createMonster("Ghoul", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/the dreadorian curse.lua b/data/spells/scripts/monster/the dreadorian curse.lua deleted file mode 100644 index 3c8649b28..000000000 --- a/data/spells/scripts/monster/the dreadorian curse.lua +++ /dev/null @@ -1,24 +0,0 @@ -local combat = {} - -for i = 2, 2 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for j = 1, 19 do - damage = damage * 1.2 - condition:addDamage(1, 4000, -damage) - end - - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(2, 2)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/the dreadorian drown.lua b/data/spells/scripts/monster/the dreadorian drown.lua deleted file mode 100644 index c660d0a33..000000000 --- a/data/spells/scripts/monster/the dreadorian drown.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POISONAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISON) - -local condition = Condition(CONDITION_DROWN) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(20, 5000, -20) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/the dreadorian soulfire.lua b/data/spells/scripts/monster/the dreadorian soulfire.lua deleted file mode 100644 index d94642a7a..000000000 --- a/data/spells/scripts/monster/the dreadorian soulfire.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(20, 9000, -10) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/the imperor summon.lua b/data/spells/scripts/monster/the imperor summon.lua deleted file mode 100644 index 3e39b1712..000000000 --- a/data/spells/scripts/monster/the imperor summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Diabolic Imp", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/the pale count bomb.lua b/data/spells/scripts/monster/the pale count bomb.lua deleted file mode 100644 index 7d15e2e7c..000000000 --- a/data/spells/scripts/monster/the pale count bomb.lua +++ /dev/null @@ -1,28 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH) - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - creature:say("Feel the hungry kiss of death!", TALKTYPE_ORANGE_1) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/the pale count manadrain.lua b/data/spells/scripts/monster/the pale count manadrain.lua deleted file mode 100644 index 8807979e4..000000000 --- a/data/spells/scripts/monster/the pale count manadrain.lua +++ /dev/null @@ -1,27 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_MANADRAIN) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_RED) - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - creature:say("Feel the hungry kiss of death!", TALKTYPE_ORANGE_1) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/the pale count summon.lua b/data/spells/scripts/monster/the pale count summon.lua deleted file mode 100644 index 5fe63bfe3..000000000 --- a/data/spells/scripts/monster/the pale count summon.lua +++ /dev/null @@ -1,23 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BATS) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 4 - -function onCastSpell(creature, var) - creature:say("Out of the dark I call you, fiend in the night!", TALKTYPE_ORANGE_1) - local summoncount = creature:getSummons() - if #summoncount < 4 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Nightfiend", { x=creature:getPosition().x+math.random(-2, 2), y=creature:getPosition().y+math.random(-2, 2), z=creature:getPosition().z }) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/the pale count wave.lua b/data/spells/scripts/monster/the pale count wave.lua deleted file mode 100644 index b2d0ad90c..000000000 --- a/data/spells/scripts/monster/the pale count wave.lua +++ /dev/null @@ -1,20 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/the ravager heal.lua b/data/spells/scripts/monster/the ravager heal.lua deleted file mode 100644 index 0fd9d3579..000000000 --- a/data/spells/scripts/monster/the ravager heal.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) - -function onCastSpell(creature, var) - local spectators, spectator = Game.getSpectators(creature:getPosition(), false, false, 25, 25, 25, 25) - for i = 1, #spectators do - spectator = spectators[i] - if spectator:isMonster() and spectator:getName() == "Greater Canopic Jar" then - creature:addHealth(10000) - creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - return true - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/the voice of ruin paralyze.lua b/data/spells/scripts/monster/the voice of ruin paralyze.lua deleted file mode 100644 index f7bf00a56..000000000 --- a/data/spells/scripts/monster/the voice of ruin paralyze.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.6, 0, -0.75, 0) -combat:addCondition(condition) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/the welter heal.lua b/data/spells/scripts/monster/the welter heal.lua deleted file mode 100644 index d05d52476..000000000 --- a/data/spells/scripts/monster/the welter heal.lua +++ /dev/null @@ -1,25 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) - -function onCastSpell(creature, var) - local spectators, spectator = Game.getSpectators(creature:getPosition(), false, false, 10, 10, 10, 10) - for i = 1, #spectators do - spectator = spectators[i] - if spectator:isMonster() and spectator:getName() == "Egg" then - spectator:getPosition():sendMagicEffect(CONST_ME_HITBYPOISON) - spectator:remove() - creature:say("", TALKTYPE_ORANGE_1) - creature:addHealth(25000) - creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - return true - elseif spectator:isMonster() and spectator:getName() == "Spawn Of The Welter" then - spectator:getPosition():sendMagicEffect(CONST_ME_DRAWBLOOD) - spectator:remove() - creature:say("", TALKTYPE_ORANGE_1) - creature:addHealth(25000) - creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - return true - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/the welter heal2.lua b/data/spells/scripts/monster/the welter heal2.lua deleted file mode 100644 index e0111eb3e..000000000 --- a/data/spells/scripts/monster/the welter heal2.lua +++ /dev/null @@ -1,42 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -arr = { - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onTargetCreature(creature, target) - local min = 100 - local max = 300 - - local master = target:getMaster() - if target:isPlayer() and not master - or master and master:isPlayer() then - return true - end - - doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/the welter paralyze.lua b/data/spells/scripts/monster/the welter paralyze.lua deleted file mode 100644 index 32b8634bf..000000000 --- a/data/spells/scripts/monster/the welter paralyze.lua +++ /dev/null @@ -1,31 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.7, 0, -0.9, 0) - combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/the welter summon.lua b/data/spells/scripts/monster/the welter summon.lua deleted file mode 100644 index 69e840aa7..000000000 --- a/data/spells/scripts/monster/the welter summon.lua +++ /dev/null @@ -1,38 +0,0 @@ -local function delayedCastSpell(cid, var) - local creature = Creature(cid) - if not creature then - return - end - - if creature:getName(creature:getMaster()) == "The Welter" then - local summon = creature:getSummons() - for i = 1, #summon do - if summon[i]:getName() == "Egg" then - summon[i]:getPosition():sendMagicEffect(CONST_ME_POISONAREA) - local newmon = Game.createMonster("Spawn Of The Welter", summon[i]:getPosition(), false, true) - summon[i]:remove() - if not newmon then - return - end - newmon:setMaster(creature) - end - end - end -end - -local maxsummons = 1 - -function onCastSpell(creature, var) -local summoncount = creature:getSummons() - if #summoncount < 1 then - for i = 1, maxsummons - #summoncount do - local mon = Game.createMonster("Egg", creature:getPosition()) - if not mon then - return - end - mon:setMaster(creature) - end - end - addEvent(delayedCastSpell, 10000, creature:getId(), var) - return true -end diff --git a/data/spells/scripts/monster/the welter summon2.lua b/data/spells/scripts/monster/the welter summon2.lua deleted file mode 100644 index 5233f659c..000000000 --- a/data/spells/scripts/monster/the welter summon2.lua +++ /dev/null @@ -1,18 +0,0 @@ -function onCastSpell(creature, var) -local t, spectator = Game.getSpectators(creature:getPosition(), false, false, 50, 50, 50, 50) - local check = 0 - if #t ~= nil then - for i = 1, #t do - spectator = t[i] - if spectator:getName() == "Egg" or spectator:getName() == "Spawn Of The Welter" then - check = check + 1 - end - end - end - if (check < 10) then - creature:getPosition():sendMagicEffect(CONST_ME_GREEN_RINGS) - Game.createMonster("Egg", creature:getPosition(), false, true) - else - end -return true -end diff --git a/data/spells/scripts/monster/thorn summon.lua b/data/spells/scripts/monster/thorn summon.lua deleted file mode 100644 index 3467883ee..000000000 --- a/data/spells/scripts/monster/thorn summon.lua +++ /dev/null @@ -1,12 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - -function onCastSpell(creature, var) - local creaturePos = creature:getPosition() - local mid = Game.createMonster('thorn minion', Position(creaturePos.x + math.random(-3, 3), creaturePos.y + math.random(-3, 3), creaturePos.z), true, false) - if not mid then - return - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/thul paralyze.lua b/data/spells/scripts/monster/thul paralyze.lua deleted file mode 100644 index 98bed3090..000000000 --- a/data/spells/scripts/monster/thul paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SNOWBALL) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 10000) - condition:setFormula(-0.8, 0, -0.9, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/thul summon.lua b/data/spells/scripts/monster/thul summon.lua deleted file mode 100644 index 6b60cb7c0..000000000 --- a/data/spells/scripts/monster/thul summon.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - mid = Game.createMonster("Massive Water Elemental", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end -return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/time guardian lost time.lua b/data/spells/scripts/monster/time guardian lost time.lua deleted file mode 100644 index cb315fcff..000000000 --- a/data/spells/scripts/monster/time guardian lost time.lua +++ /dev/null @@ -1,12 +0,0 @@ -function onCastSpell(creature, var) - local pos = creature:getPosition() - if pos.z ~= 15 then - return true - end - if creature:getName():lower() == 'the freezing time guardian' then - Game.createMonster('lost time', { x=creature:getPosition().x+math.random(-2, 2), y=creature:getPosition().y+math.random(-2, 2), z=creature:getPosition().z }) - elseif creature:getName():lower() == 'the blazing time guardian' then - Game.createMonster('time waster', { x=creature:getPosition().x+math.random(-2, 2), y=creature:getPosition().y+math.random(-2, 2), z=creature:getPosition().z }) - end - return true -end diff --git a/data/spells/scripts/monster/time guardian.lua b/data/spells/scripts/monster/time guardian.lua deleted file mode 100644 index 316d4a9a0..000000000 --- a/data/spells/scripts/monster/time guardian.lua +++ /dev/null @@ -1,50 +0,0 @@ -local monsters = { - [1] = {pos = Position(32980, 31664, 13)}, - [2] = {pos = Position(32975, 31664, 13)} -} - -local function functionBack(position, oldpos) - local guardian = Tile(position):getTopCreature() - local bool, diference, health = false, 0, 0 - local spectators, spectator = Game.getSpectators(Position(32977, 31662, 14), false, false, 15, 15, 15, 15) - for v = 1, #spectators do - spectator = spectators[v] - if spectator:getName():lower() == 'the freezing time guardian' or spectator:getName():lower() == 'the blazing time guardian' then - oldpos = spectator:getPosition() - bool = true - end - end - if not bool then - guardian:remove() - return true - end - local specs, spec = Game.getSpectators(Position(32977, 31662, 14), false, false, 15, 15, 15, 15) - for i = 1, #specs do - spec = specs[i] - if spec:isMonster() and spec:getName():lower() == 'the freezing time guardian' or spec:getName():lower() == 'the blazing time guardian' then - spec:teleportTo(position) - health = spec:getHealth() - diference = guardian:getHealth() - health - end - end - guardian:addHealth( - diference) - guardian:teleportTo(oldpos) -end - -function onCastSpell(creature, var) - local index = math.random(1, 2) - local monsterPos = creature:getPosition() - if monsterPos.z ~= 14 then - return true - end - local position = monsters[index].pos - local form = Tile(position):getTopCreature() - creature:teleportTo(position) - local diference, health = 0, 0 - health = creature:getHealth() - diference = form:getHealth() - health - form:addHealth( - diference) - form:teleportTo(monsterPos) - addEvent(functionBack, 30 * 1000, position, monsterPos) - return true -end diff --git a/data/spells/scripts/monster/time guardiann.lua b/data/spells/scripts/monster/time guardiann.lua deleted file mode 100644 index 57397aa02..000000000 --- a/data/spells/scripts/monster/time guardiann.lua +++ /dev/null @@ -1,50 +0,0 @@ -local monsters = { - [1] = {pos = Position(32810, 32664, 14)}, - [2] = {pos = Position(32815, 32664, 14)} -} - -local function functionBack(position, oldpos) - local guardian = Tile(position):getTopCreature() - local bool, diference, health = false, 0, 0 - local spectators, spectator = Game.getSpectators(Position(32813, 32664, 14), false, false, 15, 15, 15, 15) - for v = 1, #spectators do - spectator = spectators[v] - if spectator:getName():lower() == 'the blazing time guardian' or spectator:getName():lower() == 'the freezing time guardian' then - oldpos = spectator:getPosition() - bool = true - end - end - if not bool then - guardian:remove() - return true - end - local specs, spec = Game.getSpectators(Position(32813, 32664, 14), false, false, 15, 15, 15, 15) - for i = 1, #specs do - spec = specs[i] - if spec:isMonster() and spec:getName():lower() == 'the blazing time guardian' or spec:getName():lower() == 'the freezing time guardian' then - spec:teleportTo(position) - health = spec:getHealth() - diference = guardian:getHealth() - health - end - end - guardian:addHealth( - diference) - guardian:teleportTo(oldpos) -end - -function onCastSpell(creature, var) - local index = math.random(1, 2) - local monsterPos = creature:getPosition() - if monsterPos.z ~= 14 then - return true - end - local position = monsters[index].pos - local form = Tile(position):getTopCreature() - creature:teleportTo(position) - local diference, health = 0, 0 - health = creature:getHealth() - diference = form:getHealth() - health - form:addHealth( - diference) - form:teleportTo(monsterPos) - addEvent(functionBack, 30 * 1000, position, monsterPos) - return true -end diff --git a/data/spells/scripts/monster/twins skill reducer.lua b/data/spells/scripts/monster/twins skill reducer.lua deleted file mode 100644 index bdd1ad831..000000000 --- a/data/spells/scripts/monster/twins skill reducer.lua +++ /dev/null @@ -1,32 +0,0 @@ -local combat = {} - -for i = 10, 25 do -combat[i] = Combat() -combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_TELEPORT) - -local condition = Condition(CONDITION_ATTRIBUTES) -condition:setParameter(CONDITION_PARAM_TICKS, 35000) -condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) -condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - - local area = createCombatArea({ - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - }) - -combat[i]:setArea(area) -combat[i]:addCondition(condition) - -end - -function onCastSpell(creature, var) - return combat[math.random(10, 25)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/twisted shaper ice.lua b/data/spells/scripts/monster/twisted shaper ice.lua deleted file mode 100644 index 451ef68cf..000000000 --- a/data/spells/scripts/monster/twisted shaper ice.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, 53) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLICE) - -function onGetFormulaValues(player, level, maglevel) - local min = (level / 5) + (maglevel * 1.4) + 8 - local max = (level / 5) + (maglevel * 2.2) + 14 - return -min, -max -end - -combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/tyrn electrify.lua b/data/spells/scripts/monster/tyrn electrify.lua deleted file mode 100644 index 957570f6a..000000000 --- a/data/spells/scripts/monster/tyrn electrify.lua +++ /dev/null @@ -1,24 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMOKE) - -local condition = Condition(CONDITION_ENERGY) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(30, 10000, -25) -combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/tyrn heal.lua b/data/spells/scripts/monster/tyrn heal.lua deleted file mode 100644 index 2dc1c3779..000000000 --- a/data/spells/scripts/monster/tyrn heal.lua +++ /dev/null @@ -1,15 +0,0 @@ -local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) -condition:setParameter(CONDITION_PARAM_SUBID, 88888) -condition:setParameter(CONDITION_PARAM_TICKS, 15 * 60 * 1000) -condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) -condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 15 * 60 * 1000) - -function onCastSpell(creature, var) - if creature:getHealth() < creature:getMaxHealth() * 0.2 and not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then - creature:addCondition(condition) - creature:addHealth(math.random(5000, 7500)) - else - return - end - return true -end diff --git a/data/spells/scripts/monster/tyrn skill reducer.lua b/data/spells/scripts/monster/tyrn skill reducer.lua deleted file mode 100644 index c97d194b6..000000000 --- a/data/spells/scripts/monster/tyrn skill reducer.lua +++ /dev/null @@ -1,36 +0,0 @@ -local combat = {} - -for i = 40, 55 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_WHITE) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 12000) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(40, 55)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/undead cavebear curse.lua b/data/spells/scripts/monster/undead cavebear curse.lua deleted file mode 100644 index 12710822f..000000000 --- a/data/spells/scripts/monster/undead cavebear curse.lua +++ /dev/null @@ -1,25 +0,0 @@ -local combat = {} - -for i = 2, 2 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for j = 1, 18 do - damage = damage * 1.2 - condition:addDamage(1, 4000, -damage) - end - - local area = createCombatArea(AREA_SQUARE1X1) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(2, 2)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/undead dragon curse.lua b/data/spells/scripts/monster/undead dragon curse.lua deleted file mode 100644 index 0e7dc7f7f..000000000 --- a/data/spells/scripts/monster/undead dragon curse.lua +++ /dev/null @@ -1,34 +0,0 @@ -local combat = {} - -for i = 1, 2 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for j = 1, 30 do - damage = damage * 1.2 - condition:addDamage(1, 4000, -damage) - end - - local area = createCombatArea({ - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - }) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(1, 2)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/undead jester paralyze.lua b/data/spells/scripts/monster/undead jester paralyze.lua deleted file mode 100644 index 112b64950..000000000 --- a/data/spells/scripts/monster/undead jester paralyze.lua +++ /dev/null @@ -1,28 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GIFT_WRAPS) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.35, 0, -0.5, 0) -combat:addCondition(condition) - - arr = { - {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/undead jester summon.lua b/data/spells/scripts/monster/undead jester summon.lua deleted file mode 100644 index 99912edf8..000000000 --- a/data/spells/scripts/monster/undead jester summon.lua +++ /dev/null @@ -1,38 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_RED) - -arr = { -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -} - -local area = createCombatArea(arr) -combat:setArea(area) - -local maxsummons = 4 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 4 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Cave Rat", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/urmahlullu ring.lua b/data/spells/scripts/monster/urmahlullu ring.lua deleted file mode 100644 index 2e6708a45..000000000 --- a/data/spells/scripts/monster/urmahlullu ring.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) -arr = { -{0, 1, 1, 1, 0}, -{1, 0, 0, 0, 1}, -{1, 0, 2, 0, 1}, -{1, 0, 0, 0, 1}, -{0, 1, 1, 1, 0} -} - - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ushuriel curse.lua b/data/spells/scripts/monster/ushuriel curse.lua deleted file mode 100644 index c27668648..000000000 --- a/data/spells/scripts/monster/ushuriel curse.lua +++ /dev/null @@ -1,25 +0,0 @@ -local combat = {} - -for i = 1, 1.1 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - - local condition = Condition(CONDITION_CURSED) - condition:setParameter(CONDITION_PARAM_DELAYED, 1) - - local damage = i - condition:addDamage(1, 4000, -damage) - for j = 1, 27 do - damage = damage * 1.2 - condition:addDamage(1, 4000, -damage) - end - - local area = createCombatArea(AREA_CIRCLE3X3) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(1, 1.1)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/ushuriel electrify.lua b/data/spells/scripts/monster/ushuriel electrify.lua deleted file mode 100644 index 663176fd8..000000000 --- a/data/spells/scripts/monster/ushuriel electrify.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) - -local condition = Condition(CONDITION_ENERGY) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(25, 10000, -25) -combat:addCondition(condition) - -local area = createCombatArea(AREA_CIRCLE3X3) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/vampire paralyze.lua b/data/spells/scripts/monster/vampire paralyze.lua deleted file mode 100644 index b52f2b760..000000000 --- a/data/spells/scripts/monster/vampire paralyze.lua +++ /dev/null @@ -1,11 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.45, 0, -0.8, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/vampire viscount paralyze.lua b/data/spells/scripts/monster/vampire viscount paralyze.lua deleted file mode 100644 index e3745215e..000000000 --- a/data/spells/scripts/monster/vampire viscount paralyze.lua +++ /dev/null @@ -1,15 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.55, 0, -0.7, 0) - combat:addCondition(condition) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/verminor paralyze.lua b/data/spells/scripts/monster/verminor paralyze.lua deleted file mode 100644 index 028634dc9..000000000 --- a/data/spells/scripts/monster/verminor paralyze.lua +++ /dev/null @@ -1,31 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.75, 0, -0.95, 0) - combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - - local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/verminor summon.lua b/data/spells/scripts/monster/verminor summon.lua deleted file mode 100644 index 7351d5098..000000000 --- a/data/spells/scripts/monster/verminor summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_NONE) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 6 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 6 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Son of Verminor", { x=creature:getPosition().x+math.random(-2, 2), y=creature:getPosition().y+math.random(-2, 2), z=creature:getPosition().z }) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/vile grandmaster.lua b/data/spells/scripts/monster/vile grandmaster.lua deleted file mode 100644 index 6735d0e7a..000000000 --- a/data/spells/scripts/monster/vile grandmaster.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER) -combat:setArea(createCombatArea(AREA_CIRCLE3X3)) - -local condition = Condition(COMBAT_PHYSICALDAMAGE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(3, 100, -35) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/vulcongra soulfire.lua b/data/spells/scripts/monster/vulcongra soulfire.lua deleted file mode 100644 index 851550ac6..000000000 --- a/data/spells/scripts/monster/vulcongra soulfire.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(20, 9000, -10) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/walker skill reducer.lua b/data/spells/scripts/monster/walker skill reducer.lua deleted file mode 100644 index 6d3938192..000000000 --- a/data/spells/scripts/monster/walker skill reducer.lua +++ /dev/null @@ -1,73 +0,0 @@ -local combat = {} - -for i = 45, 60 do - combat[i] = Combat() - - local condition1 = Condition(CONDITION_ATTRIBUTES) - condition1:setParameter(CONDITION_PARAM_TICKS, 7000) - condition1:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition1:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - condition1:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - - local condition2 = Condition(CONDITION_ATTRIBUTES) - condition2:setParameter(CONDITION_PARAM_TICKS, 7000) - condition2:setParameter(CONDITION_PARAM_STAT_MAGICPOINTSPERCENT, i) - - local condition3 = Condition(CONDITION_ATTRIBUTES) - condition3:setParameter(CONDITION_PARAM_TICKS, 7000) - condition3:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - condition3:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE3X3) - combat[i]:setArea(area) - - - function onTargetTile(creature, pos) - local creatureTable = {} - local n, i = Tile({x=pos.x, y=pos.y, z=pos.z}).creatures, 1 - if n ~= 0 then - local v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid - while v ~= 0 do - if isCreature(v) == true then - table.insert(creatureTable, v) - if n == #creatureTable then - break - end - end - i = i + 1 - v = getThingfromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=i}).uid - end - end - - if #creatureTable ~= nil and #creatureTable > 0 then - for r = 1, #creatureTable do - if creatureTable[r] ~= creature then - local specCreature = Player(creatureTable[r]) - - if specCreature and specCreature:isPlayer() then - if specCreature:isKnight() then - specCreature:addCondition(condition1) - end - - if specCreature:isMage() then - specCreature:addCondition(condition2) - end - - if specCreature:isPaladin() then - specCreature:addCondition(condition3) - end - end - end - end - end - pos:sendMagicEffect(CONST_ME_MAGIC_RED) - return true - end - - combat[i]:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile") - -end - -function onCastSpell(creature, var) - return combat[math.random(45, 60)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/war golem electrify.lua b/data/spells/scripts/monster/war golem electrify.lua deleted file mode 100644 index bd2cf3926..000000000 --- a/data/spells/scripts/monster/war golem electrify.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL) - -local condition = Condition(CONDITION_ENERGY) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(8, 10000, -25) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/war golem skill reducer.lua b/data/spells/scripts/monster/war golem skill reducer.lua deleted file mode 100644 index ddd10e875..000000000 --- a/data/spells/scripts/monster/war golem skill reducer.lua +++ /dev/null @@ -1,29 +0,0 @@ -local combat = {} - -for i = 40, 60 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_STUN) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 8000) - condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - - local arr = { - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - - local area = createCombatArea(arr) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(40, 60)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/warden ring.lua b/data/spells/scripts/monster/warden ring.lua deleted file mode 100644 index f20e56a47..000000000 --- a/data/spells/scripts/monster/warden ring.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER) -arr = { -{0, 1, 1, 1, 0}, -{1, 0, 0, 0, 1}, -{1, 0, 2, 0, 1}, -{1, 0, 0, 0, 1}, -{0, 1, 1, 1, 0} -} - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/warden x.lua b/data/spells/scripts/monster/warden x.lua deleted file mode 100644 index cf848e59e..000000000 --- a/data/spells/scripts/monster/warden x.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER) -arr = { -{1, 0, 1}, -{0, 2, 0}, -{1, 0, 1} -} - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/warlock skill reducer.lua b/data/spells/scripts/monster/warlock skill reducer.lua deleted file mode 100644 index 92083e68d..000000000 --- a/data/spells/scripts/monster/warlock skill reducer.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = {} - -for i = 40, 50 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 6000) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(40, 50)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/wave t.lua b/data/spells/scripts/monster/wave t.lua deleted file mode 100644 index 5d92d33ee..000000000 --- a/data/spells/scripts/monster/wave t.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) -arr = { -{1, 1, 1}, -{0, 1, 0}, -{0, 3, 0} -} - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/webster paralyze.lua b/data/spells/scripts/monster/webster paralyze.lua deleted file mode 100644 index c9d5f35ab..000000000 --- a/data/spells/scripts/monster/webster paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.5, 0, -0.65, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/weeper paralyze.lua b/data/spells/scripts/monster/weeper paralyze.lua deleted file mode 100644 index 069e1d2a9..000000000 --- a/data/spells/scripts/monster/weeper paralyze.lua +++ /dev/null @@ -1,24 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 5000) -condition:setFormula(-0.55, 0, -0.7, 0) -combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/weeper skill reducer.lua b/data/spells/scripts/monster/weeper skill reducer.lua deleted file mode 100644 index d35835f80..000000000 --- a/data/spells/scripts/monster/weeper skill reducer.lua +++ /dev/null @@ -1,18 +0,0 @@ -local combat = {} - -for i = 15, 55 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 7000) - condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE1X1) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(15, 55)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/werelion_wave.lua b/data/spells/scripts/monster/werelion_wave.lua deleted file mode 100644 index ea644986b..000000000 --- a/data/spells/scripts/monster/werelion_wave.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) - - arr = { - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/werewolf skill reducer.lua b/data/spells/scripts/monster/werewolf skill reducer.lua deleted file mode 100644 index 5cec99596..000000000 --- a/data/spells/scripts/monster/werewolf skill reducer.lua +++ /dev/null @@ -1,25 +0,0 @@ -local combat = {} - -for i = 65, 85 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_RED) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 4000) - condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, i) - condition:setParameter(CONDITION_PARAM_SKILL_FISTPERCENT, i) - - arr = { - {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0} - } - - local area = createCombatArea(arr) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(65, 85)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/werewolf summon.lua b/data/spells/scripts/monster/werewolf summon.lua deleted file mode 100644 index d15d81435..000000000 --- a/data/spells/scripts/monster/werewolf summon.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_WHITE) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("War Wolf", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/white pale heal.lua b/data/spells/scripts/monster/white pale heal.lua deleted file mode 100644 index 3e7ff89f4..000000000 --- a/data/spells/scripts/monster/white pale heal.lua +++ /dev/null @@ -1,15 +0,0 @@ -local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) -condition:setParameter(CONDITION_PARAM_SUBID, 88888) -condition:setParameter(CONDITION_PARAM_TICKS, 15 * 60 * 1000) -condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) -condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 15 * 60 * 1000) - -function onCastSpell(creature, var) - if creature:getHealth() < creature:getMaxHealth() * 0.2 and not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then - creature:addCondition(condition) - creature:addHealth(400) - else - return - end -return true -end diff --git a/data/spells/scripts/monster/white pale paralyze.lua b/data/spells/scripts/monster/white pale paralyze.lua deleted file mode 100644 index d6118baef..000000000 --- a/data/spells/scripts/monster/white pale paralyze.lua +++ /dev/null @@ -1,24 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.6, 0, -0.65, 0) -combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/white pale summon.lua b/data/spells/scripts/monster/white pale summon.lua deleted file mode 100644 index 5c4c096c7..000000000 --- a/data/spells/scripts/monster/white pale summon.lua +++ /dev/null @@ -1,38 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER) - -arr = { -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 1, 3, 1, 1, 1, 1, 0, 0}, -{0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, -{0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, -{0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -} - -local area = createCombatArea(arr) -combat:setArea(area) - -local maxsummons = 2 - -function onCastSpell(creature, var) - local summoncount = creature:getSummons() - if #summoncount < 2 then - for i = 1, maxsummons - #summoncount do - local mid = Game.createMonster("Carrion Worm", creature:getPosition()) - if not mid then - return - end - mid:setMaster(creature) - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/white shade paralyze.lua b/data/spells/scripts/monster/white shade paralyze.lua deleted file mode 100644 index 699e98110..000000000 --- a/data/spells/scripts/monster/white shade paralyze.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.3, 0, -0.45, 0) -combat:addCondition(condition) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/wiggler paralyze.lua b/data/spells/scripts/monster/wiggler paralyze.lua deleted file mode 100644 index 2ee2dd258..000000000 --- a/data/spells/scripts/monster/wiggler paralyze.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.25, 0, -0.5, 0) -combat:addCondition(condition) - - arr = { - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/wilting leaf golem paralyze.lua b/data/spells/scripts/monster/wilting leaf golem paralyze.lua deleted file mode 100644 index 383bf6f0b..000000000 --- a/data/spells/scripts/monster/wilting leaf golem paralyze.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.25, 0, -0.45, 0) -combat:addCondition(condition) - - -local area = createCombatArea(AREA_SQUARE1X1) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/woodling paralyze.lua b/data/spells/scripts/monster/woodling paralyze.lua deleted file mode 100644 index f7e08f789..000000000 --- a/data/spells/scripts/monster/woodling paralyze.lua +++ /dev/null @@ -1,21 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, 2) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 3000) -condition:setFormula(-0.05, 0, -0.1, 0) - -arr = { - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/worm priestess paralyze.lua b/data/spells/scripts/monster/worm priestess paralyze.lua deleted file mode 100644 index ce7a94dbd..000000000 --- a/data/spells/scripts/monster/worm priestess paralyze.lua +++ /dev/null @@ -1,22 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 10000) -condition:setFormula(-0.4, 0, -0.7, 0) -combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/wyrm wave.lua b/data/spells/scripts/monster/wyrm wave.lua deleted file mode 100644 index 016660b98..000000000 --- a/data/spells/scripts/monster/wyrm wave.lua +++ /dev/null @@ -1,20 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_PURPLEENERGY) - - arr = { - {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) - combat:setArea(area) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/wyvern drunk.lua b/data/spells/scripts/monster/wyvern drunk.lua deleted file mode 100644 index 3914d5803..000000000 --- a/data/spells/scripts/monster/wyvern drunk.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_RED) - -local condition = Condition(CONDITION_DRUNK) -condition:setParameter(CONDITION_PARAM_TICKS, 25000) -combat:addCondition(condition) - - arr = { - {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0} - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/young sea serpent drown.lua b/data/spells/scripts/monster/young sea serpent drown.lua deleted file mode 100644 index b1e799ce3..000000000 --- a/data/spells/scripts/monster/young sea serpent drown.lua +++ /dev/null @@ -1,15 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_WATERSPLASH) - -local condition = Condition(CONDITION_DROWN) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(6, 5000, -20) - -local area = createCombatArea(AREA_SQUARE1X1) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/zamulosh invisible.lua b/data/spells/scripts/monster/zamulosh invisible.lua deleted file mode 100644 index 5b24564ef..000000000 --- a/data/spells/scripts/monster/zamulosh invisible.lua +++ /dev/null @@ -1,22 +0,0 @@ -local condition = Condition(CONDITION_INVISIBLE) -condition:setParameter(CONDITION_PARAM_TICKS, 10000) -local function invisible(fromPosition, toPosition) - for x = fromPosition.x, toPosition.x do - for y = fromPosition.y, toPosition.y do - for z = fromPosition.z, toPosition.z do - local creature = Tile(Position(x, y, z)):getTopCreature() - if creature then - if creature:isMonster() and creature:getName():lower() == 'zamulosh' then - creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - creature:addCondition(condition) - end - end - end - end - end -end - -function onCastSpell(creature, var) - invisible(Position(33634, 32749, 11), Position(33654, 32765, 11)) - return -end diff --git a/data/spells/scripts/monster/zamulosh tp.lua b/data/spells/scripts/monster/zamulosh tp.lua deleted file mode 100644 index 28bdb00d0..000000000 --- a/data/spells/scripts/monster/zamulosh tp.lua +++ /dev/null @@ -1,6 +0,0 @@ -function onCastSpell(creature, var) - creature:getPosition():sendMagicEffect(CONST_ME_POFF) - creature:teleportTo(Position(33644, 32757, 11)) - creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - return -end diff --git a/data/spells/scripts/monster/zavarash heal.lua b/data/spells/scripts/monster/zavarash heal.lua deleted file mode 100644 index 218364de5..000000000 --- a/data/spells/scripts/monster/zavarash heal.lua +++ /dev/null @@ -1,42 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -arr = { - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, - {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, - {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, - {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, - } - -local area = createCombatArea(arr) -combat:setArea(area) - -function onTargetCreature(creature, target) - local min = 425 - local max = 575 - - local master = target:getMaster() - if target:isPlayer() and not master - or master and master:isPlayer() then - return true - end - - doTargetCombatHealth(0, target, COMBAT_HEALING, min, max, CONST_ME_NONE) - return true -end - -combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/zavarash paralyze.lua b/data/spells/scripts/monster/zavarash paralyze.lua deleted file mode 100644 index a69468ad9..000000000 --- a/data/spells/scripts/monster/zavarash paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.8, 0, -0.9, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/zavarash2 paralyze.lua b/data/spells/scripts/monster/zavarash2 paralyze.lua deleted file mode 100644 index eb2ac0e2c..000000000 --- a/data/spells/scripts/monster/zavarash2 paralyze.lua +++ /dev/null @@ -1,12 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.05, 0, -0.1, 0) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/zugurosh pillar skill reducer.lua b/data/spells/scripts/monster/zugurosh pillar skill reducer.lua deleted file mode 100644 index 9e436329e..000000000 --- a/data/spells/scripts/monster/zugurosh pillar skill reducer.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = {} - -for i = 1, 20 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLCLOUDS) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 7000) - condition:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, i) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(1, 20)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/zugurosh soulfire.lua b/data/spells/scripts/monster/zugurosh soulfire.lua deleted file mode 100644 index f2fc75def..000000000 --- a/data/spells/scripts/monster/zugurosh soulfire.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) - -local condition = Condition(CONDITION_FIRE) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(30, 9000, -10) - -local area = createCombatArea(AREA_CIRCLE2X2) -combat:setArea(area) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/zulazza the corruptor paralyze.lua b/data/spells/scripts/monster/zulazza the corruptor paralyze.lua deleted file mode 100644 index 9ec9f0eec..000000000 --- a/data/spells/scripts/monster/zulazza the corruptor paralyze.lua +++ /dev/null @@ -1,17 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_GREENSTAR) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-0.6, 0, -0.8, 0) -combat:addCondition(condition) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat:setArea(area) - combat:addCondition(condition) - - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/zulazza the corruptor skill reducer.lua b/data/spells/scripts/monster/zulazza the corruptor skill reducer.lua deleted file mode 100644 index 65a09ed6d..000000000 --- a/data/spells/scripts/monster/zulazza the corruptor skill reducer.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = {} - -for i = 40, 50 do - combat[i] = Combat() - combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_POFF) - combat[i]:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH) - - local condition = Condition(CONDITION_ATTRIBUTES) - condition:setParameter(CONDITION_PARAM_TICKS, 15000) - condition:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, i) - - local area = createCombatArea(AREA_CIRCLE2X2) - combat[i]:setArea(area) - combat[i]:addCondition(condition) -end - -function onCastSpell(creature, var) - return combat[math.random(40, 50)]:execute(creature, var) -end diff --git a/data/spells/scripts/monster/zushuka freeze.lua b/data/spells/scripts/monster/zushuka freeze.lua deleted file mode 100644 index e94c6cc2d..000000000 --- a/data/spells/scripts/monster/zushuka freeze.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA) -combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SHIVERARROW) - -local condition = Condition(CONDITION_FREEZING) -condition:setParameter(CONDITION_PARAM_DELAYED, 1) -condition:addDamage(30, 8000, -8) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/monster/zushuka heal.lua b/data/spells/scripts/monster/zushuka heal.lua deleted file mode 100644 index 63e482f76..000000000 --- a/data/spells/scripts/monster/zushuka heal.lua +++ /dev/null @@ -1,15 +0,0 @@ -local condition = Condition(CONDITION_REGENERATION, CONDITIONID_DEFAULT) -condition:setParameter(CONDITION_PARAM_SUBID, 88888) -condition:setParameter(CONDITION_PARAM_TICKS, 15 * 60 * 1000) -condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 0.01) -condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 15 * 60 * 1000) - -function onCastSpell(creature, var) - if creature:getHealth() < creature:getMaxHealth() * 0.2 and not creature:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT, 88888) then - creature:addCondition(condition) - creature:addHealth(math.random(7500, 7515)) - else - return - end -return true -end diff --git a/data/spells/scripts/monster/zushuka paralyze.lua b/data/spells/scripts/monster/zushuka paralyze.lua deleted file mode 100644 index ff8cb9fcd..000000000 --- a/data/spells/scripts/monster/zushuka paralyze.lua +++ /dev/null @@ -1,15 +0,0 @@ - local combat = Combat() - combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SOUND_WHITE) - combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE) - - local condition = Condition(CONDITION_PARALYZE) - condition:setParameter(CONDITION_PARAM_TICKS, 20000) - condition:setFormula(-0.6, 0, -0.7, 0) - - local area = createCombatArea(AREA_SQUARE1X1) - combat:setArea(area) - combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/party/enchant.lua b/data/spells/scripts/party/enchant.lua deleted file mode 100644 index 12bf90121..000000000 --- a/data/spells/scripts/party/enchant.lua +++ /dev/null @@ -1,66 +0,0 @@ -local combat = Combat() -combat:setArea(createCombatArea(AREA_CIRCLE5X5)) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -local condition = Condition(CONDITION_ATTRIBUTES) -condition:setParameter(CONDITION_PARAM_SUBID, 3) -condition:setParameter(CONDITION_PARAM_BUFF_SPELL, 1) -condition:setParameter(CONDITION_PARAM_TICKS, 2 * 60 * 1000) -condition:setParameter(CONDITION_PARAM_STAT_MAGICPOINTS, 1) - -local baseMana = 120 -function onCastSpell(creature, var, isHotkey) - local position = creature:getPosition() - - local party = creature:getParty() - if not party then - creature:sendCancelMessage("No party members in range.") - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - local membersList = party:getMembers() - membersList[#membersList + 1] = party:getLeader() - if membersList == nil or type(membersList) ~= 'table' or #membersList <= 1 then - creature:sendCancelMessage("No party members in range.") - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - local affectedList = {} - for _, targetPlayer in ipairs(membersList) do - if targetPlayer:getPosition():getDistance(position) <= 36 then - affectedList[#affectedList + 1] = targetPlayer - end - end - - local tmp = #affectedList - if tmp <= 1 then - creature:sendCancelMessage("No party members in range.") - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - local mana = math.ceil((0.9 ^ (tmp - 1) * baseMana) * tmp) - if creature:getMana() < mana then - creature:sendCancelMessage(RETURNVALUE_NOTENOUGHMANA) - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - if not combat:execute(creature, var) then - creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - creature:addMana(-(mana - baseMana), FALSE) - creature:addManaSpent((mana - baseMana)) - - for _, targetPlayer in ipairs(affectedList) do - targetPlayer:addCondition(condition) - end - - return true -end diff --git a/data/spells/scripts/party/heal.lua b/data/spells/scripts/party/heal.lua deleted file mode 100644 index 99390761f..000000000 --- a/data/spells/scripts/party/heal.lua +++ /dev/null @@ -1,67 +0,0 @@ -local combat = Combat() -combat:setParameter(createCombatArea(AREA_CIRCLE5X5)) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -local condition = Condition(CONDITION_REGENERATION) -condition:setParameter(CONDITION_PARAM_SUBID, 1) -condition:setParameter(CONDITION_PARAM_BUFF_SPELL, 1) -condition:setParameter(CONDITION_PARAM_TICKS, 2 * 60 * 1000) -condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 20) -condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 2000) - -local baseMana = 120 -function onCastSpell(creature, var, isHotkey) - local position = creature:getPosition() - - local party = creature:getParty() - if not party then - creature:sendCancelMessage("No party members in range.") - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - local membersList = party:getMembers() - membersList[#membersList + 1] = party:getLeader() - if membersList == nil or type(membersList) ~= 'table' or #membersList <= 1 then - creature:sendCancelMessage("No party members in range.") - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - local affectedList = {} - for _, targetPlayer in ipairs(membersList) do - if targetPlayer:getPosition():getDistance(position) <= 36 then - affectedList[#affectedList + 1] = targetPlayer - end - end - - local tmp = #affectedList - if tmp <= 1 then - creature:sendCancelMessage("No party members in range.") - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - local mana = math.ceil((0.9 ^ (tmp - 1) * baseMana) * tmp) - if creature:getMana() < mana then - creature:sendCancelMessage(RETURNVALUE_NOTENOUGHMANA) - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - if not combat:execute(creature, var) then - creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - creature:addMana(-(mana - baseMana), false) - creature:addManaSpent((mana - baseMana)) - - for _, targetPlayer in ipairs(affectedList) do - targetPlayer:addCondition(condition) - end - - return true -end diff --git a/data/spells/scripts/party/protect.lua b/data/spells/scripts/party/protect.lua deleted file mode 100644 index 792457130..000000000 --- a/data/spells/scripts/party/protect.lua +++ /dev/null @@ -1,66 +0,0 @@ -local combat = Combat() -combat:setArea(createCombatArea(AREA_CIRCLE5X5)) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -local condition = Condition(CONDITION_ATTRIBUTES) -condition:setParameter(CONDITION_PARAM_SUBID, 2) -condition:setParameter(CONDITION_PARAM_BUFF_SPELL, 1) -condition:setParameter(CONDITION_PARAM_TICKS, 2 * 60 * 1000) -condition:setParameter(CONDITION_PARAM_SKILL_SHIELD, 2) - -local baseMana = 90 -function onCastSpell(creature, var, isHotkey) - local position = creature:getPosition() - - local party = creature:getParty() - if not party then - creature:sendCancelMessage("No party members in range.") - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - local membersList = party:getMembers() - membersList[#membersList + 1] = party:getLeader() - if membersList == nil or type(membersList) ~= 'table' or #membersList <= 1 then - creature:sendCancelMessage("No party members in range.") - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - local affectedList = {} - for _, targetPlayer in ipairs(membersList) do - if targetPlayer:getPosition():getDistance(position) <= 36 then - affectedList[#affectedList + 1] = targetPlayer - end - end - - local tmp = #affectedList - if tmp <= 1 then - creature:sendCancelMessage("No party members in range.") - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - local mana = math.ceil((0.9 ^ (tmp - 1) * baseMana) * tmp) - if creature:getMana() < mana then - creature:sendCancelMessage(RETURNVALUE_NOTENOUGHMANA) - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - if not combat:execute(creature, var) then - creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - creature:addMana(-(mana - baseMana), false) - creature:addManaSpent((mana - baseMana)) - - for _, targetPlayer in ipairs(affectedList) do - targetPlayer:addCondition(condition) - end - - return true -end diff --git a/data/spells/scripts/party/train.lua b/data/spells/scripts/party/train.lua deleted file mode 100644 index a93e29b25..000000000 --- a/data/spells/scripts/party/train.lua +++ /dev/null @@ -1,67 +0,0 @@ -local combat = Combat() -combat:setArea(createCombatArea(AREA_CIRCLE5X5)) -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -local condition = Condition(CONDITION_ATTRIBUTES) -condition:setParameter(CONDITION_PARAM_SUBID, 1) -condition:setParameter(CONDITION_PARAM_BUFF_SPELL, 1) -condition:setParameter(CONDITION_PARAM_TICKS, 2 * 60 * 1000) -condition:setParameter(CONDITION_PARAM_SKILL_MELEE, 3) -condition:setParameter(CONDITION_PARAM_SKILL_DISTANCE, 3) - -local baseMana = 60 -function onCastSpell(creature, var, isHotkey) - local position = creature:getPosition() - - local party = creature:getParty() - if not party then - creature:sendCancelMessage("No party members in range.") - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - local membersList = party:getMembers() - membersList[#membersList + 1] = party:getLeader() - if membersList == nil or type(membersList) ~= 'table' or #membersList <= 1 then - creature:sendCancelMessage("No party members in range.") - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - local affectedList = {} - for _, targetPlayer in ipairs(membersList) do - if targetPlayer:getPosition():getDistance(position) <= 36 then - affectedList[#affectedList + 1] = targetPlayer - end - end - - local tmp = #affectedList - if tmp <= 1 then - creature:sendCancelMessage("No party members in range.") - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - local mana = math.ceil((0.9 ^ (tmp - 1) * baseMana) * tmp) - if creature:getMana() < mana then - creature:sendCancelMessage(RETURNVALUE_NOTENOUGHMANA) - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - if not combat:execute(creature, var) then - creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - creature:addMana(-(mana - baseMana), FALSE) - creature:addManaSpent((mana - baseMana)) - - for _, targetPlayer in ipairs(affectedList) do - targetPlayer:addCondition(condition) - end - - return true -end diff --git a/data/spells/scripts/summon/familiars.lua b/data/spells/scripts/summon/familiars.lua deleted file mode 100644 index 9c3f8f3bd..000000000 --- a/data/spells/scripts/summon/familiars.lua +++ /dev/null @@ -1,78 +0,0 @@ -local familiar = { - [VOCATION.BASE_ID.SORCERER] = {name = "Sorcerer familiar"}, - [VOCATION.BASE_ID.DRUID] = {name = "Druid familiar"}, - [VOCATION.BASE_ID.PALADIN] = {name = "Paladin familiar"}, - [VOCATION.BASE_ID.KNIGHT] = {name = "Knight familiar"} -} - -local timer = { - [1] = {storage=Storage.PetSummonEvent10, countdown=10, message = "10 seconds"}, - [2] = {storage=Storage.PetSummonEvent60, countdown=60, message = "one minute"} -} - -local function sendMessageFunction(pid, message) - if Player(pid) then - Player(pid):sendTextMessage(MESSAGE_LOOT, "Your summon will disappear in less than " .. message) - end -end - -local function removePet(creatureId, playerId) - local creature = Creature(creatureId) - local player = Player(playerId) - if not creature or not player then - return true - end - creature:remove() - for sendMessage = 1, #timer do - player:setStorageValue(timer[sendMessage].storage, -1) - end -end - -function onCastSpell(player, variant) - if not player or not isPremium(player) then - player:getPosition():sendMagicEffect(CONST_ME_POFF) - player:sendCancelMessage("You need a premium account.") - return false - end - - if #player:getSummons() >= 1 then - player:sendCancelMessage("You can't have other summons.") - player:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end - - local vocation = familiar[player:getVocation():getBaseId()] - local familiarName - - if vocation then - familiarName = vocation.name - end - - if not familiarName then - player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - player:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end - - local myFamiliar = Game.createMonster(familiarName, player:getPosition(), true, false) - if not myFamiliar then - player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - player:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end - - player:addSummon(myFamiliar) - myFamiliar:setOutfit({lookType = player:getFamiliarLooktype()}) - --myFamiliar:reload() - myFamiliar:registerEvent("FamiliarDeath") - local deltaSpeed = math.max(player:getSpeed() - myFamiliar:getBaseSpeed(), 0) - myFamiliar:changeSpeed(deltaSpeed) - player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - myFamiliar:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - player:setStorageValue(Storage.PetSummon, os.time() + 15*60) -- 15 minutes from now - addEvent(removePet, 15*60*1000, myFamiliar:getId(), player:getId()) - for sendMessage = 1, #timer do - player:setStorageValue(timer[sendMessage].storage,addEvent(sendMessageFunction, (15*60-timer[sendMessage].countdown)*1000, player:getId(),timer[sendMessage].message)) - end - return true -end diff --git a/data/spells/scripts/summon/summon creature.lua b/data/spells/scripts/summon/summon creature.lua deleted file mode 100644 index d7803ed88..000000000 --- a/data/spells/scripts/summon/summon creature.lua +++ /dev/null @@ -1,47 +0,0 @@ -function onCastSpell(player, variant) - local monsterName = variant:getString() - local monsterType = MonsterType(monsterName) - - if not monsterType then - player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - player:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end - - if not getPlayerFlagValue(player, PlayerFlag_CanSummonAll) then - if not monsterType:isSummonable() then - player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - player:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end - - if #player:getSummons() >= 2 then - player:sendCancelMessage("You cannot summon more players.") - player:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end - end - - local manaCost = monsterType:getManaCost() - if player:getMana() < manaCost and not getPlayerFlagValue(player, PlayerFlag_HasInfiniteMana) then - player:sendCancelMessage(RETURNVALUE_NOTENOUGHMANA) - player:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end - - local position = player:getPosition() - local summon = Game.createMonster(monsterName, position, true, false) - if not summon then - player:sendCancelMessage(RETURNVALUE_NOTENOUGHROOM) - position:sendMagicEffect(CONST_ME_POFF) - return false - end - - player:addMana(-manaCost) - player:addManaSpent(manaCost) - player:addSummon(summon) - summon:reload() - position:sendMagicEffect(CONST_ME_MAGIC_BLUE) - summon:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - return true -end diff --git a/data/spells/scripts/support/animate dead rune.lua b/data/spells/scripts/support/animate dead rune.lua deleted file mode 100644 index ad61d6c5e..000000000 --- a/data/spells/scripts/support/animate dead rune.lua +++ /dev/null @@ -1,30 +0,0 @@ -function onCastSpell(player, variant) - local position = variant:getPosition() - local tile = Tile(position) - if tile then - local corpse = tile:getTopDownItem() - if corpse then - local itemType = corpse:getType() - if itemType:isCorpse() and itemType:isMovable() then - if #player:getSummons() < 2 and player:getSkull() ~= SKULL_BLACK then - local summon = Game.createMonster("Skeleton", position, true, true) - if summon then - corpse:remove() - player:addSummon(summon) - summon:reload() - position:sendMagicEffect(CONST_ME_MAGIC_BLUE) - return true - end - else - player:sendCancelMessage("You cannot control more creatures.") - player:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end - end - end - end - - player:getPosition():sendMagicEffect(CONST_ME_POFF) - player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - return false -end diff --git a/data/spells/scripts/support/blood rage.lua b/data/spells/scripts/support/blood rage.lua deleted file mode 100644 index ee909b2c8..000000000 --- a/data/spells/scripts/support/blood rage.lua +++ /dev/null @@ -1,19 +0,0 @@ -local condition = Condition(CONDITION_ATTRIBUTES) -condition:setParameter(CONDITION_PARAM_SUBID, 5) -condition:setParameter(CONDITION_PARAM_TICKS, 10000) -condition:setParameter(CONDITION_PARAM_SKILL_MELEEPERCENT, 135) -condition:setParameter(CONDITION_PARAM_BUFF_DAMAGERECEIVED, 115) -condition:setParameter(CONDITION_PARAM_DISABLE_DEFENSE, true) -condition:setParameter(CONDITION_PARAM_BUFF_SPELL, true) - -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) -combat:addCondition(condition) - -function onCastSpell(creature, var) - if creature:getCondition(CONDITION_ATTRIBUTES, CONDITIONID_COMBAT, 5) then - creature:removeCondition(CONDITION_ATTRIBUTES, CONDITIONID_COMBAT, 5) - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/support/cancel invisibility.lua b/data/spells/scripts/support/cancel invisibility.lua deleted file mode 100644 index c99719465..000000000 --- a/data/spells/scripts/support/cancel invisibility.lua +++ /dev/null @@ -1,8 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_INVISIBLE) -combat:setArea(createCombatArea(AREA_CIRCLE3X3)) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/support/cancel magic shield.lua b/data/spells/scripts/support/cancel magic shield.lua deleted file mode 100644 index 9a9279969..000000000 --- a/data/spells/scripts/support/cancel magic shield.lua +++ /dev/null @@ -1,9 +0,0 @@ - -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -function onCastSpell(creature, var) - creature:removeCondition(CONDITION_MANASHIELD) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/support/challenge.lua b/data/spells/scripts/support/challenge.lua deleted file mode 100644 index 348a3a7ad..000000000 --- a/data/spells/scripts/support/challenge.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setArea(createCombatArea(AREA_SQUARE1X1)) - -function onTargetCreature(creature, target) - return doChallengeCreature(creature, target) -end - -combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") - -function onCastSpell(creature, variant) - return combat:execute(creature, variant) -end diff --git a/data/spells/scripts/support/chameleon.lua b/data/spells/scripts/support/chameleon.lua deleted file mode 100644 index e157d1a52..000000000 --- a/data/spells/scripts/support/chameleon.lua +++ /dev/null @@ -1,27 +0,0 @@ -local condition = Condition(CONDITION_OUTFIT) -condition:setTicks(200000) - -function onCastSpell(creature, variant, isHotkey) - local position, item = variant:getPosition() - if position.x == CONTAINER_POSITION then - local container = creature:getContainerById(position.y - 64) - if container then - item = container:getItem(position.z) - else - item = creature:getSlotItem(position.y) - end - else - item = Tile(position):getTopDownItem() - end - - if not item or item.itemid == 0 or not isMoveable(item.uid) then - creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - creature:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end - - condition:setOutfit({lookTypeEx = item.itemid}) - creature:addCondition(condition) - creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) - return true -end diff --git a/data/spells/scripts/support/charge.lua b/data/spells/scripts/support/charge.lua deleted file mode 100644 index 6f931d3d5..000000000 --- a/data/spells/scripts/support/charge.lua +++ /dev/null @@ -1,27 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) - -local condition = Condition(CONDITION_HASTE) -condition:setParameter(CONDITION_PARAM_TICKS, 5000) -condition:setFormula(0.9, -72, 0.9, -72) -combat:addCondition(condition) - -function onCastSpell(creature, variant) - local summons = creature:getSummons() - if summons and type(summons) == 'table' and #summons > 0 then - for i = 1, #summons do - local summon = summons[i] - local summon_t = summon:getType() - if summon_t and summon_t:isPet() then - local deltaSpeed = math.max(creature:getBaseSpeed() - summon:getBaseSpeed(), 0) - local PetSpeed = ((summon:getBaseSpeed() + deltaSpeed) * 0.9) - 72 - local PetHaste = createConditionObject(CONDITION_HASTE) - setConditionParam(PetHaste, CONDITION_PARAM_TICKS, 5000) - setConditionParam(PetHaste, CONDITION_PARAM_SPEED, PetSpeed) - summon:addCondition(PetHaste) - end - end - end - return combat:execute(creature, variant) -end diff --git a/data/spells/scripts/support/chivalrous challenge.lua b/data/spells/scripts/support/chivalrous challenge.lua deleted file mode 100644 index a510053bb..000000000 --- a/data/spells/scripts/support/chivalrous challenge.lua +++ /dev/null @@ -1,75 +0,0 @@ -local function getDiagonalDistance(pos1, pos2) - local dstX = math.abs(pos1.x - pos2.x) - local dstY = math.abs(pos1.y - pos2.y) - if dstX > dstY then - return 14 * dstY + 10 * (dstX - dstY) - else - return 14 * dstX + 10 * (dstY - dstX) - end -end -local function chain(player) - local creatures = Game.getSpectators(player:getPosition(), false, false, 9, 9, 6, 6) - local totalChain = 0 - local monsters = {} - for _, creature in pairs(creatures) do - if creature:isMonster() then - if creature:getType():isRewardBoss() then - return -1 - elseif creature:getMaster() == nil and creature:getType():getTargetDistance() > 1 then - table.insert(monsters, creature) - end - end - end - local lastChain = player - local lastChainPosition = player:getPosition() - local closestMonster, closestMonsterIndex, closestMonsterPosition - local path, tempPosition, updateLastChain - while (totalChain < 5 and #monsters > 0) do - closestMonster = nil - for index, monster in pairs(monsters) do - tempPosition = monster:getPosition() - if not closestMonster or getDiagonalDistance(lastChain:getPosition(), tempPosition) < getDiagonalDistance(lastChain:getPosition(), closestMonsterPosition) then - closestMonster = monster - closestMonsterIndex = index - closestMonsterPosition = tempPosition - end - end - table.remove(monsters, closestMonsterIndex) - updateLastChain = false - if lastChainPosition:getDistance(closestMonsterPosition) == 1 then - updateLastChain = true - else - path = lastChainPosition:getPathTo(closestMonsterPosition, 0, 1, true, true, 9) - if path and #path > 0 then - for i=1, #path do - lastChainPosition:getNextPosition(path[i], 1) - lastChainPosition:sendMagicEffect(CONST_ME_CHIVALRIOUS_CHALLENGE) - end - updateLastChain = true - end - end - if updateLastChain then - closestMonsterPosition:sendMagicEffect(CONST_ME_CHIVALRIOUS_CHALLENGE) - closestMonster:changeTargetDistance(1) - doChallengeCreature(player, closestMonster) - lastChain = closestMonster - lastChainPosition = closestMonsterPosition - totalChain = totalChain + 1 - end - end - return totalChain -end -function onCastSpell(creature, variant) - local total = chain(creature) - if total > 0 then - return true - elseif total == -1 then - creature:sendCancelMessage("You can't use this spell if there's a boss.") - creature:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - else - creature:sendCancelMessage("There are no ranged monsters.") - creature:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end -end \ No newline at end of file diff --git a/data/spells/scripts/support/convince_creature.lua b/data/spells/scripts/support/convince_creature.lua deleted file mode 100644 index a99eb4458..000000000 --- a/data/spells/scripts/support/convince_creature.lua +++ /dev/null @@ -1,37 +0,0 @@ -function onCastSpell(creature, variant, isHotkey) - local target = Creature(variant:getNumber()) - if not target or not target:isMonster() then - creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - creature:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end - - local monsterType = target:getType() - if not getPlayerFlagValue(creature, PlayerFlag_CanConvinceAll) then - if not monsterType:isConvinceable() then - creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - creature:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end - - if #creature:getSummons() >= 2 then - creature:sendCancelMessage("You cannot control more creatures.") - creature:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end - end - - local manaCost = target:getType():getManaCost() - if creature:getMana() < manaCost and not getPlayerFlagValue(creature, PlayerFlag_HasInfiniteMana) then - creature:sendCancelMessage(RETURNVALUE_NOTENOUGHMANA) - creature:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end - - creature:addMana(-manaCost) - creature:addManaSpent(manaCost) - creature:addSummon(target) - target:reload() - creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - return true -end diff --git a/data/spells/scripts/support/desintegrate rune.lua b/data/spells/scripts/support/desintegrate rune.lua deleted file mode 100644 index 73c0c0ec5..000000000 --- a/data/spells/scripts/support/desintegrate rune.lua +++ /dev/null @@ -1,25 +0,0 @@ -local corpseIds = {3058, 3059, 3060, 3061, 3064, 3065, 3066} -local removalLimit = 500 - -function onCastSpell(creature, variant, isHotkey) - local position = variant:getPosition() - local tile = Tile(position) - if tile then - local items = tile:getItems() - if items then - for i, item in ipairs(items) do - if item:getType():isMovable() and item:getUniqueId() > 65535 and item:getActionId() == 0 and not table.contains(corpseIds, item:getId()) then - item:remove() - end - - if i == removalLimit then - break - end - end - end - end - - creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - position:sendMagicEffect(CONST_ME_POFF) - return true -end diff --git a/data/spells/scripts/support/destroy field rune.lua b/data/spells/scripts/support/destroy field rune.lua deleted file mode 100644 index c251ca919..000000000 --- a/data/spells/scripts/support/destroy field rune.lua +++ /dev/null @@ -1,14 +0,0 @@ -function onCastSpell(creature, variant, isHotkey) - local position = Variant.getPosition(variant) - local tile = Tile(position) - local field = tile and tile:getItemByType(ITEM_TYPE_MAGICFIELD) - if field and isInArray(FIELDS, field:getId()) then - field:remove() - position:sendMagicEffect(CONST_ME_POFF) - return true - end - - creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - creature:getPosition():sendMagicEffect(CONST_ME_POFF) - return false -end diff --git a/data/spells/scripts/support/divine dazzle.lua b/data/spells/scripts/support/divine dazzle.lua deleted file mode 100644 index 00b10e2e5..000000000 --- a/data/spells/scripts/support/divine dazzle.lua +++ /dev/null @@ -1,74 +0,0 @@ -local function getDiagonalDistance(pos1, pos2) - local dstX = math.abs(pos1.x - pos2.x) - local dstY = math.abs(pos1.y - pos2.y) - if dstX > dstY then - return 14 * dstY + 10 * (dstX - dstY) - else - return 14 * dstX + 10 * (dstY - dstX) - end -end -local function chain(player) - local creatures = Game.getSpectators(player:getPosition(), false, false, 6, 6, 6, 6) - local totalChain = 0 - local monsters = {} - for _, creature in pairs(creatures) do - if creature:isMonster() then - if creature:getType():isRewardBoss() then - return -1 - elseif creature:getMaster() == nil and creature:getType():getTargetDistance() > 1 then - table.insert(monsters, creature) - end - end - end - local lastChain = player - local lastChainPosition = player:getPosition() - local closestMonster, closestMonsterIndex, closestMonsterPosition - local path, tempPosition, updateLastChain - while (totalChain < 3 and #monsters > 0) do - closestMonster = nil - for index, monster in pairs(monsters) do - tempPosition = monster:getPosition() - if not closestMonster or getDiagonalDistance(lastChain:getPosition(), tempPosition) < getDiagonalDistance(lastChain:getPosition(), closestMonsterPosition) then - closestMonster = monster - closestMonsterIndex = index - closestMonsterPosition = tempPosition - end - end - table.remove(monsters, closestMonsterIndex) - updateLastChain = false - if lastChainPosition:getDistance(closestMonsterPosition) == 1 then - updateLastChain = true - else - path = lastChainPosition:getPathTo(closestMonsterPosition, 0, 1, true, true, 9) - if path and #path > 0 then - for i=1, #path do - lastChainPosition:getNextPosition(path[i], 1) - lastChainPosition:sendMagicEffect(CONST_ME_DIVINE_DAZZLE) - end - updateLastChain = true - end - end - if updateLastChain then - closestMonsterPosition:sendMagicEffect(CONST_ME_DIVINE_DAZZLE) - closestMonster:changeTargetDistance(1) - lastChain = closestMonster - lastChainPosition = closestMonsterPosition - totalChain = totalChain + 1 - end - end - return totalChain -end -function onCastSpell(creature, variant) - local total = chain(creature) - if total > 0 then - return true - elseif total == -1 then - creature:sendCancelMessage("You can't use this spell if there's a boss.") - creature:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - else - creature:sendCancelMessage("There are no ranged monsters.") - creature:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end -end \ No newline at end of file diff --git a/data/spells/scripts/support/expose weakness.lua b/data/spells/scripts/support/expose weakness.lua deleted file mode 100644 index 72e202b16..000000000 --- a/data/spells/scripts/support/expose weakness.lua +++ /dev/null @@ -1,30 +0,0 @@ -local condition = Condition(CONDITION_ATTRIBUTES) -condition:setParameter(CONDITION_PARAM_TICKS, 16000) -condition:setParameter(CONDITION_PARAM_BUFF_DAMAGERECEIVED, 105) - -function onTargetCreature(creature, target) - local player = creature:getPlayer() - - if target:isPlayer() then - return false - end - if target:getMaster() then - return true - end - - target:addCondition(condition) - return true -end - -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) -combat:setArea(createCombatArea(AREA_CIRCLE3X3)) -combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") - -function onCastSpell(creature, var, isHotkey) - local target = creature:getTarget() - if target then - var = Variant(target) - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/support/find person.lua b/data/spells/scripts/support/find person.lua deleted file mode 100644 index c478efd06..000000000 --- a/data/spells/scripts/support/find person.lua +++ /dev/null @@ -1,74 +0,0 @@ -local LEVEL_LOWER = 1 -local LEVEL_SAME = 2 -local LEVEL_HIGHER = 3 - -local DISTANCE_BESIDE = 1 -local DISTANCE_CLOSE = 2 -local DISTANCE_FAR = 3 -local DISTANCE_VERYFAR = 4 - -local directions = { - [DIRECTION_NORTH] = "north", - [DIRECTION_SOUTH] = "south", - [DIRECTION_EAST] = "east", - [DIRECTION_WEST] = "west", - [DIRECTION_NORTHEAST] = "north-east", - [DIRECTION_NORTHWEST] = "north-west", - [DIRECTION_SOUTHEAST] = "south-east", - [DIRECTION_SOUTHWEST] = "south-west" -} - -local messages = { - [DISTANCE_BESIDE] = { - [LEVEL_LOWER] = "is below you", - [LEVEL_SAME] = "is standing next to you", - [LEVEL_HIGHER] = "is above you" - }, - [DISTANCE_CLOSE] = { - [LEVEL_LOWER] = "is on a lower level to the", - [LEVEL_SAME] = "is to the", - [LEVEL_HIGHER] = "is on a higher level to the" - }, - [DISTANCE_FAR] = "is far to the", - [DISTANCE_VERYFAR] = "is very far to the" -} - -function onCastSpell(creature, variant) - local target = Player(variant:getString()) - if not target or target:getGroup():getAccess() and not creature:getGroup():getAccess() then - creature:sendCancelMessage(RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE) - creature:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end - - local targetPosition = target:getPosition() - local creaturePosition = creature:getPosition() - local positionDifference = { - x = creaturePosition.x - targetPosition.x, - y = creaturePosition.y - targetPosition.y, - z = creaturePosition.z - targetPosition.z - } - - local maxPositionDifference, direction = math.max(math.abs(positionDifference.x), math.abs(positionDifference.y)) - if maxPositionDifference >= 5 then - local positionTangent = positionDifference.x ~= 0 and positionDifference.y / positionDifference.x or 10 - if math.abs(positionTangent) < 0.4142 then - direction = positionDifference.x > 0 and DIRECTION_WEST or DIRECTION_EAST - elseif math.abs(positionTangent) < 2.4142 then - direction = positionTangent > 0 and (positionDifference.y > 0 and DIRECTION_NORTHWEST or DIRECTION_SOUTHEAST) or positionDifference.x > 0 and DIRECTION_SOUTHWEST or DIRECTION_NORTHEAST - else - direction = positionDifference.y > 0 and DIRECTION_NORTH or DIRECTION_SOUTH - end - end - - local level = positionDifference.z > 0 and LEVEL_HIGHER or positionDifference.z < 0 and LEVEL_LOWER or LEVEL_SAME - local distance = maxPositionDifference < 5 and DISTANCE_BESIDE or maxPositionDifference < 101 and DISTANCE_CLOSE or maxPositionDifference < 275 and DISTANCE_FAR or DISTANCE_VERYFAR - local message = messages[distance][level] or messages[distance] - if distance ~= DISTANCE_BESIDE then - message = message .. " " .. directions[direction] - end - - creature:sendTextMessage(MESSAGE_LOOK, target:getName() .. " " .. message .. ".") - creaturePosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) - return true -end diff --git a/data/spells/scripts/support/food.lua b/data/spells/scripts/support/food.lua deleted file mode 100644 index b1c81d013..000000000 --- a/data/spells/scripts/support/food.lua +++ /dev/null @@ -1,19 +0,0 @@ -local foods = { - 2666, -- meat - 2671, -- ham - 2681, -- grape - 2674, -- apple - 2689, -- bread - 2690, -- roll - 2696 -- cheese -} - -function onCastSpell(creature, variant) - if math.random(0, 1) == 1 then - creature:addItem(foods[math.random(#foods)]) - end - - creature:addItem(foods[math.random(#foods)]) - creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) - return true -end diff --git a/data/spells/scripts/support/great light.lua b/data/spells/scripts/support/great light.lua deleted file mode 100644 index 03ebd2b5d..000000000 --- a/data/spells/scripts/support/great light.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -local condition = Condition(CONDITION_LIGHT) -condition:setParameter(CONDITION_PARAM_LIGHT_LEVEL, 8) -condition:setParameter(CONDITION_PARAM_LIGHT_COLOR, 215) -condition:setParameter(CONDITION_PARAM_TICKS, (11 * 60 + 35) * 1000) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/support/haste.lua b/data/spells/scripts/support/haste.lua deleted file mode 100644 index fbd438dc4..000000000 --- a/data/spells/scripts/support/haste.lua +++ /dev/null @@ -1,27 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) - -local condition = Condition(CONDITION_HASTE) -condition:setParameter(CONDITION_PARAM_TICKS, 33000) -condition:setFormula(0.3, -24, 0.3, -24) -combat:addCondition(condition) - -function onCastSpell(creature, variant) - local summons = creature:getSummons() - if summons and type(summons) == 'table' and #summons > 0 then - for i = 1, #summons do - local summon = summons[i] - local summon_t = summon:getType() - if summon_t and summon_t:isPet() then - local deltaSpeed = math.max(creature:getBaseSpeed() - summon:getBaseSpeed(), 0) - local PetSpeed = ((summon:getBaseSpeed() + deltaSpeed) * 0.3) - 24 - local PetHaste = createConditionObject(CONDITION_HASTE) - setConditionParam(PetHaste, CONDITION_PARAM_TICKS, 33000) - setConditionParam(PetHaste, CONDITION_PARAM_SPEED, PetSpeed) - summon:addCondition(PetHaste) - end - end - end - return combat:execute(creature, variant) -end diff --git a/data/spells/scripts/support/illusion.lua b/data/spells/scripts/support/illusion.lua deleted file mode 100644 index 39699741e..000000000 --- a/data/spells/scripts/support/illusion.lua +++ /dev/null @@ -1,23 +0,0 @@ -local condition = Condition(CONDITION_OUTFIT) -condition:setTicks(180000) - -function onCastSpell(creature, variant) - local returnValue = RETURNVALUE_NOERROR - local monsterType = MonsterType(variant:getString()) - if not monsterType then - returnValue = RETURNVALUE_CREATUREDOESNOTEXIST - elseif not getPlayerFlagValue(creature, PlayerFlag_CanIllusionAll) and not monsterType:isIllusionable() then - returnValue = RETURNVALUE_NOTPOSSIBLE - end - - if returnValue ~= RETURNVALUE_NOERROR then - creature:sendCancelMessage(returnValue) - creature:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end - - condition:setOutfit(monsterType:getOutfit()) - creature:addCondition(condition) - creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) - return true -end diff --git a/data/spells/scripts/support/invisible.lua b/data/spells/scripts/support/invisible.lua deleted file mode 100644 index e6a9557c2..000000000 --- a/data/spells/scripts/support/invisible.lua +++ /dev/null @@ -1,11 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) - -local condition = Condition(CONDITION_INVISIBLE) -condition:setParameter(CONDITION_PARAM_TICKS, 200000) -combat:addCondition(condition) - -function onCastSpell(creature, variant) - return combat:execute(creature, variant) -end diff --git a/data/spells/scripts/support/levitate.lua b/data/spells/scripts/support/levitate.lua deleted file mode 100644 index 40a7770d5..000000000 --- a/data/spells/scripts/support/levitate.lua +++ /dev/null @@ -1,30 +0,0 @@ -local function levitate(creature, parameter) - local fromPosition = creature:getPosition() - - if parameter == "up" and fromPosition.z ~= 8 or parameter == "down" and fromPosition.z ~= 7 then - local toPosition = creature:getPosition() - toPosition:getNextPosition(creature:getDirection()) - - local tile = Tile(parameter == "up" and Position(fromPosition.x, fromPosition.y, fromPosition.z - 1) or toPosition) - if not tile or not tile:getGround() and not tile:hasFlag(parameter == "up" and TILESTATE_IMMOVABLEBLOCKSOLID or TILESTATE_BLOCKSOLID) then - tile = Tile(toPosition.x, toPosition.y, toPosition.z + (parameter == "up" and -1 or 1)) - - if tile and tile:getGround() and not tile:hasFlag(bit.bor(TILESTATE_IMMOVABLEBLOCKSOLID, TILESTATE_FLOORCHANGE)) then - return creature:move(tile, bit.bor(FLAG_IGNOREBLOCKITEM, FLAG_IGNOREBLOCKCREATURE)) - end - end - end - return RETURNVALUE_NOTPOSSIBLE -end - -function onCastSpell(creature, variant) - local returnValue = levitate(creature, variant:getString():lower()) - if returnValue ~= RETURNVALUE_NOERROR then - creature:sendCancelMessage(returnValue) - creature:getPosition():sendMagicEffect(CONST_ME_POFF) - return false - end - - creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - return true -end diff --git a/data/spells/scripts/support/light.lua b/data/spells/scripts/support/light.lua deleted file mode 100644 index c69728dcf..000000000 --- a/data/spells/scripts/support/light.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) - -local condition = Condition(CONDITION_LIGHT) -condition:setParameter(CONDITION_PARAM_LIGHT_LEVEL, 6) -condition:setParameter(CONDITION_PARAM_LIGHT_COLOR, 215) -condition:setParameter(CONDITION_PARAM_TICKS, (6 * 60 + 10) * 1000) -combat:addCondition(condition) - -function onCastSpell(creature, variant) - return combat:execute(creature, variant) -end diff --git a/data/spells/scripts/support/magic rope.lua b/data/spells/scripts/support/magic rope.lua deleted file mode 100644 index 2160e9c01..000000000 --- a/data/spells/scripts/support/magic rope.lua +++ /dev/null @@ -1,20 +0,0 @@ -function onCastSpell(creature, var) - local position = creature:getPosition() - position:sendMagicEffect(CONST_ME_POFF) - - local tile = Tile(position) - if not tile:isRopeSpot() then - creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - return false - end - - tile = Tile(position:moveUpstairs()) - if not tile then - creature:sendCancelMessage(RETURNVALUE_NOTENOUGHROOM) - return false - end - - creature:teleportTo(position, false) - position:sendMagicEffect(CONST_ME_TELEPORT) - return true -end diff --git a/data/spells/scripts/support/magic shield.lua b/data/spells/scripts/support/magic shield.lua deleted file mode 100644 index eb9e47312..000000000 --- a/data/spells/scripts/support/magic shield.lua +++ /dev/null @@ -1,14 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -function onCastSpell(creature, var) - local condition = Condition(CONDITION_MANASHIELD) - condition:setParameter(CONDITION_PARAM_TICKS, 180000) - local player = creature:getPlayer() - if player then - condition:setParameter(CONDITION_PARAM_MANASHIELD, math.min(player:getMaxMana(), 300 + 7.6 * player:getLevel() + 7 * player:getMagicLevel())) - end - creature:addCondition(condition) - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/support/paralyze rune.lua b/data/spells/scripts/support/paralyze rune.lua deleted file mode 100644 index 700bf3e99..000000000 --- a/data/spells/scripts/support/paralyze rune.lua +++ /dev/null @@ -1,16 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) - -local condition = Condition(CONDITION_PARALYZE) -condition:setParameter(CONDITION_PARAM_TICKS, 20000) -condition:setFormula(-1, 45, -1, 45) -combat:addCondition(condition) - -function onCastSpell(creature, var) - if not combat:execute(creature, var) then - return false - end - - creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) - return true -end diff --git a/data/spells/scripts/support/protector.lua b/data/spells/scripts/support/protector.lua deleted file mode 100644 index cce74117e..000000000 --- a/data/spells/scripts/support/protector.lua +++ /dev/null @@ -1,19 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) - -local skill = Condition(CONDITION_ATTRIBUTES) -skill:setParameter(CONDITION_PARAM_SUBID, 5) -skill:setParameter(CONDITION_PARAM_TICKS, 13000) -skill:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, 220) -skill:setParameter(CONDITION_PARAM_BUFF_DAMAGEDEALT, 65) -skill:setParameter(CONDITION_PARAM_BUFF_DAMAGERECEIVED, 85) -skill:setParameter(CONDITION_PARAM_BUFF_SPELL, true) -combat:addCondition(skill) - -function onCastSpell(creature, variant) - if creature:getCondition(CONDITION_ATTRIBUTES, CONDITIONID_COMBAT, 5) then - creature:removeCondition(CONDITION_ATTRIBUTES, CONDITIONID_COMBAT, 5) - end - return combat:execute(creature, variant) -end diff --git a/data/spells/scripts/support/sap strength.lua b/data/spells/scripts/support/sap strength.lua deleted file mode 100644 index b852def19..000000000 --- a/data/spells/scripts/support/sap strength.lua +++ /dev/null @@ -1,30 +0,0 @@ -local condition = Condition(CONDITION_ATTRIBUTES) -condition:setParameter(CONDITION_PARAM_TICKS, 16000) -condition:setParameter(CONDITION_PARAM_BUFF_DAMAGEDEALT, 90) - -function onTargetCreature(creature, target) - local player = creature:getPlayer() - - if target:isPlayer() then - return false - end - if target:getMaster() then - return true - end - - target:addCondition(condition) - return true -end - -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) -combat:setArea(createCombatArea(AREA_CIRCLE3X3)) -combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") - -function onCastSpell(creature, var, isHotkey) - local target = creature:getTarget() - if target then - var = Variant(target) - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/support/sharpshooter.lua b/data/spells/scripts/support/sharpshooter.lua deleted file mode 100644 index 938656989..000000000 --- a/data/spells/scripts/support/sharpshooter.lua +++ /dev/null @@ -1,30 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) - -local skill = Condition(CONDITION_ATTRIBUTES) -skill:setParameter(CONDITION_PARAM_SUBID, 6) -skill:setParameter(CONDITION_PARAM_TICKS, 10000) -skill:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, 140) -skill:setParameter(CONDITION_PARAM_DISABLE_DEFENSE, true) -skill:setParameter(CONDITION_PARAM_BUFF_SPELL, true) -combat:addCondition(skill) - -local speed = Condition(CONDITION_PARALYZE) -speed:setParameter(CONDITION_PARAM_TICKS, 10000) -speed:setFormula(-0.7, 56, -0.7, 56) -combat:addCondition(speed) - -local exhaustHealGroup = Condition(CONDITION_SPELLGROUPCOOLDOWN) -exhaustHealGroup:setParameter(CONDITION_PARAM_SUBID, 2) -exhaustHealGroup:setParameter(CONDITION_PARAM_TICKS, 10000) -combat:addCondition(exhaustHealGroup) - -local exhaustSupportGroup = Condition(CONDITION_SPELLGROUPCOOLDOWN) -exhaustSupportGroup:setParameter(CONDITION_PARAM_SUBID, 3) -exhaustSupportGroup:setParameter(CONDITION_PARAM_TICKS, 10000) -combat:addCondition(exhaustSupportGroup) - -function onCastSpell(creature, variant) - return combat:execute(creature, variant) -end diff --git a/data/spells/scripts/support/strong haste.lua b/data/spells/scripts/support/strong haste.lua deleted file mode 100644 index 9e8697fef..000000000 --- a/data/spells/scripts/support/strong haste.lua +++ /dev/null @@ -1,27 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -local condition = Condition(CONDITION_HASTE) -condition:setParameter(CONDITION_PARAM_TICKS, 22000) -condition:setFormula(0.7, -56, 0.7, -56) -combat:addCondition(condition) - -function onCastSpell(creature, var) - local summons = creature:getSummons() - if summons and type(summons) == 'table' and #summons > 0 then - for i = 1, #summons do - local summon = summons[i] - local summon_t = summon:getType() - if summon_t and summon_t:isPet() then - local deltaSpeed = math.max(creature:getBaseSpeed() - summon:getBaseSpeed(), 0) - local PetSpeed = ((summon:getBaseSpeed() + deltaSpeed) * 0.7) - 56 - local PetHaste = createConditionObject(CONDITION_HASTE) - setConditionParam(PetHaste, CONDITION_PARAM_TICKS, 22000) - setConditionParam(PetHaste, CONDITION_PARAM_SPEED, PetSpeed) - summon:addCondition(PetHaste) - end - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/support/swift foot.lua b/data/spells/scripts/support/swift foot.lua deleted file mode 100644 index 48a774b60..000000000 --- a/data/spells/scripts/support/swift foot.lua +++ /dev/null @@ -1,40 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -local exhaust = Condition(CONDITION_EXHAUST_COMBAT) -exhaust:setParameter(CONDITION_PARAM_TICKS, 10000) -combat:addCondition(exhaust) - -local condition = Condition(CONDITION_HASTE) -condition:setParameter(CONDITION_PARAM_TICKS, 10000) -condition:setFormula(0.8, -72, 0.8, -72) -combat:addCondition(condition) - -local exhaustAttackGroup = Condition(CONDITION_SPELLGROUPCOOLDOWN) -exhaustAttackGroup:setParameter(CONDITION_PARAM_SUBID, 1) -exhaustAttackGroup:setParameter(CONDITION_PARAM_TICKS, 10000) -combat:addCondition(exhaustAttackGroup) - -local disable = Condition(CONDITION_PACIFIED) -disable:setParameter(CONDITION_PARAM_TICKS, 10000) -combat:addCondition(disable) - -function onCastSpell(creature, var) - local summons = creature:getSummons() - if summons and type(summons) == 'table' and #summons > 0 then - for i = 1, #summons do - local summon = summons[i] - local summon_t = summon:getType() - if summon_t and summon_t:isPet() then - local deltaSpeed = math.max(creature:getBaseSpeed() - summon:getBaseSpeed(), 0) - local PetSpeed = ((summon:getBaseSpeed() + deltaSpeed) * 0.8) - 72 - local PetHaste = createConditionObject(CONDITION_HASTE) - setConditionParam(PetHaste, CONDITION_PARAM_TICKS, 10000) - setConditionParam(PetHaste, CONDITION_PARAM_SPEED, PetSpeed) - summon:addCondition(PetHaste) - end - end - end - return combat:execute(creature, var) -end diff --git a/data/spells/scripts/support/ultimate light.lua b/data/spells/scripts/support/ultimate light.lua deleted file mode 100644 index 8bba89b39..000000000 --- a/data/spells/scripts/support/ultimate light.lua +++ /dev/null @@ -1,13 +0,0 @@ -local combat = Combat() -combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) -combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) - -local condition = Condition(CONDITION_LIGHT) -condition:setParameter(CONDITION_PARAM_LIGHT_LEVEL, 8) -condition:setParameter(CONDITION_PARAM_LIGHT_COLOR, 215) -condition:setParameter(CONDITION_PARAM_TICKS, (60 * 33 + 10) * 1000) -combat:addCondition(condition) - -function onCastSpell(creature, var) - return combat:execute(creature, var) -end diff --git a/data/spells/spells.xml b/data/spells/spells.xml deleted file mode 100644 index aff9a679c..000000000 --- a/data/spells/spells.xml +++ /dev/null @@ -1,1301 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/creatures/combat/combat.cpp b/src/creatures/combat/combat.cpp index 3595c80a3..0819c81b4 100644 --- a/src/creatures/combat/combat.cpp +++ b/src/creatures/combat/combat.cpp @@ -866,6 +866,12 @@ void Combat::doCombatHealth(Creature* caster, Creature* target, CombatDamage& da g_game.addMagicEffect(target->getPosition(), params.impactEffect); } + if (params.combatType == COMBAT_HEALING && target->getMonster()){ + if (target != caster) { + return; + } + } + if(caster && caster->getPlayer()){ // Critical damage uint16_t chance = caster->getPlayer()->getSkillLevel(SKILL_CRITICAL_HIT_CHANCE); diff --git a/src/creatures/combat/spells.cpp b/src/creatures/combat/spells.cpp index 5669f104e..291977ca5 100644 --- a/src/creatures/combat/spells.cpp +++ b/src/creatures/combat/spells.cpp @@ -576,6 +576,10 @@ bool Spell::configureSpell(const pugi::xml_node& node) } } + if ((attr = node.attribute("allowOnSelf"))) { + allowOnSelf = attr.as_bool(); + } + if ((attr = node.attribute("aggressive"))) { aggressive = booleanString(attr.as_string()); } @@ -665,7 +669,7 @@ bool Spell::playerSpellCheck(Player* player) const return false; } - if (isInstant() && isLearnable()) { + if (isInstant() && getNeedLearn()) { if (!player->hasLearnedInstantSpell(getName())) { player->sendCancelMessage(RETURNVALUE_YOUNEEDTOLEARNTHISSPELL); g_game.addMagicEffect(player->getPosition(), CONST_ME_POFF); @@ -919,6 +923,7 @@ bool InstantSpell::playerCastInstant(Player* player, std::string& param) } LuaVariant var; + Player* playerTarget = nullptr; if (selfTarget) { var.type = VARIANT_NUMBER; @@ -928,7 +933,6 @@ bool InstantSpell::playerCastInstant(Player* player, std::string& param) bool useDirection = false; if (hasParam) { - Player* playerTarget = nullptr; ReturnValue ret = g_game.getPlayerByNameWildcard(param, playerTarget); if (playerTarget && playerTarget->isAccessPlayer() && !player->isAccessPlayer()) { @@ -998,7 +1002,6 @@ bool InstantSpell::playerCastInstant(Player* player, std::string& param) var.type = VARIANT_STRING; if (getHasPlayerNameParam()) { - Player* playerTarget = nullptr; ReturnValue ret = g_game.getPlayerByNameWildcard(param, playerTarget); if (ret != RETURNVALUE_NOERROR) { @@ -1041,8 +1044,18 @@ bool InstantSpell::playerCastInstant(Player* player, std::string& param) return false; } } + + if (!allowOnSelf && playerTarget && playerTarget->getName() == player->getName()) { + player->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE); + return false; + } + + auto worldType = g_game.getWorldType(); + if (pzLocked && (worldType == WORLD_TYPE_PVP || worldType == WORLD_TYPE_PVP_ENFORCED)) { + player->addInFightTicks(true); + } - bool result = internalCastSpell(player, var); + bool result = executeCastSpell(player, var); if (result) { postCastSpell(player); } @@ -1075,7 +1088,7 @@ bool InstantSpell::castSpell(Creature* creature) var.type = VARIANT_NUMBER; var.number = target->getID(); - return internalCastSpell(creature, var); + return executeCastSpell(creature, var); } return false; @@ -1087,7 +1100,7 @@ bool InstantSpell::castSpell(Creature* creature) var.pos = creature->getPosition(); } - return internalCastSpell(creature, var); + return executeCastSpell(creature, var); } bool InstantSpell::castSpell(Creature* creature, Creature* target) @@ -1096,17 +1109,12 @@ bool InstantSpell::castSpell(Creature* creature, Creature* target) LuaVariant var; var.type = VARIANT_NUMBER; var.number = target->getID(); - return internalCastSpell(creature, var); + return executeCastSpell(creature, var); } else { return castSpell(creature); } } -bool InstantSpell::internalCastSpell(Creature* creature, const LuaVariant& var) -{ - return executeCastSpell(creature, var); -} - bool InstantSpell::executeCastSpell(Creature* creature, const LuaVariant& var) { //onCastSpell(creature, var) @@ -1142,7 +1150,7 @@ bool InstantSpell::canCast(const Player* player) const return true; } - if (isLearnable()) { + if (getNeedLearn()) { if (player->hasLearnedInstantSpell(getName())) { return true; } @@ -1261,7 +1269,8 @@ bool RuneSpell::executeUse(Player* player, Item* item, const Position&, Thing* t player->updateSupplyTracker(item); } - if (getPzOnUse() && g_game.getWorldType() == WORLD_TYPE_PVP) { + auto worldType = g_game.getWorldType(); + if (pzLocked && (worldType == WORLD_TYPE_PVP || worldType == WORLD_TYPE_PVP_ENFORCED)) { player->addInFightTicks(true); } diff --git a/src/creatures/combat/spells.h b/src/creatures/combat/spells.h index 63206e3b9..a21467b52 100644 --- a/src/creatures/combat/spells.h +++ b/src/creatures/combat/spells.h @@ -149,6 +149,7 @@ class Spell : public BaseSpell void postCastSpell(Player* player, bool finishedCast = true, bool payCost = true) const; static void postCastSpell(Player* player, uint32_t manaCost, uint32_t soulCost); + virtual bool isInstant() const = 0; uint32_t getManaCost(const Player* player) const; uint32_t getSoulCost() const { @@ -194,13 +195,6 @@ class Spell : public BaseSpell enabled = e; } - virtual bool isInstant() const = 0; - bool isLearnable() const { - return learnable; - } - void setLearnable(bool l) { - learnable = l; - } const VocSpellMap& getVocMap() const { return vocSpellMap; @@ -251,9 +245,6 @@ class Spell : public BaseSpell bool getNeedTarget() const { return needTarget; } - bool getPzOnUse() const { - return pzLocked; - } void setNeedTarget(bool n) { needTarget = n; } @@ -293,6 +284,18 @@ class Spell : public BaseSpell void setAggressive(bool a) { aggressive = a; } + bool getAllowOnSelf() const { + return allowOnSelf; + } + void setAllowOnSelf(bool s) { + allowOnSelf = s; + } + bool getLockedPZ() const { + return pzLocked; + } + void setLockedPZ(bool b){ + pzLocked = b; + } SpellType_t spellType = SPELL_UNDEFINED; @@ -317,9 +320,10 @@ class Spell : public BaseSpell bool selfTarget = false; bool needTarget = false; + bool allowOnSelf = true; + bool pzLocked = false; private: - uint32_t mana = 0; uint32_t manaPercent = 0; uint32_t soul = 0; @@ -331,8 +335,6 @@ class Spell : public BaseSpell bool learnable = false; bool enabled = true; bool premium = false; - bool pzLocked = false; - private: std::string name; @@ -392,8 +394,6 @@ class InstantSpell final : public TalkAction, public Spell private: std::string getScriptEventName() const override; - bool internalCastSpell(Creature* creature, const LuaVariant& var); - bool needDirection = false; bool hasParam = false; bool hasPlayerNameParam = false; diff --git a/src/game/game.cpp b/src/game/game.cpp index 6fd201446..9afefa4af 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -5673,6 +5673,12 @@ bool Game::combatChangeHealth(Creature* attacker, Creature* target, CombatDamage continue; } + if (damage.primary.type == COMBAT_HEALING && target && target->getMonster()) { + if (target != attacker) { + return false; + } + } + if (tmpPlayer == attackerPlayer && attackerPlayer != targetPlayer) { ss.str({}); ss << "You heal " << target->getNameDescription() << " for " << damageString; @@ -8633,14 +8639,6 @@ bool Game::reload(ReloadTypes_t reloadType) } case RELOAD_TYPE_RAIDS: return raids.reload() && raids.startup(); - case RELOAD_TYPE_SPELLS: { - if (!g_spells->reload()) { - SPDLOG_WARN("[Game::reload] - Failed to reload spells."); - std::terminate(); - } - return true; - } - case RELOAD_TYPE_SCRIPTS: { // commented out stuff is TODO, once we approach further in revscriptsys g_actions->clear(true); @@ -8656,11 +8654,7 @@ bool Game::reload(ReloadTypes_t reloadType) } default: { - if (!g_spells->reload()) { - SPDLOG_WARN("[Game::reload] - Failed to reload spells."); - std::terminate(); - } - + g_config.reload(); Npcs::reload(); raids.reload() && raids.startup(); diff --git a/src/lua/scripts/luascript.cpp b/src/lua/scripts/luascript.cpp index 84bd3aea2..b7b51ffb1 100644 --- a/src/lua/scripts/luascript.cpp +++ b/src/lua/scripts/luascript.cpp @@ -2064,7 +2064,6 @@ void LuaScriptInterface::registerFunctions() registerEnum(RELOAD_TYPE_NPCS) registerEnum(RELOAD_TYPE_RAIDS) registerEnum(RELOAD_TYPE_SCRIPTS) - registerEnum(RELOAD_TYPE_SPELLS) registerEnum(RELOAD_TYPE_STAGES) registerEnum(ZONE_PROTECTION) @@ -3329,6 +3328,8 @@ void LuaScriptInterface::registerFunctions() registerMethod("Spell", "needTarget", LuaScriptInterface::luaSpellNeedTarget); registerMethod("Spell", "needWeapon", LuaScriptInterface::luaSpellNeedWeapon); registerMethod("Spell", "needLearn", LuaScriptInterface::luaSpellNeedLearn); + registerMethod("Spell", "allowOnSelf", LuaScriptInterface::luaSpellAllowOnSelf); + registerMethod("Spell", "setPzLocked", LuaScriptInterface::luaSpellPzLocked); registerMethod("Spell", "isSelfTarget", LuaScriptInterface::luaSpellSelfTarget); registerMethod("Spell", "isBlocking", LuaScriptInterface::luaSpellBlocking); registerMethod("Spell", "isAggressive", LuaScriptInterface::luaSpellAggressive); @@ -17977,6 +17978,40 @@ int LuaScriptInterface::luaSpellAggressive(lua_State* L) return 1; } +int LuaScriptInterface::luaSpellAllowOnSelf(lua_State* L) +{ + // spell:allowOnSelf(bool) + Spell* spell = getUserdata(L, 1); + if (spell) { + if (lua_gettop(L) == 1) { + pushBoolean(L, spell->getAllowOnSelf()); + } else { + spell->setAllowOnSelf(getBoolean(L, 2)); + pushBoolean(L, true); + } + } else { + lua_pushnil(L); + } + return 1; +} + +int LuaScriptInterface::luaSpellPzLocked(lua_State* L) +{ + // spell:isPzLocked(bool) + Spell* spell = getUserdata(L, 1); + if (spell) { + if (lua_gettop(L) == 1) { + pushBoolean(L, spell->getLockedPZ()); + } else { + spell->setLockedPZ(getBoolean(L, 2)); + pushBoolean(L, true); + } + } else { + lua_pushnil(L); + } + return 1; +} + int LuaScriptInterface::luaSpellVocation(lua_State* L) { // spell:vocation(vocation) diff --git a/src/lua/scripts/luascript.h b/src/lua/scripts/luascript.h index ac2853761..adac63266 100644 --- a/src/lua/scripts/luascript.h +++ b/src/lua/scripts/luascript.h @@ -1078,9 +1078,9 @@ class LuaScriptInterface static int luaPlayerIsPzLocked(lua_State* L); static int luaPlayerIsOffline(lua_State* L); - static int luaPlayerGetContainers(lua_State* L); - static int luaPlayerSetLootContainer(lua_State* L); - static int luaPlayerGetLootContainer(lua_State* L); + static int luaPlayerGetContainers(lua_State* L); + static int luaPlayerSetLootContainer(lua_State* L); + static int luaPlayerGetLootContainer(lua_State* L); // New Prey static int luaPlayerGetPreyState(lua_State * L); @@ -1602,6 +1602,8 @@ class LuaScriptInterface static int luaSpellPremium(lua_State* L); static int luaSpellEnabled(lua_State* L); static int luaSpellNeedTarget(lua_State* L); + static int luaSpellAllowOnSelf(lua_State* L); + static int luaSpellPzLocked(lua_State* L); static int luaSpellNeedWeapon(lua_State* L); static int luaSpellNeedLearn(lua_State* L); static int luaSpellSelfTarget(lua_State* L); diff --git a/src/lua/scripts/scripts.cpp b/src/lua/scripts/scripts.cpp index baaa0a7ac..a34478b7f 100644 --- a/src/lua/scripts/scripts.cpp +++ b/src/lua/scripts/scripts.cpp @@ -83,6 +83,11 @@ bool Scripts::loadScriptSystems() g_weapons->loadDefaults(); + g_spells = new Spells(); + if (!g_spells) { + return false; + } + g_actions = new Actions(); if (!g_actions) { return false; diff --git a/src/otserv.cpp b/src/otserv.cpp index 0c4100917..966008630 100644 --- a/src/otserv.cpp +++ b/src/otserv.cpp @@ -163,8 +163,6 @@ void loadModules() { "data/XML/imbuements.xml"); modulesLoadHelper(g_modules->loadFromXml(), "data/modules/modules.xml"); - modulesLoadHelper(g_spells->loadFromXml(), - "data/spells/spells.xml"); modulesLoadHelper(g_events->loadFromXml(), "data/events/events.xml"); modulesLoadHelper(g_scripts->loadScripts("scripts", false, false), diff --git a/src/server/signals.cpp b/src/server/signals.cpp index 90ceca4d1..b52e03d30 100644 --- a/src/server/signals.cpp +++ b/src/server/signals.cpp @@ -25,7 +25,6 @@ #include "game/game.h" #include "lua/creature/actions.h" #include "config/configmanager.h" -#include "creatures/combat/spells.h" #include "lua/creature/talkaction.h" #include "lua/creature/raids.h" #include "creatures/appearance/mounts/mounts.h" @@ -43,7 +42,6 @@ extern ConfigManager g_config; extern Actions* g_actions; extern Monsters g_monsters; extern TalkActions* g_talkActions; -extern Spells* g_spells; extern Game g_game; extern CreatureEvents* g_creatureEvents; extern GlobalEvents* g_globalEvents; @@ -153,9 +151,6 @@ void Signals::sighupHandler() g_game.raids.startup(); SPDLOG_INFO("Reloaded raids"); - g_spells->reload();; - SPDLOG_INFO("Reloaded spells"); - Item::items.reload(); SPDLOG_INFO("Reloaded items"); diff --git a/src/utils/const.h b/src/utils/const.h index 0387162a2..fe08c351c 100644 --- a/src/utils/const.h +++ b/src/utils/const.h @@ -674,7 +674,6 @@ enum ReloadTypes_t : uint8_t { RELOAD_TYPE_NPCS, RELOAD_TYPE_RAIDS, RELOAD_TYPE_SCRIPTS, - RELOAD_TYPE_SPELLS, RELOAD_TYPE_STAGES, };