diff options
-rw-r--r-- | conf/char-server.conf | 5 | ||||
-rw-r--r-- | db/castle_db.txt | 20 | ||||
-rw-r--r-- | db/pre-re/item_combo_db.txt | 4 | ||||
-rw-r--r-- | db/pre-re/item_db.txt | 2 | ||||
-rw-r--r-- | db/re/item_combo_db.txt | 8 | ||||
-rw-r--r-- | db/re/item_trade.txt | 28 | ||||
-rw-r--r-- | npc/guild/agit_main.txt | 5 | ||||
-rw-r--r-- | npc/guild2/agit_main_se.txt | 19 | ||||
-rw-r--r-- | npc/jobs/2-1/hunter.txt | 1 | ||||
-rw-r--r-- | sql-files/item_db.sql | 2 | ||||
-rw-r--r-- | sql-files/item_db_re.sql | 2 | ||||
-rw-r--r-- | src/char/char.c | 9 | ||||
-rw-r--r-- | src/map/npc.c | 27 | ||||
-rw-r--r-- | src/map/pc.c | 4 |
14 files changed, 93 insertions, 43 deletions
diff --git a/conf/char-server.conf b/conf/char-server.conf index 929bad5d0..4ed7c1a26 100644 --- a/conf/char-server.conf +++ b/conf/char-server.conf @@ -79,8 +79,9 @@ char_new: 1 // Display (New) in the server list. char_new_display: 0 -// Maximum users able to connect to the server. Set to 0 for unlimited. -max_connect_user: 0 +// Maximum users able to connect to the server. +// Set to 0 to disable users to log-in. (-1 means unlimited) +max_connect_user: -1 // Group ID that is allowed to bypass the server limit of users. // Default: -1 = nobody (there are no groups with ID < 0) diff --git a/db/castle_db.txt b/db/castle_db.txt index a77b5de7b..4e0f2e880 100644 --- a/db/castle_db.txt +++ b/db/castle_db.txt @@ -34,13 +34,13 @@ 21,nguild_gef,Air,Agit_N02,2 22,nguild_pay,Water,Agit_N03,2 23,nguild_prt,Fire,Agit_N04,2 -24,schg_cas01,Himinn,Agit_Sc01,1 // kRO : Himinn -25,schg_cas02,Andlangr,Agit_Sc02,1 // kRO : Andlangr -26,schg_cas03,Viblainn,Agit_Sc03,1 // kRO : Viblainn -27,schg_cas04,Hljod,Agit_Sc04,1 // kRO : Hljod -28,schg_cas05,Skidbladnir,Agit_Sc05,1 // kRO : Skidbladnir -29,arug_cas01,Mardol,Agit_Ar01,1 // kRO : Mardol -30,arug_cas02,Cyr,Agit_Ar02,1 // kRO : Cyr -31,arug_cas03,Horn,Agit_Ar03,1 // kRO : Horn -32,arug_cas04,Gefn,Agit_Ar04,1 // kRO : Gefn -33,arug_cas05,Bandis,Agit_Ar05,1 // kRO : Bandis +24,schg_cas01,Himinn,Manager#schg_cas01,1 // kRO : Himinn +25,schg_cas02,Andlangr,Manager#schg_cas02,1 // kRO : Andlangr +26,schg_cas03,Viblainn,Manager#schg_cas03,1 // kRO : Viblainn +27,schg_cas04,Hljod,Manager#schg_cas04,1 // kRO : Hljod +28,schg_cas05,Skidbladnir,Manager#schg_cas05,1 // kRO : Skidbladnir +29,arug_cas01,Mardol,Manager#arug_cas01,1 // kRO : Mardol +30,arug_cas02,Cyr,Manager#arug_cas02,1 // kRO : Cyr +31,arug_cas03,Horn,Manager#arug_cas03,1 // kRO : Horn +32,arug_cas04,Gefn,Manager#arug_cas04,1 // kRO : Gefn +33,arug_cas05,Bandis,Manager#arug_cas05,1 // kRO : Bandis diff --git a/db/pre-re/item_combo_db.txt b/db/pre-re/item_combo_db.txt index 3b8985fb0..c1eb3c039 100644 --- a/db/pre-re/item_combo_db.txt +++ b/db/pre-re/item_combo_db.txt @@ -21,7 +21,7 @@ 1573:2334,{ bonus bMdef,8; bonus bMaxSPRate,10; bonus bInt,4; } 1573:2372,{ bonus bMdef,8; bonus bMaxSPRate,10; bonus bInt,4; } 1573:2716:2717,{ bonus bInt,5; bonus bMaxHP,700; bonus bAspdRate,5; } -1615:18539,{ bonus bEquipmentMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bCastRate,-10; } +1615:18539,{ bonus bMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bCastRate,-10; } 1616:2515,{ bonus bSpeedRate,25; } 1618:2509,{ bonus bMaxHP,300; bonus bMatkRate,getequiprefinerycnt(EQI_HAND_R)-5; bonus2 bSubEle,Ele_Neutral,getrefine()*3; } 1618:2535,{ bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,25; } @@ -29,7 +29,7 @@ 1620:2535,{ bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,25; } 1629:5045,{ bonus bDex,2; bonus bInt,2; bonus bSPrecovRate,5; bonus bMatkRate,getrefine(); } 1631:2129,{ bonus2 bSkillAtk,"PR_MAGNUS",20; bonus3 bAutoSpellWhenHit,"PR_TURNUNDEAD",1,20; } -1636:18539,{ bonus bEquipmentMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bCastRate,-10; } +1636:18539,{ bonus bMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bCastRate,-10; } 1723:2718,{ bonus bDex,1; bonus bMaxSP,50; bonus bSPrecovRate,10; } 1730:1752,{ bonus bLongAtkRate,25; } 1731:1754,{ bonus bLongAtkRate,25; } diff --git a/db/pre-re/item_db.txt b/db/pre-re/item_db.txt index 391954fab..35763c257 100644 --- a/db/pre-re/item_db.txt +++ b/db/pre-re/item_db.txt @@ -1777,7 +1777,7 @@ 4149,Gargoyle_Card,Gargoyle Card,6,20,,10,,,,,,,,136,,,,,{ bonus3 bAddMonsterDropItem,12028,RC_Insect,100; },{},{} 4150,Goat_Card,Goat Card,6,20,,10,,,,,,,,16,,,,,{ if(getrefine()<6) { bonus bDef,2; bonus bMdef,5; } },{},{} 4151,Gajomart_Card,Gajomart Card,6,20,,10,,,,,,,,64,,,,,{ bonus2 bSubRace,RC_Plant,-20; bonus2 bExpAddRace,RC_Plant,10; },{},{} -4152,Galapago_Card,Galapago Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Juice,50; bonus3 bAddMonsterDropItem,531,RC_Insect,300; bonus3 bAddMonsterDropItem,532,RC_Insect,300; bonus3 bAddMonsterDropItem,533,RC_Insect,300; },{},{} +4152,Galapago_Card,Galapago Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Juice,50; bonus3 bAddMonsterDropItem,531,RC_Insect,300; bonus3 bAddMonsterDropItem,532,RC_Insect,300; bonus3 bAddMonsterDropItem,534,RC_Insect,300; },{},{} 4153,Crab_Card,Crab Card,6,20,,10,,,,,,,,2,,,,,{ bonus bBaseAtk,5; bonus2 bAddDamageClass,1266,30; },{},{} 4154,Rice_Cake_Boy_Card,Dumpling Child Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Candy,50; bonus3 bAddMonsterDropItem,529,RC_DemiHuman,300; bonus3 bAddMonsterDropItem,530,RC_DemiHuman,100; },{},{} 4155,Goblin_Leader_Card,Goblin Leader Card,6,20,,10,,,,,,,,2,,,,,{ bonus2 bAddRace2,1,30; },{},{} diff --git a/db/re/item_combo_db.txt b/db/re/item_combo_db.txt index 81acb7f0d..f6bd7dc01 100644 --- a/db/re/item_combo_db.txt +++ b/db/re/item_combo_db.txt @@ -24,7 +24,7 @@ 1573:2334,{ bonus bMdef,8; bonus bMaxSPRate,10; bonus bInt,4; } 1573:2372,{ bonus bMdef,8; bonus bMaxSPRate,10; bonus bInt,4; } 1573:2716:2717,{ bonus bInt,5; bonus bMaxHP,700; bonus bAspdRate,5; } -1615:18539,{ bonus bEquipmentMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bVariableCastrate,-10; } +1615:18539,{ bonus bMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bVariableCastrate,-10; } 1616:2515,{ bonus bSpeedRate,25; } 1618:2509,{ bonus bMaxHP,300; bonus bMatkRate,getequiprefinerycnt(EQI_HAND_R)-5; bonus2 bSubEle,Ele_Neutral,getrefine()*3; } 1618:2535,{ bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,25; } @@ -32,7 +32,7 @@ 1620:2535,{ bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,25; } 1629:5045,{ bonus bDex,2; bonus bInt,2; bonus bSPrecovRate,5; bonus bMatkRate,getrefine(); } 1631:2129,{ bonus2 bSkillAtk,"PR_MAGNUS",20; bonus3 bAutoSpellWhenHit,"PR_TURNUNDEAD",1,20; } -1636:18539,{ bonus bEquipmentMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bVariableCastrate,-10; } +1636:18539,{ bonus bMatk,10*getequiprefinerycnt(EQI_HAND_R); bonus bVariableCastrate,-10; } 1657:2471:2569:15029,{ bonus bHealPower,25; } 1660:2471:2569:15029,{ bonus bHealPower,45; bonus3 bAutoSpellWhenHit,"AB_SILENTIUM",1,10; } 1718:1774,{ bonus bLongAtkRate,50; } @@ -117,7 +117,7 @@ 2475:2574:2883:15036,{ bonus bMaxHPRate,14; bonus2 bSkillAtk,"RK_HUNDREDSPEAR",50; skill "CR_AUTOGUARD",1; } 2476:2575:2884:15037,{ bonus2 bAddRace,RC_NonBoss,10; bonus2 bAddRace,RC_Boss,10; bonus2 bSkillAtk,"RK_SONICWAVE",100; bonus2 bSkillAtk,"RK_WINDCUTTER",100; autobonus "{ sc_start SC_CONCENTRATION,10000,getskilllv(\"LK_CONCENTRATION\")?getskilllv(\"LK_CONCENTRATION\"):1; bonus bAspd,2; }",1,10000,BF_WEAPON,"{}"; } 2477:2577:2886:15038,{ bonus bCritical,15; bonus bFlee,10; bonus bCritAtkRate,40; bonus2 bSkillAtk,"GC_CROSSIMPACT",20; } -2478:2578:2887:15039,{ bonus2 bAddRace,RC_NonBoss,10; bonus2 bAddRace,RC_Boss,10; /* bonus bEquipmentMatk,10; */ if(readparam(bStr)>119) { bonus bBaseAtk,30; } bonus3 bAutoSpell,"ASC_BREAKER",getskilllv("ASC_BREAKER"),10; bonus bCritical,-20; } +2478:2578:2887:15039,{ bonus2 bAddRace,RC_NonBoss,10; bonus2 bAddRace,RC_Boss,10; bonus bMatk,10; if(readparam(bStr)>119) { bonus bBaseAtk,30; } bonus3 bAutoSpell,"ASC_BREAKER",getskilllv("ASC_BREAKER"),10; bonus bCritical,-20; } 2479:2580:2890:15042,{ bonus bAspd,2; bonus bLongAtkRate,30; bonus3 bAutoSpell,"AC_DOUBLE",3,10; bonus2 bSkillAtk,"RA_ARROWSTORM",50; } 2480:2581:2891:15043,{ bonus bMaxHPRate,15; bonus2 bSkillAtk,"RA_CLUSTERBOMB",20; bonus bFlee2,20; bonus bLongAtkRate,-30; bonus bAspd,-7; } 2483:2586:15046,{ bonus2 bSubRace,RC_DemiHuman,15; } @@ -147,7 +147,7 @@ 2725:2772,{ bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,3; bonus bHealPower,5; } 2726:2727,{ bonus bUseSPrate,-25; } 2733:2772,{ bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,3; bonus bHealPower,5; } -2747:13061,{ bonus bHit,5; /* bonus bEquipmentMatk,5; */ } +2747:13061,{ bonus bHit,5; bonus bMatk,5; } 2777:2778:5479,{ bonus bMaxHP,300; bonus bMatkRate,5; bonus2 bSubEle,Ele_Neutral,5; } 2779:2780:5482,{ bonus bMatkRate,10; bonus bInt,5; bonus2 bSubRace,RC_Angel,10; } 2779:2780:5577,{ bonus bMatkRate,10; bonus bInt,5; bonus2 bSubRace,RC_Angel,10; } diff --git a/db/re/item_trade.txt b/db/re/item_trade.txt index c8f518c12..abc6909c2 100644 --- a/db/re/item_trade.txt +++ b/db/re/item_trade.txt @@ -1870,3 +1870,31 @@ 13425,499,100 // Tourist Sword 15007,467,100 // Time Keeper Robe 16006,499,100 // Tourist Mace + +// Sealed Cards +4489,457,100 // Sealed Pharaoh Card +4490,457,100 // Sealed Moonlight Flower Card +4491,457,100 // Sealed Sniper Card +4492,457,100 // Sealed Orc Hero Card +4493,457,100 // Sealed Tao Gunka Card +4494,457,100 // Sealed Turtle General Card +4495,457,100 // Sealed Amon Ra Card +4496,457,100 // Sealed Drake Card +4497,457,100 // Sealed Stormy Knight Card +4498,457,100 // Sealed Lady Tanee Card +4499,457,100 // Sealed Samurai Spector Card +4500,457,100 // Sealed Orc Lord Card +4501,457,100 // Sealed High Priest Card +4502,457,100 // Sealed MasterSmith Card +4503,457,100 // Sealed Vesper Card +4504,457,100 // Sealed Eddga Card +4535,457,100 // Sealed Randgris Card +4536,457,100 // Sealed Atroce Card +4537,457,100 // Sealed Phreeoni Card +4538,457,100 // Sealed White Lady Card +4539,457,100 // Sealed Fallen Bishop Hibram Card +4540,457,100 // Sealed Lord of The Dead Card +4541,457,100 // Sealed High Wizard Card +4542,457,100 // Sealed Detale Card +4543,457,100 // Sealed Hatii Card +4544,457,100 // Sealed Evil Snake Lord Card diff --git a/npc/guild/agit_main.txt b/npc/guild/agit_main.txt index 115238bfb..5253fbe16 100644 --- a/npc/guild/agit_main.txt +++ b/npc/guild/agit_main.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= L0ne_W0lf //===== Current Version: ===================================== -//= 1.9 +//= 1.9a //===== Description: ========================================= //= [ Aegis Conversion] //= ---------------------------------------------------------- @@ -49,6 +49,7 @@ //= and added extended anouncement format for mapannounce. //= 1.8 Fixed a possible exploit in guild castle investment. [Brian] //= 1.9 Partially rewrote Script. [Masao] +//= 1.9a Fixed incorrect setcastledata parameter. [Euphy] //============================================================ // WoE : Main Functions @@ -156,7 +157,7 @@ OnGuildBreak: // Kill guardians, disable the Kafra, and set owner to 0. killmonster strnpcinfo(2),"Guardian#"+strnpcinfo(2)+"::OnGuardianDied"; disablenpc "Kafra Staff#"+strnpcinfo(2); - SetCastleData strnpcinfo(2),0,0; + SetCastleData strnpcinfo(2),1,0; // Wait before refreshing guild information. sleep 7000; Announce "Guild Base [" + GetCastleName(strnpcinfo(2)) + "] has been abandoned.",0; diff --git a/npc/guild2/agit_main_se.txt b/npc/guild2/agit_main_se.txt index 0c15e3a70..45c847d5d 100644 --- a/npc/guild2/agit_main_se.txt +++ b/npc/guild2/agit_main_se.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= Euphy //===== Current Version: ===================================== -//= 1.3 +//= 1.4 //===== Description: ========================================= //= Like agit_main, this file is required //= for SE castles to function. @@ -13,6 +13,7 @@ //= 1.1 Fixed an incorrect label execution. [Euphy] //= 1.2 Hopefully fixed a processing error. [Euphy] //= 1.3 Fixed barricade issue in schg_cas02. [Cookie] +//= 1.4 Added OnGuildBreak event and a spawn check. [Euphy] //============================================================ // Core, triggers all other events @@ -64,6 +65,17 @@ OnAgitEnd2: } end; +OnGuildBreak: + if (strnpcinfo(2) == "template") end; + killmonster strnpcinfo(2),"gard1#"+strnpcinfo(2)+"::OnGuardianDied"; + killmonster strnpcinfo(2),"gard2#"+strnpcinfo(2)+"::OnGuardianDied"; + disablenpc "Kafra Employee#"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); + setcastledata strnpcinfo(2),1,0; + sleep 7000; + announce "Guild Base ["+getcastlename(strnpcinfo(2))+"] has been abandoned.",0; + donpcevent strnpcinfo(0)+"::OnRecvCastle2"; + end; + OnStart: // $agit_ar0x[] - $agit_sc0x[] // 1st Guardian stone, 2nd Guardian stone, Barrier 1, Barrier 2, Barrier 3, Summon Guardians @@ -76,7 +88,10 @@ OnStart: for(set .@i,0; .@i<4; set .@i,.@i+1) donpcevent "RL"+.@i+"#"+strnpcinfo(2)+"::OnEnable"; } + OnEmpSpawn: + set .@str$, substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9); + if (mobcount(strnpcinfo(2),"Steward#"+.@str$+"::OnStartArena")) end; if (compare(strnpcinfo(2),"arug")) { if (strnpcinfo(2) == "arug_cas01") setarray .@i[0],87,219; else if (strnpcinfo(2) == "arug_cas02") setarray .@i[0],89,256; @@ -87,7 +102,7 @@ OnEmpSpawn: else if (strnpcinfo(2) == "schg_cas03") setarray .@i[0],338,202; else setarray .@i[0],120,272; // Castles 1,4,5 are identical. } - monster strnpcinfo(2),.@i[0],.@i[1],"Emperium",1288,1,"Steward#"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9)+"::OnStartArena"; + monster strnpcinfo(2),.@i[0],.@i[1],"Emperium",1288,1,"Steward#"+.@str$+"::OnStartArena"; end; OnReset: diff --git a/npc/jobs/2-1/hunter.txt b/npc/jobs/2-1/hunter.txt index 96874f73e..2777e0a43 100644 --- a/npc/jobs/2-1/hunter.txt +++ b/npc/jobs/2-1/hunter.txt @@ -534,6 +534,7 @@ hu_in01,382,382,4 script Guild Receptionist#hnt 732,{ close; } else if (HNTR_Q >= 3 && HNTR_Q <= 9) { + if(checkre(0)) set .@i,1; switch(HNTR_Q) { //Insect_Feeler/Claw_Of_Desert_Wolf, Wooden_Block, White_Herb case 3: setarray .@items[0], (.@i?928:7030),5, 1019,5, 509,3, 10; break; diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql index bdef46fa7..9b0c8fff4 100644 --- a/sql-files/item_db.sql +++ b/sql-files/item_db.sql @@ -1808,7 +1808,7 @@ REPLACE INTO `item_db` VALUES (4148,'Pharaoh_Card','Pharaoh Card',6,20,NULL,10,N REPLACE INTO `item_db` VALUES (4149,'Gargoyle_Card','Gargoyle Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus3 bAddMonsterDropItem,12028,RC_Insect,100;',NULL,NULL); REPLACE INTO `item_db` VALUES (4150,'Goat_Card','Goat Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16,NULL,NULL,NULL,NULL,'if(getrefine()<6) { bonus bDef,2; bonus bMdef,5; }',NULL,NULL); REPLACE INTO `item_db` VALUES (4151,'Gajomart_Card','Gajomart Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,64,NULL,NULL,NULL,NULL,'bonus2 bSubRace,RC_Plant,-20; bonus2 bExpAddRace,RC_Plant,10;',NULL,NULL); -REPLACE INTO `item_db` VALUES (4152,'Galapago_Card','Galapago Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus2 bAddItemHealRate,IG_Juice,50; bonus3 bAddMonsterDropItem,531,RC_Insect,300; bonus3 bAddMonsterDropItem,532,RC_Insect,300; bonus3 bAddMonsterDropItem,533,RC_Insect,300;',NULL,NULL); +REPLACE INTO `item_db` VALUES (4152,'Galapago_Card','Galapago Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus2 bAddItemHealRate,IG_Juice,50; bonus3 bAddMonsterDropItem,531,RC_Insect,300; bonus3 bAddMonsterDropItem,532,RC_Insect,300; bonus3 bAddMonsterDropItem,534,RC_Insect,300;',NULL,NULL); REPLACE INTO `item_db` VALUES (4153,'Crab_Card','Crab Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus bBaseAtk,5; bonus2 bAddDamageClass,1266,30;',NULL,NULL); REPLACE INTO `item_db` VALUES (4154,'Rice_Cake_Boy_Card','Dumpling Child Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,136,NULL,NULL,NULL,NULL,'bonus2 bAddItemHealRate,IG_Candy,50; bonus3 bAddMonsterDropItem,529,RC_DemiHuman,300; bonus3 bAddMonsterDropItem,530,RC_DemiHuman,100;',NULL,NULL); REPLACE INTO `item_db` VALUES (4155,'Goblin_Leader_Card','Goblin Leader Card',6,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'bonus2 bAddRace2,1,30;',NULL,NULL); diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index e9ddd31ca..a3fd574f7 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -7363,4 +7363,4 @@ REPLACE INTO `item_db_re` VALUES (19529,'Costume_Angel_Wing','Costume Angel Wing REPLACE INTO `item_db_re` VALUES (19530,'Costume_Wild_Rose','Costume Wild Rose',5,20,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,1024,NULL,'1',NULL,541,NULL,NULL,NULL); # More 2-Handed Swords REPLACE INTO `item_db_re` VALUES (21001,'Bellum_Claymore','Bellum Claymore',4,20,NULL,3500,'260',NULL,1,NULL,0x00004082,7,2,34,4,'95',1,3,'bonus2 bAddRace,RC_DemiHuman,80; bonus2 bIgnoreDefRate,RC_DemiHuman,30; if(getrefine()>=6) { bonus2 bAddRace,RC_DemiHuman,40; } if(getrefine()>=9) { autobonus2 "{bonus bShortWeaponDamageReturn,20; bonus bMagicDamageReturn,20;}",200,1000,BF_WEAPON,"{specialeffect2 EF_REFLECTSHIELD;}"; }',NULL,NULL); -REPLACE INTO `item_db_re` VALUES (21002,'Bellum_Katzbalger','Bellum Katzbalger',4,20,NULL,2500,'100',NULL,1,NULL,0x00004082,7,2,34,4,'95',1,3,'bonus2 bSPVanishRate,10000,8;',NULL,NULL);
\ No newline at end of file +REPLACE INTO `item_db_re` VALUES (21002,'Bellum_Katzbalger','Bellum Katzbalger',4,20,NULL,2500,'100',NULL,1,NULL,0x00004082,7,2,34,4,'95',1,3,'bonus2 bSPVanishRate,10000,8;',NULL,NULL); diff --git a/src/char/char.c b/src/char/char.c index d454e8bd0..1b5c7898d 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -133,7 +133,7 @@ struct char_session_data { char birthdate[10+1]; // YYYY-MM-DD }; -int max_connect_user = 0; +int max_connect_user = -1; int gm_allow_group = -1; int autosave_interval = DEFAULT_AUTOSAVE_INTERVAL; int start_zeny = 0; @@ -2154,7 +2154,8 @@ int parse_fromlogin(int fd) { ARR_FIND( 0, ARRAYLENGTH(server), server_id, server[server_id].fd > 0 && server[server_id].map[0] ); // continued from char_auth_ok... if( server_id == ARRAYLENGTH(server) || //server not online, bugreport:2359 - ( max_connect_user && count_users() >= max_connect_user && sd->group_id != gm_allow_group ) ) { + (max_connect_user == 0 && sd->group_id != gm_allow_group) || + ( max_connect_user > 0 && count_users() >= max_connect_user && sd->group_id != gm_allow_group ) ) { // refuse connection (over populated) WFIFOHEAD(i,3); WFIFOW(i,0) = 0x6c; @@ -4588,8 +4589,8 @@ int char_config_read(const char* cfgName) char_new_display = atoi(w2); } else if (strcmpi(w1, "max_connect_user") == 0) { max_connect_user = atoi(w2); - if (max_connect_user < 0) - max_connect_user = 0; // unlimited online players + if (max_connect_user < -1) + max_connect_user = -1; // unlimited online players } else if(strcmpi(w1, "gm_allow_group") == 0) { gm_allow_group = atoi(w2); } else if (strcmpi(w1, "autosave_time") == 0) { diff --git a/src/map/npc.c b/src/map/npc.c index 3aabeaf98..383cd031a 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2884,24 +2884,23 @@ int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const c setd_sub(st, NULL, ".@atcmd_command$", 0, (void *)command, NULL); // split atcmd parameters based on spaces - i = 0; - j = 0; - temp = (char*)aMalloc(strlen(message) + 1); - while( message[i] != '\0' ) { - if( message[i] == ' ' && k < 127 ) { - temp[j] = '\0'; - setd_sub(st, NULL, ".@atcmd_parameters$", k++, (void *)temp, NULL); - j = 0; - ++i; - } else - temp[j++] = message[i++]; + for( i = 0; i < ( strlen( message ) + 1 ) && k < 127; i ++ ) { + if( message[i] == ' ' || message[i] == '\0' ) { + if( message[ ( i - 1 ) ] == ' ' ) { + continue; // To prevent "@atcmd [space][space][space]..." + } + temp[k] = '\0'; + k = 0; + setd_sub( st, NULL, ".@atcmd_parameters$", j++, (void *)temp, NULL ); + } else { + temp[k] = message[i]; + k++; + } } - temp[j] = '\0'; - setd_sub(st, NULL, ".@atcmd_parameters$", k++, (void *)temp, NULL); - setd_sub(st, NULL, ".@atcmd_numparameters", 0, (void *)&k, NULL); + setd_sub(st, NULL, ".@atcmd_numparameters", 0, (void *)__64BPRTSIZE(j), NULL); aFree(temp); run_script_main(st); diff --git a/src/map/pc.c b/src/map/pc.c index 6f608cd49..4fb555d0f 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -8194,6 +8194,10 @@ int pc_removecombo(struct map_session_data *sd, struct item_data *data ) { cursor++; } + + /* check if combo requirements still fit */ + if( pc_checkcombo( sd, data ) ) + continue; /* it's empty, we can clear all the memory */ if( (sd->combos.count = cursor) == 0 ) { |