HerculesWS / Hercules

Hercules is a collaborative software development project revolving around the creation of a robust massively multiplayer online role playing game (MMORPG) server package. Written in C, the program is very versatile and provides NPCs, warps and modifications. The project is jointly managed by a group of volunteers located around the world as well as a tremendous community providing QA and support. Hercules is a continuation of the original Athena project.
http://herc.ws
GNU General Public License v3.0
900 stars 758 forks source link

Error with items type IT_USABLE #2925

Open haarenas opened 3 years ago

haarenas commented 3 years ago

Describe the bug Sometimes Fly Wings (601) and Butterfly Wings (602) are messed up in their usage: For example, when you try to use a Fly Wing but for some reason/obstruction (we have identified one way to trigger the error, but its not the only one) the item is consumed but you are not random teleported. Then if you use a Butterlfy Wing, but in this case the obstruction is not present, the item is consumed and it will use the effect of a Fly Wing.

To Reproduce Steps to reproduce the behavior:

  1. Make your save point in other city of where you try to replicate this (example: save on izlude, then go to prontera)
  2. Get 2 Fly Wings and 2 Butterfly Wings
  3. Equip the item Adventurer's Trusty Towel (Aegis: Cool_Towel / ID: 2776), this will apply the summer sprite (use an updated client to avoid error of missing sprite)
  4. Use 1 Fly Wing (it will consume, but you wont be random teleported)
  5. Unequip the Adventurer's Trusty Towel (Aegis: Cool_Towel / ID: 2776)
  6. Use 1 Butterfly Wing
  7. You will be random teleported instead of your save point

Additional context I just could add this check on pc_isUseitem (pc.c):

if (sd->sc.data[SC_WEDDING] || sd->sc.data[SC_XMAS] || sd->sc.data[SC_SUMMER] || sd->sc.data[SC_HANBOK] || sd->sc.data[SC_OKTOBERFEST] || sd->sc.data[SC_DRESS_UP])
        return 0;

but just how I said earlier, this is not the only way to trigger. Sadly Im still figuring other ways to trigger this error.

One more thing to add, this kind of behaviour started with this changes https://github.com/HerculesWS/Hercules/pull/2616 when a lot of consumables changed their type from "IT_DELAYCONSUME" to "IT_USABLE", and thus, could be affecting more items ( @Kenpachi2k13 )

tlacson7 commented 3 years ago

Been having this issue where fly wing bwing and others just consume without effect for many2x months already. i cant figure out how to duplicate the issue but many player complain about this.

Using: PRE-RE

pos4da commented 3 years ago

I have same issues for fly and bwing. Most of the users complaining about this issues. Using pre- re

tlacson7 commented 3 years ago

is there any update/fix for this? thanks @Kenpachi2k13

pos4da commented 3 years ago

Is there any update on this. Thank you

pos4da commented 3 years ago

@Kenpachi2k13

Daraen1 commented 3 years ago

I just tested this bug as well, it is present on 2018-04-18b.

either, once item 2776 has been unequip, 3 Butterfly Wings will have to be used to return to the save point. Using that 1 or 2 will teleport us like a fly wing.

Samuel23 commented 3 years ago

Up for this

This bug is strange, i'm not experiencing this in my local test server, i even tried to setup a VMware with debian to test it. As long as the test is done local, i can't reproduce this.

In our live server under a debian vps, this is what happens:

1) use any skill with a long after cast delay 2) during aftercast delay, use fly wing or bwing, item will be consumed, but skill will not be casted 3) when the aftercast delay is over, when you use again fly wing or bwing, it will cast the not casted fly wing or bwing

pos4da commented 3 years ago

up still issues

marcosbucarte commented 3 years ago

I also have problems with a clean hercules that I downloaded to do some tests, the item is being consumed and does not apply the desired effect, the other day it started to work normally, what caused this is unknown yet.

oathkeeper-oathro commented 3 years ago

I'm having the same issue on my server. People are using fly wings and butterfly wings and the item is getting consumed while the item effect is not occuring. Has there been any additional progress made on this? Just a printout of the crash where the user tried to use 3 butterfly wings in a row. I hope it can help us find the problem:

Ragnarok has been crashed!

UTC Time:       30/09/2021 04:18:10
Local Time:     30/09/2021 12:18:10
EXE version:    2020-03-04
Gepard version: 2021090201

OS version: Windows 10

This crash log was generated by command "!crash"

INIT: 22 : 26 : 0

VSYNC: 1

LL/LLD: 155/207

