Hercules Elf Bot - Jul 3, 2012 0:20
Originally posted by [b]Daegaladh[/b]
To make it work as it does on iRO:
(A little ugly code, but functional, sorry :S, this part of the Es- skills code is a little mess XD)
[CODE]
Index: skill.c
===================================================================
--- skill.c (revision 16366)
+++ skill.c (working copy)
@@ -6987,10 +6987,6 @@
break;
case SL_SWOO:
- if (tsce) {
- sc_start(src,SC_STUN,100,skilllv,10000);
- break;
- }
case SL_SKA: // [marquis007]
case SL_SKE:
if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB) {
@@ -6998,6 +6994,12 @@
status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
break;
}
+ if (skillid == SL_SWOO && tsce) {
+ clif_skill_fail(sd,skillid,0,0);
+ status_change_start(src,SC_STUN,10000,skilllv,0,0,0,10000,10);
+ status_change_end(bl, SC_SWOO, -1);
+ break;
+ }
clif_skill_nodamage(src,bl,skillid,skilllv,sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
if (skillid == SL_SKE)
sc_start(src,SC_SMA,100,skilllv,skill_get_time(SL_SMA,skilllv));[/CODE]
This post has been edited by
Daegaladh
on Jul 3, 2012 1:01
Hercules Elf Bot - Jul 3, 2012 0:41
Originally posted by [b]Mysterious[/b]
How is it supposed to work on iRO?
Hercules Elf Bot - Jul 3, 2012 0:55
Originally posted by [b]Daegaladh[/b]
If you use the skill on a mob already shrunken, it fails (shows a fail message), you got stunned for 10 seconds, and Eswoo status is canceled.
This post has been edited by
Daegaladh
on Jul 3, 2012 12:54
Hercules Elf Bot - Jul 3, 2012 6:55
Originally posted by [b]MarkZD[/b]
I believe it's equivalent to your change.
[CODE]
case SL_SWOO:
if (tsce) {
+if (sd)
+ clif_skill_fail(sd,skillid,0,0);
sc_start(src,SC_STUN,100,skilllv,10000);
+ status_change_end(bl, SC_SWOO, -1);
-break;
}
+break;
[/CODE]
This post has been edited by
MarkZD
on Jul 3, 2012 12:41
Hercules Elf Bot - Jul 3, 2012 11:59
Originally posted by [b]Daegaladh[/b]
It should be
[CODE]status_change_start(src,SC_STUN,10000,skilllv,0,0,0,10000,10);[/CODE]
instead of the sc_start
And it should check if target is a mob first.
Btw, I tested on lastest svn and when I try to use Eswoo, Eska or Eske on a player, it does nothing. It's supposed they have to stun me :S
Hercules Elf Bot - Jul 3, 2012 12:27
Originally posted by [b]MarkZD[/b]
Understood, so it'd be like
[CODE]
case SL_SWOO:
-if (tsce) {
+if (tsce && !battle_config.allow_es_magic_pc && bl->type != BL_MOB) {
+if(sd)
+ clif_skill_fail(sd,skillid,0,0);
sc_start(src,SC_STUN,100,skilllv,10000);
+ status_change_end(bl, SC_SWOO, -1);
-break;
}
+break;
[/CODE]
This post has been edited by
MarkZD
on Jul 3, 2012 12:49
Hercules Elf Bot - Jul 3, 2012 12:44
Originally posted by [b]Daegaladh[/b]
No, no, the mob check should be the same as Eska and Eske (Stun for 0.5s)
As I posted on the first post, this is the correct order:
1-Check for target, if there's no target or target isn't a mob, you got stunned for 0.5s
2-If the mob is already shrunken, you got stunned for 10s and effect on the mob is canceled
[CODE] case SL_SWOO:
case SL_SKA: // [marquis007]
case SL_SKE:
if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB) {
status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
break;
}
if (skillid == SL_SWOO && tsce) {
clif_skill_fail(sd,skillid,0,0);
status_change_start(src,SC_STUN,10000,skilllv,0,0,0,10000,10);
status_change_end(bl, SC_SWOO, -1);
break;
}[/CODE]
Anyway I think the whole code of the Es- skills could be improved a little...
This post has been edited by
Daegaladh
on Jul 3, 2012 12:54
Hercules Elf Bot - Jul 3, 2012 12:45
Originally posted by [b]MarkZD[/b]
I also updated the break, otherwise the if inside SL_SKE would execute and overwrite the first change.
In this case I think sc_start can be used in both conditions instead of status_change_start.
This post has been edited by
MarkZD
on Jul 3, 2012 12:46
Hercules Elf Bot - Jul 3, 2012 12:51
Originally posted by [b]MarkZD[/b]
[quote name='Daegaladh' timestamp='1341319488' post='11534']
No, no, the mob check should be the same as Eska and Eske (Stun for 0.5s)
[/quote]
It's because I didn't see this info on iRO, so I just put the shrunken check. ;D
But if you tested it on original, so you're right.
This post has been edited by
MarkZD
on Jul 3, 2012 12:53
Hercules Elf Bot - Jul 3, 2012 12:59
Originally posted by [b]Daegaladh[/b]
Try to use it on a player on iRO XD
Also from lastest lua files:
[quote] "Effect:^777777 Makes the monster small, greatly reducing their walking speed, but the size attribute is not affected. If this is used on a Boss monster, this skill only lasts 1/5 of normal time.", "[color=#ff0000][b]If you use Eswoo on a monster that is already under this effect, it will cause you to be stunned for 10 seconds (reduced by VIT)[/b][/color].", "\"Es\" type magic can only be used on monsters. [b][color=#ff0000]If it is used on a player character, nothing happens and the caster will be stunned for 0.5 sec (not reduced by VIT)[/color][/b]. ^000000",[/quote]
Edit: Hum, when you use on a monster the stun time can be reduced by VIT, so the flag should be 8 instead of 10, my fault.
Then the code should be:
[CODE] case SL_SWOO:
case SL_SKA: // [marquis007]
case SL_SKE:
if (sd && !battle_config.allow_es_magic_pc && bl->type != BL_MOB) {
status_change_start(src,SC_STUN,10000,skilllv,0,0,0,500,10);
break;
}
if (skillid == SL_SWOO && tsce) {
clif_skill_fail(sd,skillid,0,0);
status_change_start(src,SC_STUN,10000,skilllv,0,0,0,10000,8);
status_change_end(bl, SC_SWOO, -1);
break;
}[/CODE]
This post has been edited by
Daegaladh
on Jul 3, 2012 13:00
Hercules Elf Bot - Jul 3, 2012 13:08
Originally posted by [b]MarkZD[/b]
If player could get shrunked it'd never get into second if condition.
Also, there should be a sd check before sending the clif_skill_fail as it could be a mob casting, and the first sd should be removed(I think).
This post has been edited by
MarkZD
on Jul 3, 2012 13:25
Hercules Elf Bot - Jul 3, 2012 13:20
Originally posted by [b]Daegaladh[/b]
Hum, yeah, I was thinking on official servers, where you cannot shrink a player... but here we have the battle_config.allow_es_magic_pc option, so you're right.
This post has been edited by
Daegaladh
on Jul 3, 2012 13:20
Hercules Elf Bot - Jul 3, 2012 13:24
Originally posted by [b]MarkZD[/b]
[quote name='MarkZD' timestamp='1341320895' post='11538']
Also, there should be a sd check before sending the clif_skill_fail as it could be a mob casting, and the first sd should be removed(I think).
[/quote]
Apparently it's not needed, well, it's already solved how it's supposed to work, just wait devs implementing.
Hercules Elf Bot - Dec 7, 2012 16:44
Originally posted by [b]MarkZD[/b]
Fixed at: [url="http://trac.rathena.org/changeset/17008/rathena"]17008[/url]