Issue information

Issue ID
#6886
Status
Fixed
Severity
Low
Started
Hercules Elf Bot
Nov 12, 2012 18:08
Last Post
Hercules Elf Bot
Nov 14, 2012 16:24
Confirmation
Yes (1)
No (0)

Hercules Elf Bot - Nov 12, 2012 18:08

Originally posted by [b]Beret[/b]
[color=#000000][font=Arial][size=3]After reviewing 16914 the command @zeny not working as before, when using @zeny -1000 or any other value of error in map-server. [/size][/font][/color][color=#000000][font=Arial][size=3]Also not shown more zeny's messages changed.[/size][/font][/color]

[color=#000000][font=Arial][size=3][img]http://i48.tinypic.com/4l6o00.png[/img][/size][/font][/color]

Hercules Elf Bot - Nov 12, 2012 18:20

Originally posted by [b]kyeme[/b]
I can confirm. And @cash / @points command :)

Hercules Elf Bot - Nov 12, 2012 20:45

Originally posted by [b]MarkZD[/b]
[s]About cash and points, there was no change at it, maybe it was always bugged or it's just with you, kyeme. I'm checking.[/s]


For zeny, it's just to change within pc_getzeny.
[CODE]
if( zeny < 0 )
[/CODE]
[b]To[/b]
[CODE]
if( zeny < 0 && type != LOG_TYPE_COMMAND)
[/CODE]

Or

It's just to add an if else in the zeny command:
[CODE]
if(zeny < 0)
pc_payzeny(sd,-zeny,LOG_TYPE_COMMAND,NULL);
else
pc_getzeny(sd,zeny,LOG_TYPE_COMMAND,NULL);
[/CODE]
But if the second case is chosen, so zeny won't can be negative through atcommand again.


The "error"(warning) from Cash and Points trigger when you're setting a value bigger than what you have to be discounted.

Also, pc_getcash and pc_paycash could be int.

This post has been edited by MarkZD on Nov 13, 2012 2:30

Hercules Elf Bot - Nov 13, 2012 0:30

Originally posted by [b]Lighta[/b]
didn't get the @cash @point issue, otherwise yeah sorry for the @zeny part will be fixed tonight.
fixed in [rev=16923]

This post has been edited by Lighta on Nov 13, 2012 1:04

Hercules Elf Bot - Nov 13, 2012 0:35

Originally posted by [b]MarkZD[/b]
If you have 20 cash or point and you use @cash/points -21, it'll say it removed 21 points, but will show in front it didn't.

Your points still remain as 20 and an error will trigger in console, just a little bug in message as it doesn't check if the value send to pc_paycash in atcommand is not evaluated to check if it's bigger than your currency.

Hercules Elf Bot - Nov 13, 2012 2:17

Originally posted by [b]Beret[/b]
[color=#000000][font=Arial][size=3]Still giving error and not removing lighta.[/size][/font][/color]

Hercules Elf Bot - Nov 13, 2012 2:19

Originally posted by [b]kyeme[/b]
Thanks MarkZD.

Hmm, make a new report for @cash and @points?

Hercules Elf Bot - Nov 13, 2012 2:25

Originally posted by [b]MarkZD[/b]
[quote name='kyeme' timestamp='1352773158' post='15615']
Thanks MarkZD.Hmm, make a new report for @cash and @points?
[/quote]
[s]I'll do[/s]
http://rathena.org/board/tracker/issue-6888-cashpoints-message-problem-mapservererror-zeny-typo/page__gopid__15619#entry15619


[quote name='Beret' timestamp='1352773033' post='15614']
[color=#000000][font=Arial][size=3]Still giving error and not removing lighta.[/size][/font][/color]
[/quote]
It's because it's missing a subtraction operator before zeny in pc_payzeny.

The fix should be:
[CODE]
if(zeny > 0)
pc_getzeny(sd,zeny,LOG_TYPE_COMMAND,NULL);
else
pc_payzeny(sd,-zeny,LOG_TYPE_COMMAND,NULL);
[/CODE]

This post has been edited by MarkZD on Nov 13, 2012 2:50

Hercules Elf Bot - Nov 14, 2012 2:28

Originally posted by [b]Lighta[/b]
refixed [rev=16924]

Hercules Elf Bot - Nov 14, 2012 16:24

Originally posted by [b]Beret[/b]
seems to work fine now lighta, most lack this message zeny's still, but it is just a detail.


[CODE]clif_displaymessage(fd, msg_txt(176));[/CODE]

This post has been edited by Beret on Nov 14, 2012 16:24