FM: 6125248
TM: 12466712

LID: 44167
PMU: 900740
CMU: 402720

=============================================================================

Loaded GRFs:

[0] oath.grf
[1] data.grf

=============================================================================

Network packet's statistic:

s_bytes: 38 Kbytes
r_bytes: 734 Kbytes

s_packets ->: 2621
r_packets <-: 21632

00# -> f3001a00506577205477616e6720506577203a20216372617368 [375 ms]
01# <- 8600a46194063a8d43c0d48859dcae6f [2078 ms]
02# <- 7f0061dbae6f [2313 ms]
03# -> 6003efff4517 [2610 ms]
04# <- b000070098010000 [4157 ms]
05# <- 8600666194063c0d83b0d9885ad3ae6f [4375 ms]
06# <- 86005e61940638cd4388ce88edd2ae6f [4485 ms]
07# <- fd09720005586194060000000090010000000000000000de0400000000000000000000000073d1ae6f0000000000000000000000000000000000000000000000000000320d332cd38800001c000000ffffffffffffffff0000004368726973746d617320436f6f6b69650000000000000000 [4875 ms]
08# <- 8600a66194063b4db3bcd68814cfae6f [5469 ms]
09# <- 86009f619406394d43a0d188b6ceae6f [5547 ms]
10# <- 80008f61940600 [7375 ms]
11# <- 870038c4ae6f38ce0378de88 [8250 ms]
12# <- 8600a46194063acd83a8d488b4c2ae6f [8657 ms]
13# <- 86005e61940638cd638cd4888dc0ae6f [9188 ms]
14# -> 380403001a00b7841e00 [9297 ms]
15# <- b0001800413a0000 [9297 ms]
16# <- 47011a0004000000030008000000414c5f54454c45504f52540000000000000000000000000000 [9297 ms]
17# <- c80108005a020000b7841e00030001 [9297 ms]
18# -> 39040800b7841e00 [9578 ms]
19# <- fd097200058f6194060000000090010000000000000000e004000000000000000000000000bfbeae6f00000000000000000000000000000000000000000000000000003dcca3d4ce88000023000000ffffffffffffffff000000437275697365720000000000000000000000000000000000 [9657 ms]
20# <- 8600666194063b0db3c0d88838bdae6f [10032 ms]
21# <- b00007008a010000 [10172 ms]
22# <- 80005861940600 [10953 ms]
23# <- 80006761940600 [11141 ms]
24# <- 300aa66194064d797374204361736500000000000000000000000000000048503a20333238382f33323838007c200081a23c4756000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 [11203 ms]
25# -> 6803a6619406 [11485 ms]
26# <- 870073b7ae6f36cdf38ce088 [11532 ms]
27# <- fd09720005a66194060000000090010000000000000000e10400000000000000000000000073b7ae6f00000000000000000000000000000000000000000000000000003c4de3b4db88000026000000ffffffffffffffff0000004d7973742043617365000000000000000000000000000000 [11532 ms]
28# <- 87000db5ae6f360dd374df88 [12125 ms]
29# <- 860058619406324d331cd088e6b4ae6f [12172 ms]
30# <- 300a66619406436f6f6b696500000000000000000000000000000000000048503a20313031302f31303130007c200081a23c4756000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 [12485 ms]

=============================================================================

