Cydh Posted March 19, 2019 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 747 Joined: 06/16/12 Last Seen: February 21 Share Posted March 19, 2019 (edited) View File Script command: itemlink to generate <ITEML> To simple generate <ITEML> string by using itemlink. <ITEML> is string that auto-parsed by client that support item link feature, when user SHIFT+Click the item or equipment. Quote *itemlink(<item_id>{,<refine>,<card0>,<card1>,<card2>,<card3>}); *itemlink2(<item_id>,<refine>,<card0>,<card1>,<card2>,<card3>,<RandomIDArray>,<RandomValueArray>,<RandomParamArray>); Generate <ITEML> string for an item and can be used for npctalk, message, dispbottom, and broadcast commands. The result is clickable-item name just like from SHIFT+Click from player's inventory/cart/equipment window. In mes command is still usable but the item name is not clickable. Examples: npctalk "Knife [3] : "+itemlink(1202)+""; npctalk "+16 Knife [3] : "+itemlink(1202,16)+""; npctalk "+13 BXB Bapho+VR+EA2+EA1 : "+itemlink(18110,13,4147,4407,4833,4832)+""; setarray .@opt_ids[0],RDMOPT_VAR_ATKPERCENT,RDMOPT_VAR_ATKPERCENT,RDMOPT_VAR_ATTMPOWER,0,0; setarray .@opt_values[0],3,5,20,0,0; setarray .@opt_params[0],0,0,0,0,0; npctalk "+13 BXB Bapho+VR+EA2+EA1 + 3 Options : "+itemlink2(18110,13,4147,4407,4833,4832,.@opt_ids,.@opt_values,.@opt_params)+""; For RandomIDArray, RandomValueArray, and RandomParamArray only works if client (& server is complied) with supporter Item Random Options feature is PACKETVER >= 20150225. But using itemlink2, all command parameters must be specified if PACKETVER is not supported, use dummy arrays to avoid errors! Credits: These people from OpenKore: lututui, exaxia, and jchcc Submitter Cydh Submitted 03/19/2019 Category Source Modifications Video Content Author Cydh Edited April 3, 2019 by Cydh 3 2 2 1 Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted March 19, 2019 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted March 19, 2019 (edited) *itemlink(<item_id>{,<refine>,<card0>,<card1>,<card2>,<card3>}); compare with getitem2 *getitem2(<item id>, <amount>, <identify>, <refine>, <attribute>, <card1>, <card2>, <card3>, <card4>{, <account ID>}) what happen to the <identify> and <attribute> field ? EDIT: -> Testing ... 1. if the item is not identify ... I can't even get the shift-click to work .. 2. if the item is broken, shift-click it will display non-broken item .... hmm .... I think these guys have thought it out ... nvm, disregard this post Edited March 19, 2019 by AnnieRuru Quote Link to comment Share on other sites More sharing options...
Cydh Posted March 20, 2019 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 747 Joined: 06/16/12 Last Seen: February 21 Author Share Posted March 20, 2019 2 hours ago, AnnieRuru said: *itemlink(<item_id>{,<refine>,<card0>,<card1>,<card2>,<card3>}); compare with getitem2 *getitem2(<item id>, <amount>, <identify>, <refine>, <attribute>, <card1>, <card2>, <card3>, <card4>{, <account ID>}) what happen to the <identify> and <attribute> field ? EDIT: -> Testing ... 1. if the item is not identify ... I can't even get the shift-click to work .. 2. if the item is broken, shift-click it will display non-broken item .... hmm .... I think these guys have thought it out ... nvm, disregard this post amount and atribut is not needed by ITEML. we never talk about ITEML here, but you can found the info here 1 Quote Link to comment Share on other sites More sharing options...
Litro Endemic Posted March 20, 2019 Group: Members Topic Count: 25 Topics Per Day: 0.01 Content Count: 283 Reputation: 79 Joined: 06/13/13 Last Seen: June 7, 2023 Share Posted March 20, 2019 thanks for this patch Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted March 20, 2019 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted March 20, 2019 just took a crack on thishttp://herc.ws/board/topic/16648-iteml-function/ it seems your script command missing to view the costumes >>> this script is tested on rathena function script F_ITEML { .@id = getarg(0); .@itemid$ = callsub( S_Base62, .@id ); .@itemtype = getiteminfo( .@id, 2 ); if ( .@itemtype == IT_WEAPON || .@itemtype == IT_ARMOR ) .@show_slot = true; .@equip_loc$ = callsub( S_Base62, getiteminfo( .@id, 5 ), 5 ); .@viewid$ = "&"+ callsub( S_Base62, getiteminfo( .@id, 11 ) ); return "<ITEML>"+ .@equip_loc$ + .@show_slot + .@itemid$ + .@viewid$ +"</ITEML>"; S_Base62: .@num = getarg(0); while ( .@num ) { .@base62_value$ = $@base62$[ .@num % 62 ] + .@base62_value$; .@num /= 62; } .@default_zeroes = getarg(1, 2); while ( getstrlen(.@base62_value$) < .@default_zeroes ) .@base62_value$ = insertchar( .@base62_value$, "0", 0 ); return .@base62_value$; } - script ITEML FAKE_NPC,{ OnInit: setarray $@base62$,"0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"; end; } prontera,155,185,3 script itemlinktest#1 1_F_MARIA,{ input .@a; npctalk itemlink(.@a); npctalk F_ITEML(.@a); debugmes itemlink(.@a); debugmes F_ITEML(.@a); end; } result in [Debug]: script debug : 2000000 110000034 : <ITEML>0000011jZ</ITEML> [Debug]: script debug : 2000000 110000034 : <ITEML>0004811jZ&2H</ITEML> the difference is when input an item with costume enable yours to the left, mine to the right 48 is convert as 256, which is EQP_HEAD_TOP 2H is 167, which is the ViewID 1 Quote Link to comment Share on other sites More sharing options...
PsyOps Posted August 8, 2019 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 150 Reputation: 12 Joined: 12/03/18 Last Seen: 1 hour ago Share Posted August 8, 2019 Tried this today, got these errors. I used the example itemlink.txt provided by cyhd. Any thoughts what i need to fix or what is wrong? Thanks! Quote Link to comment Share on other sites More sharing options...
Radian Posted August 9, 2019 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24, 2024 Share Posted August 9, 2019 18 hours ago, Dev G Inc said: Tried this today, got these errors. I used the example itemlink.txt provided by cyhd. Any thoughts what i need to fix or what is wrong? Thanks! It's just a debug message not an error. Quote Link to comment Share on other sites More sharing options...
PsyOps Posted August 9, 2019 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 150 Reputation: 12 Joined: 12/03/18 Last Seen: 1 hour ago Share Posted August 9, 2019 15 hours ago, Radian said: It's just a debug message not an error. Sorry new to scripting, how do i debug it? No clue how to debug. Quote Link to comment Share on other sites More sharing options...
Conflicts Posted November 2, 2021 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 317 Reputation: 63 Joined: 11/13/11 Last Seen: March 23 Share Posted November 2, 2021 (edited) Since this has been updated fairly recently, I decided to give it a try. However, I can't seem to get it to work. I'm sure I've applied everything correctly. The test script gives me this; Spoiler For `itemlink2`, I've tried with other items, other random options, same result. For the regular `itemlink`, only the item ID and refine works, it doesn't display the card(s) you input. Edited November 2, 2021 by Conflicts Quote Link to comment Share on other sites More sharing options...
Cydh Posted November 8, 2021 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 747 Joined: 06/16/12 Last Seen: February 21 Author Share Posted November 8, 2021 On 11/2/2021 at 1:52 PM, Conflicts said: Since this has been updated fairly recently, I decided to give it a try. However, I can't seem to get it to work. I'm sure I've applied everything correctly. The test script gives me this; Hide contents For `itemlink2`, I've tried with other items, other random options, same result. For the regular `itemlink`, only the item ID and refine works, it doesn't display the card(s) you input. working fine on me Quote Link to comment Share on other sites More sharing options...
socom111 Posted November 12, 2021 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 2 Reputation: 0 Joined: 01/20/21 Last Seen: 20 hours ago Share Posted November 12, 2021 does not work on 2020 client Quote Link to comment Share on other sites More sharing options...
Conflicts Posted November 12, 2021 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 317 Reputation: 63 Joined: 11/13/11 Last Seen: March 23 Share Posted November 12, 2021 Spoiler On 11/8/2021 at 1:58 PM, Cydh said: working fine on me I forgot to mention, I tested this on 2020-09-02aRagexeRE and 2021-01-07-aRagexeRE, both giving me the same results, so yeah it might be broken for 2020+ clients. Quote Link to comment Share on other sites More sharing options...
Cydh Posted November 19, 2021 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 747 Joined: 06/16/12 Last Seen: February 21 Author Share Posted November 19, 2021 Repo just updated! test on 2020-04-01b Ragexe 1 Quote Link to comment Share on other sites More sharing options...
Hnomkeng Posted June 3, 2022 Group: Members Topic Count: 29 Topics Per Day: 0.01 Content Count: 99 Reputation: 2 Joined: 02/23/14 Last Seen: 11 hours ago Share Posted June 3, 2022 can't work on client 2021-11-16 Quote Link to comment Share on other sites More sharing options...
kalabasa Posted June 3, 2022 Group: Members Topic Count: 123 Topics Per Day: 0.05 Content Count: 478 Reputation: 14 Joined: 11/30/17 Last Seen: January 23 Share Posted June 3, 2022 itemlink not working in 2015 clients? just like https://github.com/rathena/rathena/blob/479954af304d93e7cf10fe03646f6b1db2cfdf21/doc/script_commands.txt#L1114 im using the 2021 diff. or im implementing it wrong? can someone gave an example using mes script Quote Link to comment Share on other sites More sharing options...
PsyOps Posted June 23, 2022 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 150 Reputation: 12 Joined: 12/03/18 Last Seen: 1 hour ago Share Posted June 23, 2022 On 6/3/2022 at 11:01 PM, kalabasa said: itemlink not working in 2015 clients? just like https://github.com/rathena/rathena/blob/479954af304d93e7cf10fe03646f6b1db2cfdf21/doc/script_commands.txt#L1114 im using the 2021 diff. or im implementing it wrong? can someone gave an example using mes script It should work on 2015 clients not unless you have it disabled via hexing. Quote Link to comment Share on other sites More sharing options...
kalabasa Posted June 23, 2022 Group: Members Topic Count: 123 Topics Per Day: 0.05 Content Count: 478 Reputation: 14 Joined: 11/30/17 Last Seen: January 23 Share Posted June 23, 2022 Just now, PsyOps said: It should work on 2015 clients not unless you have it disabled via hexing. can you provide me some examples? i am going to try again. im using 2015-11-04a and i have no idea about hexing. Quote Link to comment Share on other sites More sharing options...
Hitomi Yisokira Posted June 23, 2023 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 3 Reputation: 0 Joined: 01/27/21 Last Seen: March 14, 2024 Share Posted June 23, 2023 Hi, I'm using the 2019 diff file. I encountered this problem. itemdb.cpp: In function `unsigned int base62_decode(std::__cxx11::string)': itemdb.cpp:2130:19: warning: NULL used in arithmetic [-Wpointer-arith] while (str[i] != NULL) { What can I do to get rid of this warning error when compiling? Thank you. Quote Link to comment Share on other sites More sharing options...
Haxer Posted February 11 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 8 Reputation: 0 Joined: 01/17/25 Last Seen: March 17 Share Posted February 11 can someone enlighten me on how to patch these? im using 2019 emulator and im beginner please teach me. Quote Link to comment Share on other sites More sharing options...
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.