Issue information

Issue ID
#6040
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Jun 16, 2012 16:26
Last Post
Hercules Elf Bot
Jul 2, 2012 18:09
Confirmation
Yes (1)
No (0)

Hercules Elf Bot - Jun 16, 2012 16:26

Originally posted by [b]Yum[/b]
12213,Neuralizer,Neuralizer,2,2,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_CashReset"; },{},{}

It works! But if I'm with Peco Peco or something, does not reset the skills and the item is still consumed. It should not consume the item.

Hercules Elf Bot - Jun 16, 2012 19:35

Originally posted by [b]Kenpachi[/b]
The item return has to be handled inside the function.
-> Moving to Scripts section.

This post has been edited by Kenpachi on Jun 16, 2012 19:35

Hercules Elf Bot - Jun 19, 2012 19:16

Originally posted by [b]Euphy[/b]
The item is always consumed - it should not be when it fails. From what I've tried, it can't be corrected with a script, so someone needs to code a source check (I think).
In pc.c:

[CODE]
case 12213: //Neuralizer
if( !map[sd->bl.m].flag.reset )
return 0;
break;[/CODE]

This post has been edited by Euphy on Jun 19, 2012 19:20

Hercules Elf Bot - Jun 20, 2012 2:32

Originally posted by [b]MarkZD[/b]
I edited post, but you had already seem, yep, it should have to be coded in src but if I'm not wrong, it's the official way.

I'll check.

This post has been edited by MarkZD on Jun 20, 2012 2:39

Hercules Elf Bot - Jun 20, 2012 2:35

Originally posted by [b]Euphy[/b]
@MarkZD: No, the function will consume the item no matter what's coded in the function. The only way to resolve the issue there is by adding a "getitem" at the end, which is just messy - and there's a hardcoded check, anyway.

I'm a little confused as to why the item is used even if I end the function with "end;", because when I tried it with a custom item, the item [i]wasn't[/i] consumed. Does it have to do with the source code?

This post has been edited by Euphy on Jun 20, 2012 2:37

Hercules Elf Bot - Jun 20, 2012 2:42

Originally posted by [b]MarkZD[/b]
I confirmed, it's official to consume item even if it fails.
-------------------------------------------------------------------

Edit: It should consume, see below.

This post has been edited by MarkZD on Jun 20, 2012 4:28

Hercules Elf Bot - Jun 20, 2012 2:46

Originally posted by [b]Euphy[/b]
[quote name='MarkZD' timestamp='1340160143' post='10936']
I confirmed, it's official to consume item even if it fails.
[/quote]
Where did you get that information? The [url="http://richkidherbert.blogspot.com/2010/11/skill-reset-with-neuralizer.html"]only source[/url] I found was secondhand from pRO, and states:
[quote]If you attempt to use the Neuralizer with weight, nothing will happen. The Neuralizer will not be used up either.[/quote]

Hercules Elf Bot - Jun 20, 2012 2:51

Originally posted by [b]MarkZD[/b]
Oh sorry, I misread it.

bRO data:
[CODE]
Atenção: para usar o Neuralizador você deve seguir as mesmas exigências do NPC de Reset Skill.
Guarde todos os seus itens, equipamentos e flechas em seu armazém, remova seu PecoPeco, GrandPeco, Carrinho ou Falcão e só então clique duas vezes no Neuralizador. Do contrário, mesmo que você tente usá-lo, ele não será gasto, mas nada acontecerá!
[/CODE]

It really shoudn't be consumed.

This post has been edited by MarkZD on Jun 20, 2012 2:52

Hercules Elf Bot - Jun 20, 2012 2:52

Originally posted by [b]Euphy[/b]
Neuralizer is a cash item, though. Afaik those aren't auto-consumed upon failure (heck, there's even a source-coded feature preventing item consumption).

Hercules Elf Bot - Jun 20, 2012 2:54

Originally posted by [b]MarkZD[/b]
[quote name='Euphy' timestamp='1340160744' post='10939']
Neuralizer is a cash item, though. Afaik those aren't auto-consumed upon failure (heck, there's even a source-coded feature preventing item consumption).
[/quote]

You're right, I corrected my post.

Hercules Elf Bot - Jun 20, 2012 3:22

Originally posted by [b]GM Takumirai[/b]
i have this problem months ago
and i plan to edit the script

[quote]12213,Neuralizer,Neuralizer,2,2,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ if(Weight <= 0){ callfunc "F_CashReset"; }else{dispbottom "Your weight must be [0%]!"; getitem 12213,1;} },{},{}[/quote]

- it only check weight , not the riding

Hercules Elf Bot - Jun 20, 2012 3:31

Originally posted by [b]Euphy[/b]
@GM Takumirai: Yeah, a "getitem" can easily be added into the function as well. It's just not the best way to do it. c:

Hercules Elf Bot - Jun 20, 2012 5:12

Originally posted by [b]MarkZD[/b]
[quote name='Euphy' timestamp='1340159758' post='10934']
I'm a little confused as to why the item is used even if I end the function with "end;", because when I tried it with a custom item, the item [i]wasn't[/i] consumed. Does it have to do with the source code?
[/quote]

I created itemid 21100 with just end; and it was normally consumed.

From what I read only items cretaed by rentitem are supposed to not be deleted if they're usable and are used.

Maybe devs could create a new option to check if it should be deleted or not, so the script self will delete it(delitem) or just hard code it, but last option isn't so good.

Hercules Elf Bot - Jun 20, 2012 16:46

Originally posted by [b]Aleos[/b]
You could also make it an item type 11 and force the item to be consumed/deleted in the function when it successfully runs. It won't be consumed if it fails.

This post has been edited by Aleos on Jun 20, 2012 16:46

Hercules Elf Bot - Jul 1, 2012 15:42

Originally posted by [b]Masao[/b]
Gonna bump this up!

Hercules Elf Bot - Jul 2, 2012 18:09

Originally posted by [b]Euphy[/b]
Fixed according to Aleos' suggestion in [rev=16367].