summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-03-29 17:05:47 +0000
committerMicksha <ms-shaman@gmx.de>2019-03-29 17:05:47 +0000
commit00f7ce5433bb72a246a694dc1d9d6603fac57e06 (patch)
treee9112fcebc5ffd9e80275c67dae0257a721b4975
parent1f4c8869c01649f8a4b69b278b91b55caa00a7c7 (diff)
downloadserverdata-00f7ce5433bb72a246a694dc1d9d6603fac57e06.tar.gz
serverdata-00f7ce5433bb72a246a694dc1d9d6603fac57e06.tar.bz2
serverdata-00f7ce5433bb72a246a694dc1d9d6603fac57e06.tar.xz
serverdata-00f7ce5433bb72a246a694dc1d9d6603fac57e06.zip
I need a way to get the Master Book.
Uhm, Auldsbel will do for a while, WildX can comment later.
-rw-r--r--conf/map/maps.conf1
-rw-r--r--db/map_index.txt5
-rw-r--r--db/re/item_db.conf21
-rw-r--r--db/re/mob_db.conf171
-rw-r--r--db/re/skill_tree.conf7
-rw-r--r--maps/re/008-1.mcachebin6879 -> 6880 bytes
-rw-r--r--maps/re/008-4-1.mcachebin0 -> 970 bytes
-rw-r--r--npc/008-1/_warps.txt1
-rw-r--r--npc/008-1/auldsbel.txt14
-rw-r--r--npc/008-4-1/_import.txt5
-rw-r--r--npc/008-4-1/_mobs.txt7
-rw-r--r--npc/008-4-1/_warps.txt3
-rw-r--r--npc/008-4-1/boss.txt62
-rw-r--r--npc/_import.txt1
-rw-r--r--npc/items/master_skillbook.txt113
-rw-r--r--npc/scripts.conf1
16 files changed, 410 insertions, 2 deletions
diff --git a/conf/map/maps.conf b/conf/map/maps.conf
index f9cb4cad..50edf2f0 100644
--- a/conf/map/maps.conf
+++ b/conf/map/maps.conf
@@ -91,6 +91,7 @@ map_list: (
"008-2-9",
"008-3-0",
"008-3-1",
+ "008-4-1",
"test",
"testbg",
)
diff --git a/db/map_index.txt b/db/map_index.txt
index 599d54b0..9885b94d 100644
--- a/db/map_index.txt
+++ b/db/map_index.txt
@@ -88,5 +88,6 @@
008-2-9 88
008-3-0 89
008-3-1 90
-test 91
-testbg 92
+008-4-1 91
+test 92
+testbg 93
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index acf02a2f..246e37ff 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -1285,6 +1285,27 @@ item_db: (
">
},
{
+ Id: 540
+ AegisName: "MasterBook"
+ Name: "Master Book"
+ Type: "IT_USABLE"
+ Buy: 8000
+ Sell: 0
+ Weight: 20
+ KeepAfterUse: true
+ Trade: {
+ notrade: true
+ nodrop: true
+ noselltonpc: true
+ nogstorage: true
+ nomail: true
+ noauction: true
+ }
+ Script: <"
+ doevent "#MasterBook::OnUse";
+ ">
+},
+{
Id: 560
AegisName: "CarpSandwich"
Name: "Carp Sandwich"
diff --git a/db/re/mob_db.conf b/db/re/mob_db.conf
index db7e67a4..85b946fe 100644
--- a/db/re/mob_db.conf
+++ b/db/re/mob_db.conf
@@ -2669,4 +2669,175 @@ mob_db: (
Drops: {
}
},
+{
+ Id: 1102
+ SpriteName: "GameBalance"
+ Name: "Game Balance"
+ Lv: 40
+ Hp: 12000
+ Sp: 0
+ Exp: 180
+ JExp: 25
+ AttackRange: 2
+ Attack: [250, 750]
+ Def: 45
+ Mdef: 80
+ Stats: {
+ Str: 20
+ Agi: 50
+ Vit: 50
+ Int: 10
+ Dex: 65
+ Luk: 30
+ }
+ ViewRange: 5
+ ChaseRange: 8
+ Size: 0
+ Race: 2
+ Element: (5, 1)
+ Mode: {
+ CanMove: true
+ CanAttack: true
+ CastSensorChase: true
+ ChangeChase: true
+ Boss: true
+ Angry: true
+ Aggressive: true
+ }
+ MoveSpeed: 350
+ AttackDelay: 1625
+ AttackMotion: 550
+ DamageMotion: 450
+ MvpExp: 0
+ Drops: {
+ }
+},
+{
+ Id: 1103
+ SpriteName: "AngryCrafty"
+ Name: "AngryCrafty"
+ Lv: 7
+ Hp: 500
+ Sp: 0
+ Exp: 9
+ JExp: 0
+ AttackRange: 1
+ Attack: [100, 150]
+ Def: 7
+ Mdef: 40
+ Stats: {
+ Str: 4
+ Agi: 30
+ Vit: 20
+ Int: 1
+ Dex: 50
+ Luk: 10
+ }
+ ViewRange: 7
+ ChaseRange: 15
+ Size: 0
+ Race: 2
+ Element: (4, 1)
+ Mode: {
+ CanMove: true
+ Looter: true
+ CanAttack: true
+ CastSensorChase: true
+ ChangeChase: true
+ Angry: true
+ Aggressive: true
+ }
+ MoveSpeed: 400
+ AttackDelay: 800
+ AttackMotion: 672
+ DamageMotion: 270
+ MvpExp: 0
+ Drops: {
+ LeftCraftyWing: 4000
+ RightCraftyWing: 4000
+ BatTeeth: 4000
+ }
+},
+{
+ Id: 1104
+ SpriteName: "BlackScorpion"
+ Name: "Black Scorpion"
+ Lv: 18
+ Hp: 3000
+ Sp: 0
+ Exp: 70
+ JExp: 2
+ AttackRange: 1
+ Attack: [600, 700]
+ Def: 30
+ Mdef: 5
+ Stats: {
+ Str: 25
+ Agi: 15
+ Vit: 40
+ Int: 1
+ Dex: 20
+ Luk: 10
+ }
+ ViewRange: 7
+ ChaseRange: 12
+ Size: 0
+ Race: 2
+ Element: (1, 1)
+ Mode: {
+ CanMove: true
+ CanAttack: true
+ CastSensorChase: true
+ ChangeChase: true
+ }
+ MoveSpeed: 500
+ AttackDelay: 1250
+ AttackMotion: 800
+ DamageMotion: 500
+ MvpExp: 0
+ Drops: {
+ }
+},
+{
+ Id: 1105
+ SpriteName: "ThiefSlime"
+ Name: "Thief Slime"
+ Lv: 10
+ Hp: 1200
+ Sp: 0
+ Exp: 30
+ JExp: 0
+ AttackRange: 1
+ Attack: [200, 400]
+ Def: 15
+ Mdef: 0
+ Stats: {
+ Str: 5
+ Agi: 15
+ Vit: 20
+ Int: 1
+ Dex: 35
+ Luk: 10
+ }
+ ViewRange: 8
+ ChaseRange: 8
+ Size: 0
+ Race: 2
+ Element: (1, 1)
+ Mode: {
+ CanMove: true
+ CanAttack: false
+ Looter: true
+ }
+ MoveSpeed: 300
+ AttackDelay: 2462
+ AttackMotion: 864
+ DamageMotion: 1026
+ MvpExp: 0
+ Drops: {
+ MaggotSlime: 800
+ HalfEggshell: 200
+ Moss: 400
+ }
+},
)
diff --git a/db/re/skill_tree.conf b/db/re/skill_tree.conf
index 5120553c..8c1908c1 100644
--- a/db/re/skill_tree.conf
+++ b/db/re/skill_tree.conf
@@ -79,6 +79,7 @@ Human: {
WE_MALE: 0
WE_FEMALE: 0
WE_CALLPARTNER: 0
+ MG_COLDBOLT: 0
EVOL_MASS_PROVOKE: 0
EVOL_PHYSICAL_SHIELD: 0
}
@@ -138,6 +139,7 @@ Ukar: {
WE_MALE: 0
WE_FEMALE: 0
WE_CALLPARTNER: 0
+ MG_COLDBOLT: 0
}
}
@@ -195,6 +197,7 @@ Demon: {
WE_MALE: 0
WE_FEMALE: 0
WE_CALLPARTNER: 0
+ MG_COLDBOLT: 0
}
}
@@ -252,6 +255,7 @@ Elven: {
WE_MALE: 0
WE_FEMALE: 0
WE_CALLPARTNER: 0
+ MG_COLDBOLT: 0
}
}
@@ -309,6 +313,7 @@ Orc: {
WE_MALE: 0
WE_FEMALE: 0
WE_CALLPARTNER: 0
+ MG_COLDBOLT: 0
}
}
@@ -366,6 +371,7 @@ Raijin: {
WE_MALE: 0
WE_FEMALE: 0
WE_CALLPARTNER: 0
+ MG_COLDBOLT: 0
}
}
@@ -423,5 +429,6 @@ Tritan: {
WE_MALE: 0
WE_FEMALE: 0
WE_CALLPARTNER: 0
+ MG_COLDBOLT: 0
}
}
diff --git a/maps/re/008-1.mcache b/maps/re/008-1.mcache
index 2c416411..bd439b3c 100644
--- a/maps/re/008-1.mcache
+++ b/maps/re/008-1.mcache
Binary files differ
diff --git a/maps/re/008-4-1.mcache b/maps/re/008-4-1.mcache
new file mode 100644
index 00000000..c64a3c80
--- /dev/null
+++ b/maps/re/008-4-1.mcache
Binary files differ
diff --git a/npc/008-1/_warps.txt b/npc/008-1/_warps.txt
index 46e9891d..9ca7640a 100644
--- a/npc/008-1/_warps.txt
+++ b/npc/008-1/_warps.txt
@@ -25,3 +25,4 @@
008-1,233,131,0 warp #008-1_233_131 0,0,008-2-29,36,24
008-1,287,133,0 warp #008-1_287_133 0,0,008-2-30,52,39
008-1,20,85,0 warp #008-1_20_85 0,1,008-1-1,246,85
+008-1,165,171,0 warp #008-1_165_171 0,0,008-4-1,175,19
diff --git a/npc/008-1/auldsbel.txt b/npc/008-1/auldsbel.txt
index cf4cd16e..dc7cf202 100644
--- a/npc/008-1/auldsbel.txt
+++ b/npc/008-1/auldsbel.txt
@@ -6,6 +6,20 @@
// THIS IS A PLACEHOLDER!
008-1,119,114,0 script Auldsbel#008-1 NPC_WIZARD,{
+ // Placeholder please remove
+ if (!MASTERBOOK_PAGES)
+ {
+ inventoryplace MasterBook, 1;
+ getitem MasterBook, 1;
+ MASTERBOOK_PAGES=1;
+ mesc l("Auldsbel discretly stuffs a book on your backpack.");
+ next;
+ speech
+ l("Don't tell anyone about this. Once you kill you a boss, you can try to learn the boss skill by using the book."),
+ l("Beware you have a limited number of pages. Do not let the Legion or the Brotherhood find out you have one."),
+ l("And by the way. I know nothing about this book. And I don't know how to get more pages either.");
+ close;
+ }
speech
l("Hello."),
l("Oh, you look more interested in magic.. the brotherhood did forbid most of the interesting paths of magic, but boring baby spells are still allowed."),
diff --git a/npc/008-4-1/_import.txt b/npc/008-4-1/_import.txt
new file mode 100644
index 00000000..0f706bbc
--- /dev/null
+++ b/npc/008-4-1/_import.txt
@@ -0,0 +1,5 @@
+// Map 008-4-1: Cave Of Trials
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/008-4-1/_mobs.txt",
+"npc/008-4-1/_warps.txt",
+"npc/008-4-1/boss.txt",
diff --git a/npc/008-4-1/_mobs.txt b/npc/008-4-1/_mobs.txt
new file mode 100644
index 00000000..ad992a8d
--- /dev/null
+++ b/npc/008-4-1/_mobs.txt
@@ -0,0 +1,7 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-4-1: Cave Of Trials mobs
+008-4-1,106,73,73,63 monster Cave Maggot 1027,80,30000,2500
+008-4-1,136,71,47,50 monster Thief Slime 1105,35,50000,2500
+008-4-1,101,83,73,30 monster AngryCrafty 1103,60,50000,2500
+008-4-1,100,79,32,31 monster Black Scorpion 1104,14,45000,2500
+008-4-1,94,98,11,9 monster Green Slime 1024,4,500,2500
diff --git a/npc/008-4-1/_warps.txt b/npc/008-4-1/_warps.txt
new file mode 100644
index 00000000..b1a26ad0
--- /dev/null
+++ b/npc/008-4-1/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 008-4-1: Cave Of Trials warps
+008-4-1,175,18,0 warp #008-4-1_175_18 2,0,008-1,165,170
diff --git a/npc/008-4-1/boss.txt b/npc/008-4-1/boss.txt
new file mode 100644
index 00000000..17b04880
--- /dev/null
+++ b/npc/008-4-1/boss.txt
@@ -0,0 +1,62 @@
+// Evol Script
+// Author:
+// Jesusalva
+// Description:
+// Controls the boss on 008-4-1 and the Master Book Learning
+// see npc/items/master_skillbook.txt for explanation about variables
+
+008-4-1,0,0,0 script #BossCtrl_008-4-1 NPC_HIDDEN,{
+ end;
+
+// Test server: 15 minutes only
+OnTimer900000:
+ if (!debug)
+ end;
+
+// Otherwise, respawn every hour
+OnTimer3600000:
+ stopnpctimer;
+OnInit:
+ $@MB_00841=0;
+ monster "008-4-1", 67, 30, strmobinfo(1, GameBalance), GameBalance, 1, "#BossCtrl_008-4-1::OnBossDeath";
+ end;
+
+OnBossDeath:
+ initnpctimer;
+ // Only the party which defeated the boss can learn the skill
+ getmapxy(.@m$, .@x, .@y, 0);
+ .@party=getcharid(1);
+ if (.@party > 0)
+ {
+ $@MB_00841=.@party;
+ areatimer("008-4-1", .@x-15, .@y-15, .@x+15, .@y+15, 10, "#BossCtrl_008-4-1::OnBossCheck");
+ mapannounce "008-4-1", "Boss deafeated by Party: " + getpartyname(.@party), bc_all;
+ }
+ else
+ {
+ addtimer(10, "#BossCtrl_008-4-1::OnBegin");
+ mapannounce "008-4-1", "Boss deafeated by: " + strcharinfo(0), bc_all;
+ }
+ end;
+
+OnBossCheck:
+ // TODO: Check if you really fought or was just lurking
+ // Check if party is correct
+ if (getcharid(1) != $@MB_00841)
+ end;
+OnBegin:
+ @mb_BossId=GameBalance;
+ @mb_SkillId=MG_COLDBOLT;
+ @mb_ItemId=Manana; // Placeholder
+ @mb_ItemAm=1;
+ addtimer(15000, "#BossCtrl_008-4-1::OnFinish");
+ end;
+
+OnFinish:
+ @mb_BossId=0;
+ @mb_SkillId=0;
+ @mb_ItemId=0;
+ @mb_ItemAm=0;
+ end;
+
+}
diff --git a/npc/_import.txt b/npc/_import.txt
index fe81168d..23aef7f4 100644
--- a/npc/_import.txt
+++ b/npc/_import.txt
@@ -90,6 +90,7 @@
@include "npc/008-2-9/_import.txt"
@include "npc/008-3-0/_import.txt"
@include "npc/008-3-1/_import.txt"
+@include "npc/008-4-1/_import.txt"
@include "npc/test/_import.txt"
@include "npc/testbg/_import.txt"
"npc/_anchors.txt",
diff --git a/npc/items/master_skillbook.txt b/npc/items/master_skillbook.txt
new file mode 100644
index 00000000..d7e7de14
--- /dev/null
+++ b/npc/items/master_skillbook.txt
@@ -0,0 +1,113 @@
+// Evol script.
+// Author:
+// Jesusalva
+// Elvano
+// Description:
+// Contains master skills which can only be learnt after killing boss
+// See also: <link to tmw forum topic>
+// Notes:
+// Not exactly equal as Elvano proposal. I actually care for restrictions you know...
+// Variables:
+// PERMANENT:
+// MASTERBOOK_PAGES - How many pages your Master Book have.
+// Defaults to zero, so you can't @item it.
+// MASTERBOOK_SKILL - An array with the skills you have learnt from Master Book.
+// - It's more flexible this way.
+// TEMPORARY:
+// @mb_BossId - Contains the MobID of the boss your party killed.
+// @mb_SkillId - Contains the SkillID which can be learnt with the boss.
+// @mb_ItemId - Contains the Ink Id to write (or whatever)
+// @mb_ItemAm - How many ink is required to write the skill
+// Remember: @mb_BossId will be reset to zero after 15 seconds from boss death.
+// Or upon logout. Or when changing maps. Temporary variables aren't reliable.
+//
+// @mb_BossId controls if you'll try to LEARN a skill, or READ the book.
+// Remember: A dialog prevents timer events from happening, but doesn't stops the timer.
+// TODO: Currently no way to get skill name from database (add getskillinfo() to server-plugin please)
+// TODO: Reset @mb_* when register_skill() finish
+// TODO: Add Magic Ink
+// TODO: When another party/player kills the boss, book should say so.
+
+- script #MasterBook NPC_HIDDEN,{
+
+
+ function register_skill {
+
+ setnpcdialogtitle l(.book_name$);
+
+ .@mb_lvl=strmobinfo(3, @mb_BossId);
+ mesc l("You just defeated the following boss: @@ (Lv. @@)", strmobinfo(1, @mb_BossId), .@mb_lvl);
+ // Check if all reqs are met
+ // The boss must have a skill
+ if (!@mb_SkillId)
+ {
+ mesc l("But there is no skill to be learnt from this boss.");
+ close;
+ }
+ // You must have free pages
+ if (array_entries(MASTERBOOK_SKILL) >= MASTERBOOK_PAGES)
+ {
+ mesc l("But you ran out of empty pages on this book.");
+ close;
+ }
+ // TODO: Party Level Range
+ // You must be at most 30 levels below the monster level
+ if (BaseLevel+30 < .@mb_lvl)
+ {
+ mesc l("But you are out of the boss level range.");
+ close;
+ }
+ // You must have enough materials
+ if (countitem(@mb_ItemId) < @mb_ItemAm)
+ {
+ mesc l("But you do not have enough Magic Ink. (You need: @@ @@)", @mb_ItemAm, getitemlink(@mb_ItemId));
+ close;
+ }
+
+ // Allow you to check which skills are here to learn
+ mes "";
+ mesc l("You have: @@/@@ @@", countitem(@mb_ItemId), @mb_ItemAm, getitemlink(@mb_ItemId));
+ select
+ rif(!getskilllv(@mb_SkillId), l("Learn Skill")),
+ l("Do not learn");
+ mes "";
+ if (@menu == 1)
+ {
+ delitem @mb_ItemId, @mb_ItemAm;
+ skill(@mb_SkillId, 1, 0);
+ array_push(MASTERBOOK_SKILL, @mb_SkillId);
+ closeclientdialog;
+ dispbottom l("You have learnt the skill.");
+ }
+ close;
+ }
+
+
+ function read_book {
+
+ setnpcdialogtitle l(.book_name$);
+ mesc l("@@/@@ pages used.", array_entries(MASTERBOOK_SKILL), MASTERBOOK_PAGES);
+
+ mesc l("List of known master skills:");
+ mes "";
+ for (.@i = 0; .@i < getarraysize(MASTERBOOK_SKILL); ++.@i) {
+ mesc l("* Skill ID: @@", MASTERBOOK_SKILL[.@i]);
+ }
+ close;
+ }
+
+OnUse:
+ // We assume if @mb_BossId is set, everything else is set, too
+ if (@mb_BossId)
+ register_skill;
+ if (openbook())
+ read_book;
+ closeclientdialog();
+ close;
+
+OnInit:
+ .book_name$ = getitemname(MasterBook);
+ .sex = G_OTHER;
+ .distance = 1;
+ end;
+}
diff --git a/npc/scripts.conf b/npc/scripts.conf
index 8185ef56..a7f39836 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -100,6 +100,7 @@
"npc/items/shovel.txt",
"npc/items/rand_sc_heal.txt",
"npc/items/recipes.txt",
+"npc/items/master_skillbook.txt",
// custom atcommands
"npc/commands/music.txt",