00# [ OK ] sprite\¾ÆÀÌÅÛ\³ªºñÀdz¯°³.act [19282 ms]
01# [ OK ] sprite\¾ÆÀÌÅÛ\³ªºñÀdz¯°³.spr [19282 ms]
02# [ OK ] texture\À¯ÀúÀÎÅÍÆäÀ̽º\cardbmp\¹Ì½ºÆ®ÄÉÀ̽ºÄ«µå.bmp [38907 ms]
03# [ OK ] texture\À¯ÀúÀÎÅÍÆäÀ̽º\collection\À̸§¾ø´ÂÄ«µå.bmp [40141 ms]
04# [ OK ] texture\À¯ÀúÀÎÅÍÆäÀ̽º\basic_interface\collection_bg.bmp [40141 ms]
05# [ OK ] texture\À¯ÀúÀÎÅÍÆäÀ̽º\sysbox_bg.bmp [40172 ms]
06# [ OK ] sprite\book\Ã¥Àбâ.act [40172 ms]
07# [ OK ] sprite\book\Ã¥Àбâ.spr [40172 ms]
08# [ OK ] texture\À¯ÀúÀÎÅÍÆäÀ̽º\btn_view_b.bmp [40172 ms]
09# [ OK ] texture\À¯ÀúÀÎÅÍÆäÀ̽º\btn_view_a.bmp [40172 ms]
10# [ OK ] texture\À¯ÀúÀÎÅÍÆäÀ̽º\btn_view.bmp [40172 ms]
11# [ OK ] texture\À¯ÀúÀÎÅÍÆäÀ̽º\item\À̸§¾ø´ÂÄ«µå.bmp [42719 ms]
12# [ OK ] texture\effect\new_dropitem\dropitem_red\dropitem_red_bottom\dro_glow_bottom_01.bmp [46907 ms]
13# [ OK ] texture\effect\new_dropitem\dropitem_red\dropitem_red_bottom\dro_glow_bottom_01.tga [46907 ms]
14# [ OK ] texture\effect\new_dropitem\dropitem_red\dropitem_red_bottom\dro_aura_bottom_01.bmp [46907 ms]
15# [ OK ] texture\effect\new_dropitem\dropitem_red\dropitem_red_bottom\dro_glow_sub_bottom_01.tga [46907 ms]
16# [ OK ] texture\effect\new_dropitem\dropitem_red\dropitem_red\dro_star_01.bmp [46907 ms]
17# [ OK ] texture\effect\new_dropitem\dropitem_red\dropitem_red\dro_light_01.bmp [46907 ms]
18# [ OK ] texture\effect\new_dropitem\dropitem_red\dropitem_red\dro_light_01.tga [46907 ms]
19# [ OK ] texture\effect\new_dropitem\dropitem_pink\dropitem_pink_bottom\dro_glow_bottom_01.bmp [46907 ms]
20# [ OK ] texture\effect\new_dropitem\dropitem_pink\dropitem_pink_bottom\dro_glow_bottom_01.tga [46907 ms]
21# [ OK ] texture\effect\new_dropitem\dropitem_pink\dropitem_pink_bottom\dro_aura_bottom_01.bmp [46907 ms]
22# [ OK ] texture\effect\new_dropitem\dropitem_pink\dropitem_pink_bottom\dro_glow_sub_bottom_01.tga [46907 ms]
23# [ OK ] texture\effect\new_dropitem\dropitem_pink\dropitem_pink\dro_star_01.bmp [46922 ms]
24# [ OK ] texture\effect\new_dropitem\dropitem_pink\dropitem_pink\dro_light_01.bmp [46922 ms]
... (131 lines left)
vBrenth commented 2 years ago

Up for this

This bug is strange, i'm not experiencing this in my local test server, i even tried to setup a VMware with debian to test it. As long as the test is done local, i can't reproduce this.

In our live server under a debian vps, this is what happens:

1. use any skill with a long after cast delay

2. during aftercast delay, use fly wing or bwing, item will be consumed, but skill will not be casted

3. when the aftercast delay is over, when you use again fly wing or bwing, it will cast the not casted fly wing or bwing

Up for this!

4144 commented 2 years ago

what about plugins and gepard? Need not disable but use hercules without gepard installed. if use clean hercules issue still exists?

vBrenth commented 2 years ago

I tried it on clean and updated Hercules and the error its still there.

vBrenth commented 2 years ago

Up for this, At first we noticed this on a High rate server but it doesnt matter because of unlimited usage. Now we are working on low-rate this affects the game-play big time.

csnv commented 11 months ago

I am not able to reproduce this second issue, even when using far away VPN/proxies to emulate high ping times. @vBrenth can you share how did you reproduce the error?

MrKrzYch00 commented 6 months ago

I could reproduce the issue on ~40ms ping connection. Using pick stone skill + fly wing at the same time will not initiate the teleport skill while the stone is being picked up but fly wing item will be consumed. Probably the high ping increases the probability for skills overlapping each other and rendering skill type items have no effect when consumed. Reducing connection bandwidth considerably can occasionally require two fly wings to be used to trigger the teleport. This is what I reproduced personally. Other claims are that fly wing works as butterfly wing and vice versa (server caching failed actions and using them in queue but only if another skill item is being used?), and that @refresh command solves that issue.

Please note, I did reproduce it on uaRO server and I'm not sure if they have the latest version but I think it's worth verifying the above. Maybe logic needs some reordering or more checks/packets are required? Maybe some skills have their own specific form of cooldown like animation time or aspd which is not taken into account, with the second known to be impacted by ping?

csnv commented 6 months ago

Using pick stone skill + fly wing at the same time will not initiate the teleport skill while the stone is being picked up

