Jump to content
  • 0

Item Requirement Script


brianj070707

Question


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  48
  • Reputation:   0
  • Joined:  01/21/12
  • Last Seen:  

Hello,

I would just like to ask if this possible. I have a custom dungeon on my server, so what I want to do is before you can enter the dungeon.

You will talk to my custom npc and he will ask if you have the item on your inventory for example (item id: 601, flywing). If you have it he will let you in and give you a time limit of 2hours unlimited access on that said dungeon. Once the 2hour limit expires he will let you require a fly wing again.

Im just confused if this is possible?

Thanks

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

erm..try something like this


set .itemID,7539;
set .Minutes,120;
if( !countitem(.itemID) && TimeLeft <= gettimetick(2) ){
mes "You need 1 "+getitemname( .itemID )+" to get access to this dunguen.";
}else if( countitem(.itemID) && TimeLeft <= gettimetick(2) ){
delitem .itemID,1;
set TimeLeft,gettimetick(2) + ( .Minutes * 60 );
mes "Gained Access for next "+.Minutes+" Minutes.";
}
warp "mapname",0,0;
end;

[/codeBOX]

perhap other can do better than mine..xD

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