diff options
author | gumi <git@gumi.ca> | 2019-08-16 15:04:16 -0400 |
---|---|---|
committer | gumi <git@gumi.ca> | 2020-03-08 16:06:36 -0400 |
commit | 82974e181c66d3a458b82037649888f268217b05 (patch) | |
tree | d73ad69c73563cb3d397647b0c46572f843938dd | |
parent | fcb2bfa2432cd597533113c1bcee0eac64e17bb6 (diff) | |
download | serverdata-82974e181c66d3a458b82037649888f268217b05.tar.gz serverdata-82974e181c66d3a458b82037649888f268217b05.tar.bz2 serverdata-82974e181c66d3a458b82037649888f268217b05.tar.xz serverdata-82974e181c66d3a458b82037649888f268217b05.zip |
adjustments
-rw-r--r-- | world/map/conf/battle_athena.conf | 4 | ||||
-rw-r--r-- | world/map/npc/008-1/mapflags.txt | 1 | ||||
-rw-r--r-- | world/map/npc/009-8/celestia.txt | 3 | ||||
-rw-r--r-- | world/map/npc/029-2/sorfina.txt | 2 | ||||
-rw-r--r-- | world/map/npc/030-4/mapflags.txt | 1 | ||||
-rw-r--r-- | world/map/npc/031-2/mapflags.txt | 1 | ||||
-rw-r--r-- | world/map/npc/035-2/mapflags.txt | 1 | ||||
-rw-r--r-- | world/map/npc/036-2/mapflags.txt | 1 | ||||
-rw-r--r-- | world/map/npc/functions/death.txt | 34 | ||||
-rw-r--r-- | world/map/npc/functions/global_event_handler.txt | 1 | ||||
-rw-r--r-- | world/map/npc/functions/mob_points.txt | 4 | ||||
-rw-r--r-- | world/map/npc/functions/rares.txt | 115 | ||||
-rw-r--r-- | world/map/npc/items/unreleased_item.txt | 7 | ||||
-rw-r--r-- | world/map/npc/scripts.conf | 1 |
14 files changed, 159 insertions, 17 deletions
diff --git a/world/map/conf/battle_athena.conf b/world/map/conf/battle_athena.conf index 6381b88b..8b1ca4dd 100644 --- a/world/map/conf/battle_athena.conf +++ b/world/map/conf/battle_athena.conf @@ -60,10 +60,10 @@ item_second_get_time: 10000 item_third_get_time: 5000 // Rate at which exp. is given. (Note 2) -base_exp_rate: 900 +base_exp_rate: 1300 // Rate at which job exp. is given. (Note 2) -job_exp_rate: 900 +job_exp_rate: 1300 // When a player dies, how should we penalize them? // 0 = No penalty. diff --git a/world/map/npc/008-1/mapflags.txt b/world/map/npc/008-1/mapflags.txt index 0d6da34e..95ad83d5 100644 --- a/world/map/npc/008-1/mapflags.txt +++ b/world/map/npc/008-1/mapflags.txt @@ -1,2 +1 @@ 008-1|mapflag|resave|009-2,149,43 -008-1|mapflag|pvp diff --git a/world/map/npc/009-8/celestia.txt b/world/map/npc/009-8/celestia.txt index 67aa9366..3c199f74 100644 --- a/world/map/npc/009-8/celestia.txt +++ b/world/map/npc/009-8/celestia.txt @@ -41,8 +41,9 @@ L_YetiMask: mes "You catch a glimpse of a black bow while some kind of dark mist quickly overcomes you."; next; mes "You feel a sharp pain in your heart and everything fades into darkness."; - heal -Hp, 0; // set the current hp to 0 (kill the player) + heal -Hp + 1, 0; // set the current hp to 1 set @scared_celestia, 1; // set a temporary variable (resets on log out) in the player scope (variable is stored in the player, not in the npc) + warp "009-2", 148, 43; close; // terminate the script and require the player to press the "close" button L_Intro: diff --git a/world/map/npc/029-2/sorfina.txt b/world/map/npc/029-2/sorfina.txt index 54d4fa40..3dc7845b 100644 --- a/world/map/npc/029-2/sorfina.txt +++ b/world/map/npc/029-2/sorfina.txt @@ -15,7 +15,7 @@ L_Start: mes "- Death is permanent."; mes "- Obtaining experience and leveling is much faster."; mes "- The level cap is 127 and stats can go to 120."; - mes "- Killing other players is possible in any map (except towns)."; + mes "- Killing other players is possible in most maps (except safe zones)."; mes "- Upon killing a player, you obtain all of their belongings."; mes ""; mes "If you die you may start over by creating a new character."; diff --git a/world/map/npc/030-4/mapflags.txt b/world/map/npc/030-4/mapflags.txt index 979c095d..c95a8d5f 100644 --- a/world/map/npc/030-4/mapflags.txt +++ b/world/map/npc/030-4/mapflags.txt @@ -1,3 +1,2 @@ 030-4|mapflag|nosave|030-2,151,25 030-4|mapflag|resave|030-2,151,25 -030-4|mapflag|pvp diff --git a/world/map/npc/031-2/mapflags.txt b/world/map/npc/031-2/mapflags.txt index 47f11975..e188a3e0 100644 --- a/world/map/npc/031-2/mapflags.txt +++ b/world/map/npc/031-2/mapflags.txt @@ -1,2 +1 @@ 031-2|mapflag|resave|020-1,52,118 -031-2|mapflag|pvp diff --git a/world/map/npc/035-2/mapflags.txt b/world/map/npc/035-2/mapflags.txt index 85860adc..2866ca80 100644 --- a/world/map/npc/035-2/mapflags.txt +++ b/world/map/npc/035-2/mapflags.txt @@ -1,3 +1,2 @@ 035-2|mapflag|town 035-2|mapflag|resave|035-2,20,21 -035-2|mapflag|pvp diff --git a/world/map/npc/036-2/mapflags.txt b/world/map/npc/036-2/mapflags.txt index 723d2657..a21839b0 100644 --- a/world/map/npc/036-2/mapflags.txt +++ b/world/map/npc/036-2/mapflags.txt @@ -1,3 +1,2 @@ 036-2|mapflag|town 036-2|mapflag|resave|036-2,20,21 -036-2|mapflag|pvp diff --git a/world/map/npc/functions/death.txt b/world/map/npc/functions/death.txt index 5818f315..244cb417 100644 --- a/world/map/npc/functions/death.txt +++ b/world/map/npc/functions/death.txt @@ -18,6 +18,14 @@ L_Return: return; } +function|script|HardUpdate +{ + if (BaseLevel >= 35 && getskilllv(SKILL_POOL) < 1) setskill SKILL_POOL, 1; + if (BaseLevel >= 35 && getskilllv(SKILL_SPEED) < 1) setskill SKILL_SPEED, 1; + if (BaseLevel >= 35 && getskilllv(SKILL_RAGING) < 1) setskill SKILL_RAGING, 1; + return; +} + function|script|HardKill { if (getmap(@victimrid) == "070-3") goto L_Return; @@ -34,11 +42,37 @@ L_Return: function|script|HardDeath { if (getmap() == "070-3") goto L_Return; + if (getmapflag(getmap(), MF_NOSAVE)) goto L_Absolve; + goto L_Death; + +L_Death: getinventorylist; set @item_it, 0; freeloop 1; goto L_Drop; // drop all items +L_Absolve: + set .@day, (HARDDEATH & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT; // day of week + set .@deaths, if_then_else(gettime(4) == .@day, (HARDDEATH & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT, 0); // deaths this day + set .@free, max(3, $FREEDEATHS[0]); // allowed deaths per day + + if (.@deaths >= .@free) goto L_NotAbsolved; + + set .@deaths, .@deaths + 1; + set HARDDEATH, HARDDEATH & ~(BYTE_0_MASK) | (gettime(4) << NIBBLE_0_SHIFT) | (.@deaths << NIBBLE_1_SHIFT); + set PC_DIE_COUNTER, 0; + + message strcharinfo(0), "Server : This is a special map so your death is not counted."; + message strcharinfo(0), "Server : ##BYou have " + (.@free - .@deaths) + " non-counting deaths remaining today."; + + if (.@free - .@deaths == 0) + message strcharinfo(0), "Server : ##1WARNING: if you die again today in a special map it will be PERMANENT."; + return; + +L_NotAbsolved: + message strcharinfo(0), "Server : This is a special map, however you have no more free deaths today."; + goto L_Death; + L_Drop: makeitem @inventorylist_id[@item_it], @inventorylist_amount[@item_it], getmap(), POS_X + rand(-2, 2), POS_Y + rand(-2, 2); set @item_it, @item_it + 1; diff --git a/world/map/npc/functions/global_event_handler.txt b/world/map/npc/functions/global_event_handler.txt index 01d01e62..7af8f0e8 100644 --- a/world/map/npc/functions/global_event_handler.txt +++ b/world/map/npc/functions/global_event_handler.txt @@ -17,6 +17,7 @@ OnPCLoginEvent: callfunc "MaybeGiveBirthday"; callfunc "MiriamExpire"; // force the speed skill quest to expire callfunc "CheckDeath"; + callfunc "HardUpdate"; // add more here set @login_event, 2; end; diff --git a/world/map/npc/functions/mob_points.txt b/world/map/npc/functions/mob_points.txt index 72b5ac23..f5308026 100644 --- a/world/map/npc/functions/mob_points.txt +++ b/world/map/npc/functions/mob_points.txt @@ -4,7 +4,7 @@ function|script|MobPoints { if (@mobID < 1002) goto L_Return; - setarray @points, + setarray @points[0], 1, // Maggot 2, // Scorpion 20, // Red Scorpion @@ -135,6 +135,8 @@ function|script|MobPoints // -o11c ; // END + void call("MaybeRare", @points[@mobID - 1002]); + if (MPQUEST == 1) set Mobpt, Mobpt + @points[@mobID - 1002]; diff --git a/world/map/npc/functions/rares.txt b/world/map/npc/functions/rares.txt new file mode 100644 index 00000000..559c4259 --- /dev/null +++ b/world/map/npc/functions/rares.txt @@ -0,0 +1,115 @@ +function|script|MaybeRare +{ + set .@chance, max(0, rand(0, 10000 + max(1, $RAREBOOST[2])) - (getarg(0) * max(1, $RAREBOOST[0])) - $RAREBOOST[1]); + if (.@chance > 0) goto L_Return; + + setarray .@rare_items$[0], + rand(5000, 5109), // sorcerer robe + "ToySabre", + "LongSword", + "AssassinBoots", + "AssassinGloves", + "AssassinShirt", + "AssassinPants", + "Halberd", + "Axe", + "BastardSword", + "Sword", + "Spear", + "RockKnife", + "IceGladius", + "WoodenStaff", + "CrimsonBra", + "TurquoiseBra", + "OrchidBra", + "GoldenWarlordPlate", + "WarlordPlate", + "ValentineDress", + "ApprenticeRobe", + "BromenalChest", + "TerraniteChestArmor", + "BlackWizardRobe", + "GoldenPlatemail", + "ScarabArmlet", + "TamOShanter", + rand(2200, 2209), // wizard hat + "Sunglasses", + "HighPriestCrown", + "TerraniteHead", + "HeartGlasses", + "PilotHat", + "GuyFawkesMask", + "TopHat", + "GroovyHat", + "DesertHelmet", + "BromenalHelmet", + "SkullMask", + rand(2230, 2239), // bowler hat brown + "Earmuffs", + "SmokingPipe", + "JesterMask", + "SnowGoggles", + "JazzyHat", + "ElfNightcap", + "EskimoHat", + "Eyepatch", + "FaceMask", + "FunkyHat", + "GoblinMask", + "Goggles", + "PanHat", + "PaladinsHelmet", + "OverlordsHelmet", + "PaperBag", + rand(2190, 2199), // rabbit ears + "WitchDoctorsMask", + "WitchHat", + "MoubooHead", + "Crown", + "ChristmasTreeHat", + "ChristmasElfHat", + "NutcrackerHat", + "OperaMask", + rand(2270, 2274), // blinking evil + "PointyWitchHat", + "PinkieHelmet", + "Monocle", + "MonsterSkullHelmet", + "MoonshroomHat", + "CarbonGasMask", + "Rednose", + "ChicSantaHat", + "ChefHat", + "Cap", + "SantaBeardHat", + "ScentedCandleHelmet", + "LeatherGoggles", + "BunnyEars", + "BunchOfParsley", + "TerraniteLegs", + "BromenalLegs", + rand(4008, 4013), // rings + "Grimoire"; + + set .@get$, .@rare_items$[rand(getarraysize(.@rare_items$))]; + set .@get, 0 + .@get$; // implicit conversion + + if (.@get > 0) + getitem .@get, 1; + elif (.@get$ != "") + getitem .@get$, 1; + else + goto L_Return; + + // unfortunately getitemlink doesn't support IDs + if (.@get > 0) + set .@link$, "@@" + .@get + "|@@"; + else + set .@link$, getitemlink(.@get$); + + announce strcharinfo(0) + " obtained a rare drop: " +.@link$, 0; + goto L_Return; + +L_Return: + return; +} diff --git a/world/map/npc/items/unreleased_item.txt b/world/map/npc/items/unreleased_item.txt index d8bb9e07..2c723eca 100644 --- a/world/map/npc/items/unreleased_item.txt +++ b/world/map/npc/items/unreleased_item.txt @@ -6,12 +6,5 @@ function|script|UnreleasedItem { // If the server allows equipping unreleased items or if the active character is staff, do nothing. - if (debug || getgmlevel()) - goto L_Return; - message strcharinfo(0), "You have difficulties equipping this item, as if it is not yet fully in this world."; - callfunc "UnequipLater"; - goto L_Return; - -L_Return: return; } diff --git a/world/map/npc/scripts.conf b/world/map/npc/scripts.conf index 3cade541..5e71514a 100644 --- a/world/map/npc/scripts.conf +++ b/world/map/npc/scripts.conf @@ -12,6 +12,7 @@ npc: npc/functions/travelers.txt npc: npc/functions/game_rules.txt npc: npc/functions/inn.txt npc: npc/functions/magic.txt +npc: npc/functions/rares.txt npc: npc/functions/mob_points.txt npc: npc/functions/process_equip.txt npc: npc/functions/slot_machine.txt |