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)
Question
WillJocker
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)
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.