Jump to content
  • 0

Help with input NPC


windston

Question


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   1
  • Joined:  03/06/12
  • Last Seen:  

I have a NPC where players can choose from a bunch of different headgears, but right now have them as lists.

post-2902-0-45409000-1331090037_thumb.jpg

Here is example of code:

t1:        callsub S_GetHeadgear,"top",500, "2nd Anniversary Hat",109,5105;
t2:        callsub S_GetHeadgear,"top",500, "2nd Anniversary Hat",144,5486;
t3:        callsub S_GetHeadgear,"top",500, "2nd Anniversary Party Hat",144,5106;
t4:        callsub S_GetHeadgear,"top",500, "4 Years Anniversary Hat",144,5432;
t5:        callsub S_GetHeadgear,"top",500, "Academy 1st Stage Completion Hat",410,5407;
t6:        callsub S_GetHeadgear,"top",500, "Academy Freshman Hat",409,5406;
t7:        callsub S_GetHeadgear,"top",500, "Advanced Mini Propeller",270,5226;
t8:        callsub S_GetHeadgear,"top",500, "Aerial",97,5011;
t9:        callsub S_GetHeadgear,"top",500, "Alice Doll",208,5137;
t10:        callsub S_GetHeadgear,"top",500, "Angel Blessing",260,5207;
t11:        callsub S_GetHeadgear,"top",500, "Angel Helm",290,5025;
t12:        callsub S_GetHeadgear,"top",500, "Angel Wing",38,2254;
t13:        callsub S_GetHeadgear,"top",500, "Angel's Kiss",255,5125;
t14:        callsub S_GetHeadgear,"top",500, "Angeling Hat",204,5132;
t15:        callsub S_GetHeadgear,"top",500, "Angeling Pin",222,5153;
t16:        callsub S_GetHeadgear,"top",500, "Antenna",347,5333;
t17:        callsub S_GetHeadgear,"top",500, "Antlers",71,2284;
t18:        callsub S_GetHeadgear,"top",500, "Apple of Archer",72,2285;
t19:        callsub S_GetHeadgear,"top",500, "Army Cap",48,2261;
t20:        callsub S_GetHeadgear,"top",500, "Australian Flag Hat",304,5264;
t21:        callsub S_GetHeadgear,"top",500, "Autumn Leaves",241,5270;

I want to add more headgears but problem is its sorted alphabetically so I would have to go and change all the t1, t2, t3 ,tx, etc after the new submission.

So I was wondering if anyone could help me with making it have a input function?

Like a window comes up and telll the players to insert a item ID, then it checks if that ID is in the list if not tells them to try again but if it is then proceds with the script.

The Item ID are the last value and are seen as getarg(4) by the script.

t21: callsub S_GetHeadgear,"top",500, "Autumn Leaves",241,5270;

So if anyone could help me with this I would be very thankful.

Edited by windston
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  341
  • Reputation:   43
  • Joined:  01/10/12
  • Last Seen:  

It would be better if you provide the full script.

Link to comment
Share on other sites


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

erm..something like this ??

[ Pastebin ] Headgear Quest Template

this NPC currently can support up to ~127 Headgear Quests.

to add a New Headgear...just add a new line in this format..

Case <HeadgearID>: Required( .@HeadgearID, <item>,<amount>,<item>,<amount>..... );
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...