summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-20 19:24:19 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-20 19:24:19 +0000
commit74d35a9d33bcdba381e9e78af1bdf59d106f1493 (patch)
treee13f8de8d5fd98a43250490399672098fd0cd25c
parent66938035a86ed1faf8eb7cc1b352f8f96df6acfd (diff)
downloadhercules-74d35a9d33bcdba381e9e78af1bdf59d106f1493.tar.gz
hercules-74d35a9d33bcdba381e9e78af1bdf59d106f1493.tar.bz2
hercules-74d35a9d33bcdba381e9e78af1bdf59d106f1493.tar.xz
hercules-74d35a9d33bcdba381e9e78af1bdf59d106f1493.zip
- Fixes on schg_cas02 and arug_cas01.txt
- Official Meteor Storm. Meteors can fail and just not fall, and only fall where you can get a shootable path. * Tested on Aegis with help of ultramage. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13096 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--npc/guild2/arug_cas01.txt77
-rw-r--r--npc/guild2/schg_cas02.txt9
-rw-r--r--src/map/skill.c43
3 files changed, 70 insertions, 59 deletions
diff --git a/npc/guild2/arug_cas01.txt b/npc/guild2/arug_cas01.txt
index c13a88d54..5fa19ff70 100644
--- a/npc/guild2/arug_cas01.txt
+++ b/npc/guild2/arug_cas01.txt
@@ -403,63 +403,63 @@ OnInit:
arug_cas01,1,1,0 script #aru01_gard01 -1,{
OnEnable:
set .@defence,GetCastleData("arug_cas01",3);
- guardian "arug_cas01",233,83,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //0;
+ guardian "arug_cas01",233,83,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //0;
if ((.@defence > 10) && (.@defence < 31)) {
set .MyMobCount,2;
- guardian "arug_cas01",252,81,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //1;
+ guardian "arug_cas01",252,81,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //1;
}
else if ((.@defence > 30) && (.@defence < 51)) {
set .MyMobCount,3;
- guardian "arug_cas01",252,81,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //1;
- guardian "arug_cas01",232,108,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //2;
+ guardian "arug_cas01",252,81,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //1;
+ guardian "arug_cas01",232,108,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //2;
}
else if ((.@defence > 50) && (.@defence < 71)) {
set .MyMobCount,4;
- guardian "arug_cas01",252,81,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //1;
- guardian "arug_cas01",232,108,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //2;
- guardian "arug_cas01",201,130,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //3;
+ guardian "arug_cas01",252,81,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //1;
+ guardian "arug_cas01",232,108,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //2;
+ guardian "arug_cas01",201,130,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //3;
}
else if (.@defence > 70) {
set .MyMobCount,5;
- guardian "arug_cas01",252,81,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //1;
- guardian "arug_cas01",232,108,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //2;
- guardian "arug_cas01",201,130,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //3;
- guardian "arug_cas01",224,168,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //4;
+ guardian "arug_cas01",252,81,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //1;
+ guardian "arug_cas01",232,108,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //2;
+ guardian "arug_cas01",201,130,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //3;
+ guardian "arug_cas01",224,168,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //4;
}
else {
set .MyMobCount,2;
- guardian "arug_cas01",195,250,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //1;
+ guardian "arug_cas01",195,250,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //1;
}
initnpctimer;
end;
OnTimer300000:
set .MyMobCount,.MyMobCount+1;
- guardian "arug_cas01",196,137,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //5;
+ guardian "arug_cas01",196,137,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //5;
mapannounce "arug_cas01","The 1st Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
end;
OnTimer900000:
set .MyMobCount,.MyMobCount+1;
- guardian "arug_cas01",269,89,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //6;
+ guardian "arug_cas01",269,89,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //6;
mapannounce "arug_cas01","The 2nd Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
end;
OnTimer1800000:
set .MyMobCount,.MyMobCount+1;
- guardian "arug_cas01",252,81,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //7;
+ guardian "arug_cas01",252,81,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //7;
mapannounce "arug_cas01","The 3rd Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
end;
OnTimer2700000:
set .MyMobCount,.MyMobCount+1;
- guardian "arug_cas01",201,130,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //8;
+ guardian "arug_cas01",201,130,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //8;
mapannounce "arug_cas01","The 4th Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
end;
OnTimer3600000:
set .MyMobCount,.MyMobCount+1;
- guardian "arug_cas01",224,168,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //9;
+ guardian "arug_cas01",224,168,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //9;
mapannounce "arug_cas01","The 5th Guardian has been summoned from the Gate House.",bc_map,"0xff4500";
stopnpctimer;
end;
@@ -468,7 +468,7 @@ OnGuardianDied:
set .MyMobCount,.MyMobCount-1;
if (.MyMobCount < 2) {
set .MyMobCount,.MyMobCount+1;
- guardian "arug_cas01",222,129,"Guardian",1899,"#aru01_gard01::OnGuardianDied"; //10;
+ guardian "arug_cas01",222,129,"Guardian Soldier",1899,"#aru01_gard01::OnGuardianDied"; //10;
}
end;
@@ -481,59 +481,59 @@ Onreset:
arug_cas01,1,2,0 script #aru01_gard02 -1,{
OnEnable:
set .@defence,GetCastleData("arug_cas01",3);
- guardian "arug_cas01",294,210,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //11;
+ guardian "arug_cas01",294,210,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //11;
if ((.@defence > 10) && (.@defence < 31)) {
set .MyMobCount,2;
- guardian "arug_cas01",256,203,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //12;
+ guardian "arug_cas01",256,203,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //12;
}
else if ((.@defence > 30) && (.@defence < 51)) {
set .MyMobCount,3;
- guardian "arug_cas01",256,203,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //12;
- guardian "arug_cas01",240,133,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //13;
+ guardian "arug_cas01",256,203,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //12;
+ guardian "arug_cas01",240,133,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //13;
}
else if ((.@defence > 50) && (.@defence < 71)) {
set .MyMobCount,4;
- guardian "arug_cas01",256,203,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //12;
- guardian "arug_cas01",240,133,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //13;
- guardian "arug_cas01",246,92,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //14;
+ guardian "arug_cas01",256,203,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //12;
+ guardian "arug_cas01",240,133,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //13;
+ guardian "arug_cas01",246,92,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //14;
}
else if (.@defence > 70) {
set .MyMobCount,5;
- guardian "arug_cas01",256,203,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //12;
- guardian "arug_cas01",240,133,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //13;
- guardian "arug_cas01",246,92,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //14;
- guardian "arug_cas01",235,132,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //15;
+ guardian "arug_cas01",256,203,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //12;
+ guardian "arug_cas01",240,133,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //13;
+ guardian "arug_cas01",246,92,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //14;
+ guardian "arug_cas01",235,132,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //15;
}
else {
set .MyMobCount,2;
- guardian "arug_cas01",292,188,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //12;
+ guardian "arug_cas01",292,188,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //12;
}
initnpctimer;
end;
OnTimer600000:
set .MyMobCount,.MyMobCount+1;
- guardian "arug_cas01",235,132,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //16;
+ guardian "arug_cas01",235,132,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //16;
end;
OnTimer1200000:
set .MyMobCount,.MyMobCount+1;
- guardian "arug_cas01",246,92,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //17;
+ guardian "arug_cas01",246,92,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //17;
end;
OnTimer2100000:
set .MyMobCount,.MyMobCount+1;
- guardian "arug_cas01",240,133,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //18;
+ guardian "arug_cas01",240,133,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //18;
end;
OnTimer3000000:
set .MyMobCount,.MyMobCount+1;
- guardian "arug_cas01",256,203,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //19;
+ guardian "arug_cas01",256,203,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //19;
end;
OnTimer3900000:
set .MyMobCount,.MyMobCount+1;
- guardian "arug_cas01",254,95,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //20;
+ guardian "arug_cas01",254,95,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //20;
stopnpctimer;
end;
@@ -541,7 +541,7 @@ OnGuardianDied:
set .MyMobCount,.MyMobCount-1;
if (.MyMobCount < 2) {
set .MyMobCount,.MyMobCount+1;
- guardian "arug_cas01",242,151,"Guardian",1899,"#aru01_gard02::OnGuardianDied"; //21;
+ guardian "arug_cas01",242,151,"Guardian Soldier",1899,"#aru01_gard02::OnGuardianDied"; //21;
}
end;
@@ -584,7 +584,7 @@ OnGuardianStoneDied:
end;
OnTimer300000:
- donpcevent "1st Guardian Stone#aru01::OnGuardian";
+ donpcevent "1st Guardian Stone#aru01::OnEnable";
setarray $agit_ar01[0],2; //Global Variable
stopnpctimer;
end;
@@ -1124,7 +1124,7 @@ arug_cas01,308,189,0 script 2nd Guardian Stone#aru01 844,{
donpcevent "#aru01_RL00::OnEnable";
}
else {
- mapannounce "arug_cas01","The 2nd Guardian Stone was repaired successfully.",bc_map,"0x00ff00";
+ mapannounce "arug_cas01","The 2nd Guardian Stone has been repaired successfully.",bc_map,"0x00ff00";
}
if ($agit_ar01[5] == 1) {
donpcevent "#aru01_gard02::OnEnable";
@@ -1169,7 +1169,6 @@ OnDisable:
end;
}
-// Barrier Summoners
arug_cas01,2,1,0 script #aru01_RL00 -1,{
OnEnable:
setcell "arug_cas01",238,74,245,74,cell_walkable,0;
diff --git a/npc/guild2/schg_cas02.txt b/npc/guild2/schg_cas02.txt
index 395ba25ec..e9ba924d9 100644
--- a/npc/guild2/schg_cas02.txt
+++ b/npc/guild2/schg_cas02.txt
@@ -56,6 +56,7 @@ OnAgitEnd:
if (GetCastleData("schg_cas02",1)) {
KillMonster "schg_cas02","Steward#sch02::OnStartArena";
donpcevent "Manager#sch02_02::Onreset";
+ donpcevent "Steward#sch02::Onstop";
}
end;
@@ -106,7 +107,11 @@ Onchange:
OnClock0001:
if (!GetCastleData("schg_cas02",1)) end;
- killmonster "schg_cas02","Manager#sch02_02::OnMyTreasureDied";
+ killmonster "schg_cas02","Manager#sch02_02::OnTreasureDied";
+
+ setcastledata "schg_cas02",4,0;
+ setcastledata "schg_cas02",5,0;
+
set .@Treasure,GetCastleData("schg_cas02",2)/5+4;
if (.@Treasure) {
monster "schg_cas02",249,378,"Treasure Chest",1939,1,"Manager#sch02_02::OnTreasureDied";
@@ -154,8 +159,6 @@ OnClock0001:
if (.@Treasure < 24) end;
monster "schg_cas02",253,370,"Treasure Chest",1324,1,"Manager#sch02_02::OnTreasureDied";
}
- setcastledata "schg_cas02",4,0;
- setcastledata "schg_cas02",5,0;
end;
OnTreasureDied:
diff --git a/src/map/skill.c b/src/map/skill.c
index 4bec332d6..af47b0a87 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2122,13 +2122,18 @@ static int skill_timerskill(int tid, unsigned int tick, int id, intptr data)
else {
if(src->m != skl->map)
break;
- switch(skl->skill_id) {
+ switch( skl->skill_id )
+ {
case WZ_METEOR:
- if(skl->type >= 0) {
- skill_unitsetting(src,skl->skill_id,skl->skill_lv,skl->type>>16,skl->type&0xFFFF,skl->flag);
- clif_skill_poseffect(src,skl->skill_id,skl->skill_lv,skl->x,skl->y,tick);
+ if( skl->type >= 0 )
+ {
+ int x = skl->type>>16, y = skl->type&0xFFFF;
+ if( path_search_long(NULL, src->m, src->x, src->y, x, y, CELL_CHKWALL) )
+ skill_unitsetting(src,skl->skill_id,skl->skill_lv,x,y,skl->flag);
+ if( path_search_long(NULL, src->m, src->x, src->y, skl->x, skl->y, CELL_CHKWALL) )
+ clif_skill_poseffect(src,skl->skill_id,skl->skill_lv,skl->x,skl->y,tick);
}
- else
+ else if( path_search_long(NULL, src->m, src->x, src->y, skl->x, skl->y, CELL_CHKWALL) )
skill_unitsetting(src,skl->skill_id,skl->skill_lv,skl->x,skl->y,skl->flag);
break;
}
@@ -5756,25 +5761,29 @@ int skill_castend_pos2(struct block_list* src, int x, int y, int skillid, int sk
case WZ_METEOR:
{
- int flag=0, area = skill_get_splash(skillid, skilllv);
+ int flag = 0, area = skill_get_splash(skillid, skilllv);
short tmpx = 0, tmpy = 0, x1 = 0, y1 = 0;
- if (sc && sc->data[SC_MAGICPOWER])
+
+ if( sc && sc->data[SC_MAGICPOWER] )
flag = flag|2; //Store the magic power flag for future use. [Skotlex]
- for(i=0;i<2+(skilllv>>1);i++) {
- tmpx = x;
- tmpy = y;
- if (!map_search_freecell(NULL, src->m, &tmpx, &tmpy, area, area, 1))
- continue;
- if(!(flag&1)){
+
+ for( i = 0; i < 2 + (skilllv>>1); i++ )
+ {
+ // Creates a random Cell in the Splash Area
+ tmpx = x - area + rand()%(area * 2 + 1);
+ tmpy = y - area + rand()%(area * 2 + 1);
+
+ if( i == 0 && path_search_long(NULL, src->m, src->x, src->y, tmpx, tmpy, CELL_CHKWALL) )
clif_skill_poseffect(src,skillid,skilllv,tmpx,tmpy,tick);
- flag=flag|1;
- }
- if(i > 0)
+
+ if( i > 0 )
skill_addtimerskill(src,tick+i*1000,0,tmpx,tmpy,skillid,skilllv,(x1<<16)|y1,flag&2); //Only pass the Magic Power flag
+
x1 = tmpx;
y1 = tmpy;
}
- skill_addtimerskill(src,tick+i*1000,0,tmpx,tmpy,skillid,skilllv,-1,flag&2); //Only pass the Magic Power flag
+
+ skill_addtimerskill(src,tick+i*1000,0,tmpx,tmpy,skillid,skilllv,-1,flag&2);
}
break;