Issue information

Issue ID
#4230
Status
Fixed
Severity
None
Started
Hercules Elf Bot
May 9, 2010 3:36
Last Post
Hercules Elf Bot
Mar 5, 2012 15:58
Confirmation
N/A

Hercules Elf Bot - May 9, 2010 3:36

Originally posted by [b]TheKaras[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4230

The posible bug consists in if we have more than 39.999 zenys and less than 60.000 when the option "Pay 40.000 Laichin Zeny" is chosen, later "What do you pisses by big and small?" and finally "Pay him". it causes that crash the NPC and not let follow with the dialogue.

This happens If we chose Pay Laichin 40.000 Zeny code it sees that makes a verification to see if we have 40.000 zenys to continue, supposing that we have an amount between which I mentioned above we continued without problems.

Later if we chose "What do you and pisses by big small?" and next "Pay him". the program makes a verification to see if we have 20.000 zenys, and as it didn´t discount the 40.000 to us that it verified in the beginning we go ahead.

The issue in that part is that later more down in the script tries to discount 60.000 zenys from us, and as we do not own that amount generates that the NPC crash.

CODE
niflheim,102,54,4       script  Mad Man#s       739,{
        .....
        .....
        else if (sign_q == 96) {
                .....
                .....
                switch(select("Pay Laichin 40,000 Zeny:Don't pay Laichin.")) {
                case 1:
                        if (Zeny < 40000) {
                                .....
                                .....
                                close;
                        }
                        else {
                                .....
                                .....
                                next;
                                set .@select_s,rand(1,5);
                                if (.@select_s == 1) {
                                        .....
                                        .....
                                        next;
                                }
                                else if (.@select_s == 2) {
                                        .....
                                        .....
                                        next;
                                }
                                else if (.@select_s == 3) {
                                        .....
                                        .....
                                        next;
                                }
                                else if (.@select_s == 4) {
                                        .....
                                        .....
                                        next;
                                }
                                else {
                                        .....
                                        .....
                                        close;
                                }
                                next;
                                switch(select("I promise.:What do you mean by big and small?")) {
                                case 1:
                                        .....
                                        .....
                                        close;
                                case 2:
                                        .....
                                        .....
                                        next;
                                        switch(select("Don't pay him.:Pay him.")) {
                                        case 1:
                                                .....
                                                .....
                                                close;
                                        case 2:
                                                if (Zeny < 20000) {
                                                        .....
                                                        .....
                                                        close;
                                                }
                                                else {
                                                        .....
                                                        .....
                                                        set zeny,zeny-60000;
                                                        if (.@select_s == 1) {
                                                                set sign_q,101;
                                                        }
                                                        else if (.@select_s == 2) {
                                                                set sign_q,102;
                                                        }
                                                        else if (.@select_s == 3) {
                                                                set sign_q,103;
                                                        }
                                                        else if (.@select_s == 4) {
                                                                set sign_q,104;
                                                        }
                                                        else {
                                                                .....
                                                                .....
                                                                close;
                                                        }
                                                        close;
                                                }
                                        }
                                }
                        }
                case 2:
                        .....
                        .....
                        close;
                }
        }



EDIT:

In the part when you can obtain the Serin's Gold Ring (2642), after it sends you to talk to Crayu and later with the Depresing Man.
The scrip have to give us some options when we have the Serin´s Gold Ring; but I don´t know if this could be a problem beacause you can only obtain 1 ring:

CODE
        else if (sign_q == 87) {
                if (countitem(2642) > 1) {
                        .....
                        .....
                        switch(select("To prove my courage:For honor:To help people")) {
                        case 1:


In the if (countitem(2642) > 1) theres no problem if is only > o its needed to add =?


Thnx

This post has been edited by TheKaras: May 13 2010, 09:27 PM

Hercules Elf Bot - Dec 20, 2011 9:57

Originally posted by [b]calciumkid[/b]
The edit makes zero sense, however the original bug is fixed.