Jump to content
  • 0

Help With Script


gckiller

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  11/19/12
  • Last Seen:  

Good Night!

 

I create an NPC following this example from another topic

setarray array1[0],987,654,321;

setarray array2[0],123,456,789;

setarray array3[0],987,654,321;

set arraycount,3;

set .@a,1;

L_ArrayLoop:

for(set .@i,0; .@i<getarraysize( getd("array"+.@a+"") ); set .@i,.@i+1)

{set .@menu$, .@menu$ + (.@i?":":"");

	if( getd("array"+.@a+"["+.@i+"]") ) // found

		{set .@menu$, .@menu$ + getd("array"+.@a+"["+.@i+"]");}

}//end for(loop)

set .@a,.@a+1; if( .@a < arraycount ){goto L_ArrayLoop;}

// This will display after it's done with the array loop.

blah blah blah
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

more like this

prontera,155,188,5	script	kjdhfdksjf	100,{
	setarray .@array1$,"123","456","789";
	setarray .@array2$,"abc","def","ghi";
	setarray .@array3$,"rst","uvw","xyz";
	.@s1 = select( "1:2:3" );
	for ( .@i = 0; .@i < 3; .@i++ )
		.@menu$ = .@menu$ + getd( ".@array"+ .@s1 +"$["+ .@i +"]" ) +":";
	.@s2 = select( .@menu$ ) -1;
	mes getd( ".@array"+ .@s1 +"$["+ .@s2 +"]" );
	close;
}
  • Upvote 1
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...