Not being able to use itemskill while casting other skills is regular behavior - or, at least, it's coded that way. IIRC it's the same behavior in aegis or something.

MrKrzYch00 commented 6 months ago

Using pick stone skill + fly wing at the same time will not initiate the teleport skill while the stone is being picked up

Not being able to use itemskill while casting other skills is regular behavior - or, at least, it's coded that way. IIRC it's the same behavior in aegis or something.

I'm sorry, I can't compare it with iRO anymore due to GDPR but I also don't recall ever having issues of the same kind there where my ping was probably 150+. Yet, here, anyone of higher ping has fly wing or butterfly wing fail for them or work incorrectly as the other after failing before, while they are being consumed. A lot of players probably play archer class, spamming DS and trying to panic fly wing and non-stop having it fail to work (while the item consumption kind of promising for teleport to happen in a moment) and player ending up killed by enemies, where lower ping users do not encounter this issue. So are you saying that if someone has very high ping, even on official, they'll have huge issue with using these common teleport skill type items and that issue should be faithfully carried over - skill items being subtracted instantly, yet nothing happening, no skill being used/cast, targeting not shown if there is some racing condition with cooldowns or other skills? I'm just being curious on the final behavior to maybe explain it to others that they should purposely delay the use of said items on their own end or opt-in for infinite fly wing which naturally ignores skills and delays, looking at its script. Are you planning some option for a different, non-official behavior to make the game more enjoyable to high ping users at a certain cost of some skill items ignoring cooldowns/other skills or memorize the action and use it right away when possible?

csnv commented 6 months ago

So are you saying that if someone has very high ping, even on official, they'll have huge issue with using these common teleport skill type items and that issue

Nope, I didn't even mention anything about ping. And I'm not part of the Hercules staff, don't take my word as if it was the project's opinion on the matter.

MrKrzYch00 commented 6 months ago

So are you saying that if someone has very high ping, even on official, they'll have huge issue with using these common teleport skill type items and that issue

Nope, I didn't even mention anything about ping. And I'm not part of the Hercules staff, don't take my word as if it was the project's opinion on the matter.

Understood. I have a bit more information. Today, after using Teleport Lv.2 on a priest the menu popped up correctly but when selecting save point and confirming with ENTER key nothing happened. After using the skill for the second time it worked as expected. This could point that the issue may in fact be somewhere in the logic of teleport skill, possibly its last events. More info: I was using a lot of turn undead skill and rapidly pressing Teleport Lv.1 during cooldown. The Lv.1 teleport would be hard to tell if it worked each time or was occasionally failing as it would require some sort of debugging on the server's side. After the weight turned 50% I decided to use Lv.2 to get back to the save point and this was the time I noticed that setting position to save point did not trigger as expected.

csnv commented 6 months ago

I've personally been able to reproduce the issue of using a fly wing and nothing happening, even if I wasn't casting a skill at the moment. Coincidentally, it only happened when I used a faraway proxy in UARO, so that's definitely an issue.

The sad part is I can't reproduce it in my local environment artificially increasing my latency. Last I spoke with UARO admin he may be able to let me use a proxy for debugging purposes, although I have my suspicions it only happens with Gepard Shield - which I don't have access to :/

That said, I'd also like to confirm if fly wings fail in officials servers when casting a skill.

MrKrzYch00 commented 6 months ago

Casting Lv.2 Teleport and keeping the menu open will allow the player to use up all their fly wings, scrolls and any other skill based item. Would be strange for official to allow that, having in mind that some of said items may come from cash purchases. Shouldn't we somehow ensure that the use of a skill, being those having a direct effect like fly wing, Blessing and Agility Up scrolls, as well as those initiating targeting circle, is possible before the item is subtracted from player's inventory? The biggest issue is that, whether it's a cooldown of a skill or any other blocker, like even the mentioned Gepard Shield possibly causing some interference, it shouldn't let the player waste their items for nothing.

EDIT: On a side note. Now that I think of it... I don't recall fly/butterfly wings having any sort of delay in the past. As far as I remember, they were working independently of any skill mechanics, be it during casting of a skill, animation or cooldown. (1) Is it something new for them to be blocked now by skill usage mechanics (even though the item is being subtracted from inventory per behavior from the past)? (2) Isn't the ability to select Teleport skill level an official thing, to make Teleport Lv.1 also teleport the player instantly, not only without any menu but ignoring anything related to skill usage - working on pair with traditional fly wing (what about Teleport Lv.2 then)?