Index: conf/map_darkstar.conf =================================================================== --- conf/map_darkstar.conf (revision 1847) +++ conf/map_darkstar.conf (working copy) @@ -69,7 +69,7 @@ #Modifier to apply to player speed. 0 means default speed of 40, where 20 would mean speed 60 or -10 would mean speed 30. speed_mod: 0 -#Allows you to manipulate the constant multiplier in the skill-up rate formulas, having a potent effect on skill-up rates. +#Allows you to manipulate the constant multiplier in the skill-up rate formulas, having a potent effect on skill-up rates. Default skillup os 2.5, default for craft is 2.6. skillup_multiplier: 2.5 craft_multiplier: 2.6 @@ -88,3 +88,54 @@ # 0100 4 Guard # 0111 7 Parry, Block, & Guard newstyle_skillups: 7 + +#Multiplies the distance that you can engage target. Change to 2 for double the distance. Default is 1. +engage_dist_mod: 1 + +#Multiplies the distance that you can cast magic on a target. Change to 2 for double the distance. Default is 1. +magic_dist_mod: 1 + +#Multiplies the distance that you can used ranged attack on a target. Change to 2 for double the distance. Default is 1. +ranged_dist_mod: 1 + +#Set to 1 to disable the delay that happens just after killing a target, or after equipping a weapon. +remove_engage_delay: 0 + +#Set to 1 to allow movement while casting magic. +magic_movement: 0 + +#Increases chance of exp mobs dropping seals or crests. Set from 0 - 60. Default is 0. +seal_crest_bonus: 0 + +#Allows non exp beastman mobs to drop seals and crests. Set to 1 for non exp beastman mobs to drop seals and crests. Default is 0. +always_seal_crest: 0 + +#Adds to the drop rate percentage. Set to 20 to add additional %20 drop rate on items. Default 0. +drop_rate_bonus: 0 + +#Set to 1 to allow all mobs to drop gil. Currently does not display in-game messages for these gil drops. Default is 0. +all_mobs_drop_gil: 0 + +#Multiplies the amount of gil dropped. Default is 1. +gil_bonus: 1 + +#Allows exp chain on any exp mob. Default is 0. +chain_on_easy: 1 + +#Increases the time frame allowed to get an exp chain. Default is 1. +chain_bonus: 1 + +#Allows same skill-up on chance for failures as crafting successes have. Default is 0. +craft_skill_onfail: 0 + +#Increases the chance of getting larger skill-ups while crafting. Set 0 to 100. Default 0. +craft_skillamt: 0 + +#Increases the chance of succeeding at crafting. Set 0 to 100. Default 0. +craft_success: 0 + +#Multiplies the amount of conquest points earned on an exp mob kill. Default is 1. +conquest_bonus: 1 + +#Sets 1 nation and owner of all regions. 0 = off, 1 = Sandoria, 2 = Bastok, 3 = Windurst, 4 = Beastmen. Default is 0. +conquest_constant: 0 \ No newline at end of file Index: scripts/globals/effects/healing.lua =================================================================== --- scripts/globals/effects/healing.lua (revision 1847) +++ scripts/globals/effects/healing.lua (working copy) @@ -26,12 +26,12 @@ if (healtime > 1) then if (not(target:hasStatusEffect(EFFECT_DISEASE))) then if (target:getContinentID() == 1 and target:hasStatusEffect(EFFECT_SIGNET)) then - target:addHP(10+(3*math.floor(target:getMainLvl()/10))+(healtime-2)*(1+math.floor(target:getMaxHP()/300))+(target:getMod(MOD_HPHEAL))); + target:addHP(BASE_HP_HEAL_BONUS+10+(3*math.floor(target:getMainLvl()/10))+HP_HEAL_BONUS*(healtime-2)*(1+math.floor(target:getMaxHP()/300))+(target:getMod(MOD_HPHEAL))); else - target:setTP(target:getTP()-10); - target:addHP(10+(healtime-2)+(target:getMod(MOD_HPHEAL))); + target:setTP(target:getTP()-10+10*DISABLE_TP_LOSS); + target:addHP(BASE_HP_HEAL_BONUS+10+HP_HEAL_BONUS*(healtime-2)+(target:getMod(MOD_HPHEAL))); end - target:addMP(12+(healtime-2)+(target:getMod(MOD_MPHEAL))+(target:getMod(MOD_CLEAR_MIND)*(healtime-2))); + target:addMP(BASE_MP_HEAL_BONUS+12+MP_HEAL_BONUS*(healtime-2)+(target:getMod(MOD_MPHEAL))+(target:getMod(MOD_CLEAR_MIND)*(healtime-2))); end end Index: scripts/globals/settings.lua =================================================================== --- scripts/globals/settings.lua (revision 1847) +++ scripts/globals/settings.lua (working copy) @@ -29,7 +29,6 @@ SHOP_PRICE = 1.000; --Multiplies prices in NPC shops. GIL_RATE = 1.000; --Multiplies gil earned from quests. Won't always display in game. EXP_RATE = 1.000; --Multiplies exp earned from fov. -TABS_RATE = 1.000; --Multiplies tabs earned from fov. SAN_FAME = 1.000; --Multiplies fame earned from San d'Oria quests. BAS_FAME = 1.000; --Multiplies fame earned from Bastok quests. WIN_FAME = 1.000; --Multiplies fame earned from Windurst quests. @@ -83,6 +82,13 @@ CHRISTMAS = 0; --Set to 1 to give starting characters Christmas dress. HALLOWEEN = 0; --Set to 1 to give starting characters Halloween dress. +--HEALING/RESTING-- +BASE_HP_HEAL_BONUS = 0; -- Default is 0. Adds to the default base of 10HP for resting. i.e. change to 20 to have a base heal tick of 30MP. +HP_HEAL_BONUS = 1; -- Default is 1. Multiplies the increased HP added to each resting tick. Default rest ticks are 10, 11, 12, 13 etc without any bonuses. Changing this value to 5 would cause a new rest ticks of 10, 15, 20, 25, etc. +BASE_MP_HEAL_BONUS = 0; -- Default is 0. Adds to the default base of 10MP for resting. i.e. change 20 to have a base heal tick of 30MP. +MP_HEAL_BONUS = 1; -- Default is 1. Multiplies the increased MP added to each resting tick. Default rest ticks are 10, 11, 12, 13 etc without any bonuses. Changing this value to 5 would cause a new rest ticks 10, 15, 20, 25, etc. +DISABLE_TP_LOSS = 0; -- Default is 0. Disables the 10TP lost on each tick during resting when signet is not active. + --QUEST/MISSION SPECIFIC SETTINGS WSNM_LEVEL = 70; -- Min Level to get WSNM Quests WSNM_SKILL_LEVEL = 240; @@ -95,8 +101,12 @@ QM_RESET_TIME = 300; -- Default time (in seconds) you have from killing ???-pop mission NMs to click again and get key item, until ??? resets. --FIELDS OF VALOR SETTINGS -REGIME_WAIT = 1; --Make people wait till 00:00 game time as in retail. If it's 0, there is no wait time. -LOW_LEVEL_REGIME = 0; --Allow people to kill regime targets even if they give no exp, allowing people to farm regime targets at 75 in low level areas. +FIELD_MANUALS = 1; --Enabled Field Manuals +REGIME_WAIT = 0; --Make people wait till 00:00 game time as in retail. If it's 0, there is no wait time. +LOW_LEVEL_REGIME = 1; --Allow people to kill regime targets even if they give no exp, allowing people to farm regime targets at 75 in low level areas. +FOV_EXP_RATE = 1.0; --Multiplies exp earned from fov. +TABS_RATE = 1.0; --Multiplies tabs earned from fov. +FOV_GIL_RATE = 1.000; --Multiplies gil earned from fov. --JOB ABILITY/TRAIT SPECIFIC SETTINGS SCAVENGE_RATE = 0.1; --The chance of obtaining an item when you use the Ranger job ability Scavenge. Do not set above 1! @@ -132,7 +142,6 @@ EXPLORER_MOOGLE_LEVELCAP = 10; --MISC -FIELD_MANUALS = 1; HOMEPOINT_HEAL = 0; --Set to 1 if you want Home Points to heal you like in single-player Final Fantasy games. RIVERNE_PORTERS = 120; -- Time in seconds that Unstable Displacements in Cape Riverne stay open after trading a scale. LANTERNS_STAY_LIT = 1200; -- time in seconds that lanterns in the Den of Rancor stay lit. \ No newline at end of file Index: src/map/ai/ai_char_normal.cpp =================================================================== --- src/map/ai/ai_char_normal.cpp (revision 1847) +++ src/map/ai/ai_char_normal.cpp (working copy) @@ -242,9 +242,9 @@ { if(IsMobOwner(m_PBattleTarget)) { - if (distance(m_PChar->loc.p, m_PBattleTarget->loc.p) <= 30) + if (distance(m_PChar->loc.p, m_PBattleTarget->loc.p) <= 30*map_config.engage_dist_mod) { - if ((m_Tick - m_LastMeleeTime) > m_PChar->m_Weapons[SLOT_MAIN]->getDelay()) + if (((m_Tick - m_LastMeleeTime) > m_PChar->m_Weapons[SLOT_MAIN]->getDelay()) || map_config.remove_engage_delay == 1) { if (m_PChar->animation == ANIMATION_CHOCOBO) { @@ -306,7 +306,7 @@ { if (IsMobOwner(PBattleTarget)) { - if (distance(m_PChar->loc.p, PBattleTarget->loc.p) <= 30) + if (distance(m_PChar->loc.p, PBattleTarget->loc.p) <= 30*map_config.engage_dist_mod) { m_LastActionTime = m_Tick; m_PBattleTarget = PBattleTarget; @@ -642,7 +642,7 @@ DSP_DEBUG_BREAK_IF(m_ActionTargetID == 0); DSP_DEBUG_BREAK_IF(m_PBattleSubTarget != NULL); - if( (m_Tick - m_PChar->m_rangedDelay) < 2400){ //cooldown between shots + if( (m_Tick - m_PChar->m_rangedDelay) < 2400 ){ //cooldown between shots m_PChar->pushPacket(new CMessageBasicPacket(m_PChar,m_PChar,0,0,94)); m_ActionType = (m_PChar->animation == ANIMATION_ATTACK ? ACTION_ATTACK : ACTION_NONE); m_ActionTargetID = 0; @@ -726,7 +726,7 @@ m_PBattleSubTarget = NULL; return; } - if (distance(m_PChar->loc.p, m_PBattleSubTarget->loc.p) > 25) + if (distance(m_PChar->loc.p, m_PBattleSubTarget->loc.p) > 25*map_config.ranged_dist_mod) { m_PChar->pushPacket(new CMessageBasicPacket(m_PChar,m_PBattleSubTarget,0,0,78)); @@ -1010,12 +1010,12 @@ { float Distance = distance(m_PChar->loc.p, m_PBattleSubTarget->loc.p); - if (Distance > 25) + if (Distance > 25*map_config.magic_dist_mod) { MagicStartError(78); return; } - if (Distance > 21.5) + if (Distance > 21.5*map_config.magic_dist_mod) { MagicStartError(313); return; @@ -1125,8 +1125,8 @@ } //the check for player position only occurs AFTER the cast time is up, you can move so long as x/z is the same on finish. //furthermore, it's actually quite lenient, hence the rounding to 1 dp - if (floorf(m_PChar->m_StartActionPos.x * 10 + 0.5) / 10 != floorf(m_PChar->loc.p.x * 10 + 0.5) / 10 || - floorf(m_PChar->m_StartActionPos.z * 10 + 0.5) / 10 != floorf(m_PChar->loc.p.z * 10 + 0.5) / 10) + if (map_config.magic_movement == 0 && (floorf(m_PChar->m_StartActionPos.x * 10 + 0.5) / 10 != floorf(m_PChar->loc.p.x * 10 + 0.5) / 10 || + floorf(m_PChar->m_StartActionPos.z * 10 + 0.5) / 10 != floorf(m_PChar->loc.p.z * 10 + 0.5) / 10)) { m_PChar->pushPacket(new CMessageBasicPacket(m_PChar, m_PChar, 0, 0, 16)); @@ -1135,7 +1135,7 @@ return; } if ((m_PBattleSubTarget != m_PChar) && - (distance(m_PChar->loc.p,m_PBattleSubTarget->loc.p) > 21.5)) + (distance(m_PChar->loc.p,m_PBattleSubTarget->loc.p) > 21.5*map_config.magic_dist_mod)) { m_PChar->pushPacket(new CMessageBasicPacket(m_PChar,m_PBattleSubTarget,0,0,78)); @@ -2072,7 +2072,7 @@ float Distance = distance(m_PChar->loc.p,m_PBattleTarget->loc.p); - if (Distance > 30) + if (Distance > 30*map_config.engage_dist_mod) { m_PChar->pushPacket(new CMessageBasicPacket(m_PChar,m_PBattleTarget,0,0,36)); Index: src/map/ai/ai_mob_dummy.cpp =================================================================== --- src/map/ai/ai_mob_dummy.cpp (revision 1847) +++ src/map/ai/ai_mob_dummy.cpp (working copy) @@ -268,7 +268,7 @@ uint8 tries = 0; while(tries < 1+highestTH) { - if(rand()%100 < DropList->at(i).DropRate) + if(rand()%100 < (DropList->at(i).DropRate + map_config.drop_rate_bonus)) { PChar->PTreasurePool->AddItem(DropList->at(i).ItemID, m_PMob); break; @@ -277,7 +277,7 @@ } } //check for gil (beastmen drop gil, some NMs drop gil) - if(m_PMob->m_EcoSystem == SYSTEM_BEASTMEN || m_PMob->m_Type & MOBTYPE_NOTORIOUS) + if(m_PMob->m_EcoSystem == SYSTEM_BEASTMEN || m_PMob->m_Type & MOBTYPE_NOTORIOUS || map_config.all_mobs_drop_gil == 1) { charutils::DistributeGil(PChar, m_PMob); // TODO: REALISATION MUST BE IN TREASUREPOOL } @@ -288,8 +288,8 @@ >= 90 = High Kindred Crests ID=2956 */ uint8 Pzone = PChar->getZone(); - if(charutils::GetRealExp(PChar->GetMLevel(),m_PMob->GetMLevel())>0 && - rand()%100 < 40 && m_PMob->m_Type == MOBTYPE_NORMAL && ((Pzone > 0 && + if((charutils::GetRealExp(PChar->GetMLevel(),m_PMob->GetMLevel())>0 || map_config.always_seal_crest == 1) && + rand()%100 < (40 + map_config.seal_crest_bonus) && m_PMob->m_Type == MOBTYPE_NORMAL && ((Pzone > 0 && Pzone < 39) || (Pzone > 42 && Pzone < 134) || (Pzone > 135 && Pzone < 185) || (Pzone > 188 && Pzone < 255))){ //exp-yielding monster and drop is successful //TODO: The drop is actually based on a 5 minute timer, and not a probability of dropping! Index: src/map/charutils.cpp =================================================================== --- src/map/charutils.cpp (revision 1847) +++ src/map/charutils.cpp (working copy) @@ -2115,7 +2115,7 @@ void DistributeGil(CCharEntity* PChar, CMobEntity* PMob) { //work out the amount of gil to give (guessed; replace with testing) - uint32 gil = PMob->GetMLevel() * ((PMob->m_Type & MOBTYPE_NOTORIOUS) ? 10 : 1); + uint32 gil = PMob->GetMLevel() * map_config.gil_bonus * ((PMob->m_Type & MOBTYPE_NOTORIOUS) ? 10 : 1); //distribute to said members (perhaps store pointers to each member in first loop?) if (PChar->PParty != NULL) @@ -2261,13 +2261,13 @@ } else { - if (PMember->GetMLevel() <=10) PMember->expChain.chainTime = gettick()+50000; - else if (PMember->GetMLevel() <=20) PMember->expChain.chainTime = gettick()+100000; - else if (PMember->GetMLevel() <=30) PMember->expChain.chainTime = gettick()+150000; - else if (PMember->GetMLevel() <=40) PMember->expChain.chainTime = gettick()+200000; - else if (PMember->GetMLevel() <=50) PMember->expChain.chainTime = gettick()+250000; - else if (PMember->GetMLevel() <=60) PMember->expChain.chainTime = gettick()+300000; - else PMember->expChain.chainTime = gettick()+360000; + if (PMember->GetMLevel() <=10) PMember->expChain.chainTime = gettick()+50000*map_config.chain_bonus; + else if (PMember->GetMLevel() <=20) PMember->expChain.chainTime = gettick()+100000*map_config.chain_bonus; + else if (PMember->GetMLevel() <=30) PMember->expChain.chainTime = gettick()+150000*map_config.chain_bonus; + else if (PMember->GetMLevel() <=40) PMember->expChain.chainTime = gettick()+200000*map_config.chain_bonus; + else if (PMember->GetMLevel() <=50) PMember->expChain.chainTime = gettick()+250000*map_config.chain_bonus; + else if (PMember->GetMLevel() <=60) PMember->expChain.chainTime = gettick()+300000*map_config.chain_bonus; + else PMember->expChain.chainTime = gettick()+360000*map_config.chain_bonus; chainactive = false; PMember->expChain.chainNumber = 1; } @@ -2275,85 +2275,85 @@ { switch(PMember->expChain.chainNumber) { - case 0: PMember->expChain.chainTime = gettick()+50000; break; - case 1: PMember->expChain.chainTime = gettick()+40000; break; - case 2: PMember->expChain.chainTime = gettick()+30000; break; - case 3: PMember->expChain.chainTime = gettick()+20000; break; - case 4: PMember->expChain.chainTime = gettick()+10000; break; - case 5: PMember->expChain.chainTime = gettick()+6000; break; - default: PMember->expChain.chainTime = gettick()+2000; break; + case 0: PMember->expChain.chainTime = gettick()+50000*map_config.chain_bonus; break; + case 1: PMember->expChain.chainTime = gettick()+40000*map_config.chain_bonus; break; + case 2: PMember->expChain.chainTime = gettick()+30000*map_config.chain_bonus; break; + case 3: PMember->expChain.chainTime = gettick()+20000*map_config.chain_bonus; break; + case 4: PMember->expChain.chainTime = gettick()+10000*map_config.chain_bonus; break; + case 5: PMember->expChain.chainTime = gettick()+6000*map_config.chain_bonus; break; + default: PMember->expChain.chainTime = gettick()+2000*map_config.chain_bonus; break; } } else if(chainactive && PMember->GetMLevel() <= 20) { switch(PMember->expChain.chainNumber) { - case 0: PMember->expChain.chainTime = gettick()+100000; break; - case 1: PMember->expChain.chainTime = gettick()+80000; break; - case 2: PMember->expChain.chainTime = gettick()+60000; break; - case 3: PMember->expChain.chainTime = gettick()+40000; break; - case 4: PMember->expChain.chainTime = gettick()+20000; break; - case 5: PMember->expChain.chainTime = gettick()+8000; break; - default: PMember->expChain.chainTime = gettick()+4000; break; + case 0: PMember->expChain.chainTime = gettick()+100000*map_config.chain_bonus; break; + case 1: PMember->expChain.chainTime = gettick()+80000*map_config.chain_bonus; break; + case 2: PMember->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; + case 3: PMember->expChain.chainTime = gettick()+40000*map_config.chain_bonus; break; + case 4: PMember->expChain.chainTime = gettick()+20000*map_config.chain_bonus; break; + case 5: PMember->expChain.chainTime = gettick()+8000*map_config.chain_bonus; break; + default: PMember->expChain.chainTime = gettick()+4000*map_config.chain_bonus; break; } } else if(chainactive && PMember->GetMLevel() <= 30) { switch(PMember->expChain.chainNumber) { - case 0: PMember->expChain.chainTime = gettick()+150000; break; - case 1: PMember->expChain.chainTime = gettick()+120000; break; - case 2: PMember->expChain.chainTime = gettick()+90000; break; - case 3: PMember->expChain.chainTime = gettick()+60000; break; - case 4: PMember->expChain.chainTime = gettick()+30000; break; - case 5: PMember->expChain.chainTime = gettick()+10000; break; - default: PMember->expChain.chainTime = gettick()+5000; break; + case 0: PMember->expChain.chainTime = gettick()+150000*map_config.chain_bonus; break; + case 1: PMember->expChain.chainTime = gettick()+120000*map_config.chain_bonus; break; + case 2: PMember->expChain.chainTime = gettick()+90000*map_config.chain_bonus; break; + case 3: PMember->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; + case 4: PMember->expChain.chainTime = gettick()+30000*map_config.chain_bonus; break; + case 5: PMember->expChain.chainTime = gettick()+10000*map_config.chain_bonus; break; + default: PMember->expChain.chainTime = gettick()+5000*map_config.chain_bonus; break; } } else if(chainactive && PMember->GetMLevel() <= 40) { switch(PMember->expChain.chainNumber) { - case 0: PMember->expChain.chainTime = gettick()+200000; break; - case 1: PMember->expChain.chainTime = gettick()+160000; break; - case 2: PMember->expChain.chainTime = gettick()+120000; break; - case 3: PMember->expChain.chainTime = gettick()+80000; break; - case 4: PMember->expChain.chainTime = gettick()+40000; break; - case 5: PMember->expChain.chainTime = gettick()+40000; break; - default: PMember->expChain.chainTime = gettick()+30000; break; + case 0: PMember->expChain.chainTime = gettick()+200000*map_config.chain_bonus; break; + case 1: PMember->expChain.chainTime = gettick()+160000*map_config.chain_bonus; break; + case 2: PMember->expChain.chainTime = gettick()+120000*map_config.chain_bonus; break; + case 3: PMember->expChain.chainTime = gettick()+80000*map_config.chain_bonus; break; + case 4: PMember->expChain.chainTime = gettick()+40000*map_config.chain_bonus; break; + case 5: PMember->expChain.chainTime = gettick()+40000*map_config.chain_bonus; break; + default: PMember->expChain.chainTime = gettick()+30000*map_config.chain_bonus; break; } } else if(chainactive && PMember->GetMLevel() <= 50) { switch(PMember->expChain.chainNumber) { - case 0: PMember->expChain.chainTime = gettick()+250000; break; - case 1: PMember->expChain.chainTime = gettick()+200000; break; - case 2: PMember->expChain.chainTime = gettick()+150000; break; - case 3: PMember->expChain.chainTime = gettick()+100000; break; - case 4: PMember->expChain.chainTime = gettick()+50000; break; - case 5: PMember->expChain.chainTime = gettick()+50000; break; - default: PMember->expChain.chainTime = gettick()+50000; break; + case 0: PMember->expChain.chainTime = gettick()+250000*map_config.chain_bonus; break; + case 1: PMember->expChain.chainTime = gettick()+200000*map_config.chain_bonus; break; + case 2: PMember->expChain.chainTime = gettick()+150000*map_config.chain_bonus; break; + case 3: PMember->expChain.chainTime = gettick()+100000*map_config.chain_bonus; break; + case 4: PMember->expChain.chainTime = gettick()+50000*map_config.chain_bonus; break; + case 5: PMember->expChain.chainTime = gettick()+50000*map_config.chain_bonus; break; + default: PMember->expChain.chainTime = gettick()+50000*map_config.chain_bonus; break; } } else if(chainactive && PMember->GetMLevel() <= 60) { switch(PMember->expChain.chainNumber) { - case 0: PMember->expChain.chainTime = gettick()+300000; break; - case 1: PMember->expChain.chainTime = gettick()+240000; break; - case 2: PMember->expChain.chainTime = gettick()+180000; break; - case 3: PMember->expChain.chainTime = gettick()+120000; break; - case 4: PMember->expChain.chainTime = gettick()+90000; break; - case 5: PMember->expChain.chainTime = gettick()+60000; break; - default: PMember->expChain.chainTime = gettick()+60000; break; + case 0: PMember->expChain.chainTime = gettick()+300000*map_config.chain_bonus; break; + case 1: PMember->expChain.chainTime = gettick()+240000*map_config.chain_bonus; break; + case 2: PMember->expChain.chainTime = gettick()+180000*map_config.chain_bonus; break; + case 3: PMember->expChain.chainTime = gettick()+120000*map_config.chain_bonus; break; + case 4: PMember->expChain.chainTime = gettick()+90000*map_config.chain_bonus; break; + case 5: PMember->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; + default: PMember->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; } } else if (chainactive) { switch(PMember->expChain.chainNumber) { - case 0: PMember->expChain.chainTime = gettick()+360000; break; - case 1: PMember->expChain.chainTime = gettick()+300000; break; - case 2: PMember->expChain.chainTime = gettick()+240000; break; - case 3: PMember->expChain.chainTime = gettick()+165000; break; - case 4: PMember->expChain.chainTime = gettick()+105000; break; - case 5: PMember->expChain.chainTime = gettick()+60000; break; - default: PMember->expChain.chainTime = gettick()+60000; break; + case 0: PMember->expChain.chainTime = gettick()+360000*map_config.chain_bonus; break; + case 1: PMember->expChain.chainTime = gettick()+300000*map_config.chain_bonus; break; + case 2: PMember->expChain.chainTime = gettick()+240000*map_config.chain_bonus; break; + case 3: PMember->expChain.chainTime = gettick()+165000*map_config.chain_bonus; break; + case 4: PMember->expChain.chainTime = gettick()+105000*map_config.chain_bonus; break; + case 5: PMember->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; + default: PMember->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; } } exp = charutils::AddExpBonus(PMember, exp); @@ -2425,13 +2425,13 @@ } else { - if (PChar->GetMLevel() <=10) PChar->expChain.chainTime = gettick()+50000; - else if (PChar->GetMLevel() <=20) PChar->expChain.chainTime = gettick()+100000; - else if (PChar->GetMLevel() <=30) PChar->expChain.chainTime = gettick()+150000; - else if (PChar->GetMLevel() <=40) PChar->expChain.chainTime = gettick()+200000; - else if (PChar->GetMLevel() <=50) PChar->expChain.chainTime = gettick()+250000; - else if (PChar->GetMLevel() <=60) PChar->expChain.chainTime = gettick()+300000; - else PChar->expChain.chainTime = gettick()+360000; + if (PChar->GetMLevel() <=10) PChar->expChain.chainTime = gettick()+50000*map_config.chain_bonus; + else if (PChar->GetMLevel() <=20) PChar->expChain.chainTime = gettick()+100000*map_config.chain_bonus; + else if (PChar->GetMLevel() <=30) PChar->expChain.chainTime = gettick()+150000*map_config.chain_bonus; + else if (PChar->GetMLevel() <=40) PChar->expChain.chainTime = gettick()+200000*map_config.chain_bonus; + else if (PChar->GetMLevel() <=50) PChar->expChain.chainTime = gettick()+250000*map_config.chain_bonus; + else if (PChar->GetMLevel() <=60) PChar->expChain.chainTime = gettick()+300000*map_config.chain_bonus; + else PChar->expChain.chainTime = gettick()+360000*map_config.chain_bonus; chainactive = false; PChar->expChain.chainNumber = 1; } @@ -2439,85 +2439,85 @@ { switch(PChar->expChain.chainNumber) { - case 0: PChar->expChain.chainTime = gettick()+50000; break; - case 1: PChar->expChain.chainTime = gettick()+40000; break; - case 2: PChar->expChain.chainTime = gettick()+30000; break; - case 3: PChar->expChain.chainTime = gettick()+20000; break; - case 4: PChar->expChain.chainTime = gettick()+10000; break; - case 5: PChar->expChain.chainTime = gettick()+6000; break; - default: PChar->expChain.chainTime = gettick()+2000; break; + case 0: PChar->expChain.chainTime = gettick()+50000*map_config.chain_bonus; break; + case 1: PChar->expChain.chainTime = gettick()+40000*map_config.chain_bonus; break; + case 2: PChar->expChain.chainTime = gettick()+30000*map_config.chain_bonus; break; + case 3: PChar->expChain.chainTime = gettick()+20000*map_config.chain_bonus; break; + case 4: PChar->expChain.chainTime = gettick()+10000*map_config.chain_bonus; break; + case 5: PChar->expChain.chainTime = gettick()+6000*map_config.chain_bonus; break; + default: PChar->expChain.chainTime = gettick()+2000*map_config.chain_bonus; break; } } else if(chainactive && PChar->GetMLevel() <= 20) { switch(PChar->expChain.chainNumber) { - case 0: PChar->expChain.chainTime = gettick()+100000; break; - case 1: PChar->expChain.chainTime = gettick()+80000; break; - case 2: PChar->expChain.chainTime = gettick()+60000; break; - case 3: PChar->expChain.chainTime = gettick()+40000; break; - case 4: PChar->expChain.chainTime = gettick()+20000; break; - case 5: PChar->expChain.chainTime = gettick()+8000; break; - default: PChar->expChain.chainTime = gettick()+4000; break; + case 0: PChar->expChain.chainTime = gettick()+100000*map_config.chain_bonus; break; + case 1: PChar->expChain.chainTime = gettick()+80000*map_config.chain_bonus; break; + case 2: PChar->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; + case 3: PChar->expChain.chainTime = gettick()+40000*map_config.chain_bonus; break; + case 4: PChar->expChain.chainTime = gettick()+20000*map_config.chain_bonus; break; + case 5: PChar->expChain.chainTime = gettick()+8000*map_config.chain_bonus; break; + default: PChar->expChain.chainTime = gettick()+4000*map_config.chain_bonus; break; } } else if(chainactive && PChar->GetMLevel() <= 30) { switch(PChar->expChain.chainNumber) { - case 0: PChar->expChain.chainTime = gettick()+150000; break; - case 1: PChar->expChain.chainTime = gettick()+120000; break; - case 2: PChar->expChain.chainTime = gettick()+90000; break; - case 3: PChar->expChain.chainTime = gettick()+60000; break; - case 4: PChar->expChain.chainTime = gettick()+30000; break; - case 5: PChar->expChain.chainTime = gettick()+10000; break; - default: PChar->expChain.chainTime = gettick()+5000; break; + case 0: PChar->expChain.chainTime = gettick()+150000*map_config.chain_bonus; break; + case 1: PChar->expChain.chainTime = gettick()+120000*map_config.chain_bonus; break; + case 2: PChar->expChain.chainTime = gettick()+90000*map_config.chain_bonus; break; + case 3: PChar->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; + case 4: PChar->expChain.chainTime = gettick()+30000*map_config.chain_bonus; break; + case 5: PChar->expChain.chainTime = gettick()+10000*map_config.chain_bonus; break; + default: PChar->expChain.chainTime = gettick()+5000*map_config.chain_bonus; break; } } else if(chainactive && PChar->GetMLevel() <= 40) { switch(PChar->expChain.chainNumber) { - case 0: PChar->expChain.chainTime = gettick()+200000; break; - case 1: PChar->expChain.chainTime = gettick()+160000; break; - case 2: PChar->expChain.chainTime = gettick()+120000; break; - case 3: PChar->expChain.chainTime = gettick()+80000; break; - case 4: PChar->expChain.chainTime = gettick()+40000; break; - case 5: PChar->expChain.chainTime = gettick()+40000; break; - default: PChar->expChain.chainTime = gettick()+30000; break; + case 0: PChar->expChain.chainTime = gettick()+200000*map_config.chain_bonus; break; + case 1: PChar->expChain.chainTime = gettick()+160000*map_config.chain_bonus; break; + case 2: PChar->expChain.chainTime = gettick()+120000*map_config.chain_bonus; break; + case 3: PChar->expChain.chainTime = gettick()+80000*map_config.chain_bonus; break; + case 4: PChar->expChain.chainTime = gettick()+40000*map_config.chain_bonus; break; + case 5: PChar->expChain.chainTime = gettick()+40000*map_config.chain_bonus; break; + default: PChar->expChain.chainTime = gettick()+30000*map_config.chain_bonus; break; } } else if(chainactive && PChar->GetMLevel() <= 50) { switch(PChar->expChain.chainNumber) { - case 0: PChar->expChain.chainTime = gettick()+250000; break; - case 1: PChar->expChain.chainTime = gettick()+200000; break; - case 2: PChar->expChain.chainTime = gettick()+150000; break; - case 3: PChar->expChain.chainTime = gettick()+100000; break; - case 4: PChar->expChain.chainTime = gettick()+50000; break; - case 5: PChar->expChain.chainTime = gettick()+50000; break; - default: PChar->expChain.chainTime = gettick()+50000; break; + case 0: PChar->expChain.chainTime = gettick()+250000*map_config.chain_bonus; break; + case 1: PChar->expChain.chainTime = gettick()+200000*map_config.chain_bonus; break; + case 2: PChar->expChain.chainTime = gettick()+150000*map_config.chain_bonus; break; + case 3: PChar->expChain.chainTime = gettick()+100000*map_config.chain_bonus; break; + case 4: PChar->expChain.chainTime = gettick()+50000*map_config.chain_bonus; break; + case 5: PChar->expChain.chainTime = gettick()+50000*map_config.chain_bonus; break; + default: PChar->expChain.chainTime = gettick()+50000*map_config.chain_bonus; break; } } else if(chainactive && PChar->GetMLevel() <= 60) { switch(PChar->expChain.chainNumber) { - case 0: PChar->expChain.chainTime = gettick()+300000; break; - case 1: PChar->expChain.chainTime = gettick()+240000; break; - case 2: PChar->expChain.chainTime = gettick()+180000; break; - case 3: PChar->expChain.chainTime = gettick()+120000; break; - case 4: PChar->expChain.chainTime = gettick()+90000; break; - case 5: PChar->expChain.chainTime = gettick()+60000; break; - default: PChar->expChain.chainTime = gettick()+60000; break; + case 0: PChar->expChain.chainTime = gettick()+300000*map_config.chain_bonus; break; + case 1: PChar->expChain.chainTime = gettick()+240000*map_config.chain_bonus; break; + case 2: PChar->expChain.chainTime = gettick()+180000*map_config.chain_bonus; break; + case 3: PChar->expChain.chainTime = gettick()+120000*map_config.chain_bonus; break; + case 4: PChar->expChain.chainTime = gettick()+90000*map_config.chain_bonus; break; + case 5: PChar->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; + default: PChar->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; } } else if (chainactive) { switch(PChar->expChain.chainNumber) { - case 0: PChar->expChain.chainTime = gettick()+360000; break; - case 1: PChar->expChain.chainTime = gettick()+300000; break; - case 2: PChar->expChain.chainTime = gettick()+240000; break; - case 3: PChar->expChain.chainTime = gettick()+165000; break; - case 4: PChar->expChain.chainTime = gettick()+105000; break; - case 5: PChar->expChain.chainTime = gettick()+60000; break; - default: PChar->expChain.chainTime = gettick()+60000; break; + case 0: PChar->expChain.chainTime = gettick()+360000*map_config.chain_bonus; break; + case 1: PChar->expChain.chainTime = gettick()+300000*map_config.chain_bonus; break; + case 2: PChar->expChain.chainTime = gettick()+240000*map_config.chain_bonus; break; + case 3: PChar->expChain.chainTime = gettick()+165000*map_config.chain_bonus; break; + case 4: PChar->expChain.chainTime = gettick()+105000*map_config.chain_bonus; break; + case 5: PChar->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; + default: PChar->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; } } exp = charutils::AddExpBonus(PChar, exp); @@ -2679,7 +2679,7 @@ if (PChar->isDead()) return; exp = exp * map_config.exp_rate; - if (baseexp > 100 && isexpchain) + if ((baseexp > 100 || (map_config.chain_on_easy == 1 && baseexp > 0)) && isexpchain) { if (PChar->expChain.chainNumber != 0) PChar->pushPacket(new CMessageDebugPacket(PChar, PChar, exp, PChar->expChain.chainNumber, 253)); else PChar->pushPacket(new CMessageDebugPacket(PChar, PChar, exp, 0, 8)); Index: src/map/conquest_system.cpp =================================================================== --- src/map/conquest_system.cpp (revision 1847) +++ src/map/conquest_system.cpp (working copy) @@ -76,7 +76,7 @@ // 10% if region control is player's nation // 15% otherwise - PChar->RegionPoints[PChar->profile.nation] += exp * (PChar->profile.nation == GetRegionOwner(region) ? 0.1 : 0.15); + PChar->RegionPoints[PChar->profile.nation] += exp * map_config.conquest_bonus * (PChar->profile.nation == GetRegionOwner(region) ? 0.1 : 0.15); } return 0; // added conquest points (пока не вижу в этом определенного смысла) } @@ -87,30 +87,137 @@ * * ************************************************************************/ - uint8 GetRegionOwner(REGIONTYPE RegionID) - { - switch (RegionID) - { - case REGION_RONFAURE: return SANDORIA; - case REGION_ZULKHEIM: return SANDORIA; - case REGION_NORVALLEN: return SANDORIA; - case REGION_GUSTABERG: return BASTOK; - case REGION_DERFLAND: return WINDURST; - case REGION_SARUTABARUTA: return WINDURST; - case REGION_KOLSHUSHU: return WINDURST; - case REGION_ARAGONEU: return SANDORIA; - case REGION_FAUREGANDI: return BASTOK; - case REGION_VALDEAUNIA: return WINDURST; - case REGION_QUFIMISLAND: return BASTOK; - case REGION_LITELOR: return BASTOK; - case REGION_KUZOTZ: return SANDORIA; - case REGION_VOLLBOW: return WINDURST; - case REGION_ELSHIMOLOWLANDS: return SANDORIA; - case REGION_ELSHIMOUPLANDS: return WINDURST; - case REGION_TULIA: return WINDURST; - case REGION_MOVALPOLOS: return BEASTMEN; - case REGION_TAVNAZIA: return WINDURST; - } - return NEUTRAL; - } + uint8 GetRegionOwner(REGIONTYPE RegionID) + { + if(map_config.conquest_constant==1) + { + switch (RegionID) + { + case REGION_RONFAURE: return SANDORIA; + case REGION_ZULKHEIM: return SANDORIA; + case REGION_NORVALLEN: return SANDORIA; + case REGION_GUSTABERG: return SANDORIA; + case REGION_DERFLAND: return SANDORIA; + case REGION_SARUTABARUTA: return SANDORIA; + case REGION_KOLSHUSHU: return SANDORIA; + case REGION_ARAGONEU: return SANDORIA; + case REGION_FAUREGANDI: return SANDORIA; + case REGION_VALDEAUNIA: return SANDORIA; + case REGION_QUFIMISLAND: return SANDORIA; + case REGION_LITELOR: return SANDORIA; + case REGION_KUZOTZ: return SANDORIA; + case REGION_VOLLBOW: return SANDORIA; + case REGION_ELSHIMOLOWLANDS: return SANDORIA; + case REGION_ELSHIMOUPLANDS: return SANDORIA; + case REGION_TULIA: return SANDORIA; + case REGION_MOVALPOLOS: return SANDORIA; + case REGION_TAVNAZIA: return SANDORIA; + } + return NEUTRAL; + } + else if(map_config.conquest_constant == 2) + { + switch (RegionID) + { + case REGION_RONFAURE: return BASTOK; + case REGION_ZULKHEIM: return BASTOK; + case REGION_NORVALLEN: return BASTOK; + case REGION_GUSTABERG: return BASTOK; + case REGION_DERFLAND: return BASTOK; + case REGION_SARUTABARUTA: return BASTOK; + case REGION_KOLSHUSHU: return BASTOK; + case REGION_ARAGONEU: return BASTOK; + case REGION_FAUREGANDI: return BASTOK; + case REGION_VALDEAUNIA: return BASTOK; + case REGION_QUFIMISLAND: return BASTOK; + case REGION_LITELOR: return BASTOK; + case REGION_KUZOTZ: return BASTOK; + case REGION_VOLLBOW: return BASTOK; + case REGION_ELSHIMOLOWLANDS: return BASTOK; + case REGION_ELSHIMOUPLANDS: return BASTOK; + case REGION_TULIA: return BASTOK; + case REGION_MOVALPOLOS: return BASTOK; + case REGION_TAVNAZIA: return BASTOK; + } + return NEUTRAL; + } + else if(map_config.conquest_constant == 3) + { + switch (RegionID) + { + case REGION_RONFAURE: return WINDURST; + case REGION_ZULKHEIM: return WINDURST; + case REGION_NORVALLEN: return WINDURST; + case REGION_GUSTABERG: return WINDURST; + case REGION_DERFLAND: return WINDURST; + case REGION_SARUTABARUTA: return WINDURST; + case REGION_KOLSHUSHU: return WINDURST; + case REGION_ARAGONEU: return WINDURST; + case REGION_FAUREGANDI: return WINDURST; + case REGION_VALDEAUNIA: return WINDURST; + case REGION_QUFIMISLAND: return WINDURST; + case REGION_LITELOR: return WINDURST; + case REGION_KUZOTZ: return WINDURST; + case REGION_VOLLBOW: return WINDURST; + case REGION_ELSHIMOLOWLANDS: return WINDURST; + case REGION_ELSHIMOUPLANDS: return WINDURST; + case REGION_TULIA: return WINDURST; + case REGION_MOVALPOLOS: return WINDURST; + case REGION_TAVNAZIA: return WINDURST; + } + return NEUTRAL; + } + else if(map_config.conquest_constant == 4) + { + switch (RegionID) + { + case REGION_RONFAURE: return BEASTMEN; + case REGION_ZULKHEIM: return BEASTMEN; + case REGION_NORVALLEN: return BEASTMEN; + case REGION_GUSTABERG: return BEASTMEN; + case REGION_DERFLAND: return BEASTMEN; + case REGION_SARUTABARUTA: return BEASTMEN; + case REGION_KOLSHUSHU: return BEASTMEN; + case REGION_ARAGONEU: return BEASTMEN; + case REGION_FAUREGANDI: return BEASTMEN; + case REGION_VALDEAUNIA: return BEASTMEN; + case REGION_QUFIMISLAND: return BEASTMEN; + case REGION_LITELOR: return BEASTMEN; + case REGION_KUZOTZ: return BEASTMEN; + case REGION_VOLLBOW: return BEASTMEN; + case REGION_ELSHIMOLOWLANDS: return BEASTMEN; + case REGION_ELSHIMOUPLANDS: return BEASTMEN; + case REGION_TULIA: return BEASTMEN; + case REGION_MOVALPOLOS: return BEASTMEN; + case REGION_TAVNAZIA: return BEASTMEN; + } + return NEUTRAL; + } + else if(map_config.conquest_constant == 0) + { + switch (RegionID) + { + case REGION_RONFAURE: return SANDORIA; + case REGION_ZULKHEIM: return SANDORIA; + case REGION_NORVALLEN: return SANDORIA; + case REGION_GUSTABERG: return BASTOK; + case REGION_DERFLAND: return WINDURST; + case REGION_SARUTABARUTA: return WINDURST; + case REGION_KOLSHUSHU: return WINDURST; + case REGION_ARAGONEU: return SANDORIA; + case REGION_FAUREGANDI: return BASTOK; + case REGION_VALDEAUNIA: return WINDURST; + case REGION_QUFIMISLAND: return BASTOK; + case REGION_LITELOR: return BASTOK; + case REGION_KUZOTZ: return SANDORIA; + case REGION_VOLLBOW: return WINDURST; + case REGION_ELSHIMOLOWLANDS: return SANDORIA; + case REGION_ELSHIMOUPLANDS: return WINDURST; + case REGION_TULIA: return WINDURST; + case REGION_MOVALPOLOS: return BEASTMEN; + case REGION_TAVNAZIA: return WINDURST; + } + return NEUTRAL; + } + } }; \ No newline at end of file Index: src/map/map.cpp =================================================================== --- src/map/map.cpp (revision 1847) +++ src/map/map.cpp (working copy) @@ -801,6 +801,23 @@ map_config.lightluggage_block = 4; map_config.max_time_lastupdate = 60000; map_config.newstyle_skillups = 7; + map_config.engage_dist_mod = 1.0f; + map_config.magic_dist_mod = 1.0f; + map_config.ranged_dist_mod = 1.0f; + map_config.remove_engage_delay = 0; + map_config.magic_movement = 0; + map_config.seal_crest_bonus = 0; + map_config.always_seal_crest = 0; + map_config.drop_rate_bonus = 0; + map_config.all_mobs_drop_gil = 0; + map_config.gil_bonus = 1; + map_config.chain_on_easy = 0; + map_config.chain_bonus = 1; + map_config.craft_skill_onfail = 0; + map_config.craft_skillamt = 0; + map_config.conquest_bonus = 1; + map_config.conquest_constant = 0; + map_config.craft_success = 1; return 0; } @@ -956,6 +973,74 @@ { map_config.newstyle_skillups = atoi(w2); } + else if (strcmp(w1,"engage_dist_mod") == 0) + { + map_config.engage_dist_mod = atoi(w2); + } + else if (strcmp(w1,"magic_dist_mod") == 0) + { + map_config.magic_dist_mod = atoi(w2); + } + else if (strcmp(w1,"ranged_dist_mod") == 0) + { + map_config.ranged_dist_mod = atoi(w2); + } + else if (strcmp(w1,"remove_engage_delay") == 0) + { + map_config.remove_engage_delay = atoi(w2); + } + else if (strcmp(w1,"magic_movement") == 0) + { + map_config.magic_movement = atoi(w2); + } + else if (strcmp(w1,"seal_crest_bonus") == 0) + { + map_config.seal_crest_bonus = atoi(w2); + } + else if (strcmp(w1,"always_seal_crest") == 0) + { + map_config.always_seal_crest = atoi(w2); + } + else if (strcmp(w1,"drop_rate_bonus") == 0) + { + map_config.drop_rate_bonus = atoi(w2); + } + else if (strcmp(w1,"all_mobs_drop_gil") == 0) + { + map_config.all_mobs_drop_gil = atoi(w2); + } + else if (strcmp(w1,"gil_bonus") == 0) + { + map_config.gil_bonus = atoi(w2); + } + else if (strcmp(w1,"chain_on_easy") == 0) + { + map_config.chain_on_easy = atoi(w2); + } + else if (strcmp(w1,"chain_bonus") == 0) + { + map_config.chain_bonus = atoi(w2); + } + else if (strcmp(w1,"craft_skill_onfail") == 0) + { + map_config.craft_skill_onfail = atoi(w2); + } + else if (strcmp(w1,"craft_skillamt") == 0) + { + map_config.craft_skillamt = atoi(w2); + } + else if (strcmp(w1,"conquest_bonus") == 0) + { + map_config.conquest_bonus = atoi(w2); + } + else if (strcmp(w1,"conquest_constant") == 0) + { + map_config.conquest_constant = atoi(w2); + } + else if (strcmp(w1,"craft_success") == 0) + { + map_config.craft_success = atoi(w2); + } else { ShowWarning(CL_YELLOW"Unknown setting '%s' in file %s\n" CL_RESET, w1, cfgName); Index: src/map/map.h =================================================================== --- src/map/map.h (revision 1847) +++ src/map/map.h (working copy) @@ -85,6 +85,23 @@ float mob_tp_multiplier; // Multiplies the amount of TP mobs gain on any effect that would grant TP float player_tp_multiplier; // Multiplies the amount of TP players gain on any effect that would grant TP uint8 newstyle_skillups; // Allows failed parries and blocks to trigger skill up chance. + float engage_dist_mod; // Default is 1. Multiplies the distance that you can engage a target. Change to 3 for 3x the distance. + float magic_dist_mod; // Default is 1. Multiplies the distance that you can cast magic on a target. Change to 3 for 3x the distance. + float ranged_dist_mod; // Default is 1. Multiplies the distance that you can used ranged attack on a target. Change to 3 for 3x the distance. + int8 remove_engage_delay; // Default is 0. This removes the engegement delay that happens just after killing a target, or after equipping a weapon. + float magic_movement; // Default is 0. Allows movement while magic casting. + int16 seal_crest_bonus; // Increases chance of exp mobs dropping seals or crests. Set from 0 - 60. + int8 always_seal_crest; // Allows non exp beastman mobs to drop seals and crests. Default is 0. Set to 1 for non exp beastman mobs to drop seals and crests. + int8 drop_rate_bonus; // Adds to the drop rate percentate. Set to 20 to add additional %20 drop rate on all drops. + int8 all_mobs_drop_gil; // Set to 1 to allow all mobs to drop gil. Currently does not display ingame messages for these gil drops. Default is 0. + int16 gil_bonus; // Multiplies the amount of gil dropped + int8 chain_on_easy; // Allows exp chain on any exp mob + int8 chain_bonus; // Increases the time frame allowed to get an exp chain. Default is 1. + int8 craft_skill_onfail; // Allows same skillup on chance for failures as crafting successes have. Default is 0. + int8 craft_skillamt; // Increases the chance of getting larger skillups while crafting. Set 0 to 100. Default 0. + int8 conquest_bonus; // Multiplies the amount of conquest points earned on an exp mob kill. Default is 1 + int8 conquest_constant; // Sets 1 nation and owner of all regions. 0 = off, 1 = Sandoria, 2 = Bastok, 3 = Windurst, 4 = Beastmen. Default is 0. + int16 craft_success; // Increases the chance of succeding at crafting. Default 1. }; /************************************************************************ Index: src/map/synthutils.cpp =================================================================== --- src/map/synthutils.cpp (revision 1847) +++ src/map/synthutils.cpp (working copy) @@ -331,11 +331,12 @@ if(synthDiff <= 0) { success = 0.95; + synthDiff -= map_config.craft_success; if((synthDiff <= 0) && (synthDiff >= -10)){ success -= (double)(PChar->Container->getType() == ELEMENT_LIGHTNING) * 0.2; hqtier = 1; - }else if((synthDiff <= -11) && (synthDiff >= -30)){ + }else if((synthDiff <= -11) && (synthDiff >= -30)){ hqtier = 2; }else if((synthDiff <= -31) && (synthDiff >= -50)){ hqtier = 3; @@ -354,7 +355,7 @@ ShowDebug(CL_CYAN"Success: %g Random: %g\n" CL_RESET, success, random); #endif - if(random < success) + if(random < (success + map_config.craft_success*.01)) { for(int32 i = 0; i < 3; ++i) { @@ -372,7 +373,7 @@ case 1: chance = 0.015; break; default: chance = 0.000; break; } - if(chance < random) + if((chance + map_config.craft_success*.01) < random) break; result += 1; hqtier -= 1; @@ -467,7 +468,7 @@ int32 basDiff = PChar->Container->getQuantity(skillID-40) - charSkill/10; double synthDiff = getSynthDifficulty(PChar, skillID); - if ((basDiff <= 0) || ((basDiff > 5) && (PChar->Container->getQuantity(0) == SYNTHESIS_FAIL))) // результат синтеза хранится в quantity нулевой ячейки + if (map_config.craft_skill_onfail == 0 && ((basDiff <= 0) || ((basDiff > 5) && (PChar->Container->getQuantity(0) == SYNTHESIS_FAIL)))) // результат синтеза хранится в quantity нулевой ячейки { return 0; } @@ -475,19 +476,23 @@ if (charSkill < maxSkill) { double skillUpChance = (synthDiff*(map_config.craft_multiplier - (log(1.2 + charSkill/100) + MoonCorrection)))/10; + if (map_config.craft_skill_onfail == 0) + { skillUpChance = skillUpChance/(1 + (PChar->Container->getQuantity(0) == SYNTHESIS_FAIL)); // результат синтеза хранится в quantity нулевой ячейки + } double random = rand() / ((double)RAND_MAX); #ifdef _DSP_SYNTH_DEBUG_MESSAGES_ ShowDebug(CL_CYAN"Skill up chance: %g Random: %g\n" CL_RESET, skillUpChance, random); #endif - if (random < skillUpChance) + if (random < (skillUpChance + map_config.craft_skillamt*.01)) { int32 satier = 0; int32 skillAmount = 1; double chance = 0; - + synthDiff += map_config.craft_skillamt*.1; + if((synthDiff >= 1) && (synthDiff < 3)){ satier = 1; }else if((synthDiff >= 3) && (synthDiff < 5)){ @@ -517,7 +522,7 @@ case 1: chance = 0.100; break; default: chance = 0.000; break; } - if(chance < random) + if((chance + map_config.craft_skillamt*.01) < random) break; skillAmount += 1; satier -= 1;