From b0936b9f5477646e2e3c96c4f5c2788f1638d554 Mon Sep 17 00:00:00 2001 From: big bad waffle Date: Wed, 7 Feb 2018 11:02:21 +0200 Subject: [PATCH] vikar now sells basic runes --- .../createCharacter/createCharacter.js | 12 +- .../ui/templates/createCharacter/styles.less | 10 +- .../components/extensions/factionVendor.js | 16 +- src/server/config/maps/tutorial/dialogues.js | 24 +- src/server/config/maps/tutorial/zone.js | 1324 +++++++++-------- src/server/items/generator.js | 2 +- src/server/items/generators/worth.js | 3 + src/server/mods/class-necromancer/index.js | 25 + src/server/world/worker.js | 1 + 9 files changed, 780 insertions(+), 637 deletions(-) diff --git a/src/client/ui/templates/createCharacter/createCharacter.js b/src/client/ui/templates/createCharacter/createCharacter.js index c38111bf..f423affd 100644 --- a/src/client/ui/templates/createCharacter/createCharacter.js +++ b/src/client/ui/templates/createCharacter/createCharacter.js @@ -59,8 +59,8 @@ define([ this.costume = -1; - this.class = Object.keys(result)[0] || ''; - this.find('.txtClass').html(this.class); + this.class = 'wizard'; + this.find('.txtClass').html('Wizard'); this.changeCostume({ target: this.find('.txtCostume') @@ -143,18 +143,14 @@ define([ changeClass: function (e) { var el = $(e.target); var classes = ['wizard', 'warrior', 'thief']; - var nextIndex = (classes.indexOf(el.html()) + 1) % classes.length; + var nextIndex = (classes.indexOf(this.class) + 1) % classes.length; this.costume = -1; var newClass = classes[nextIndex]; - el.html(newClass); + el.html(newClass[0].toUpperCase() + newClass.substr(1)); this.class = newClass; - - this.changeCostume({ - target: this.find('.txtCostume') - }); }, changeCostume: function (e) { diff --git a/src/client/ui/templates/createCharacter/styles.less b/src/client/ui/templates/createCharacter/styles.less index 67b548fb..3bf4618c 100644 --- a/src/client/ui/templates/createCharacter/styles.less +++ b/src/client/ui/templates/createCharacter/styles.less @@ -46,8 +46,16 @@ } } + .txtClass { + &:before { + content: 'Class: '; + } + } + .txtCostume { - + &:before { + content: 'Skin: '; + } } } diff --git a/src/server/components/extensions/factionVendor.js b/src/server/components/extensions/factionVendor.js index c98a303f..d4767bc7 100644 --- a/src/server/components/extensions/factionVendor.js +++ b/src/server/components/extensions/factionVendor.js @@ -159,10 +159,24 @@ define([ var skinBlueprint = skins.getBlueprint(item.id); item.name = skinBlueprint.name; item.sprite = skinBlueprint.sprite; + } else if (item.generate) { + var generated = generator.generate(item); + if (item.worth) + generated.worth = item.worth; + if (item.infinite) + generated.infinite = true; + item = generated; } - list.items.push(item); + var id = 0; + list.items.forEach(function (checkItem) { + if (checkItem.id >= id) + id = checkItem.id + 1; + }); + + item.id = id; + list.items.push(item); } }, diff --git a/src/server/config/maps/tutorial/dialogues.js b/src/server/config/maps/tutorial/dialogues.js index 7eb127e7..b8aad660 100644 --- a/src/server/config/maps/tutorial/dialogues.js +++ b/src/server/config/maps/tutorial/dialogues.js @@ -193,7 +193,7 @@ module.exports = { '1': { msg: [{ msg: `Is there anything I can help you with today?`, - options: [1.1] + options: [1.1, 1.2, 1.3] }], options: { '1.1': { @@ -203,6 +203,14 @@ module.exports = { return !!fullSet; }, goto: 'tradeCards' + }, + '1.2': { + msg: `I would like to buy some runes`, + goto: 'tradeBuy' + }, + '1.3': { + msg: `I have some items I would like to sell`, + goto: 'tradeSell' } } }, @@ -232,6 +240,20 @@ module.exports = { return `Thank you.`; } + }, + tradeBuy: { + cpn: 'trade', + method: 'startBuy', + args: [{ + targetName: 'vikar' + }] + }, + tradeSell: { + cpn: 'trade', + method: 'startSell', + args: [{ + targetName: 'vikar' + }] } }, priest: { diff --git a/src/server/config/maps/tutorial/zone.js b/src/server/config/maps/tutorial/zone.js index dc8aff98..a11ef195 100644 --- a/src/server/config/maps/tutorial/zone.js +++ b/src/server/config/maps/tutorial/zone.js @@ -1,633 +1,707 @@ -module.exports = { - name: 'tutorial', - level: [1, 10], - resources: { - Moonbell: { - type: 'herb', - max: 5 - }, - Skyblossom: { - type: 'herb', - max: 3 - }, - Emberleaf: { - type: 'herb', - max: 1 - } - }, - objects: { - 'sun carp school': { - max: 9, - type: 'fish', - quantity: [6, 12] - }, - estriddoor: { - properties: { - cpnDoor: { - locked: true, - key: 'estrid' - } - } - }, - shophermit: { - properties: { - cpnNotice: { - actions: { - enter: { - cpn: 'dialogue', - method: 'talk', - args: [{ - targetName: 'hermit' - }] - }, - exit: { - cpn: 'dialogue', - method: 'stopTalk' - } - } - } - } - }, - shopestrid: { - properties: { - cpnNotice: { - actions: { - enter: { - cpn: 'dialogue', - method: 'talk', - args: [{ - targetName: 'estrid' - }] - }, - exit: { - cpn: 'dialogue', - method: 'stopTalk' - } - } - } - } - }, - shopvikar: { - properties: { - cpnNotice: { - actions: { - enter: { - cpn: 'dialogue', - method: 'talk', - args: [{ - targetName: 'vikar' - }] - }, - exit: { - cpn: 'dialogue', - method: 'stopTalk' - } - } - } - } - }, - shoppriest: { - properties: { - cpnNotice: { - actions: { - enter: { - cpn: 'dialogue', - method: 'talk', - args: [{ - targetName: 'priest' - }] - }, - exit: { - cpn: 'dialogue', - method: 'stopTalk' - } - } - } - } - }, - 'estuary entrance': { - components: { - cpnParticles: { - simplify: function () { - return { - type: 'particles', - blueprint: { - color: { - start: ['48edff', '80f643'], - end: ['80f643', '48edff'] - }, - scale: { - start: { - min: 2, - max: 10 - }, - end: { - min: 0, - max: 2 - } - }, - speed: { - start: { - min: 4, - max: 16 - }, - end: { - min: 2, - max: 8 - } - }, - lifetime: { - min: 1, - max: 4 - }, - randomScale: true, - randomSpeed: true, - chance: 0.075, - randomColor: true, - spawnType: 'rect', - spawnRect: { - x: -32, - y: -48, - w: 64, - h: 64 - } - } - } - } - } - } - }, - greencandle: { - components: { - cpnLight: { - simplify: function () { - return { - type: 'light', - blueprint: { - color: { - start: ['80f643'], - end: ['4ac441', '51fc9a', 'd07840'] - }, - lifetime: { - min: 2, - max: 6 - } - } - } - } - } - } - }, - fountain: { - components: { - cpnParticles: { - simplify: function () { - return { - type: 'particles', - blueprint: { - color: { - start: ['48edff', '3fa7dd'], - end: ['3a71ba', '42548d'] - }, - scale: { - start: { - min: 2, - max: 10 - }, - end: { - min: 0, - max: 2 - } - }, - speed: { - start: { - min: 4, - max: 16 - }, - end: { - min: 2, - max: 8 - } - }, - lifetime: { - min: 2, - max: 5 - }, - randomScale: true, - randomSpeed: true, - chance: 0.8, - randomColor: true, - spawnType: 'rect', - spawnRect: { - x: -10, - y: -21, - w: 20, - h: 8 - } - } - } - } - } - } - }, - alchgreenpot: { - components: { - cpnParticles: { - simplify: function () { - return { - type: 'particles', - blueprint: { - color: { - start: ['80f643', '80f643'], - end: ['4ac441', '4ac441'] - }, - scale: { - start: { - min: 2, - max: 10 - }, - end: { - min: 0, - max: 2 - } - }, - speed: { - start: { - min: 4, - max: 16 - }, - end: { - min: 2, - max: 8 - } - }, - lifetime: { - min: 1, - max: 4 - }, - randomScale: true, - randomSpeed: true, - chance: 0.1, - randomColor: true, - spawnType: 'rect', - spawnRect: { - x: -15, - y: -20, - w: 30, - h: 8 - } - } - } - } - } - } - }, - alchredpot: { - components: { - cpnParticles: { - simplify: function () { - return { - type: 'particles', - blueprint: { - color: { - start: ['ff4252', 'ff4252'], - end: ['a82841', 'a82841'] - }, - scale: { - start: { - min: 2, - max: 10 - }, - end: { - min: 0, - max: 2 - } - }, - speed: { - start: { - min: 4, - max: 16 - }, - end: { - min: 2, - max: 8 - } - }, - lifetime: { - min: 1, - max: 4 - }, - randomScale: true, - randomSpeed: true, - chance: 0.2, - randomColor: true, - spawnType: 'rect', - spawnRect: { - x: -15, - y: -28, - w: 30, - h: 8 - } - } - } - } - } - } - } - }, - mobs: { - default: { - regular: { - drops: { - chance: 40, - rolls: 1 - } - } - }, - 'crazed seagull': { - level: 1, + module.exports = { + name: 'tutorial', + level: [1, 10], + resources: { + Moonbell: { + type: 'herb', + max: 5 + }, + Skyblossom: { + type: 'herb', + max: 3 + }, + Emberleaf: { + type: 'herb', + max: 1 + } + }, + objects: { + 'sun carp school': { + max: 9, + type: 'fish', + quantity: [6, 12] + }, + estriddoor: { + properties: { + cpnDoor: { + locked: true, + key: 'estrid' + } + } + }, + shophermit: { + properties: { + cpnNotice: { + actions: { + enter: { + cpn: 'dialogue', + method: 'talk', + args: [{ + targetName: 'hermit' + }] + }, + exit: { + cpn: 'dialogue', + method: 'stopTalk' + } + } + } + } + }, + shopestrid: { + properties: { + cpnNotice: { + actions: { + enter: { + cpn: 'dialogue', + method: 'talk', + args: [{ + targetName: 'estrid' + }] + }, + exit: { + cpn: 'dialogue', + method: 'stopTalk' + } + } + } + } + }, + shopvikar: { + properties: { + cpnNotice: { + actions: { + enter: { + cpn: 'dialogue', + method: 'talk', + args: [{ + targetName: 'vikar' + }] + }, + exit: { + cpn: 'dialogue', + method: 'stopTalk' + } + } + } + } + }, + shoppriest: { + properties: { + cpnNotice: { + actions: { + enter: { + cpn: 'dialogue', + method: 'talk', + args: [{ + targetName: 'priest' + }] + }, + exit: { + cpn: 'dialogue', + method: 'stopTalk' + } + } + } + } + }, + 'estuary entrance': { + components: { + cpnParticles: { + simplify: function () { + return { + type: 'particles', + blueprint: { + color: { + start: ['48edff', '80f643'], + end: ['80f643', '48edff'] + }, + scale: { + start: { + min: 2, + max: 10 + }, + end: { + min: 0, + max: 2 + } + }, + speed: { + start: { + min: 4, + max: 16 + }, + end: { + min: 2, + max: 8 + } + }, + lifetime: { + min: 1, + max: 4 + }, + randomScale: true, + randomSpeed: true, + chance: 0.075, + randomColor: true, + spawnType: 'rect', + spawnRect: { + x: -32, + y: -48, + w: 64, + h: 64 + } + } + } + } + } + } + }, + greencandle: { + components: { + cpnLight: { + simplify: function () { + return { + type: 'light', + blueprint: { + color: { + start: ['80f643'], + end: ['4ac441', '51fc9a', 'd07840'] + }, + lifetime: { + min: 2, + max: 6 + } + } + } + } + } + } + }, + fountain: { + components: { + cpnParticles: { + simplify: function () { + return { + type: 'particles', + blueprint: { + color: { + start: ['48edff', '3fa7dd'], + end: ['3a71ba', '42548d'] + }, + scale: { + start: { + min: 2, + max: 10 + }, + end: { + min: 0, + max: 2 + } + }, + speed: { + start: { + min: 4, + max: 16 + }, + end: { + min: 2, + max: 8 + } + }, + lifetime: { + min: 2, + max: 5 + }, + randomScale: true, + randomSpeed: true, + chance: 0.8, + randomColor: true, + spawnType: 'rect', + spawnRect: { + x: -10, + y: -21, + w: 20, + h: 8 + } + } + } + } + } + } + }, + alchgreenpot: { + components: { + cpnParticles: { + simplify: function () { + return { + type: 'particles', + blueprint: { + color: { + start: ['80f643', '80f643'], + end: ['4ac441', '4ac441'] + }, + scale: { + start: { + min: 2, + max: 10 + }, + end: { + min: 0, + max: 2 + } + }, + speed: { + start: { + min: 4, + max: 16 + }, + end: { + min: 2, + max: 8 + } + }, + lifetime: { + min: 1, + max: 4 + }, + randomScale: true, + randomSpeed: true, + chance: 0.1, + randomColor: true, + spawnType: 'rect', + spawnRect: { + x: -15, + y: -20, + w: 30, + h: 8 + } + } + } + } + } + } + }, + alchredpot: { + components: { + cpnParticles: { + simplify: function () { + return { + type: 'particles', + blueprint: { + color: { + start: ['ff4252', 'ff4252'], + end: ['a82841', 'a82841'] + }, + scale: { + start: { + min: 2, + max: 10 + }, + end: { + min: 0, + max: 2 + } + }, + speed: { + start: { + min: 4, + max: 16 + }, + end: { + min: 2, + max: 8 + } + }, + lifetime: { + min: 1, + max: 4 + }, + randomScale: true, + randomSpeed: true, + chance: 0.2, + randomColor: true, + spawnType: 'rect', + spawnRect: { + x: -15, + y: -28, + w: 30, + h: 8 + } + } + } + } + } + } + } + }, + mobs: { + default: { + regular: { + drops: { + chance: 40, + rolls: 1 + } + } + }, + 'crazed seagull': { + level: 1, - rare: { - count: 0 - }, + rare: { + count: 0 + }, - regular: { - drops: { - chance: 100, - rolls: 1, - noRandom: true, - blueprints: [{ - maxLevel: 2, - name: 'Family Heirloom', - quality: 2, - slot: 'neck', - type: 'Pendant', - noSalvage: true, - stats: ['vit', 'regenHp', 'regenMana'] - }] - } - } - }, - seagull: { - level: 2, - regular: { - drops: { - chance: 60, - rolls: 1 - } - }, - rare: { - count: 0 - }, - questItem: { - name: 'Gull Feather', - sprite: [0, 0] - } - }, - bunny: { - level: 3, - regular: { - drops: { - chance: 56, - rolls: 1 - } - }, - rare: { - name: 'Thumper' - }, - questItem: { - name: "Rabbit's Foot", - sprite: [0, 1] - } - }, - elk: { - level: 4, - regular: { - drops: { - chance: 50, - rolls: 1 - } - }, - rare: { - name: 'Ironhorn' - }, - questItem: { - name: "Elk Antler", - sprite: [0, 2] - } - }, - flamingo: { - level: 5, - regular: { - drops: { - chance: 45, - rolls: 1 - } - } - }, - crab: { - level: 6, + regular: { + drops: { + chance: 100, + rolls: 1, + noRandom: true, + blueprints: [{ + maxLevel: 2, + name: 'Family Heirloom', + quality: 2, + slot: 'neck', + type: 'Pendant', + noSalvage: true, + stats: ['vit', 'regenHp', 'regenMana'] + }] + } + } + }, + seagull: { + level: 2, + regular: { + drops: { + chance: 60, + rolls: 1 + } + }, + rare: { + count: 0 + }, + questItem: { + name: 'Gull Feather', + sprite: [0, 0] + } + }, + bunny: { + level: 3, + regular: { + drops: { + chance: 56, + rolls: 1 + } + }, + rare: { + name: 'Thumper' + }, + questItem: { + name: "Rabbit's Foot", + sprite: [0, 1] + } + }, + elk: { + level: 4, + regular: { + drops: { + chance: 50, + rolls: 1 + } + }, + rare: { + name: 'Ironhorn' + }, + questItem: { + name: "Elk Antler", + sprite: [0, 2] + } + }, + flamingo: { + level: 5, + regular: { + drops: { + chance: 45, + rolls: 1 + } + } + }, + crab: { + level: 6, - rare: { - name: 'Squiggles' - }, - questItem: { - name: 'Severed Pincer', - sprite: [0, 3] - } - }, - 'titan crab': { - level: 7, - rare: { - name: 'The Pincer King' - } - }, - 'mud crab': { - level: 9 - }, - frog: { - level: 8, - rare: { - name: 'The Muck Prince' - } - }, - eagle: { - level: 10, - faction: 'hostile', - rare: { - name: 'Fleshripper' - } - }, - hermit: { - level: 10, - walkDistance: 0, - attackable: false, - rare: { - count: 0 - }, - properties: { - cpnTrade: { - items: { - min: 3, - max: 5 - }, - forceItems: [{ - name: 'Flimsy Fishing Rod', - type: 'Fishing Rod', - slot: 'tool', - quality: 0, - worth: 5, - sprite: [11, 0], - infinite: true, - noSalvage: true - }], - level: { - min: 1, - max: 5 - }, - markup: { - buy: 0.25, - sell: 2.5 - } - } - } - }, - guard: { - level: 50, - attackable: false, + rare: { + name: 'Squiggles' + }, + questItem: { + name: 'Severed Pincer', + sprite: [0, 3] + } + }, + 'titan crab': { + level: 7, + rare: { + name: 'The Pincer King' + } + }, + 'mud crab': { + level: 9 + }, + frog: { + level: 8, + rare: { + name: 'The Muck Prince' + } + }, + eagle: { + level: 10, + faction: 'hostile', + rare: { + name: 'Fleshripper' + } + }, + hermit: { + level: 10, + walkDistance: 0, + attackable: false, + rare: { + count: 0 + }, + properties: { + cpnTrade: { + items: { + min: 3, + max: 5 + }, + forceItems: [{ + name: 'Flimsy Fishing Rod', + type: 'Fishing Rod', + slot: 'tool', + quality: 0, + worth: 5, + sprite: [11, 0], + infinite: true, + noSalvage: true + }], + level: { + min: 1, + max: 5 + }, + markup: { + buy: 0.25, + sell: 2.5 + } + } + } + }, + guard: { + level: 50, + attackable: false, - walkDistance: 0, + walkDistance: 0, - rare: { - count: 0 - } - }, - estrid: { - level: 25, - attackable: false, - walkDistance: 5, + rare: { + count: 0 + } + }, + estrid: { + level: 25, + attackable: false, + walkDistance: 5, - rare: { - count: 0 - }, + rare: { + count: 0 + }, - properties: { - cpnTrade: { - items: { - min: 5, - max: 10 - }, - level: { - min: 5, - max: 15 - }, - markup: { - buy: 0.25, - sell: 2.5 - } - } - } - }, - vikar: { - walkDistance: 0, - attackable: false, - rare: { - count: 0 - } - }, - luta: { - walkDistance: 0, - attackable: false, - rare: { - count: 0 - } - }, - rodriguez: { - attackable: false, - level: 10, - rare: { - count: 0 - } - }, - pig: { - attackable: false, - level: 3, - rare: { - count: 0 - } - }, - goat: { - attackable: false, - level: 3, - rare: { - count: 0 - } - }, - cow: { - attackable: false, - level: 3, - rare: { - count: 0 - } - }, - priest: { - level: 50, - attackable: false, - walkDistance: 0, - rare: { - count: 0 - }, + properties: { + cpnTrade: { + items: { + min: 5, + max: 10 + }, + level: { + min: 5, + max: 15 + }, + markup: { + buy: 0.25, + sell: 2.5 + } + } + } + }, + vikar: { + walkDistance: 0, + attackable: false, + rare: { + count: 0 + }, - properties: { - cpnTrade: { - items: { - min: 5, - max: 10, - extra: [{ - type: 'skin', - id: 'gaekatla druid', - worth: 100, - factions: [{ - id: 'gaekatla', - tier: 7 - }] - }, { - worth: 100, - infinite: true, - generate: true, - name: `Cowl of Obscurity`, - level: [4, 13], - quality: 4, - noSpell: true, - slot: 'head', - sprite: [2, 0], - spritesheet: '../../../images/legendaryItems.png', - type: 'Silk Cowl', - description: `Imbued with the powers of Gaekatla herself.`, - stats: ['hpMax', 'hpMax', 'int', 'int'], - effects: [{ - type: 'healOnCrit', - rolls: { - i_chance: [20, 60], - i_percentage: [3, 7] - } - }], - factions: [{ - id: 'gaekatla', - tier: 7 - }] - }] - }, - faction: { - id: 'gaekatla', - tier: 5 - }, - markup: { - buy: 0.25, - sell: 10 - } - } - } - } - } -}; + properties: { + cpnTrade: { + items: { + min: 0, + max: 0, + extra: [{ + generate: true, + spell: true, + spellQuality: 'basic', + infinite: true, + spellName: 'magic missile', + worth: 3 + }, { + generate: true, + spell: true, + spellQuality: 'basic', + infinite: true, + spellName: 'ice spear', + worth: 3 + }, { + generate: true, + spell: true, + spellQuality: 'basic', + infinite: true, + spellName: 'smite', + worth: 3 + }, { + generate: true, + spell: true, + spellQuality: 'basic', + infinite: true, + spellName: 'consecrate', + worth: 3 + }, { + generate: true, + spell: true, + spellQuality: 'basic', + infinite: true, + spellName: 'slash', + worth: 3 + }, { + generate: true, + spell: true, + spellQuality: 'basic', + infinite: true, + spellName: 'charge', + worth: 3 + }, { + generate: true, + spell: true, + spellQuality: 'basic', + infinite: true, + spellName: 'flurry', + worth: 3 + }, { + generate: true, + spell: true, + spellQuality: 'basic', + infinite: true, + spellName: 'smokebomb', + worth: 3 + }] + }, + faction: { + id: 'fjolgard', + tier: 5 + }, + markup: { + buy: 0.25, + sell: 10 + } + } + } + }, + luta: { + walkDistance: 0, + attackable: false, + rare: { + count: 0 + } + }, + rodriguez: { + attackable: false, + level: 10, + rare: { + count: 0 + } + }, + pig: { + attackable: false, + level: 3, + rare: { + count: 0 + } + }, + goat: { + attackable: false, + level: 3, + rare: { + count: 0 + } + }, + cow: { + attackable: false, + level: 3, + rare: { + count: 0 + } + }, + priest: { + level: 50, + attackable: false, + walkDistance: 0, + rare: { + count: 0 + }, + + properties: { + cpnTrade: { + items: { + min: 5, + max: 10, + extra: [{ + type: 'skin', + id: 'gaekatla druid', + worth: 100, + factions: [{ + id: 'gaekatla', + tier: 7 + }] + }, { + worth: 100, + infinite: true, + generate: true, + name: `Cowl of Obscurity`, + level: [4, 13], + quality: 4, + noSpell: true, + slot: 'head', + sprite: [2, 0], + spritesheet: '../../../images/legendaryItems.png', + type: 'Silk Cowl', + description: `Imbued with the powers of Gaekatla herself.`, + stats: ['hpMax', 'hpMax', 'int', 'int'], + effects: [{ + type: 'healOnCrit', + rolls: { + i_chance: [20, 60], + i_percentage: [3, 7] + } + }], + factions: [{ + id: 'gaekatla', + tier: 7 + }] + }] + }, + faction: { + id: 'gaekatla', + tier: 5 + }, + markup: { + buy: 0.25, + sell: 10 + } + } + } + } + } + }; diff --git a/src/server/items/generator.js b/src/server/items/generator.js index 77429aaf..80fb7814 100644 --- a/src/server/items/generator.js +++ b/src/server/items/generator.js @@ -15,7 +15,7 @@ define([ ) { var generators = [g1, g2, g3, g4, g5, g6, g11, g7]; var materialGenerators = [g6, g8]; - var spellGenerators = [g1, g9]; + var spellGenerators = [g1, g9, g7]; var currencyGenerators = [g10]; var generator = { diff --git a/src/server/items/generators/worth.js b/src/server/items/generators/worth.js index a9644b65..c54b28ba 100644 --- a/src/server/items/generators/worth.js +++ b/src/server/items/generators/worth.js @@ -6,6 +6,9 @@ define([ return { generate: function (item, blueprint) { item.worth = ~~(Math.pow(item.level, 1.5) + (Math.pow((item.quality + 1), 2) * 10)); + + if (item.spell) + item.worth *= 5; } }; }); diff --git a/src/server/mods/class-necromancer/index.js b/src/server/mods/class-necromancer/index.js index d91af509..14de0bb3 100644 --- a/src/server/mods/class-necromancer/index.js +++ b/src/server/mods/class-necromancer/index.js @@ -21,6 +21,31 @@ define([ this.events.on('onBeforeGetSpellTemplate', this.beforeGetSpellTemplate.bind(this)); this.events.on('onBeforeGetResourceList', this.beforeGetResourceList.bind(this)); this.events.on('onBeforeGetAnimations', this.beforeGetAnimations.bind(this)); + this.events.on('onAfterGetZone', this.onAfterGetZone.bind(this)); + }, + + onAfterGetZone: function (zone, config) { + if (zone != 'tutorial') + return; + + var newRunes = [{ + generate: true, + spell: true, + spellQuality: 'basic', + infinite: true, + spellName: 'harvest life', + worth: 3 + }, { + generate: true, + spell: true, + spellQuality: 'basic', + infinite: true, + spellName: 'summon skeleton', + worth: 3 + }]; + + var vikarTrade = config.mobs.vikar.properties.cpnTrade; + Array.prototype.push.apply(vikarTrade.items.extra, newRunes); }, beforeGetAnimations: function (animations) { diff --git a/src/server/world/worker.js b/src/server/world/worker.js index 271076bf..5eff83a9 100644 --- a/src/server/world/worker.js +++ b/src/server/world/worker.js @@ -58,6 +58,7 @@ requirejs([ return; console.log('Error Logged: ' + e.toString()); + console.log(e.stack); io.set({ ent: new Date(),