summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-07-28 17:41:40 -0300
committerJesusaves <cpntb1@ymail.com>2019-07-28 17:41:40 -0300
commit6a6ccf27161b239c974b4dadcb3cfc275f3581d7 (patch)
treed00870cb27fb2c6fe4b2a90f205a24d108e4e428
parentfec35860f0876dd7bb74a13896c28532c91ca766 (diff)
parentd50cb8eff8d4f143b553cc33401f60baa6b03873 (diff)
downloadserverdata-6a6ccf27161b239c974b4dadcb3cfc275f3581d7.tar.gz
serverdata-6a6ccf27161b239c974b4dadcb3cfc275f3581d7.tar.bz2
serverdata-6a6ccf27161b239c974b4dadcb3cfc275f3581d7.tar.xz
serverdata-6a6ccf27161b239c974b4dadcb3cfc275f3581d7.zip
Partly Merge branch 'master' into testserver
Conflicts: npc/commands/rate-management.txt npc/functions/mobpoint.txt
-rw-r--r--db/re/item_db.conf66
-rw-r--r--db/re/map_zone_db.conf27
-rw-r--r--db/re/mob_db.conf11
-rw-r--r--db/re/skill_db.conf4
-rw-r--r--npc/001-1/rewards.txt11
-rw-r--r--npc/002-3/elmo.txt11
-rw-r--r--npc/002-3/nard.txt12
-rw-r--r--npc/003-0/notes2
-rw-r--r--npc/003-0/trickmaster.txt2
-rw-r--r--npc/003-1/aahna.txt11
-rw-r--r--npc/003-3/malindou.txt6
-rw-r--r--npc/005-5/nylo.txt8
-rw-r--r--npc/015-2/ben.txt58
-rw-r--r--npc/015-3/arkim.txt4
-rw-r--r--npc/016-1/captain.txt1
-rw-r--r--npc/016-7/main.txt3
-rw-r--r--npc/019-1-1/miler.txt10
-rw-r--r--npc/019-1/well.txt11
-rw-r--r--npc/020-5/bracco.txt3
-rw-r--r--npc/021-1/yeti.txt1
-rw-r--r--npc/023-2/mk.txt6
-rw-r--r--npc/024-9/_import.txt1
-rw-r--r--npc/024-9/barkeeper.txt33
-rw-r--r--npc/commands/rate-management.txt11
-rw-r--r--npc/craft/recipes.txt6
-rw-r--r--npc/craft/smith.txt3
-rw-r--r--npc/functions/clientversion.txt59
-rw-r--r--npc/functions/fishing.txt4
-rw-r--r--npc/functions/mobpoint.txt1
-rw-r--r--npc/functions/siege.txt20
-rw-r--r--npc/functions/treasure.txt3
-rw-r--r--npc/items/alcohol.txt44
-rw-r--r--npc/items/inc_sc_bonus.txt51
-rw-r--r--npc/items/lofteleporter.txt4
-rw-r--r--npc/items/teleporter.txt3
35 files changed, 405 insertions, 106 deletions
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index ceb2b5661..ea18eb90d 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -758,8 +758,8 @@ item_db: (
AegisName: "RedPlushWine"
Name: "Red Plush Wine"
Type: "IT_HEALING"
- Buy: 100
- Sell: 20
+ Buy: 400
+ Sell: 110
Weight: 10
Refine: false
ViewSprite: 531
@@ -772,6 +772,60 @@ item_db: (
">
},
{
+ Id: 532
+ AegisName: "DwarvenSake"
+ Name: "Dwarven Sake"
+ Type: "IT_HEALING"
+ Buy: 800
+ Sell: 220
+ Weight: 14
+ Refine: false
+ ViewSprite: 532
+ Delay: 500
+ UseEffect: "EFFECT_HEAL"
+ Script: <"
+ @taste = 20;
+ @Alcohol = 25;
+ doevent "alcohol_sc::OnUse";
+ ">
+},
+{
+ Id: 533
+ AegisName: "CrazyRum"
+ Name: "Crazy Rum"
+ Type: "IT_HEALING"
+ Buy: 1600
+ Sell: 440
+ Weight: 25
+ Refine: false
+ ViewSprite: 533
+ Delay: 500
+ UseEffect: "EFFECT_HEAL"
+ Script: <"
+ @taste = 30;
+ @Alcohol = 40;
+ doevent "alcohol_sc::OnUse";
+ ">
+},
+{
+ Id: 534
+ AegisName: "WhiskeyAle"
+ Name: "Whiskey Ale"
+ Type: "IT_HEALING"
+ Buy: 3200
+ Sell: 880
+ Weight: 55
+ Refine: false
+ ViewSprite: 534
+ Delay: 500
+ UseEffect: "EFFECT_HEAL"
+ Script: <"
+ @taste = 50;
+ @Alcohol = 70;
+ doevent "alcohol_sc::OnUse";
+ ">
+},
+{
Id: 535
AegisName: "JesusalvaGrimorium"
Name: "Jesusaves's Grimorium"
@@ -938,9 +992,11 @@ item_db: (
Delay: 500
UseEffect: "EFFECT_HEAL"
Script: <"
+ /*
@type = 1;
@rarity=4;
doevent "rand_sc_heal::OnUse";
+ */
@taste = 5;
@Alcohol = 7;
doevent "alcohol_sc::OnUse";
@@ -2020,10 +2076,10 @@ item_db: (
Refine: false
Script: <"
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- setarray .@r, StrangeCoin, SilkCocoon, PiouFeathers, RattoTeeth, MushroomSpores, SpellBookPage, SpellBookPage, AncientBlueprint, SpellBookPage, PirateTreasureMap, TreasureKey, GrassCarp, CottonCloth, CasinoCoins, PileOfAsh, Pearl;
+ setarray .@r, StrangeCoin, SilkCocoon, MushroomSpores, RattoTeeth, BottleOfSeaWater, SpellBookPage, SpellBookPage, AncientBlueprint, SpellBookPage, PirateTreasureMap, TreasureKey, GrassCarp, CottonCloth, CasinoCoins, CrazyRum, Pearl;
.@n=rand(getarraysize(.@r));
- if (.@n > 4)
+ if (.@n > 3)
getitem .@r[.@n], 1;
else
getitem .@r[.@n], rand(1,3);
@@ -2614,6 +2670,7 @@ item_db: (
Script: <"
// We would want warp to be delayed a bit but meh
sleep2(rand(1000,2500));
+ @timer_navio_running=0;
warp "Save", 0, 0;
">
},
@@ -5172,7 +5229,6 @@ item_db: (
Sell: 1
Weight: 850
Refine: false
- ViewSprite: 714
Trade: {
nodrop: true
noselltonpc: true
diff --git a/db/re/map_zone_db.conf b/db/re/map_zone_db.conf
index 3f51d73f2..191b3610a 100644
--- a/db/re/map_zone_db.conf
+++ b/db/re/map_zone_db.conf
@@ -157,7 +157,7 @@ zones: (
mapflags: (
"nopenalty",
- "nosave 000-1,22,22",
+ "nosave 000-1,22,22",
)
/* "command:min-group-lv-to-override" e.g. "heal: 70" */
@@ -203,16 +203,39 @@ zones: (
name: "ship"
disabled_skills: {
+ // Destructive, Fire, and AoE Magic not allowed
+ MG_NAPALMBEAT: "ALL"
MG_FIREBALL: "ALL"
+ WZ_FROSTNOVA: "ALL"
+ MG_FIREBOLT: "ALL"
+ MG_COLDBOLT: "ALL"
+ MG_LIGHTNINGBOLT: "ALL"
+ WZ_EARTHSPIKE: "ALL"
+ MG_FROSTDIVER: "ALL"
+ ASC_METEORASSAULT: "ALL"
+ AC_SHOWER: "ALL"
SN_SHARPSHOOTING: "ALL"
- SM_BASH: "ALL"
+ MG_FIREWALL: "ALL"
+ SO_FIREWALK: "ALL"
+ SA_FLAMELAUNCHER: "ALL"
+ // Warp skills (for obvious reasons)
+ AL_WARP: "ALL"
+ AL_TELEPORT: "ALL"
+ SC_DIMENSIONDOOR: "ALL"
+
}
disabled_items: {
+ ExplosiveArrow: true
+ Grenade: true
}
mapflags: (
"nosave 000-1,22,22",
+ "noknockback",
+ "magic_damage_rate 60",
+ "misc_damage_rate 60",
+ "long_damage_rate 80",
)
/* "command:min-group-lv-to-override" e.g. "heal: 70" */
diff --git a/db/re/mob_db.conf b/db/re/mob_db.conf
index 4645f5d0f..78b83a67f 100644
--- a/db/re/mob_db.conf
+++ b/db/re/mob_db.conf
@@ -855,10 +855,10 @@ mob_db: (
Drops: {
Milk: 400
RedApple: 350
+ MoubooSteak: 300
ChocolateBar: 290
CasinoCoins: 250
ReedBundle: 200
- MoubooSteak: 200
ChocolateMouboo: 100
MoubooHat: 1
}
@@ -2035,8 +2035,8 @@ mob_db: (
Drops: {
CasinoCoins: 1100
RedApple: 400
+ MoubooSteak: 375
ChocolateBar: 300
- MoubooSteak: 215
ChocolateMouboo: 200
ChocolateBar: 15
AntlersHat: 1
@@ -3300,7 +3300,7 @@ mob_db: (
Id: 1086
SpriteName: "RudolphSlime"
Name: "Rudolph Slime"
- Lv: 30
+ Lv: 27
Hp: 860
Sp: 0
Exp: 12
@@ -6380,7 +6380,12 @@ mob_db: (
DamageMotion: 480
Drops: {
GrassSeeds: 300
+ SnakeTongue: 250
+ SnakeEgg: 200
+ ReedBundle: 160
EmptyBottle: 70
+ SnakeSkin: 61
+ DivineApple: 1
}
},
{
diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf
index c818dab3c..acfd0c5ef 100644
--- a/db/re/skill_db.conf
+++ b/db/re/skill_db.conf
@@ -902,7 +902,7 @@ skill_db: (
{
Id: 18
Name: "MG_FIREWALL"
- Description: "Fire Wall"
+ Description: "Nature Wall"
MaxLevel: 10
Range: 9
Hit: "BDT_SKILL"
@@ -910,7 +910,7 @@ skill_db: (
Place: true
}
AttackType: "Magic"
- Element: "Ele_Fire"
+ Element: "Ele_Nature"
InterruptCast: true
SkillInstances: 3
KnockBackTiles: 2
diff --git a/npc/001-1/rewards.txt b/npc/001-1/rewards.txt
index b3534c1f9..41b272c91 100644
--- a/npc/001-1/rewards.txt
+++ b/npc/001-1/rewards.txt
@@ -69,12 +69,13 @@ OnInit:
sellitem MagicApple,115;
sellitem SacredLifePotion,60;
sellitem SacredManaPotion,60;
- sellitem Grenade,50;
sellitem ElixirOfLife,32;
- sellitem CelestiaTea,18;
- sellitem HastePotion,15;
- sellitem StrengthPotion,15;
- sellitem BottleOfDivineWater, 11;
+ sellitem Grenade,28;
+ sellitem WhiskeyAle,28;
+ sellitem CelestiaTea,17;
+ sellitem BottleOfDivineWater, 15;
+ sellitem HastePotion,11;
+ sellitem StrengthPotion,11;
sellitem PrecisionPotion,9;
sellitem DodgePotion,9;
sellitem Curshroom,6;
diff --git a/npc/002-3/elmo.txt b/npc/002-3/elmo.txt
index 3aa022b19..4fa12f700 100644
--- a/npc/002-3/elmo.txt
+++ b/npc/002-3/elmo.txt
@@ -148,10 +148,13 @@ function ExpBoost {
// Level 100 ("max") = 25% EXP BOOST (max)
// Current (2019-04-27) top is 80/80/75, meaning a 19% EXP Boost.
.@AVG_LEVEL=($@hoblvl_value[0]+$@hoblvl_value[1]+$@hoblvl_value[2])/3;
- .@BONUS=.@AVG_LEVEL/4;
- sc_end SC_OVERLAPEXPUP;
- sc_start SC_OVERLAPEXPUP, 3600000, min(25, .@BONUS);
- mesc l("EXP Gain raised in @@% for one hour!", min(25, .@BONUS)), 2;
+ .@BONUS=min(25, .@AVG_LEVEL/4);
+ sc_end SC_CASH_PLUSEXP;
+ sc_end SC_CASH_RECEIVEITEM;
+ sc_start SC_CASH_PLUSEXP, 3600000, .@BONUS;
+ sc_start SC_CASH_RECEIVEITEM, 3600000, .@BONUS;
+ specialeffect FX_SPECIAL, SELF, getcharid(3);
+ mesc l("EXP Gain raised in @@% for one hour!", .@BONUS), 2;
return;
}
diff --git a/npc/002-3/nard.txt b/npc/002-3/nard.txt
index 5feca5164..ce0e513f2 100644
--- a/npc/002-3/nard.txt
+++ b/npc/002-3/nard.txt
@@ -63,11 +63,13 @@ L_Checker:
mesc l("Talk to Elmo to get an EXP UP Boost until level 15!"), 2;
// Actually, why don't we apply it right now...?
.@AVG_LEVEL=($@hoblvl_value[0]+$@hoblvl_value[1]+$@hoblvl_value[2])/3;
- .@BONUS=.@AVG_LEVEL/4;
- sc_end SC_OVERLAPEXPUP;
- sc_start SC_OVERLAPEXPUP, 3600000, min(25, .@BONUS);
+ .@BONUS=min(25, .@AVG_LEVEL/4);
+ sc_end SC_CASH_PLUSEXP;
+ sc_end SC_CASH_RECEIVEITEM;
+ sc_start SC_CASH_PLUSEXP, 3600000, .@BONUS;
+ sc_start SC_CASH_RECEIVEITEM, 3600000, .@BONUS;
specialeffect FX_SPECIAL, SELF, getcharid(3);
- mesc l("EXP Gain raised in @@% for one hour!", min(25, .@BONUS)), 2;
+ mesc l("EXP Gain raised in @@% for one hour!", .@BONUS), 2;
next;
showavatar NPC_NARD;
mesn;
@@ -129,7 +131,7 @@ L_FirstLogin:
close;
-L_NeedHead:
+L_NeedHelp:
mes "";
mesn;
mesq l("You're pretty much stranded on this forsaken island if you don't help me!");
diff --git a/npc/003-0/notes b/npc/003-0/notes
index cc277008b..fda37bf5a 100644
--- a/npc/003-0/notes
+++ b/npc/003-0/notes
@@ -49,7 +49,7 @@ SUPPORT SCIENCE / SCHOLARSHIP (MMO)
AL_INCAGI (raise agi in 3+1/lv)
HW_MAGICPOWER (aumenta poder da próxima skill em MATK 5%/lv)
SM_PROVOKE (provoca um monstro especifico - exceto BOSS)
- AL_ANGELUS (14x14, party, def +5%/lv)
+ **AL_ANGELUS (14x14, party, def +5%/lv)
TF_DETOXIFY (cancels poison. 40% MP.)
AC_CONCENTRATION (self: agi/dex 3+1%/lv, unhide enemies 3x3)
AB_HIGHNESSHEAL (REAL healing skill)
diff --git a/npc/003-0/trickmaster.txt b/npc/003-0/trickmaster.txt
index f8b3a8110..e35312606 100644
--- a/npc/003-0/trickmaster.txt
+++ b/npc/003-0/trickmaster.txt
@@ -19,7 +19,7 @@
"freecast", SA_FREECAST,
"backslide", TF_BACKSLIDING,
"firewall", MG_FIREWALL,
- "inccarry", ALL_INCCARRY,
+ //"inccarry", ALL_INCCARRY,
"fullthrottle", ALL_FULL_THROTTLE,
"darkillusion", GC_DARKILLUSION,
"trickdead", NV_TRICKDEAD,
diff --git a/npc/003-1/aahna.txt b/npc/003-1/aahna.txt
index 9273e3955..94fff454a 100644
--- a/npc/003-1/aahna.txt
+++ b/npc/003-1/aahna.txt
@@ -24,14 +24,9 @@ OnInit:
// Server Happy Hour
OnSun1800:
- /*
- $@EXP_EVENT=rand(110, 115);
- if ($@EXP_EVENT > 111 && $@EXP_EVENT != 115)
- $@EXP_EVENT=rand(110, 115);
- */
- $@EXP_EVENT=rand(115, 120);
- if ($@EXP_EVENT > 115 && $@EXP_EVENT != 120)
- $@EXP_EVENT=rand(115, 120);
+ $@EXP_EVENT=rand2(15, 20);
+ if ($@EXP_EVENT > 15 && $@EXP_EVENT != 20)
+ $@EXP_EVENT=rand2(15, 20);
$@EXP_EVENT_TIME=any(1,1,1,2);
donpcevent "@exprate::OnPlayerCall";
end;
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt
index 21bcf2279..9e41b9196 100644
--- a/npc/003-3/malindou.txt
+++ b/npc/003-3/malindou.txt
@@ -470,7 +470,8 @@ OnInit:
OnPCBaseLvUpEvent:
switch (BaseLevel) {
case 15:
- sc_end SC_OVERLAPEXPUP;
+ sc_end SC_CASH_PLUSEXP;
+ sc_end SC_CASH_RECEIVEITEM;
break;
case 25:
case 50:
@@ -515,6 +516,9 @@ OnPCLoginEvent:
// Position and gameplay fixes
HUB_Login();
+ // Alcohol system reset
+ ALCReset();
+
// Daily rewards (always the last)
daily_login_bonus_handler();
end;
diff --git a/npc/005-5/nylo.txt b/npc/005-5/nylo.txt
index c37c1ed99..c0ac3d98c 100644
--- a/npc/005-5/nylo.txt
+++ b/npc/005-5/nylo.txt
@@ -31,6 +31,14 @@
mesn;
mesq l("Of course: better drinks, more EXP. Just be careful to don't get so drunk that you cannot fight anymore, will ya?");
next;
+ if (TUTORIAL && !@beertuto) {
+ @beertuto=true;
+ mes l(".:: Alcohol Tutorial ::.");
+ mesc l("Drinking with friends will give 1.5% extra XP boost for each person nearby.");
+ mesc l("Alcohol effects expire upon death. You need vitality to drink more beer.");
+ mesc l("Even if you drink alone, you'll still receive the EXP bonus marked on the item description.");
+ next;
+ }
closeclientdialog; // Not needed?
openshop "Nylo#Beer";
break;
diff --git a/npc/015-2/ben.txt b/npc/015-2/ben.txt
index c965131cc..2957b2e47 100644
--- a/npc/015-2/ben.txt
+++ b/npc/015-2/ben.txt
@@ -25,8 +25,8 @@ L_Quest:
if (THIEF_RANK == 0)
goto L_Recruit;
mesn;
- mesq l("Hello there, @@, fear from the wealthy.", thiefrank());
- if (THIEF_RANK == 5) close;
+ mesq l("Hello there, @@ the @@.", strcharinfo(0), thiefrank());
+ if (THIEF_RANK == 5) goto L_Menu;
mesq l("I see you have collected some experience. Let me try to rank you up!");
next;
if (THIEF_EXP > (THIEF_RANK*2)**5) {
@@ -36,23 +36,27 @@ L_Quest:
mesn;
mesq l("Congrats! You rank up! You are now a(n) @@!", thiefrank());
if (THIEF_RANK == 2) goto L_Rank2;
+ if (THIEF_RANK == 3) goto L_Rank3;
} else {
mesn;
mesq l("Well, you need more experience. Keep trying!");
}
+ goto L_Menu;
close;
L_Recruit:
mesn;
- mesq l("You seem to be doing some money. Would you consider fighting for evil, and against all those whom make wealthy unworthly?");
- mesc l("Notice: If you join the ##BBandits Guild##b now, you WON'T BE ABLE to be a merchant police later!"), 1;
+ mesq l("You seem to be doing some money. Would you consider fighting for your own greed, or even be a Robin-Hood-of-sorts, stealing from the rich?");
+ //mesc l("Notice: If you join the ##BBandits Guild##b now, you WON'T BE ABLE to be a merchant police later!"), 1;
+ mesc l("Note: You won't be able to leave the class later."), 1;
next;
if (askyesno() == ASK_YES) {
THIEF_EXP=0;
THIEF_RANK=1;
mes "";
mesn;
- mesq l("Welcome to the ##BBandits Guild##b! Steal anyone wealthy!");
+ mesq l("Welcome to the ##BThieves Guild##b! Follow those with higher rank than you, and happy stealing!");
+ mesc l("You've learned how to use @@. Simple locks can now be broken.", getitemlink(Lockpicks));
} else {
goto L_Intro;
}
@@ -69,6 +73,50 @@ L_Rank2:
mesq l("You must be close to it, and stealing won't change drops! If you fail, just try again! Good luck!");
close;
+// Learn INCCARRY
+L_Rank3:
+ skill(ALL_INCCARRY,1,0);
+ next;
+ mesn;
+ mesq l("Now, you'll learn a thief trick! What sort of thief loots so much that they get overweight penalty? That's not cool!");
+ next;
+ mesn;
+ mesq l("You now gained two extra kilograms to your weight quota! Ka-pow, that's fantastic! Good luck!");
+ close;
+
+// Allow to level up thief skills
+L_Menu:
+ next;
+ mesn;
+ mesq l("Do you want me to teach you how to improve an existing skill with MAGIC? There are no better mages than Mouboos!");
+ mesc l("You also need @@/@@ Mob Points to improve thief skills.", format_number(Mobpt), 1000);
+ if (Mobpt < 1000)
+ close;
+ next;
+ select
+ rif(getskilllv(TF_STEAL), l("Improve Stealing to level ")+getskilllv(TF_STEAL)+1),
+ rif(getskilllv(ALL_INCCARRY), l("Improve Max Weight to level ")+getskilllv(ALL_INCCARRY)+1),
+ l("None at the moment.");
+ mes "";
+ // BlueCoral, {CrocClaw, OceanCrocClaw: Empty Box}, PlushroomBox
+ switch (@menu) {
+ case 1:
+ if (!mlearn(TF_STEAL, 10, 1, BlueCoral, 6*getskilllv(TF_STEAL)))
+ mesc l("You do not meet all requisites for this skill."), 1;
+ else
+ Mobpt-=1000;
+ break;
+ case 2:
+ if (!mlearn(ALL_INCCARRY, 10, 1, BlueCoral, 9*getskilllv(ALL_INCCARRY)))
+ mesc l("You do not meet all requisites for this skill."), 1;
+ else
+ Mobpt-=1000;
+ break;
+ case 3:
+ close;
+ }
+ goto L_Menu;
+
OnInit:
.sex = G_MALE;
.distance = 5;
diff --git a/npc/015-3/arkim.txt b/npc/015-3/arkim.txt
index fa93d8b87..21a5ce307 100644
--- a/npc/015-3/arkim.txt
+++ b/npc/015-3/arkim.txt
@@ -118,8 +118,10 @@ L_Research:
mesq l("@@ is developing these potions.", "Wyara"); break;
case 5:
mesq l("@@ is developing these potions.", "Fate, in Nivalis,"); break; // TODO: Missing NPC
+ case 6:
+ mesq l("@@ is developing these potions.", "Frostia Dwarves"); break;
default:
- mesq l("@@ is developing these potions.", "Jesusalva"); // TODO: Clotho, Lachesis and Atropos
+ mesq l("@@ is developing these potions.", "Jesusalva"); // TODO: Lachesis and Atropos
break;
}
diff --git a/npc/016-1/captain.txt b/npc/016-1/captain.txt
index 7aee841db..b281e5206 100644
--- a/npc/016-1/captain.txt
+++ b/npc/016-1/captain.txt
@@ -13,6 +13,7 @@
mesq l("Hi @@.", strcharinfo(0));
next;
mesq l("You are currently at @@.", LOCATION$);
+ mesc l("Note: Onboard, Destructive, Fire, and AoE Magic are NOT allowed.");
mes "";
menu
diff --git a/npc/016-7/main.txt b/npc/016-7/main.txt
index 6c615a50d..165150630 100644
--- a/npc/016-7/main.txt
+++ b/npc/016-7/main.txt
@@ -47,6 +47,9 @@ OnReward:
getexp BaseLevel*10, BaseLevel;
Zeny=Zeny+BaseLevel*rand2(5,15);
//getitem SailorShirt, 1; // I already tried to do this before...?
+ // 7% chance to get Crazy Rum
+ if (rand2(10000) < 700+(readparam(bLuk)*3))
+ getitem CrazyRum, 1;
dispbottom l("Congratulations!");
if (isin("016-7", 23, 25, 52, 35))
addtimer(3000, "#MarineShipAttack::OnResumeTravel");
diff --git a/npc/019-1-1/miler.txt b/npc/019-1-1/miler.txt
index a4ecfd6bc..12c25899c 100644
--- a/npc/019-1-1/miler.txt
+++ b/npc/019-1-1/miler.txt
@@ -26,6 +26,10 @@
rif(.@q == 4, l("So, could I help you?")), L_Quest,
l("Do you want any monster killed?"), L_GHQ;
+ // If not on Cordo quest, Miler will speak about
+ if (!THIEF_RANK && !MERC_RANK)
+ goto L_Rejected;
+
close;
// Well Quest Subplot
@@ -61,9 +65,11 @@ L_Doctor:
// Not on Cordo quest
L_Rejected:
+ /*
mesn;
mesq l("You cannot help me at all. You lack any skill to do so.");
next;
+ */
mesn;
mesq l("Hey, did you know there are two mouboos which constantly fight against themselves?!");
next;
@@ -77,15 +83,17 @@ L_Rejected:
next;
mesn;
mesq l("Anyway, I heard both were disciples from Cordo-whatever, a powerful person from LoF Village.");
- mesq l("I think you should get initiated on any side before speaking to me again.");
+ //mesq l("I think you should get initiated on any side before speaking to me again.");
close;
// Main Quest
L_Quest:
// Force players upon Cordo quest
+ /*
if (!THIEF_RANK && !MERC_RANK)
goto L_Rejected;
+ */
mes "";
mesn;
diff --git a/npc/019-1/well.txt b/npc/019-1/well.txt
index 9eba86bfa..6f90d5fb7 100644
--- a/npc/019-1/well.txt
+++ b/npc/019-1/well.txt
@@ -31,7 +31,7 @@ L_Reckless:
closedialog;
warp "015-6", 363, 109;
dispbottom l("Ouch! That was kinda reckless!");
- percentheal -155+readparam(bVit), 0;
+ percentheal -150+readparam(bVit), 0;
close;
// Easter Egg
@@ -68,6 +68,13 @@ L_Throw:
// Now we check if quest must start
if (!.@q)
goto L_Quest;
+ // If not, report if it is safe to jump
+ if (readparam(bVit) < 55)
+ mesc l("The item impact suggests you don't have enough vitality to jump inside."), 1;
+ else if (readparam(bVit) < 75)
+ mesc l("The item impact suggests jumping inside will leave you badly wounded.");
+ else
+ mesc l("The item impact suggests jumping inside should be safe if you have enough life.");
close;
// Quest Node
@@ -141,7 +148,7 @@ L_Bottle:
// Calculate how many iced bottles you'll get
.@iced=0;
for (.@i=0; .@i < .@count; .@i++) {
- if (rand(1,1000) < 11)
+ if (rand2(1,1000) < 33)
.@iced++;
}
diff --git a/npc/020-5/bracco.txt b/npc/020-5/bracco.txt
index 52e9ad63e..3a3c33b3c 100644
--- a/npc/020-5/bracco.txt
+++ b/npc/020-5/bracco.txt
@@ -151,6 +151,9 @@ L_Meltdown:
mes "";
// Returns 50~70% of invested ingots, rounded down. Never returns Coal.
switch (.@id) {
+ case SilverMirror:
+ Meltdown(.@it, 500, SilverOre, rand2(2, 5)); // Exception
+ break;
case RustyKnife:
Meltdown(.@it, 15, IronOre, any(0, 0, 0, 1, 1)); // Exception
break;
diff --git a/npc/021-1/yeti.txt b/npc/021-1/yeti.txt
index 7bdebcbab..a24c83d6d 100644
--- a/npc/021-1/yeti.txt
+++ b/npc/021-1/yeti.txt
@@ -108,6 +108,7 @@ L_Report:
close;
}
delitem MoubooSteak, 60;
+ getexp 120000, 0; // roughly 30% from needed EXP. This quest IS boring.
setq NivalisQuest_Cindy, 3;
mesn;
mesq l("Great. I hereby task you to kill the rogue Yetis on the Yeti King Throne Room. Of course, you won't be able to leave until all of them are dead.");
diff --git a/npc/023-2/mk.txt b/npc/023-2/mk.txt
index 8fe91da85..60fa62361 100644
--- a/npc/023-2/mk.txt
+++ b/npc/023-2/mk.txt
@@ -53,13 +53,13 @@ L_Finish:
channelmes("#world", "Congratulations for the draw, that was a good fight.");
channelmes("#world", "The Monster King stole whatever he wanted and left.");
// Reproduce the same bonus from Alpha Server
- $@EXP_EVENT=125;
+ $@EXP_EVENT=25;
donpcevent "@exprate::OnPlayerCall";
} else if (.victory_count < 100) { // 1 player for 5 minutes is enough to prevent this loss
announce "The Monster King, after moping the floor with the players, accomplish what he set, and left...", bc_all|bc_npc;
channelmes("#world", "The players failed miserably in stopping the Monster King.");
// Reproduce the same penalty from Beta Server
- $@EXP_EVENT=rand(50, 75);
+ $@EXP_EVENT=rand2(-50, -25);
donpcevent "@exprate::OnPlayerCall";
} else {
announce "The fight ends in draw, with advantage to the Monster King...", bc_all|bc_npc;
@@ -127,7 +127,7 @@ OnVictory:
channelmes("#world", "Getting magic is now easier!");
announce "Players have defeated the Monster King! He fleed from the cave after leaving a decoy!", bc_all|bc_npc;
$MANA_BLVL-=10;
- $@EXP_EVENT=125;
+ $@EXP_EVENT=25;
donpcevent "@exprate::OnPlayerCall";
goto L_Finish2;
end;
diff --git a/npc/024-9/_import.txt b/npc/024-9/_import.txt
index f038f049f..b0d325f44 100644
--- a/npc/024-9/_import.txt
+++ b/npc/024-9/_import.txt
@@ -1,3 +1,4 @@
// Map 024-9: Frostia Indoors
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/024-9/_warps.txt",
+"npc/024-9/barkeeper.txt",
diff --git a/npc/024-9/barkeeper.txt b/npc/024-9/barkeeper.txt
new file mode 100644
index 000000000..2d9f09122
--- /dev/null
+++ b/npc/024-9/barkeeper.txt
@@ -0,0 +1,33 @@
+// TMW-2 Script
+// Author:
+// Jesusalva
+// Description:
+// Sells beer
+
+// Temporary Sprite
+024-9,39,31,0 script Bar Jobs NPC_DWARF_TRADER,{
+ hello;
+ shop .name$;
+ close;
+
+OnInit:
+ tradertype(NST_MARKET);
+
+ sellitem DwarvenSake, 1100, 5;
+ sellitem Beer, 300, 20;
+ if ($ARKIM_ST >= 4000)
+ sellitem ClothoLiquor, -1, (($ARKIM_ST-4000)/500)+1;
+
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+
+OnClock2358:
+ restoreshopitem DwarvenSake, 1100, 5;
+ restoreshopitem Beer, 300, 20;
+ if ($ARKIM_ST >= 4000)
+ restoreshopitem ClothoLiquor, (($ARKIM_ST-4000)/500)+1;
+ end;
+
+}
+
diff --git a/npc/commands/rate-management.txt b/npc/commands/rate-management.txt
index e9e858ee1..c98f8eeb9 100644
--- a/npc/commands/rate-management.txt
+++ b/npc/commands/rate-management.txt
@@ -75,14 +75,23 @@ OnCall:
end;
OnPlayerCall:
+ /*
// GM calls take precedence at any time!
if (.max_hours > 0 || .hours > 0)
end;
+ */
// $@EXP_EVENT will determine the boost and should not be above 25%
// Default duration is one hour, or whatever $@EXP_EVENT_TIME is
- $@EXP_EVENT=200+limit(0, $@EXP_EVENT, 150);
+ $@EXP_EVENT=limit(0, $@EXP_EVENT, 100);
+ $@EXP_EVENT+=.current_rate;
$@EXP_EVENT_TIME=limit(1, $@EXP_EVENT_TIME, 6);
+ // If a GM rate-up was running, we will sum the time, too.
+ // It'll be rounded down. (so 1h + 30m = 1h) FIXME average is better
+ if (.hours || .max_hours) {
+ $@EXP_EVENT_TIME+=max(0, .max_hours-.hours-1);
+ }
+
// Default duration is one hour, or whatever $@EXP_EVENT_TIME is
.hours = 0;
.max_hours = $@EXP_EVENT_TIME;
diff --git a/npc/craft/recipes.txt b/npc/craft/recipes.txt
index 163faf545..c8a3362ca 100644
--- a/npc/craft/recipes.txt
+++ b/npc/craft/recipes.txt
@@ -384,6 +384,9 @@ function script MakeBlueprint {
if (RECIPES_ALCHEMY[.@rcp]) {
dispbottom l("It was a recipe you already knew...");
getexp (BaseLevel+JobLevel)*rand2(1,.@rarity), JobLevel+rand2(1,.@rarity);
+ // Give you some Monster Points to use with Intense Beard
+ // You do NOT need to be registered with Aidan for this.
+ Mobpt+=rand2(900, 1000*.@rarity);
} else {
dispbottom l("Learned a new recipe!");
RECIPES_ALCHEMY[.@rcp]=true;
@@ -439,6 +442,9 @@ function script MakeBlueprint {
if (RECIPES_EQUIPMENT[.@rcp]) {
dispbottom l("It was a recipe you already knew...");
getexp (BaseLevel+JobLevel)*rand2(1,.@rarity), JobLevel+rand2(1,.@rarity);
+ // Give you some Monster Points to use with Intense Beard
+ // You do NOT need to be registered with Aidan for this.
+ Mobpt+=rand2(900, 1000*.@rarity);
} else {
dispbottom l("Learned a new recipe!");
RECIPES_EQUIPMENT[.@rcp]=true;
diff --git a/npc/craft/smith.txt b/npc/craft/smith.txt
index 71f6a47f5..87dc9d55d 100644
--- a/npc/craft/smith.txt
+++ b/npc/craft/smith.txt
@@ -62,6 +62,9 @@ function script SmithSystem {
// Get experience for the craft
.@xp=getiteminfo(.@it, ITEMINFO_SELLPRICE);
getexp .@xp+BaseLevel, (.@xp/3)+BaseLevel+JobLevel;
+ // Monster points too, if appliable - by your Job Level
+ if (MPQUEST)
+ Mobpt+=JobLevel;
.success=true;
} else {
diff --git a/npc/functions/clientversion.txt b/npc/functions/clientversion.txt
index 59098ee15..873873018 100644
--- a/npc/functions/clientversion.txt
+++ b/npc/functions/clientversion.txt
@@ -287,25 +287,39 @@ function script clientupdater {
if (UPDATE < 1563219695) {
UPDATE=1563219695;
.@dg=true;
+ mesc l(".:: This is Release 9.5 Academy ::."), 0;
+ //mesc l(".:: This is Release 10.0 Infinity ::."), 0;
+ // Fix mounts
+ unequip(EQI_SHADOW_SHOES);
+ setmount 0;
// You got recipe book by BSS Quest - mark as complete and get Blueprint
if (getq(NivalisQuest_BlueSageSlimes) == 2) {
getitem any(AncientBlueprint, AlchemyBlueprintA, EquipmentBlueprintA), 1;
CRAFTQUEST=1;
+ mesc l("You got a blueprint as reward for Blue Sage Slimes Quest completion."), 3;
+ }
+ // If you have TMW2_CRAFT skill, you need the bonus recipe
+ if (getskilllv(TMW2_CRAFT)) {
+ RECIPES_EQUIPMENT[CraftDagger]=true;
+ mesc l("Dagger Crafting recipe learnt."), 2;
}
// Bounty Hunter Helmet
if (MERCENARY_DAILYQUEST > 100) {
getitem BountyHunterHelmet, 1;
+ mesc l("You got a @@ for completing 100+ daily bountyhunter quests!", getitemlink(BountyHunterHelmet)), 2;
}
- // If you have TMW2_CRAFT skill, you need the bonus recipe
- if (getskilllv(TMW2_CRAFT)) {
- RECIPES_EQUIPMENT[CraftDagger]=true;
- mesc l("Dagger Crafting recipe learnt.");
+ // Cindy quest new rewards
+ if (getq(NivalisQuest_Cindy) >= 3) {
+ getexp 120000, 0;
+ mesc l("You got 120,000 XP for completing Mercury's quest."), 2;
}
// Mercenary Rank removed
if (MERC_RANK) {
THIEF_RANK=MERC_RANK;
+ THIEF_EXP=MERC_EXP;
MERC_RANK=0;
- mesc l("Your class has been changed from %s to %s.", b(l("Merchant Police")), b(l("Thief")));
+ MERC_EXP=0;
+ mesc l("Your class has been changed from %s to %s.", b(l("Merchant Police")), b(l("Thief"))), 1;
}
if (getskilllv(ALL_INCCARRY)) {
skill TF_STEAL, getskilllv(ALL_INCCARRY);
@@ -317,7 +331,7 @@ function script clientupdater {
skill AC_CHARGEARROW, getskilllv(SN_SHARPSHOOTING);
skill AC_CHARGEARROW, 0, 0;
getexp 2000, 150;
- mesc l("Sharpshooting skill replaced with Charged Arrow.");
+ mesc l("Sharpshooting skill replaced with Charged Arrow."), 1;
mesc l("You've got 2000 xp and 150 job xp in apology tokens.");
}
getskilllist();
@@ -326,19 +340,24 @@ function script clientupdater {
if (@skilllist_flag[.@i] != 0)
continue;
// Only “paid” skills will result in a Scholarship Badge
- switch (@skilllist_id[.@i]) {
+ .@id=@skilllist_id[.@i];
+ .@am=0;
+ switch (.@id) {
case SM_BASH:
+ case TMW2_DEMURE:
+ case MG_FIREBALL:
+ case MG_SRECOVERY:
+ case AL_DP:
+ .@am=1;
case SM_ENDURE:
case KN_AUTOCOUNTER:
case KN_TWOHANDQUICKEN:
- case TMW2_DEMURE:
case AL_ANGELUS:
case CR_TRUST:
case CR_DEFENDER:
case AL_HOLYLIGHT:
case TF_DETOXIFY:
case ALL_RESURRECTION:
- case MG_SRECOVERY:
case SM_RECOVERY:
case PR_ASPERSIO:
case AB_HIGHNESSHEAL:
@@ -349,7 +368,6 @@ function script clientupdater {
case SA_FROSTWEAPON:
case SA_LIGHTNINGLOADER:
case SA_SEISMICWEAPON:
- case MG_FIREBALL:
case MG_ENERGYCOAT:
case MG_NAPALMBEAT:
case MG_FIREBOLT:
@@ -357,7 +375,10 @@ function script clientupdater {
case MG_LIGHTNINGBOLT:
case WZ_EARTHSPIKE:
mesc l("A skill has been replaced with an @@.", getitemlink(ScholarshipBadge));
- getitem ScholarshipBadge, 1;
+ if (!.@am)
+ .@am=min(5, @skilllist_lv[.@i]);
+
+ getitem ScholarshipBadge, .@am;
skill @skilllist_id[.@i], 0, 0;
getexp 5, (@skilllist_lv[.@i]-1)*1000;
break;
@@ -377,6 +398,22 @@ function script clientupdater {
break;
}
}
+ // Grant you AL_DP based on magic level
+ if (MAGIC_LVL) {
+ skill AL_DP, MAGIC_LVL, 0;
+ mesc l("You have learnt \"Divine Protection\" level @@.", MAGIC_LVL), 3;
+ }
+ // Grant you Thief Skill Tier 3
+ if (THIEF_RANK >= 3) {
+ skill(ALL_INCCARRY,1,0);
+ mesc l("You have learnt \"Increase Weight\" in Thief Skills."), 2;
+ }
+ // If you got a Scholarship Badge, you need to travel to Tulimshar.
+ // Give you a Warp Crystal to do so.
+ if (countitem(ScholarshipBadge)) {
+ getitem TulimWarpCrystal, 1;
+ mesc l("You've obtained a @@ to visit Magic Academy.", getitemlink(TulimWarpCrystal)), 1;
+ }
// Cleanup
deletearray RNGTREASURE_DATE;
}
diff --git a/npc/functions/fishing.txt b/npc/functions/fishing.txt
index 56415e6eb..52f9fcc9a 100644
--- a/npc/functions/fishing.txt
+++ b/npc/functions/fishing.txt
@@ -225,6 +225,10 @@ function script fishing {
specialeffect(.@success_fx, SELF, playerattached());
getexp getvariableofnpc(.bait_ids[@bait_d+1], .@npc$)+(BaseLevel/10), 0; // xp gain is equivalent to bait rarity + BaseLevel boost
+ // MobPt gain is equivalent to bait rarity.
+ if (MPQUEST)
+ Mobpt+=getvariableofnpc(.bait_ids[@bait_d+1], .@npc$);
+
if(!checkweight(.@fish_id, 1))
{
dispbottom l("You caught a @@ but had no room in your inventory to carry it.", getitemlink(.@fish_id));
diff --git a/npc/functions/mobpoint.txt b/npc/functions/mobpoint.txt
index 1035c62ca..8133c938f 100644
--- a/npc/functions/mobpoint.txt
+++ b/npc/functions/mobpoint.txt
@@ -19,6 +19,7 @@ function script mobpoint {
TS_MOBPT = TS_MOBPT + .@addval;
if (!MPQUEST)
return;
+
Mobpt = Mobpt + .@addval;
return;
diff --git a/npc/functions/siege.txt b/npc/functions/siege.txt
index ef14e6e51..95d16ebc2 100644
--- a/npc/functions/siege.txt
+++ b/npc/functions/siege.txt
@@ -433,9 +433,9 @@ OnRespawn:
OnSergeantDeath:
if ($GAME_STORYLINE == 2)
$MK_TEMPVAR+=1;
- getitem StrangeCoin, rand(1,5);
+ getitem StrangeCoin, rand2(1,5);
announce("##2The Monster Sergeant was defeated by "+strcharinfo(0)+"!", bc_all);
- $@EXP_EVENT=rand2(101, 103);
+ $@EXP_EVENT=rand2(1, 3);
$@EXP_EVENT_TIME=1;
donpcevent "@exprate::OnPlayerCall";
end;
@@ -443,9 +443,9 @@ OnSergeantDeath:
OnLieutenantDeath:
if ($GAME_STORYLINE == 2)
$MK_TEMPVAR+=3;
- getitem StrangeCoin, rand(5,10);
+ getitem StrangeCoin, rand2(5,10);
announce("##2The Monster Lieutenant was defeated by "+strcharinfo(0)+"!", bc_all);
- $@EXP_EVENT=rand2(104, 106);
+ $@EXP_EVENT=rand2(4, 6);
$@EXP_EVENT_TIME=1;
donpcevent "@exprate::OnPlayerCall";
end;
@@ -453,9 +453,9 @@ OnLieutenantDeath:
OnCaptainDeath:
if ($GAME_STORYLINE == 2)
$MK_TEMPVAR+=5;
- getitem StrangeCoin, rand(10,15);
+ getitem StrangeCoin, rand2(10,15);
announce("##2The Monster Captain was defeated by "+strcharinfo(0)+"!", bc_all);
- $@EXP_EVENT=rand2(107, 109);
+ $@EXP_EVENT=rand2(7, 9);
$@EXP_EVENT_TIME=1;
donpcevent "@exprate::OnPlayerCall";
end;
@@ -463,10 +463,10 @@ OnCaptainDeath:
OnColonelDeath:
if ($GAME_STORYLINE == 2)
$MK_TEMPVAR+=7;
- getitem StrangeCoin, rand(15,20);
+ getitem StrangeCoin, rand2(15,20);
$MOST_HEROIC$=strcharinfo(0);
announce("##2The Monster Colonel was defeated by "+strcharinfo(0)+"!", bc_all);
- $@EXP_EVENT=rand2(110, 112);
+ $@EXP_EVENT=rand2(10, 12);
$@EXP_EVENT_TIME=1;
donpcevent "@exprate::OnPlayerCall";
end;
@@ -474,10 +474,10 @@ OnColonelDeath:
OnGeneralDeath:
if ($GAME_STORYLINE == 2)
$MK_TEMPVAR+=9;
- getitem StrangeCoin, rand(20,25);
+ getitem StrangeCoin, rand2(20,25);
$MOST_HEROIC$=strcharinfo(0);
announce("##2The Monster General was defeated by "+strcharinfo(0)+"!", bc_all);
- $@EXP_EVENT=rand2(113, 115);
+ $@EXP_EVENT=rand2(13, 15);
$@EXP_EVENT_TIME=1;
donpcevent "@exprate::OnPlayerCall";
end;
diff --git a/npc/functions/treasure.txt b/npc/functions/treasure.txt
index 0698d56ee..83da812e4 100644
--- a/npc/functions/treasure.txt
+++ b/npc/functions/treasure.txt
@@ -49,6 +49,9 @@ function script TreasureBox {
inventoryplace .@loot, 1;
mesc l("You find @@ inside!", getitemlink(.@loot));
getitem .@loot, 1;
+ // Get Monster points for treasure hunting (20% from job level)
+ if (MPQUEST)
+ Mobpt+=(JobLevel/5);
} else {
mesc l("You find @@ inside!", l("nothing"));
}
diff --git a/npc/items/alcohol.txt b/npc/items/alcohol.txt
index 81c6a6bd0..ad91da8db 100644
--- a/npc/items/alcohol.txt
+++ b/npc/items/alcohol.txt
@@ -36,23 +36,30 @@
}
OnUse:
- if (@Alcohol <= 0) close;
- // Do you have enough vitality to hold your beer?
- .@vit=readparam(bVit);
- if (@Alcohol+ALC_THRESHOLD > .@vit) {
- dispbottom l("You vomit, you are too drunk for this to have effect anymore.");
- dispbottom l("Raise vitality to be able to drink even more.");
- sc_start SC_CONFUSION, 5000, 0, 10000, SCFLAG_NOAVOID; // Warning, forces user to use @resync!
+ if (@Alcohol <= 0 || @taste <= 0) {
+ Exception("Invalid alcoholic item, deleting without any effect.");
end;
}
+ // Do you have enough vitality to hold your beer?
+ // Skip this check on the first drink
+ if (ALC_THRESHOLD) {
+ .@vit=readparam(bVit);
+ if (@Alcohol+ALC_THRESHOLD > .@vit) {
+ dispbottom l("You vomit, you are too drunk for this to have effect anymore.");
+ dispbottom l("Raise vitality to be able to drink even more.");
+ sc_start SC_CONFUSION, 5000, 0, 10000, SCFLAG_NOAVOID; // Warning, forces user to use @resync!
+ end;
+ }
+ }
.@deltatime=60*1000; // How long (in ms) each Alcohol point works? (max. 100 points)
// Default value is 1 minute per alcohol point - you'll be somber after at most two hours.
// Taste is affected by users near you.
- // Each user raises exp bonus in 1%, capped to the beverage taste
+ // Each user raises exp bonus in 1.5%, capped to the beverage taste
// If you are with many people, drink a better beverage! ;-)
getmapxy(.@m$, .@x, .@y, 0);
- .@bonus=getareausers(.@m$, .@x-10, .@y-10, .@x+10, .@y+10)-1;
+ .@bonus=getareausers(.@m$, .@x-12, .@y-12, .@x+12, .@y+12)-1;
+ .@bonus=.@bonus*15/10;
@taste+=min(@taste, .@bonus);
// Alcohol EXP Bonus - ponderate average, so having more VIT doesn't means
@@ -73,19 +80,26 @@ OnUse:
// Recalculate Alcohol Threshold and time
ALC_THRESHOLD+=@Alcohol;
- if (ALC_DELAYTIME < gettimetick(2))
+ if (ALC_DELAYTIME < gettimetick(2)) {
ALC_DELAYTIME=gettimetick(2);
+ ALC_THRESHOLD=@Alcohol;
+ }
ALC_DELAYTIME+=@Alcohol*.@deltatime;
// Debug comment if you need to check stuff
//debugmes "%d %d | %d %d | f t ", remaining_bonus(SC_OVERLAPEXPUP, false), remaining_bonus(SC_OVERLAPEXPUP, true), remaining_bonus(SC_ATTHASTE_INFINITY, false), remaining_bonus(SC_ATTHASTE_INFINITY, true);
// For debuff I'll use inc_sc_bonus utilities (exp gain = atk speed loss)
- @min=-(remaining_bonus(SC_OVERLAPEXPUP, true)*2);
- @max=-(remaining_bonus(SC_OVERLAPEXPUP, true)*2);
- @type=SC_ATTHASTE_INFINITY;
- @delay=@Alcohol*(.@deltatime/1000);
- doevent "inc_sc_bonus::OnUse";
+ .@delay=@Alcohol*(.@deltatime/1000);
+ .@min=-(remaining_bonus(SC_OVERLAPEXPUP, true)*2);
+ .@max=-(remaining_bonus(SC_OVERLAPEXPUP, true)*2);
+ SC_Bonus(.@delay, SC_ATTHASTE_INFINITY, .@min, .@max);
close;
}
+function script ALCReset {
+ if (ALC_DELAYTIME < gettimetick(2))
+ ALC_THRESHOLD=0;
+ end;
+}
+
diff --git a/npc/items/inc_sc_bonus.txt b/npc/items/inc_sc_bonus.txt
index 92a5ae522..98e4ca104 100644
--- a/npc/items/inc_sc_bonus.txt
+++ b/npc/items/inc_sc_bonus.txt
@@ -5,28 +5,32 @@
// Applies effects for INC_* (STR doesn't exist)
// Valid values: INCAGI INCVIT INCINT INCDEX INCLUK INCHIT INCFLEE
// Doesn't works: SC_STRUP
-// Works if @min == @max: INCMHP INCMHPRATE INCMSP INCMSPRATE
+// Works if .@min == .@max: INCMHP INCMHPRATE INCMSP INCMSPRATE
/// Untested Values: WALKSPEED (reverse logic) INVINCIBLE (broken)
//
// Variables:
-// @delay Second of buffing
-// @min Min amount of type
-// @max Max amount of type
-// @type SC_*
+// .@delay Second of buffing
+// .@type SC_*
+// .@min Min amount of type
+// .@max Max amount of type (optional)
-- script inc_sc_bonus -1,{
-OnUse:
- if (@delay <= 0) close;
+function script SC_Bonus {
+ .@delay=getarg(0);
+ .@type=getarg(1);
+ .@min=getarg(2);
+ .@max=getarg(3, .@min);
+ if (.@delay <= 0)
+ return false;
// Get the bonus value
- if (@min != @max)
- .@bonus=rand(@min, @max);
+ if (.@min != .@max)
+ .@bonus=rand2(.@min, .@max);
else
- .@bonus=any(@min, @max);
+ .@bonus=.@min;
// Remaining time and effect conversion
- .@v=getstatus(@type, 1);
- .@t=getstatus(@type, 5);
+ .@v=getstatus(.@type, 1);
+ .@t=getstatus(.@type, 5);
// Convert remaining time to seconds, rounded down
if (.@t > 1000)
@@ -36,22 +40,31 @@ OnUse:
// If there was effect previously, get ponderate average
if (.@v > 0)
- .@v=ponderate_avg(.@bonus, @delay, .@v, .@t);
+ .@v=ponderate_avg(.@bonus, .@delay, .@v, .@t);
else
.@v=.@bonus;
// Update time value to ms and to stack
- .@t+=@delay;
+ .@t+=.@delay;
.@t*=1000;
// Debug print if needed
if (debug || $@GM_OVERRIDE)
- debugmes "Effect %d (+%d percent) for %d ms", @type, .@bonus, .@t;
+ debugmes "Effect %d (+%d percent) for %d ms", .@type, .@bonus, .@t;
// Restart the bonus
- sc_end @type;
- sc_start @type,.@t,.@v;
+ sc_end .@type;
+ sc_start .@type,.@t,.@v;
+ return true;
+}
- close;
+- script inc_sc_bonus -1,{
+OnUse:
+ SC_Bonus(@delay, @type, @min, @max);
+ @delay=0;
+ @type=0;
+ @min=0;
+ @max=0;
+ end;
}
diff --git a/npc/items/lofteleporter.txt b/npc/items/lofteleporter.txt
index 44cf93c59..2540c90dc 100644
--- a/npc/items/lofteleporter.txt
+++ b/npc/items/lofteleporter.txt
@@ -71,21 +71,25 @@ OnUse:
warp "017-1", 120, 89;
TELEPORTER_TIME=loftel_time(40, .@x);
LOCATION$="LoF";
+ @timer_navio_running=0;
break;
case 3:
warp "024-1", 155, 82;
TELEPORTER_TIME=loftel_time(120, .@x);
LOCATION$="Frostia";
+ @timer_navio_running=0;
break;
case 4:
warp "009-1", 113, 91;
TELEPORTER_TIME=loftel_time(120, .@x);
LOCATION$="Halin";
+ @timer_navio_running=0;
break;
case 5:
warp "Save", 0, 0;
TELEPORTER_TIME=loftel_time(20, .@x);
//LOCATION$="Save";
+ @timer_navio_running=0;
break;
}
closedialog;
diff --git a/npc/items/teleporter.txt b/npc/items/teleporter.txt
index dad9b97a7..40bf61821 100644
--- a/npc/items/teleporter.txt
+++ b/npc/items/teleporter.txt
@@ -41,8 +41,9 @@ OnUse:
else
getitem BrokenWarpCrystal, 1;
- // Apply Cooldown, same variable as LoF Teleporter
+ // Apply Cooldown, same variable as LoF Teleporter, cancel ship travels
TELEPORTER_TIME=gettimetick(2)+300;
+ @timer_navio_running=0;
// Save new location and warp you there
EnterTown(@dest$);