Jump to content
  • 0

modify @iteminfo/@ii (w/ Picture)


Question

Posted

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
 

8 answers to this question

Recommended Posts

  • 1
Posted

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
  • 1
Posted
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
  • 0
Posted
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!

  • 0
Posted

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

  • 0
Posted
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

  • 0
Posted
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

  • 0
Posted
On 5/8/2023 at 12:12 AM, Gidz Cross 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

 

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

image.png.15173730f488e90f9136c8c5a0687a6a.png

how about this error please help im newbie

image.png?ex=67acee58&is=67ab9cd8&hm=f550e1dba387daac099582783af7c9835b69afdb0be4c9be48dcdbcbea2df33f&=

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...