Jump to content
  • 0

modify @iteminfo/@ii (w/ Picture)


Gidz Cross

Question


  • Group:  Members
  • Topic Count:  123
  • Topics Per Day:  0.03
  • Content Count:  640
  • Reputation:   82
  • Joined:  04/07/14
  • Last Seen:  

Heya. Can i request a replicated method to this @iteminfo.

So the picture shows is when you type @ii in a wild search. For example @ii Poring Card. Those information on the chat box will appear. And at the same time it will call a npc script with dialog box which shows the item with itemlink in it.

Tagging @joecalis XD

Or... The NPC dialog box isn't necessary. Just make the information on the chatbox with item link.

OSRO_h4qXVLiXo3.png.f57b7dc2b42e109431fc71d74eb4af49.png
 

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  64
  • Reputation:   40
  • Joined:  03/26/12
  • Last Seen:  

If you have itemlink commands by Cydh implemented you just have to edit

in atcommand.cpp

Find:

		struct item_data * item_data = item_array[i];
		sprintf(atcmd_output, msg_txt(sd,1277), // Item: '%s'/'%s'[%d] (%hu) Type: %s | Extra Effect: %s
			item_data->name,item_data->jname,item_data->slot,item_data->nameid,
			(item_data->type != IT_AMMO) ? itemdb_typename((enum item_types)item_data->type) : itemdb_typename_ammo((enum e_item_ammo)item_data->look),
			(item_data->script==NULL)? msg_txt(sd,1278) : msg_txt(sd,1279) // None / With script
		);

Change To:

		struct item_data * item_data = item_array[i];
		sprintf(atcmd_output, "Item: '%s'/'%s' (%hu)", // msg_txt(sd, 1277)
			item_data->name, createItemLink(item_data->nameid, 0, NULL).c_str(),item_data->nameid);

 

  • MVP 1
Link to comment
Share on other sites

  • 1

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  64
  • Reputation:   40
  • Joined:  03/26/12
  • Last Seen:  

4 hours ago, Gidz Cross said:

@joecalis Hey apologies for the multiple mentions. XD

How about retaining the Item Type? I am playing with it but all my attempts are failing. So the src code retains to read msg_txt(sd, 1277) but only will display the item type. 

try this:

		struct item_data * item_data = item_array[i];
		sprintf(atcmd_output, "Item: '%s'/'%s' (%hu) Type: %s", // msg_txt(sd, 1277)
			item_data->name,createItemLink(item_data->nameid, 0, NULL).c_str(),item_data->nameid,
			(item_data->type != IT_AMMO) ? itemdb_typename((enum item_types)item_data->type) : itemdb_typename_ammo((enum e_item_ammo)item_data->look));

 

  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  123
  • Topics Per Day:  0.03
  • Content Count:  640
  • Reputation:   82
  • Joined:  04/07/14
  • Last Seen:  

3 hours ago, joecalis said:

If you have itemlink commands by Cydh implemented you just have to edit

in atcommand.cpp

Find:

		struct item_data * item_data = item_array[i];
		sprintf(atcmd_output, msg_txt(sd,1277), // Item: '%s'/'%s'[%d] (%hu) Type: %s | Extra Effect: %s
			item_data->name,item_data->jname,item_data->slot,item_data->nameid,
			(item_data->type != IT_AMMO) ? itemdb_typename((enum item_types)item_data->type) : itemdb_typename_ammo((enum e_item_ammo)item_data->look),
			(item_data->script==NULL)? msg_txt(sd,1278) : msg_txt(sd,1279) // None / With script
		);

Change To:

		struct item_data * item_data = item_array[i];
		sprintf(atcmd_output, "Item: '%s'/'%s' (%hu)", // msg_txt(sd, 1277)
			item_data->name, createItemLink(item_data->nameid, 0, NULL).c_str(),item_data->nameid);

 

Eyyy!!! It works! Thanks mate you are AWESOME!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  123
  • Topics Per Day:  0.03
  • Content Count:  640
  • Reputation:   82
  • Joined:  04/07/14
  • Last Seen:  

@joecalis Hey apologies for the multiple mentions. XD

How about retaining the Item Type? I am playing with it but all my attempts are failing. So the src code retains to read msg_txt(sd, 1277) but only will display the item type. 

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  830
  • Reputation:   316
  • Joined:  02/11/19
  • Last Seen:  

7 hours ago, Gidz Cross said:

Heya. Can i request a replicated method to this @iteminfo.

So the picture shows is when you type @ii in a wild search. For example @ii Poring Card. Those information on the chat box will appear. And at the same time it will call a npc script with dialog box which shows the item with itemlink in it.

Tagging @joecalis XD

Or... The NPC dialog box isn't necessary. Just make the information on the chatbox with item link.

OSRO_h4qXVLiXo3.png.f57b7dc2b42e109431fc71d74eb4af49.png
 

https://github.com/rathena/rathena/blob/master/conf/battle/feature.conf#L155

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  123
  • Topics Per Day:  0.03
  • Content Count:  640
  • Reputation:   82
  • Joined:  04/07/14
  • Last Seen:  

3 hours ago, Mael said:

Woooah. So the usual item linking is updated.

mes "Don't you want to exchange this with " + .@item_data[.@i+1] + " <ITEM>Doram Token<INFO>25142</INFO></ITEM>?";
into
mes "Don't you want to exchange this with " + .@item_data[.@i+1] + " " + mesitemlink( 25142, false ) + "?";

But as much as I wanted to have this. I think imma pass since my trunk is old. Like 3 years ago. Thanks Mael! XD

 

1 hour ago, joecalis said:

try this:

		struct item_data * item_data = item_array[i];
		sprintf(atcmd_output, "Item: '%s'/'%s' (%hu) Type: %s", // msg_txt(sd, 1277)
			item_data->name,createItemLink(item_data->nameid, 0, NULL).c_str(),item_data->nameid,
			(item_data->type != IT_AMMO) ? itemdb_typename((enum item_types)item_data->type) : itemdb_typename_ammo((enum e_item_ammo)item_data->look));

 

Eyyy! It works like a charm! Thank you so much!

image.png.15173730f488e90f9136c8c5a0687a6a.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.06
  • Content Count:  74
  • Reputation:   1
  • Joined:  06/22/23
  • Last Seen:  

Hello about @mobinfo make it like thisimage.png.6dcd5c0d1d6af2da8a39d45181b1c186.png

 

Link to comment
Share on other sites

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...