• 0
cebols

Request Script: Quest Custom Headgear with Preview

Question

Hi All,
I would ask a favor for quest custom headgear with Preview.

1.jpg.9c967cef20cdb8273480df36a290294d.jpg2.jpg.b416b08bd829d12c59ad2fc53de66747.jpg3.jpg.e42f6a287a7d4d9c961bcdeabf153ab6.jpg

All Custom Helm need same item
All Custom Aura need same item
All Custom Wing need same item

Preview look for Helm start from view 2001-20100
Preview look for Aura start from view 2101-20200
Preview look for Helm start from view 2201-20300


Thank you in advance...

Share this post


Link to post
Share on other sites

1 answer to this question

  • 0

Hey cebols,

just use a simple for-loop to create your menu.

 

L_CUSTOMHELMS:
	set .@minid, 2001;
	set .@maxid, 2100;
	set .@diff, .@maxid - .@minid;
	set .@helm_menu$, "";

	for ( set .@i, 0; .@i < .@diff; set .@i, .@i +1 ) {
		set .@helmnr, .@helmnr + 1;
		set .@helm_menu$, .@helm_menu$+" Helm ["+.@helmnr+"]:";
	}
	set .selected, select(.@helm_menu$) -1;

	set CUST_LOOK_HEAD_TOP, getlook(LOOK_HEAD_TOP);
	set .@viewid, .@minid + .selected - 1;
	mes "You've selected Helm "+.selected+". You can see the style the next 5 seconds.";
	close2;
	set CUST_PREVIEWVIEW, 1;
	setlook(LOOK_HEAD_TOP, .@viewid);
	sleep2 5000;
	setlook(LOOK_HEAD_TOP, CUST_LOOK_HEAD_TOP);
	set CUST_PREVIEWVIEW, 0;
	end;


// To prevent Logout to bypass the "preview"
OnPCLoginEvent:
	if (CUST_PREVIEWVIEW == 1) {
		setlook(LOOK_HEAD_TOP, CUST_LOOK_HEAD_TOP);
		set CUST_PREVIEWVIEW, 0;
	}
	end;

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now