Jump to content
  • 0

how to make npc script with required equiped item.


Brynner

Question


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

i want to try to make an npc. but before he talks to you. you should equip an item.

example.

You need to equip this before talking to Alex:

Helmet

Boots

or else you can do that quest.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

if (!isequipped(<ID>{,<ID>,...})) { mes "You need to have _____ equipped to continue."; close; }
// script resumes

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

if (!isequipped(<ID>{,<ID>,...})) { mes "You need to have _____ equipped to continue."; close; }
// script resumes

thanks.

if (!isequipped(<ID>{,<ID>,...})) { mes "You need to have _____ equipped to continue."; close; }
// script resumes

can you check my script?

aldebaran,150,147,6 script Toji 766,{
set .@n$,"^0000FF[Toji]^000000";
mes .@n$;
mes "You have 200 Bacillus and 150 Mould Powder?";
menu "Yes",-,"It's Hard",end2;
if (isequipped(5009, 2406) || countitem(7119) < 200 || countitem(7001)  < 150 ) goto L_NOTENOUGH;
next;
delitem 7119,200;
delitem 7001,150;
next;
mes .@n$;
mes "Oh my God,you got it all.";
mes "thanks for helping older guy.";
mes "here is your reward.";
next;
getitem 5131,1;
mes .@n$;
mes "Take it...it's such a nice";
mes "item...";
close;
end2:
next;
mes .@n$;
mes "Too bad...You are too lazy";
mes "to do this job.";
close;
L_NOTENOUGH:
next;
mes .@n$;
mes "You still miss some items";
close;
}

he needs 200 Bacillus and 150 Mould Powder. but you should wear a Safety Helmet and Boots [1]

before you can do this quest.

after you finish the quest you will get Close Helmet as a reward.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

if (isequipped(5009, 2406) ...

Should be:

if (!isequipped(5009, 2406) ...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  36
  • Reputation:   0
  • Joined:  03/18/12
  • Last Seen:  

maybe like this?

aldebaran,150,147,6 script Toji 766,{
if (!isequipped(5009, 2406)) { mes "Please use Safety Helmet[0] & Boots[1] Before Talk."; close; }

set .@n$,"^0000FF[Toji]^000000";
mes .@n$;
mes "You have 200 Bacillus and 150 Mould Powder?";
menu "Yes",-,"It's Hard",end2;
if (countitem(7119) < 200 || countitem(7001)  < 150) goto L_NOTENOUGH;
next;
delitem 7119,200;
delitem 7001,150;
next;
mes .@n$;
mes "Oh my God,you got it all.";
mes "thanks for helping older guy.";
mes "here is your reward.";
next;
getitem 5131,1;
mes .@n$;
mes "Take it...it's such a nice";
mes "item...";
close;
end2:
next;
mes .@n$;
mes "Too bad...You are too lazy";
mes "to do this job.";
close;
L_NOTENOUGH:
next;
mes .@n$;
mes "You still miss some items";
close;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

thanks

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