Jump to content
  • 0

menu that show if item is on inventory


nelax

Question


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  41
  • Reputation:   0
  • Joined:  08/16/13
  • Last Seen:  

Hey guys! I would like to ask for help from an npc.
when clicking on the item would call a callfunc which would run the following script.

would open a window checking if the player has the following items in inventory. 60000, 60001, 60002.
if it has one of the mentioned ids, the player would click on the item and be teleported to a map.

Edited by nelax
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.01
  • Content Count:  147
  • Reputation:   36
  • Joined:  05/15/20
  • Last Seen:  

21 hours ago, nelax said:

Hey guys! I would like to ask for help from an npc.
when clicking on the item would call a callfunc which would run the following script.

would open a window checking if the player has the following items in inventory. 60000, 60001, 60002.
if it has one of the mentioned ids, the player would click on the item and be teleported to a map.

Add in your item script : 

callfunc("KeyWarp");

NPC Function Script :
Just change the item ids and the showscript to warp to anywhere you want.
Mark as solution if this helped you. ^^

function	script	KeyWarp	{
	if(countitem(6266) >= 1 || countitem(6267) >= 1 || countitem(6268) >= 1)
		menu (countitem(6267) ? ""+getitemname(6267)+"":""),Test1,(countitem(6268) ? ""+getitemname(6268)+"":""),Test2,(countitem(6266) ? ""+getitemname(6266)+"":""),Test3;
	else
		showscript "You don't hold any key.";
		end;

Test1:
	showscript "Warp To Key of Illusion";
	end;
Test2:
	showscript "Warp to Key of Gaiety";
	end;
Test3:
	showscript "Warp to Key of Deception";
	end;
}

image.png.b70c8d3ca71fa168025933221d2528ef.png

image.png.ab20d59333e0b8973bde66e6be90f580.png

image.png.c4cdd017d97ae0ab1e27aaee88c28eaf.png

image.png.90219a824e141c760f32497054e7d7fa.png

image.png.d5fb8579a1752634322ee7581b9d1400.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1188
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

1 hour ago, nelax said:

Hey guys! I would like to ask for help from an npc.
when clicking on the item would call a callfunc which would run the following script.

would open a window checking if the player has the following items in inventory. 60000, 60001, 60002.
if it has one of the mentioned ids, the player would click on the item and be teleported to a map.

teleport using item (consume the item to teleport like butterfly wing) or the NPC will teleport the char and delete the items?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  41
  • Reputation:   0
  • Joined:  08/16/13
  • Last Seen:  

3 minutes ago, hendra814 said:

teleport using item (consume the item to teleport like butterfly wing) or the NPC will teleport the char and delete the items?

Teleport using item. They are a kind of key that will stay in the etc. When I click on my Tower Portal item, the teleport location will appear according to the keys in the inventory.

 

something similar to that. However, instead of appearing only one option in the window, the other keys also appeared.

1231.png

Edited by nelax
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1188
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

Just now, nelax said:

Teleport using item. They are a kind of key that will stay in the etc. When I click on my Tower Portal item, the teleport location will appear according to the keys in the inventory

I don't have idea for your concept.

maybe other members have the scripting concept for that.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  102
  • Reputation:   6
  • Joined:  03/02/18
  • Last Seen:  

9 minutes ago, nelax said:

Teleport using item. They are a kind of key that will stay in the etc. When I click on my Tower Portal item, the teleport location will appear according to the keys in the inventory.

 

something similar to that. However, instead of appearing only one option in the window, the other keys also appeared.

1231.png

just add your geitemid in your menu script and put the item id number....

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  41
  • Reputation:   0
  • Joined:  08/16/13
  • Last Seen:  

1 minute ago, AceofSpades said:

just add your geitemid in your menu script and put the item id number....

Could you help me? I have this script from an Emistry topic.

 

.@count = countitem(6150);
if( .@count ){
	if( select( getitemname( 6150 )+" X "+.@count,"close" ) == 1 ){
		mes "Done ??";
	}
}else{
	mes "You dont have any.";
}
close;
}

Topic Emistry

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  102
  • Reputation:   6
  • Joined:  03/02/18
  • Last Seen:  

On 5/25/2023 at 2:41 PM, nelax said:

Could you help me? I have this script from an Emistry topic.

 

.@count = countitem(6150);
if( .@count ){
	if( select( getitemname( 6150 )+" X "+.@count,"close" ) == 1 ){
		mes "Done ??";
	}
}else{
	mes "You dont have any.";
}
close;
}

Topic Emistry

function	script	KeyWarp	{
	if(countitem(6266) >= 1 || countitem(6267) >= 1 || countitem(6268) >= 1)
		menu (countitem(6267) ? ""+getitemname(6267)+"":""),Test1,(countitem(6268) ? ""+getitemname(6268)+"":""),Test2,(countitem(6266) ? ""+getitemname(6266)+"":""),Test3;
	else
		showscript "You don't hold any key.";
		end;

Test1:
	showscript "Warp To Key of Illusion";
	end;
Test2:
	showscript "Warp to Key of Gaiety";
	end;
Test3:
	showscript "Warp to Key of Deception";
	end;
}

 

 

its already release then just apply the code to your script, just understand the codes how to merge it to your script

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