Jump to content
  • 0

Help with Script please?


WillJocker

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.01
  • Content Count:  33
  • Reputation:   0
  • Joined:  03/27/22
  • Last Seen:  

I started working on a script where the idea is for the player to be able to advertise their item in-game, and for someone else to see the catalog and be able to buy the item. However, I'm not able to make it work in relation to items with refinement, cards and the like. Can you help me, please?
Here is the section that needs review and correction:

            setarray .@item_data_array$[0], explode(",", .@item_data$);
            set .@identify, atoi(.@item_data_array$[0]); // Identificado (1 ou 0)
            set .@refine, atoi(.@item_data_array$[1]); // Nível de refino
            set .@attribute, atoi(.@item_data_array$[2]); // Atributo (0 ou 1)
            set .@card1, atoi(.@item_data_array$[3]); // Card1
            set .@card2, atoi(.@item_data_array$[4]); // Card2
            set .@card3, atoi(.@item_data_array$[5]); // Card3
            set .@card4, atoi(.@item_data_array$[6]); // Card4

            // Devolve o item ao comprador com os dados completos
            getitem2 .@item_id, 1, .@identify, .@refine, .@attribute, .@card1, .@card2, .@card3, .@card4;

error log:

[Error]:
script error on npc/testescrips/testez.txt line 49
    parse_line: expected ';'
    44 :                 mes "Preþo invßlido.";
    45 :                 close;
    46 :             }
    47 :
    48 :             // ObtÚm os dados completos do item (incluindo cartas, refino, etc.)
*   49 :             set .@card1, getinventorycardid'('.@item_index, 0); // Card1
    50 :             set .@card2, getinventorycardid(.@item_index, 1); // Card2
    51 :             set .@card3, getinventorycardid(.@item_index, 2); // Card3
    52 :             set .@card4, getinventorycardid(.@item_index, 3); // Card4
    53 :             set .@refine, getinventoryrefinerycnt(.@item_index); // Refino
    54 :             set .@identify, getinventoryidentify(.@item_index); // Identificado (1 ou 0)

image.thumb.png.eaeb9c6b2d1a051acd323a19d7eba0a5.png

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...