summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/pre-re/skill_db.txt8
-rw-r--r--db/re/skill_db.txt8
-rw-r--r--doc/atcommands.txt10
-rw-r--r--npc/cities/comodo.txt82
-rw-r--r--npc/cities/jawaii.txt6
-rw-r--r--npc/custom/woe_controller.txt181
-rw-r--r--npc/jobs/2-1/wizard.txt22
-rw-r--r--npc/other/mail.txt21
-rw-r--r--src/map/atcommand.c9
-rw-r--r--src/map/battle.c34
-rw-r--r--src/map/clif.c2
-rw-r--r--src/map/script.c7
-rw-r--r--src/map/skill.c67
-rw-r--r--src/map/status.c25
14 files changed, 279 insertions, 203 deletions
diff --git a/db/pre-re/skill_db.txt b/db/pre-re/skill_db.txt
index 580268701..882ffb6e2 100644
--- a/db/pre-re/skill_db.txt
+++ b/db/pre-re/skill_db.txt
@@ -714,7 +714,7 @@
2210,11,6,1,0,0,0,5,1,yes,0,0,0,magic,0, WL_DRAINLIFE,Drain Life
2211,11,8,1,3,0x2,3,5,-7,yes,0,0,0,magic,3, WL_CRIMSONROCK,Crimson Rock
2212,11,6,1,3,0,0,5,1,yes,0,0,0,magic,0, WL_HELLINFERNO,Hell Inferno
-2213,11,8,2,0,0x2,15,5,-20,yes,0,0,0,magic,2, WL_COMET,Comet //CHECK AoE in official code appears to be 15 x 15, yet casting circle is much bigger then that.
+2213,11,8,2,0,0x2,7,5,-20,yes,0,0,0,magic,2, WL_COMET,Comet
2214,11,6,1,0,0,3,5,1,yes,0,0,0,magic,0, WL_CHAINLIGHTNING,Chain Lightning //CHECK Is the splash being used for the target search?
2215,11,6,1,4,0,0,5,1,no,0,0,0,magic,0, WL_CHAINLIGHTNING_ATK,Chain Lightning Attack
2216,3,8,2,2,0,0,5,-6:-7:-8:-9:-10,yes,0,0,0,magic,0, WL_EARTHSTRAIN,Earth Strain
@@ -738,7 +738,7 @@
//****
// GC Guillotine Cross
//****
-2021,5,6,1,0,0x1,0,5,1,no,0,0,0,none,0, GC_VENOMIMPRESS,Venom Impress
+2021,10,6,1,0,0x1,0,5,1,no,0,0,0,none,0, GC_VENOMIMPRESS,Venom Impress
2022,3,8,1,-1,0,0,5,-7,no,0,0,0,weapon,0, GC_CROSSIMPACT,Cross Impact
2023,3:4:5:6:7,6,1,-1,0,0,5,1,no,0,0,0,weapon,0,GC_DARKILLUSION,Dark Illusion
2024,0,0,0,0,0,0,10,0,no,0,0,0,none,0, GC_RESEARCHNEWPOISON,Research New Poison
@@ -939,7 +939,7 @@
2419,9,6,2,0,0x3,1,5,1,yes,0,0x80,5,none,0, WM_POEMOFNETHERWORLD,Poem of The Netherworld //CHECK May need to recode too.
2420,0,6,4,0,0x2,2:3:4:5:6,5,1,yes,0,0,0,none,0, WM_VOICEOFSIREN,Voice of Siren
2421,7,6,16,0,0x1,0,5,1,yes,0,0,0,none,0, WM_DEADHILLHERE,Valley of Death
-2422,7,6,2,0,0x3,5:6:7:8:9,5,1,yes,0,0,0,none,0, WM_LULLABY_DEEPSLEEP,Deep Sleep Lullaby
+2422,7,6,4,0,0x3,5:6:7:8:9,5,1,yes,0,0,0,none,0, WM_LULLABY_DEEPSLEEP,Deep Sleep Lullaby
2423,0,6,4,0,0x3,3:4:5:6:7,5,1,yes,0,0,0,none,0, WM_SIRCLEOFNATURE,Circle of Nature's Sound
2424,9,6,4,0,0x1,0,5,1,yes,0,0,0,magic,0, WM_RANDOMIZESPELL,Improvised Song
2425,9,6,16,0,0x1,0,5,1,yes,0,0,0,none,0, WM_GLOOMYDAY,Gloomy Day
@@ -968,7 +968,7 @@
2452,9,6,2,3,0x1,0,5,1,yes,0,0,0,magic,0, SO_WARMER,Warmer
2453,9,6,2,0,0x1,0,5,1,yes,0,0,0,magic,0, SO_VACUUM_EXTREME,Vacuum Extreme
2454,9,6,1,4,0x2,1:1:2:2:3,5,1,yes,0,0,0,magic,0, SO_VARETYR_SPEAR,Varetyr Spear
-2455,9,6,1,0,0x3,1:1:2:2:3,5,1,yes,0,0,0,magic,0, SO_ARRULLO,Arrullo
+2455,9,6,2,0,0x3,1:1:2:2:3,5,1,yes,0,0,0,magic,0, SO_ARRULLO,Arrullo
2456,0,6,4,0,0x1,0,4,1,yes,0,0,0,none,0, SO_EL_CONTROL,Spirit Control
2457,0,6,4,3,0x1,0,3,1,yes,0,0,0,none,0, SO_SUMMON_AGNI,Summon Fire Spirit Agni
2458,0,6,4,1,0x1,0,3,1,yes,0,0,0,none,0, SO_SUMMON_AQUA,Summon Water Spirit Aqua
diff --git a/db/re/skill_db.txt b/db/re/skill_db.txt
index f81cd5b05..acb879442 100644
--- a/db/re/skill_db.txt
+++ b/db/re/skill_db.txt
@@ -714,7 +714,7 @@
2210,11,6,1,0,0,0,5,1,yes,0,0,0,magic,0, WL_DRAINLIFE,Drain Life
2211,11,8,1,3,0x2,3,5,-7,yes,0,0,0,magic,3, WL_CRIMSONROCK,Crimson Rock
2212,11,6,1,3,0,0,5,1,yes,0,0,0,magic,0, WL_HELLINFERNO,Hell Inferno
-2213,11,8,2,0,0x2,15,5,-20,yes,0,0,0,magic,2, WL_COMET,Comet //CHECK AoE in official code appears to be 15 x 15, yet casting circle is much bigger then that.
+2213,11,8,2,0,0x2,7,5,-20,yes,0,0,0,magic,2, WL_COMET,Comet
2214,11,6,1,0,0,3,5,1,yes,0,0,0,magic,0, WL_CHAINLIGHTNING,Chain Lightning //CHECK Is the splash being used for the target search?
2215,11,6,1,4,0,0,5,1,no,0,0,0,magic,0, WL_CHAINLIGHTNING_ATK,Chain Lightning Attack
2216,3,8,2,2,0,0,5,-6:-7:-8:-9:-10,yes,0,0,0,magic,0, WL_EARTHSTRAIN,Earth Strain
@@ -739,7 +739,7 @@
//****
// GC Guillotine Cross
//****
-2021,5,6,1,0,0x1,0,5,1,no,0,0,0,none,0, GC_VENOMIMPRESS,Venom Impress
+2021,10,6,1,0,0x1,0,5,1,no,0,0,0,none,0, GC_VENOMIMPRESS,Venom Impress
2022,3,8,1,-1,0,0,5,-7,no,0,0,0,weapon,0, GC_CROSSIMPACT,Cross Impact
2023,3:4:5:6:7,6,1,-1,0,0,5,1,no,0,0,0,weapon,0,GC_DARKILLUSION,Dark Illusion
2024,0,0,0,0,0,0,10,0,no,0,0,0,none,0, GC_RESEARCHNEWPOISON,Research New Poison
@@ -940,7 +940,7 @@
2419,9,6,2,0,0x3,1,5,1,yes,0,0x80,5,none,0, WM_POEMOFNETHERWORLD,Poem of The Netherworld //CHECK May need to recode too.
2420,0,6,4,0,0x2,2:3:4:5:6,5,1,yes,0,0,0,none,0, WM_VOICEOFSIREN,Voice of Siren
2421,7,6,16,0,0x1,0,5,1,yes,0,0,0,none,0, WM_DEADHILLHERE,Valley of Death
-2422,7,6,2,0,0x3,5:6:7:8:9,5,1,yes,0,0,0,none,0, WM_LULLABY_DEEPSLEEP,Deep Sleep Lullaby
+2422,7,6,4,0,0x3,5:6:7:8:9,5,1,yes,0,0,0,none,0, WM_LULLABY_DEEPSLEEP,Deep Sleep Lullaby
2423,0,6,4,0,0x3,3:4:5:6:7,5,1,yes,0,0,0,none,0, WM_SIRCLEOFNATURE,Circle of Nature's Sound
2424,9,6,4,0,0x1,0,5,1,yes,0,0,0,magic,0, WM_RANDOMIZESPELL,Improvised Song
2425,9,6,16,0,0x1,0,5,1,yes,0,0,0,none,0, WM_GLOOMYDAY,Gloomy Day
@@ -969,7 +969,7 @@
2452,9,6,2,3,0x1,0,5,1,yes,0,0,0,magic,0, SO_WARMER,Warmer
2453,9,6,2,0,0x1,0,5,1,yes,0,0,0,magic,0, SO_VACUUM_EXTREME,Vacuum Extreme
2454,9,6,1,4,0x2,1:1:2:2:3,5,1,yes,0,0,0,magic,0, SO_VARETYR_SPEAR,Varetyr Spear
-2455,9,6,1,0,0x3,1:1:2:2:3,5,1,yes,0,0,0,magic,0, SO_ARRULLO,Arrullo
+2455,9,6,2,0,0x3,1:1:2:2:3,5,1,yes,0,0,0,magic,0, SO_ARRULLO,Arrullo
2456,0,6,4,0,0x1,0,4,1,yes,0,0,0,none,0, SO_EL_CONTROL,Spirit Control
2457,0,6,4,3,0x1,0,3,1,yes,0,0,0,none,0, SO_SUMMON_AGNI,Summon Fire Spirit Agni
2458,0,6,4,1,0x1,0,3,1,yes,0,0,0,none,0, SO_SUMMON_AQUA,Summon Water Spirit Aqua
diff --git a/doc/atcommands.txt b/doc/atcommands.txt
index a8d00ef19..a0afa043c 100644
--- a/doc/atcommands.txt
+++ b/doc/atcommands.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= rAthena Dev Team
//===== Current Version: =====================================
-//= 20121223
+//= 20130115
//===== Description: =========================================
//= List of available atcommands and their functions.
//============================================================
@@ -1145,6 +1145,14 @@ Reloads the specified configuration file.
---------------------------------------
+@set <variable> {<value>}
+
+Changes a player or account variable to the specified value.
+If no value is given, the variable's current value will be displayed.
+Note that the value of a string variable may be typed with or without double quotes.
+
+---------------------------------------
+
@setbattleflag <flag> <value>
Changes a battle_config flag without rebooting the server.
diff --git a/npc/cities/comodo.txt b/npc/cities/comodo.txt
index 5dbf99f89..38d7731ba 100644
--- a/npc/cities/comodo.txt
+++ b/npc/cities/comodo.txt
@@ -1,13 +1,13 @@
//===== rAthena Script =======================================
//= Comodo Town
//===== By: ==================================================
-//= rAthena dev team
+//= rAthena Dev Team
//===== Current Version: =====================================
-//= 1.9
+//= 2.0
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
-//= [Aegis Conversion]
+//= [Official Conversion]
//= Comodo Town NPCs
//===== Additional Comments: =================================
//= Not complete.
@@ -21,6 +21,7 @@
//= 1.7 Rescripted to Aegis 10.3 standards. [L0ne_W0lf]
//= 1.8 Fixed a small bug. (close -> close2) [L0ne_W0lf]
//= 1.9 Added a missing Kafra NPC. [L0ne_W0lf]
+//= 2.0 Added Izlude RE coordinates. [Euphy]
//============================================================
// Inside Comodo
@@ -339,7 +340,8 @@ cmd_fild07,52,280,4 script Hallosu#cmd 100,{
}
cmd_fild07,299,83,4 script Zain#cmd 100,{
- mes "[Zain]";
+ set .@n$,"["+strnpcinfo(1)+"]";
+ mes .@n$;
mes "Would you like to";
mes "board a ship on the";
mes "Reudelus route? You";
@@ -348,71 +350,20 @@ cmd_fild07,299,83,4 script Zain#cmd 100,{
next;
switch(select("Alberta - 600 Zeny:Izlude - 800 Zeny:Cancel")) {
case 1:
- if (Zeny < 600) {
- mes "[Zain]";
- mes "I'm sorry, but you";
- mes "don't have enough";
- mes "zeny for the boarding fare.";
- close;
- }
+ if (Zeny < 600) break;
set zeny,zeny-600;
warp "alberta",192,169;
end;
case 2:
- if (Zeny < 800) {
- mes "[Zain]";
- mes "I'm sorry, but you";
- mes "don't have enough";
- mes "zeny for the boarding fare.";
- close;
- }
+ if (Zeny < 800) break;
set zeny,zeny-800;
- warp "izlude",176,182;
+ if(checkre(0))
+ warp "izlude",195,212;
+ else
+ warp "izlude",176,182;
end;
case 3:
- mes "[Zain]";
- mes "Travel by ship is";
- mes "still one of the safest and";
- mes "dependable methods of";
- mes "transportation. I invite you";
- mes "to try Reudelus travel soon~";
- close;
- }
-}
-
-cmd_fild07,94,134,4 script Sarumane#cmd 100,{
- mes "[Sarumane]";
- mes "Would you like to";
- mes "board a ship on the";
- mes "Reudelus route? You";
- mes "can travel on Reudelus";
- mes "to Alberta or Izlude.";
- next;
- switch(select("Alberta - 600 Zeny:Izlude - 800 Zeny:Cancel")) {
- case 1:
- if (Zeny < 600) {
- mes "[Sarumane]";
- mes "I'm sorry, but you";
- mes "don't have enough";
- mes "zeny for the boarding fare.";
- close;
- }
- set zeny,zeny-600;
- warp "alberta",192,169;
- end;
- case 2:
- if (Zeny < 800) {
- mes "[Sarumane]";
- mes "I'm sorry, but you";
- mes "don't have enough";
- mes "zeny for the boarding fare.";
- close;
- }
- set zeny,zeny-800;
- warp "izlude",176,182;
- end;
- case 3:
- mes "[Sarumane]";
+ mes .@n$;
mes "Travel by ship is";
mes "still one of the safest and";
mes "dependable methods of";
@@ -420,8 +371,13 @@ cmd_fild07,94,134,4 script Sarumane#cmd 100,{
mes "to try Reudelus travel soon~";
close;
}
+ mes .@n$;
+ mes "I'm sorry, but you";
+ mes "don't have enough";
+ mes "zeny for the boarding fare.";
+ close;
}
-
+cmd_fild07,94,134,4 duplicate(Zain#cmd) Sarumane#cmd 100
cmd_in02,146,180,4 script Kafra Employee::kaf_comodo2 721,{
cutin "kafra_07",2;
diff --git a/npc/cities/jawaii.txt b/npc/cities/jawaii.txt
index dd7ebb28a..e6706df4a 100644
--- a/npc/cities/jawaii.txt
+++ b/npc/cities/jawaii.txt
@@ -1,5 +1,5 @@
//===== rAthena Script =======================================
-//= Jawaii (The Lovers' Paradise) Town script
+//= Jawaii (The Lovers' Paradise) Town
//===== By: ==================================================
//= jAthena (1.0)
//= DNett123 (1.1 - 1.5)
@@ -9,8 +9,8 @@
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
-//= [Aegis OCnversion]
-//= Jawaii Town Npcs
+//= [Official Conversion]
+//= Jawaii Town NPCs
//===== Additional Comments: =================================
//= 1.0 Done By jAthena
//= 1.1 Rough Translation [DNett123]
diff --git a/npc/custom/woe_controller.txt b/npc/custom/woe_controller.txt
index d8380e770..fe88b0934 100644
--- a/npc/custom/woe_controller.txt
+++ b/npc/custom/woe_controller.txt
@@ -3,9 +3,9 @@
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
-//= 1.4
+//= 1.5
//===== Compatible With: =====================================
-//= rAthena SVN r16571+
+//= rAthena SVN r16958+
//===== Description: =========================================
//= A controller for War of Emperium designed for
//= simplicity and ease of use.
@@ -17,23 +17,64 @@
//== npc\guild2\agit_start_se.txt
//============================================================
-prontera,149,193,4 script WOE Information 835,{ doevent "WOE_CONTROL::OnMenu"; end; OnAgitStart: while(agitcheck()) { misceffect 58; sleep 425; } end; }
+// Information NPC
+//============================================================
+prontera,149,193,4 script WOE Information 835,{
+ doevent "WOE_CONTROL::OnMenu";
+ end;
+OnAgitStart:
+ while(agitcheck()) {
+ misceffect EF_BEGINSPELL6;
+ sleep 425;
+ }
+ end;
+}
+// Script Core
+//============================================================
- script WOE_CONTROL -1,{
function Disp_Owner; function Add_Zero;
OnInit:
-// --------------------------------------------------------------------------------------------------------------------------
+
+// -----------------------------------------------------------
+// Configuration settings.
+// -----------------------------------------------------------
set .CastleWarp,0; // 1: Always enable all castle warps. | 0: Warp only to active castles.
set .AutoKick,1; // Automatically kick players from inactive castles during WOE? (1:yes / 0:no)
set .NoOwner,0; // Automatically kick players from unconquered castles outside of WOE? (1:yes / 0:no)
set .ExitWarp,0; // Warp all players from castles when WOE ends? (1:yes / 0:no)
set .GMAccess,99; // GM level required to access Session Manager.
- setarray .Reward[0],14001,1; // Reward for all members of conquering guilds, per castle: <ID>,<Count>{,...} (0 to disable)
-// --------------------------------------------------------------------------------------------------------------------------
- set .Size, getarraysize($WOE_CONTROL);
+// -----------------------------------------------------------
+// Reward options.
+// -----------------------------------------------------------
+// [1] Enable rewards.
+// [2] Mail all rewards.
+// - If not set, players receive items in their inventory.
+// - Only ONE item can be sent via mail, plus Zeny.
+// - Note that offline players do NOT receive rewards.
+// [4] Only reward Guild Masters.
+// - If not set, all guild members are rewarded.
+// - If mailing is enabled (option 2), offline Guild Masters WILL receive rewards.
+// [8] Duplicate IP check.
+// - Members in a guild with the same IP address are not rewarded.
+// - If Guild Masters is enabled (option 4), this feature is not used.
+// -----------------------------------------------------------
+
+ // Combine values as needed (e.g. 1|8 = 1+8 = 9).
+ set .Options, 1|8;
+
+ // Rewards per castle.
+ // -- when given directly: <itemID>,<amount>{,<itemID>,<amount>,...}
+ // -- via mail (option 2): <itemID>,<amount>,<Zeny>
+ setarray .Reward[0],14001,1;
+
+// -----------------------------------------------------------
+// Constants (leave this section alone).
+// -----------------------------------------------------------
+
setarray .Castles$[0],
"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05",
"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05",
@@ -47,12 +88,18 @@ OnInit:
setarray .Map$[0],"prt_gld","pay_gld","gef_fild13","alde_gld","aru_gld","sch_gld";
setarray .MapX[0],134,240,153,111,208,121,295,317,140,204,214,308,143,193,305,48, 95,142,239,264,158,83, 68,299,292,293,288, 97,137, 71;
setarray .MapY[0], 65,128,137,240,240,233,116,293,160,266, 75,240,240,278, 87,83,249, 85,242, 90,272,47,155,345,107,100,252,196, 90,315;
- if (.AutoKick || .NoOwner) for(set .@i,0; .@i<30; set .@i,.@i+1) {
- setmapflag .Castles$[.@i], mf_loadevent;
- setd "."+.Castles$[.@i], .@i;
- }
+
+// -----------------------------------------------------------
+
+ set .Size, getarraysize($WOE_CONTROL);
+ if (.AutoKick || .NoOwner)
+ for(set .@i,0; .@i<30; set .@i,.@i+1) {
+ setmapflag .Castles$[.@i], mf_loadevent;
+ setd "."+.Castles$[.@i], .@i;
+ }
if (!agitcheck() && !agitcheck2()) sleep 4000;
set .Init,1;
+
OnMinute00:
freeloop(1);
if (agitcheck() || agitcheck2()) {
@@ -66,7 +113,7 @@ OnMinute00:
if (.Active[0]&(1<<.@j)) Disp_Owner(.Castles$[.@j],1);
if (.ExitWarp) maprespawnguildid .Castles$[.@j],0,3;
}
- if (.Reward[0] && .Active[0] && .ForceEnd != 2) callsub OnReward, .Active[0];
+ if (.Options&1 && .Active[0] && .ForceEnd != 2) callsub OnReward, .Active[0];
deletearray .Active[0],2;
if (.ForceEnd) { set .ForceEnd,0; end; }
break;
@@ -100,7 +147,6 @@ OnMinute00:
}
}
set .Init,0;
- freeloop(0);
end;
function Disp_Owner {
@@ -114,20 +160,37 @@ function Add_Zero {
}
OnReward:
+ set .@sql$, ((.Options&4)?"position = 0":"online = 1");
+ if (.Options&2) set .@str$,gettimestr("%B %d, %Y",21);
+ freeloop(1);
for(set .@i,0; .@i<30; set .@i,.@i+1)
if (getarg(0)&(1<<.@i)) {
- set .@guild, getcastledata(.Castles$[.@i],1);
- if (.@guild) {
- deletearray .@acc[0], getarraysize(.@acc); deletearray .@char[0], getarraysize(.@char);
- query_sql("SELECT account_id,char_id FROM `guild_member` WHERE guild_id = '"+.@guild+"'", .@acc, .@char);
- for(set .@j,0; .@j<getarraysize(.@acc); set .@j,.@j+1)
- if (isloggedin(.@acc[.@j],.@char[.@j])) {
- for(set .@k,0; .@k<getarraysize(.Reward); set .@k,.@k+2)
- getitem .Reward[.@k], .Reward[.@k+1], .@acc[.@j];
- message rid2name(.@acc[.@j]),"You have been rewarded for conquering "+getcastlename(.Castles$[.@i])+".";
+ set .@gid, getcastledata(.Castles$[.@i],1);
+ if (!.@gid) continue;
+ set .@size, query_sql("SELECT account_id,char_id FROM `guild_member` WHERE guild_id = '"+.@gid+"' AND "+.@sql$,.@aid,.@cid);
+ for(set .@j,0; .@j<.@size; set .@j,.@j+1) {
+ if (.Options&8 && !(.Options&4)) {
+ set .@ip$, replacestr(getcharip(.@aid[.@j]),".","a");
+ if (getd(".@ip_"+.@i+"_"+.@ip$)) continue;
+ setd ".@ip_"+.@i+"_"+.@ip$,1;
+ }
+ if (.Options&2) {
+ query_sql("INSERT INTO `mail` (send_name,dest_id,title,message,nameid,amount,identify,zeny,time) VALUES ("+
+ "'no-reply',"+.@cid[.@j]+",'** Siege Reward: "+getcastlename(.Castles$[.@i])+" **',"+
+ "'Brave one,% % Congratulations!% Your guild has successfully occupied% territory in the War of Emperium on% "+.@str$+".% % % % % [ Your reward is attached. ]',"+
+ .Reward[0]+","+.Reward[1]+",0,"+.Reward[2]+",UNIX_TIMESTAMP(NOW()))");
+ if (!getd(".@str_"+.@cid[.@j]) && isloggedin(.@aid[.@j],.@cid[.@j])) {
+ setd ".@str_"+.@cid[.@j],1;
+ message rid2name(.@aid[.@j]),"You've got mail! Please re-login to update your mailing list.";
}
+ } else if (isloggedin(.@aid[.@j])) {
+ for(set .@k,0; .@k<getarraysize(.Reward); set .@k,.@k+2)
+ getitem .Reward[.@k], .Reward[.@k+1], .@aid[.@j];
+ message rid2name(.@aid[.@j]),"You have been rewarded for conquering "+getcastlename(.Castles$[.@i])+".";
+ }
}
}
+ if (.Options&2) query_sql("UPDATE `mail` SET message = REPLACE(message,'%',CHAR(13)) WHERE send_name = 'no-reply'");
return;
OnPCLoadMapEvent:
@@ -145,8 +208,7 @@ OnMenu:
while(1) {
mes "[WOE Information]";
if (agitcheck() || agitcheck2()) {
- if (!.Size) mes "The War of Emperium is ^0055FFactive^000000.";
- else {
+ if (.Active[0]) {
for(set .@i,0; .@i<.Size; set .@i,.@i+4)
if (gettime(4) == $WOE_CONTROL[.@i] && gettime(3) >= $WOE_CONTROL[.@i+1] && gettime(3) < $WOE_CONTROL[.@i+2]) {
set .@i, $WOE_CONTROL[.@i+2];
@@ -156,39 +218,38 @@ while(1) {
mes " ";
for(set .@i,0; .@i<6; set .@i,.@i+1)
if (.Active[1]&(1<<(.@i+1))) mes " > ^777777"+.Regions$[.@i]+"^000000";
- }
+ } else
+ mes "The War of Emperium is ^0055FFactive^000000.";
} else {
- set .@j,0; set .@k,0;
for(set .@i,0; .@i<.Size; set .@i,.@i+4)
if ((gettime(4) == $WOE_CONTROL[.@i] && gettime(3) <= $WOE_CONTROL[.@i+1]) || gettime(4) < $WOE_CONTROL[.@i]) {
- set .@j, $WOE_CONTROL[.@i]; set .@k, $WOE_CONTROL[.@i+1];
+ setarray .@time[0],$WOE_CONTROL[.@i],$WOE_CONTROL[.@i+1];
break;
}
- if (!.@j && !.@k) {
- set .@j, $WOE_CONTROL[0];
- set .@k, $WOE_CONTROL[1];
- }
+ if (!getarraysize(.@time))
+ setarray .@time[0],$WOE_CONTROL[0],$WOE_CONTROL[1];
mes "The War of Emperium is ^777777inactive^000000.";
if (.Size) {
mes " ";
mes "The next session will begin";
- mes "on ^0055FF"+.Days$[.@j]+"^000000 at "+Add_Zero(.@k)+"^000000.";
+ mes "on ^0055FF"+.Days$[.@time[0]]+"^000000 at "+Add_Zero(.@time[1])+"^000000.";
}
}
next;
switch(select(""+((.CastleWarp || .Active[1])?" ~ Warp to castles...":"")+": ~ Check schedule...: ~ View castle owners...:"+((getgmlevel()<.GMAccess || !getgmlevel())?"":" ~ Manage sessions...")+": ~ ^777777Cancel^000000")) {
case 1:
+ if (.CastleWarp) set .@clr$,"^0055FF";
set .@menu$,"";
for(set .@i,0; .@i<6; set .@i,.@i+1) {
if (.CastleWarp || .Active[1]&(1<<(.@i+1)))
- set .@menu$, .@menu$+" ~ "+((.Active[1]&(1<<(.@i+1)))?"^0055FF":"^777777")+.Regions$[.@i]+" Castles^000000";
+ set .@menu$, .@menu$+" ~ "+((.Active[1]&(1<<(.@i+1)))?.@clr$:"^777777")+.Regions$[.@i]+" Castles^000000";
set .@menu$, .@menu$+":";
}
set .@i, select(.@menu$)-1;
set .@menu$,"";
for(set .@j,.@i*5; .@j<(.@i*5)+5; set .@j,.@j+1) {
if (.CastleWarp || .Active[0]&(1<<.@j))
- set .@menu$, .@menu$+" ~ "+((.Active[0]&(1<<.@j))?"^0055FF":"^777777")+getcastlename(.Castles$[.@j])+"^000000";
+ set .@menu$, .@menu$+" ~ "+((.Active[0]&(1<<.@j))?.@clr$:"^777777")+getcastlename(.Castles$[.@j])+"^000000";
set .@menu$, .@menu$+":";
}
set .@j, select(.@menu$)-1;
@@ -205,8 +266,8 @@ while(1) {
if (.@i+4 < .Size) mes " ";
}
freeloop(0);
- }
- else mes "No times are configured.";
+ } else
+ mes "No times are configured.";
next;
break;
case 3:
@@ -270,7 +331,8 @@ while(1) {
mes "[New Session]";
mes "^0055FF"+.Days$[.@Day]+" ("+Add_Zero(.@Start)+"-"+Add_Zero(.@End)+")^000000";
mes " > Castles:";
- if (!.@Castle) mes " ~ ^777777(none selected)^000000";
+ if (!.@Castle)
+ mes " ~ ^777777(none selected)^000000";
else for(set .@i,0; .@i<30; set .@i,.@i+1)
if (.@Castle&(1<<.@i)) mes " ~ "+getcastlename(.Castles$[.@i])+" ("+.Castles$[.@i]+")";
next;
@@ -278,29 +340,30 @@ while(1) {
for(set .@i,0; .@i<30; set .@i,.@i+1)
set .@menu$, .@menu$+" ~ "+((.@Castle&(1<<.@i))?"^0055FF":"")+getcastlename(.Castles$[.@i])+" ("+.Castles$[.@i]+")^000000:";
set .@i, select(.@menu$)-1;
- if (.@i) set .@Castle, .@Castle^(1<<(.@i-1));
+ if (.@i)
+ set .@Castle, .@Castle^(1<<(.@i-1));
else {
mes "[New Session]";
mes "Are you sure?";
next;
switch(select(" ~ ^0055FFAdd session...^000000: ~ Continue selecting castles...: ~ ^777777Cancel^000000")) {
- case 1:
- for(set .@i,0; .@i<.Size; set .@i,.@i+4)
- if ((.@Day == $WOE_CONTROL[.@i] && .@End <= $WOE_CONTROL[.@i+1]) || .@Day < $WOE_CONTROL[.@i]) {
- set .@d,1;
- break;
- }
- if (!.@d) { set .@d,1; set .@i,.Size; }
- copyarray $WOE_CONTROL[.@i+4], $WOE_CONTROL[.@i], .Size-.@i;
- setarray $WOE_CONTROL[.@i], .@Day, .@Start, .@End, .@Castle;
- set .Size, getarraysize($WOE_CONTROL);
- case 3:
- mes "[New Session]";
- mes ((.@d)?"Session added.":"Cancelled.");
- next;
- set .@d,1;
- case 2:
- break;
+ case 1:
+ for(set .@i,0; .@i<.Size; set .@i,.@i+4)
+ if ((.@Day == $WOE_CONTROL[.@i] && .@End <= $WOE_CONTROL[.@i+1]) || .@Day < $WOE_CONTROL[.@i]) {
+ set .@d,1;
+ break;
+ }
+ if (!.@d) { set .@d,1; set .@i,.Size; }
+ copyarray $WOE_CONTROL[.@i+4], $WOE_CONTROL[.@i], .Size-.@i;
+ setarray $WOE_CONTROL[.@i], .@Day, .@Start, .@End, .@Castle;
+ set .Size, getarraysize($WOE_CONTROL);
+ case 3:
+ mes "[New Session]";
+ mes ((.@d)?"Session added.":"Cancelled.");
+ next;
+ set .@d,1;
+ case 2:
+ break;
}
if (.@d) { set .@d,0; break; }
}
@@ -327,7 +390,8 @@ while(1) {
next;
set .@j, select(" ~ ^FF0000Delete session...^000000: ~ ^777777Cancel^000000");
mes "[Remove Session]";
- if (.@j == 2) mes "Cancelled.";
+ if (.@j == 2)
+ mes "Cancelled.";
else {
deletearray $WOE_CONTROL[.@i*4],4;
set .Size, getarraysize($WOE_CONTROL);
@@ -364,9 +428,10 @@ while(1) {
mes " ";
mes "Kill the current WOE session?";
next;
- set .@i, select(" ~ ^FF0000End session...^000000:"+((.Reward[0])?" ~ ^FF0000End session without rewards...^000000":"")+": ~ ^777777Cancel^000000");
+ set .@i, select(" ~ ^FF0000End session...^000000:"+((.Options&1)?" ~ ^FF0000End session without rewards...^000000":"")+": ~ ^777777Cancel^000000");
mes "[Force Agit End]";
- if (.@i == 3) mes "Cancelled.";
+ if (.@i == 3)
+ mes "Cancelled.";
else {
set .ForceEnd, .@i;
donpcevent "WOE_CONTROL::OnWOEEnd";
diff --git a/npc/jobs/2-1/wizard.txt b/npc/jobs/2-1/wizard.txt
index b24728a24..6598a0cc2 100644
--- a/npc/jobs/2-1/wizard.txt
+++ b/npc/jobs/2-1/wizard.txt
@@ -4,7 +4,7 @@
//= (Aegis) Translated by yoshiki, converted by kobra_k88
//= Further bugfixed and tested by Lupus
//===== Current Version: =====================================
-//= 3.2
+//= 3.3
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
@@ -26,6 +26,7 @@
//= 3.0 Added Quest Log commands. [Kisuka]
//= 3.1 Removed the need for use of 'goto.' [L0ne_W0lf]
//= 3.2 Modified the quest to renewal. [Vali] (Thanks to Muad_Dib for the necessary info).
+//= 3.3 Fixed waitingroom bug. [Euphy]
//============================================================
gef_tower,111,37,4 script Wizard Guildsman 70,{
@@ -1067,11 +1068,9 @@ job_wiz,50,165,4 script Arena Assistant 700,{
mes "Each person may take approximately 5 to 10 minutes.";
mes "If you would like to leave the arena, please log off anytime.";
close;
-}
-job_wiz,50,165,4 script Waiting Room#wiz 700,{
OnInit:
- waitingroom "Waiting Room",20,"Waiting Room#wiz::OnStartArena",1;
+ waitingroom "Waiting Room",20,"Arena Assistant::OnStartArena",1;
enablewaitingroomevent;
end;
@@ -1079,7 +1078,6 @@ OnStartArena:
killmonsterall "job_wiz";
warpwaitingpc "job_wiz",114,169;
donpcevent "Room of Water::OnEnable";
- disablenpc "Waiting Room#wiz";
disablewaitingroomevent;
end;
@@ -1180,7 +1178,7 @@ OnTimer185000:
OnTimer186000:
disablenpc "Room of Water#Failed";
donpcevent "Room of Water::OnDisable";
- donpcevent "Waiting Room#wiz::OnStart";
+ donpcevent "Arena Assistant::OnStart";
end;
}
@@ -1246,7 +1244,7 @@ OnTimer62000:
OnTimer63000:
disablenpc "Room of Water#Failed";
donpcevent "Room of Water#Door::OnDisable";
- donpcevent "Waiting Room#wiz::OnStart";
+ donpcevent "Arena Assistant::OnStart";
end;
}
@@ -1354,7 +1352,7 @@ OnTimer185000:
OnTimer186000:
disablenpc "Room of Earth#Failed";
donpcevent "Room of Earth::OnDisable";
- donpcevent "Waiting Room#wiz::OnStart";
+ donpcevent "Arena Assistant::OnStart";
end;
}
@@ -1426,7 +1424,7 @@ OnTimer62000:
OnTimer63000:
disablenpc "Room of Earth#Failed";
donpcevent "Room of Earth#Door::OnDisable";
- donpcevent "Waiting Room#wiz::OnStart";
+ donpcevent "Arena Assistant::OnStart";
end;
}
@@ -1532,7 +1530,7 @@ OnTimer185000:
OnTimer186000:
disablenpc "Room of Fire#Failed";
donpcevent "Room of Fire::OnDisable";
- donpcevent "Waiting Room#wiz::OnStart";
+ donpcevent "Arena Assistant::OnStart";
end;
}
@@ -1610,7 +1608,7 @@ OnTimer122000:
OnTimer123000:
disablenpc "Room of Fire#Failed";
donpcevent "Room of Fire#Door::OnDisable";
- donpcevent "Waiting Room#wiz::OnStart";
+ donpcevent "Arena Assistant::OnStart";
}
job_wiz,46,99,0 script Room of Fire#Failed -1,16,16,{
@@ -1656,7 +1654,7 @@ OnTimer7000:
OnTimer9000:
donpcevent "Test Helper#wiz::OnDisable";
- donpcevent "Waiting Room#wiz::OnStart";
+ donpcevent "Arena Assistant::OnStart";
stopnpctimer;
end;
}
diff --git a/npc/other/mail.txt b/npc/other/mail.txt
index 8b236fc76..edd4af17b 100644
--- a/npc/other/mail.txt
+++ b/npc/other/mail.txt
@@ -26,26 +26,29 @@
//============================================================
- script Mailbox#dummy::MailBox -1,{
mes "[Mailbox]";
- mes "To use the mailbox service, you are required";
- mes "to pay 130 zeny.";
+ mes "To use the mailbox service,";
+ mes "you are required to pay 130 zeny.";
mes "Would you like to use the service?";
next;
- mes "[Mailbox]";
- if (select("Yes.:No.") == 1) {
+ switch(select("Yes.:No.")) {
+ case 1:
+ mes "[Mailbox]";
if (Zeny < 130) {
mes "I am sorry, but you do not have enough money.";
- mes "To use the mailbox service, you are required";
- mes "to pay 130 zeny.";
+ mes "To use the mailbox service,";
+ mes "you are required to pay 130 zeny.";
close;
}
mes "Thank you, please come again.";
- set Zeny,(Zeny - 130);
+ set Zeny, Zeny - 130;
close2;
openmail;
end;
+ case 2:
+ mes "[Mailbox]";
+ mes "Thank you, please come again.";
+ close;
}
- mes "Thank you, please come again.";
- close;
}
// Prontera
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index c6292a7a9..2a18b7d2f 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -8585,7 +8585,7 @@ ACMD_FUNC(accinfo) {
ACMD_FUNC(set) {
char reg[32], val[128];
struct script_data* data;
- int toset = 0;
+ int toset = 0, len;
bool is_str = false;
if( !message || !*message || (toset = sscanf(message, "%32s %128[^\n]s", reg, val)) < 1 ) {
@@ -8607,6 +8607,13 @@ ACMD_FUNC(set) {
is_str = ( reg[strlen(reg) - 1] == '$' ) ? true : false;
+ if( ( len = strlen(val) ) > 1 ) {
+ if( val[0] == '"' && val[len-1] == '"') {
+ val[len-1] = '\0'; //Strip quotes.
+ memmove(val, val+1, len-1);
+ }
+ }
+
if( toset >= 2 ) {/* we only set the var if there is an val, otherwise we only output the value */
if( is_str )
set_var(sd, reg, (void*) val);
diff --git a/src/map/battle.c b/src/map/battle.c
index 7b6bf5869..0959ea858 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1857,19 +1857,35 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
wd.div_ = skill_get_num(GS_CHAINACTION,skill_lv);
wd.type = 0x08;
}
- else if(sc && sc->data[SC_FEARBREEZE] && sd->weapontype1==W_BOW && (i = sd->equip_index[EQI_AMMO]) >= 0 && sd->inventory_data[i] && sd->status.inventory[i].amount > 1){
- short rate[] = { 4, 4, 7, 9, 10 };
- if(sc->data[SC_FEARBREEZE]->val1 > 0 && sc->data[SC_FEARBREEZE]->val1 < 6 && rand()%100 < rate[sc->data[SC_FEARBREEZE]->val1-1]) {
+ else if(sc && sc->data[SC_FEARBREEZE] && sd->weapontype1==W_BOW
+ && (i = sd->equip_index[EQI_AMMO]) >= 0 && sd->inventory_data[i] && sd->status.inventory[i].amount > 1){
+ int chance = rand()%100;
wd.type = 0x08;
- wd.div_ = 2;
- if(sc->data[SC_FEARBREEZE]->val1 > 2){
- int chance = rand()%100;
- wd.div_ += (chance >= 40) + (chance >= 70) + (chance >= 90);
- wd.div_ = min(wd.div_,sc->data[SC_FEARBREEZE]->val1);
+ switch(sc->data[SC_FEARBREEZE]->val1){
+ case 5:
+ if( chance < 3){// 3 % chance to attack 5 times.
+ wd.div_ = 5;
+ break;
+ }
+ case 4:
+ if( chance < 7){// 6 % chance to attack 4 times.
+ wd.div_ = 4;
+ break;
+ }
+ case 3:
+ if( chance < 10){// 9 % chance to attack 3 times.
+ wd.div_ = 3;
+ break;
+ }
+ case 2:
+ case 1:
+ if( chance < 13){// 12 % chance to attack 2 times.
+ wd.div_ = 2;
+ break;
+ }
}
wd.div_ = min(wd.div_,sd->status.inventory[i].amount);
sc->data[SC_FEARBREEZE]->val4 = wd.div_-1;
- }
}
}
diff --git a/src/map/clif.c b/src/map/clif.c
index a47a98891..31c3cc53c 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -11057,7 +11057,7 @@ void clif_parse_Cooking(int fd,struct map_session_data *sd) {
return;
}
if( skill_can_produce_mix(sd,nameid,sd->menuskill_val, amount) )
- skill_produce_mix(sd,0,nameid,0,0,0,amount);
+ skill_produce_mix(sd,(type>1?sd->menuskill_id:0),nameid,0,0,0,amount);
clif_menuskill_clear(sd);
}
diff --git a/src/map/script.c b/src/map/script.c
index a918bc853..4099820f1 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -7414,7 +7414,7 @@ BUILDIN_FUNC(getequipname)
i = pc_checkequip(sd,equip[num]);
if( i < 0 )
{
- script_pushint(st,-1);
+ script_pushconststr(st,"");
return 0;
}
@@ -12911,6 +12911,11 @@ BUILDIN_FUNC(npcwalkto)
y=script_getnum(st,3);
if(nd) {
+ if (!nd->status.hp) {
+ status_calc_npc(nd, true);
+ } else {
+ status_calc_npc(nd, false);
+ }
unit_walktoxy(&nd->bl,x,y,0);
}
diff --git a/src/map/skill.c b/src/map/skill.c
index 8c21b7eba..8718c3b58 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -988,7 +988,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, uint
break;
case AM_ACIDTERROR:
- sc_start(bl,SC_BLEEDING,(skill_lv*3),skill_lv,skill_get_time2(skill_id,skill_lv));
+ sc_start2(bl,SC_BLEEDING,(skill_lv*3),skill_lv,src->id,skill_get_time2(skill_id,skill_lv));
if (skill_break_equip(bl, EQP_ARMOR, 100*skill_get_time(skill_id,skill_lv), BCT_ENEMY))
clif_emotion(bl,E_OMG);
break;
@@ -1060,7 +1060,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, uint
sc_start(bl,status_skill2sc(skill_id),70,skill_lv,skill_get_time2(skill_id,skill_lv));
break;
case NPC_BLEEDING:
- sc_start(bl,SC_BLEEDING,(20*skill_lv),skill_lv,skill_get_time2(skill_id,skill_lv));
+ sc_start2(bl,SC_BLEEDING,(20*skill_lv),skill_lv,src->id,skill_get_time2(skill_id,skill_lv));
break;
case NPC_MENTALBREAKER:
{ //Based on observations by Tharis, Mental Breaker should do SP damage
@@ -1106,13 +1106,13 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, uint
case LK_HEADCRUSH: //Headcrush has chance of causing Bleeding status, except on demon and undead element
if (!(battle_check_undead(tstatus->race, tstatus->def_ele) || tstatus->race == RC_DEMON))
- sc_start(bl, SC_BLEEDING,50, skill_lv, skill_get_time2(skill_id,skill_lv));
+ sc_start2(bl, SC_BLEEDING,50, skill_lv, src->id, skill_get_time2(skill_id,skill_lv));
break;
case LK_JOINTBEAT:
status = status_skill2sc(skill_id);
if (tsc->jb_flag) {
- sc_start2(bl,status,(5*skill_lv+5),skill_lv,tsc->jb_flag&BREAK_FLAGS,skill_get_time2(skill_id,skill_lv));
+ sc_start4(bl,status,(5*skill_lv+5),skill_lv,tsc->jb_flag&BREAK_FLAGS,src->id,0,skill_get_time2(skill_id,skill_lv));
tsc->jb_flag = 0;
}
break;
@@ -1126,7 +1126,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, uint
sc_start(bl,SC_STUN,(5+skill_lv*5),skill_lv,skill_get_time2(skill_id,2));
break;
default:
- sc_start(bl,SC_BLEEDING,(5+skill_lv*5),skill_lv,skill_get_time2(skill_id,3));
+ sc_start2(bl,SC_BLEEDING,(5+skill_lv*5),skill_lv,src->id,skill_get_time2(skill_id,3));
}
break;
@@ -1167,7 +1167,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, uint
status_change_start(bl,SC_COMA,10,skill_lv,0,src->id,0,0,0);
break;
case GS_PIERCINGSHOT:
- sc_start(bl,SC_BLEEDING,(skill_lv*3),skill_lv,skill_get_time2(skill_id,skill_lv));
+ sc_start2(bl,SC_BLEEDING,(skill_lv*3),skill_lv,src->id,skill_get_time2(skill_id,skill_lv));
break;
case NJ_HYOUSYOURAKU:
sc_start(bl,SC_FREEZE,(10+10*skill_lv),skill_lv,skill_get_time2(skill_id,skill_lv));
@@ -1271,7 +1271,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, uint
rate = 30 + (((5 * (sd?pc_checkskill(sd,LG_PINPOINTATTACK):skill_lv)) + (sstatus->agi + status_get_lv(src))) / 10);
switch( skill_lv ) {
case 1:
- sc_start(bl,SC_BLEEDING,rate,skill_lv,skill_get_time(skill_id,skill_lv));
+ sc_start2(bl,SC_BLEEDING,rate,skill_lv,src->id,skill_get_time(skill_id,skill_lv));
break;
case 2:
if( dstsd && dstsd->spiritball && rnd()%100 < rate )
@@ -1351,7 +1351,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, uint
}
break;
case SO_EARTHGRAVE:
- sc_start(bl, SC_BLEEDING, 5 * skill_lv, skill_lv, skill_get_time2(skill_id, skill_lv)); // Need official rate. [LimitLine]
+ sc_start2(bl, SC_BLEEDING, 5 * skill_lv, skill_lv, src->id, skill_get_time2(skill_id, skill_lv)); // Need official rate. [LimitLine]
break;
case SO_DIAMONDDUST:
rate = 5 + 5 * skill_lv;
@@ -1367,7 +1367,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, uint
switch( sd->itemid ) { // Starting SCs here instead of do it in skill_additional_effect to simplify the code.
case 13261:
sc_start(bl, SC_STUN, 100, skill_lv, skill_get_time2(GN_SLINGITEM, skill_lv));
- sc_start(bl, SC_BLEEDING, 100, skill_lv, skill_get_time2(GN_SLINGITEM, skill_lv));
+ sc_start2(bl, SC_BLEEDING, 100, skill_lv, src->id, skill_get_time2(GN_SLINGITEM, skill_lv));
break;
case 13262:
sc_start(bl, SC_MELON_BOMB, 100, skill_lv, skill_get_time(GN_SLINGITEM, skill_lv)); // Reduces ASPD and moviment speed
@@ -1382,10 +1382,10 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, uint
break;
case GN_HELLS_PLANT_ATK:
sc_start(bl, SC_STUN, 5 + 5 * skill_lv, skill_lv, skill_get_time2(skill_id, skill_lv));
- sc_start(bl, SC_BLEEDING, 20 + 10 * skill_lv, skill_lv, skill_get_time2(skill_id, skill_lv));
+ sc_start2(bl, SC_BLEEDING, 20 + 10 * skill_lv, skill_lv, src->id,skill_get_time2(skill_id, skill_lv));
break;
case EL_WIND_SLASH: // Non confirmed rate.
- sc_start(bl, SC_BLEEDING, 25, skill_lv, skill_get_time(skill_id,skill_lv));
+ sc_start2(bl, SC_BLEEDING, 25, skill_lv, src->id, skill_get_time(skill_id,skill_lv));
break;
case EL_STONE_HAMMER:
rate = 10 * skill_lv;
@@ -3239,7 +3239,7 @@ static int skill_timerskill(int tid, unsigned int tick, int id, intptr_t data)
{
i = applyeffects[rnd()%j];
status_change_start(target, i, 10000, skl->skill_lv,
- (i == SC_BURNING ? 1000 : 0),
+ (i == SC_BURNING ? 1000 : (i == SC_BLEEDING ? src->id : 0)),
(i == SC_BURNING ? src->id : 0),
0, skill_get_time(WL_TETRAVORTEX,skl->skill_lv), 0);
}
@@ -4496,11 +4496,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
}
break;
- case WM_LULLABY_DEEPSLEEP:
- if( bl != src && rnd()%100 < 88 + 2 * skill_lv )
- sc_start(bl,status_skill2sc(skill_id),100,skill_lv,skill_get_time(skill_id,skill_lv));
- break;
-
case SO_POISON_BUSTER: {
struct status_change *tsc = status_get_sc(bl);
if( tsc && tsc->data[SC_POISON] ) {
@@ -7393,7 +7388,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
const enum sc_type sc[] = { SC_STUN, SC_SILENCE, SC_CONFUSION, SC_BLEEDING };
int j;
j = i = rnd()%ARRAYLENGTH(sc);
- while ( !sc_start(bl,sc[i],100,skill_lv,skill_get_time2(skill_id,i+1)) ) {
+ while ( !sc_start2(bl,sc[i],100,skill_lv,src->id,skill_get_time2(skill_id,i+1)) ) {
i++;
if ( i == ARRAYLENGTH(sc) )
i = 0;
@@ -7413,7 +7408,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
case NPC_SLOWCAST:
case NPC_WIDEHELLDIGNITY:
if (flag&1)
- sc_start(bl,type,100,skill_lv,skill_get_time2(skill_id,skill_lv));
+ sc_start2(bl,type,100,skill_lv,src->id,skill_get_time2(skill_id,skill_lv));
else {
skill_area_temp[2] = 0; //For SD_PREAMBLE
clif_skill_nodamage(src,bl,skill_id,skill_lv,1);
@@ -8592,12 +8587,25 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
break;
case SO_ARRULLO:
- if( flag&1 )
- sc_start2(bl, type, 88 + 2 * skill_lv, skill_lv, 1, skill_get_time(skill_id, skill_lv));
- else {
- clif_skill_nodamage(src, bl, skill_id, 0, 1);
+ {
+ // [(15 + 5 * Skill Level) + ( Caster’s INT / 5 ) + ( Caster’s Job Level / 5 ) - ( Target’s INT / 6 ) - ( Target’s LUK / 10 )] %
+ int rate = (15 + 5 * skill_lv) + status_get_int(src)/5 + (sd)?sd->status.job_level:0;
+ rate -= status_get_int(bl)/6 - status_get_luk(bl)/10;
+ clif_skill_nodamage(src, bl, skill_id, skill_lv, 1);
+ sc_start2(bl, type, rate, skill_lv, 1, skill_get_time(skill_id, skill_lv));
+ }
+ break;
+
+ case WM_LULLABY_DEEPSLEEP:
+ if( flag&1 ){
+ //[(Skill Level x 4) + (Voice Lessons Skill Level x 2) + (Caster’s Base Level / 15) + (Caster’s Job Level / 5)] %
+ int rate = (4 * skill_lv) + ( (sd) ? pc_checkskill(sd,WM_LESSON)*2 + sd->status.job_level/5 : 0 ) + status_get_lv(src) / 15;
+ if( bl != src )
+ sc_start(bl,type,rate,skill_lv,skill_get_time(skill_id,skill_lv));
+ }else {
+ clif_skill_nodamage(src, bl, skill_id, skill_lv, 1);
map_foreachinrange(skill_area_sub, bl, skill_get_splash(skill_id, skill_lv), BL_CHAR,
- src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill_castend_nodamage_id);
+ src, skill_id, skill_lv, tick, flag|BCT_ALL|1, skill_castend_nodamage_id);
}
break;
@@ -9821,6 +9829,8 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
(skill_lv >= 4) ? sd->status.memo_point[2].map : 0
);
}
+ if( sc && sc->data[SC_CURSEDCIRCLE_ATKER] ) //Should only remove after the skill has been casted.
+ status_change_end(src,SC_CURSEDCIRCLE_ATKER,INVALID_TIMER);
return 0; // not to consume item.
case MO_BODYRELOCATION:
@@ -10008,10 +10018,15 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
case NC_COLDSLOWER:
case NC_ARMSCANNON:
case RK_DRAGONBREATH:
- case WM_LULLABY_DEEPSLEEP:
i = skill_get_splash(skill_id,skill_lv);
map_foreachinarea(skill_area_sub,src->m,x-i,y-i,x+i,y+i,splash_target(src),
- src,skill_id,skill_lv,tick,flag|(skill_id==WM_LULLABY_DEEPSLEEP?BCT_ALL:BCT_ENEMY)|1,skill_castend_damage_id);
+ src,skill_id,skill_lv,tick,flag|BCT_ENEMY|1,skill_castend_damage_id);
+ break;
+
+ case SO_ARRULLO:
+ i = skill_get_splash(skill_id,skill_lv);
+ map_foreachinarea(skill_area_sub,src->m,x-i,y-i,x+i,y+i,splash_target(src),
+ src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill_castend_nodamage_id);
break;
/**
* Guilotine Cross
diff --git a/src/map/status.c b/src/map/status.c
index 649cfa1ae..8a173f611 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2995,6 +2995,10 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
sd->subele[ELE_NEUTRAL] += skill;
sd->subele[ELE_FIRE] += skill*4;
}
+ if((skill=pc_checkskill(sd,NC_RESEARCHFE))>0) {
+ sd->subele[ELE_EARTH] += skill*10;
+ sd->subele[ELE_FIRE] += skill*10;
+ }
if((skill=pc_checkskill(sd,SA_DRAGONOLOGY))>0 ){
skill = skill*4;
sd->right_weapon.addrace[RC_DRAGON]+=skill;
@@ -3246,7 +3250,7 @@ int status_calc_npc_(struct npc_data *nd, bool first) {
status->race = RC_DEMIHUMAN;
status->size = nd->size;
status->rhw.range = 1 + status->size;
- status->mode = MD_CANMOVE|MD_CANATTACK;
+ status->mode = (MD_CANMOVE|MD_CANATTACK);
status->speed = nd->speed;
}
@@ -3700,7 +3704,7 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag)
else
status->def2 = status_calc_def2(bl, sc, b_status->def2
#ifdef RENEWAL
- + (int)( ((float)status->vit/2 + (float)b_status->vit/2) + ((float)status->agi/5 + (float)b_status->agi/5) )
+ + (int)( ((float)status->vit/2 - (float)b_status->vit/2) + ((float)status->agi/5 - (float)b_status->agi/5) )
#else
+ (status->vit - b_status->vit)
#endif
@@ -3725,7 +3729,7 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag)
else
status->mdef2 = status_calc_mdef2(bl, sc, b_status->mdef2 +(status->int_ - b_status->int_)
#ifdef RENEWAL
- + (int)( ((float)status->dex/5 - (float)b_status->dex/5) + ((float)status->vit/5 + (float)b_status->vit/5) )
+ + (int)( ((float)status->dex/5 - (float)b_status->dex/5) + ((float)status->vit/5 - (float)b_status->vit/5) )
#else
+ ((status->vit - b_status->vit)>>1)
#endif
@@ -4978,8 +4982,6 @@ static signed short status_calc_def2(struct block_list *bl, struct status_change
def2 -= def2 * ( 14 * sc->data[SC_ANALYZE]->val1 ) / 100;
if( sc->data[SC_ECHOSONG] )
def2 += def2 * sc->data[SC_ECHOSONG]->val2/100;
- if( sc->data[SC_GT_REVITALIZE] && sc->data[SC_GT_REVITALIZE]->val4)
- def2 += def2 * sc->data[SC_GT_REVITALIZE]->val4 / 100;
if(sc->data[SC_ASH] && (bl->type==BL_MOB)){
if(status_get_race(bl)==RC_PLANT)
def2 /= 2;
@@ -5791,7 +5793,7 @@ struct status_data *status_get_status_data(struct block_list *bl)
case BL_HOM: return &((TBL_HOM*)bl)->battle_status;
case BL_MER: return &((TBL_MER*)bl)->battle_status;
case BL_ELEM: return &((TBL_ELEM*)bl)->battle_status;
- case BL_NPC: return ((mobdb_checkid(((TBL_NPC*)bl)->class_) == 0) ? &((TBL_NPC*)bl)->status : &dummy_status);
+ case BL_NPC: return ((mobdb_checkid(((TBL_NPC*)bl)->class_) == 0) ? &((TBL_NPC*)bl)->status : &dummy_status);
default:
return &dummy_status;
}
@@ -5807,7 +5809,7 @@ struct status_data *status_get_base_status(struct block_list *bl)
case BL_HOM: return &((TBL_HOM*)bl)->base_status;
case BL_MER: return &((TBL_MER*)bl)->base_status;
case BL_ELEM: return &((TBL_ELEM*)bl)->base_status;
- case BL_NPC: return ((mobdb_checkid(((TBL_NPC*)bl)->class_) == 0) ? &((TBL_NPC*)bl)->status : NULL);
+ case BL_NPC: return ((mobdb_checkid(((TBL_NPC*)bl)->class_) == 0) ? &((TBL_NPC*)bl)->status : NULL);
default:
return NULL;
}
@@ -5825,8 +5827,8 @@ defType status_get_def(struct block_list *bl) {
unsigned short status_get_speed(struct block_list *bl)
{
- if(bl->type==BL_NPC)//Only BL with speed data but no status_data [Skotlex]
- return ((struct npc_data *)bl)->speed;
+ if(bl->type==BL_NPC)//Only BL with speed data but no status_data [Skotlex]
+ return ((struct npc_data *)bl)->speed;
return status_get_status_data(bl)->speed;
}
@@ -7587,7 +7589,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_JOINTBEAT:
if( val2&BREAK_NECK )
- sc_start(bl,SC_BLEEDING,100,val1,skill_get_time2(status_sc2skill(type),val1));
+ sc_start2(bl,SC_BLEEDING,100,val1,val3,skill_get_time2(status_sc2skill(type),val1));
break;
case SC_BERSERK:
@@ -9948,8 +9950,9 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data)
case SC_BLEEDING:
if (--(sce->val4) >= 0) {
int hp = rnd()%600 + 200;
+ struct block_list* src = map_id2bl(sce->val2);
map_freeblock_lock();
- status_fix_damage(NULL, bl, sd||hp<status->hp?hp:status->hp-1, 1);
+ status_fix_damage(src, bl, sd||hp<status->hp?hp:status->hp-1, 1);
if( sc->data[type] ) {
if( status->hp == 1 ) {
map_freeblock_unlock();