Jump to content
  • 0

Renting Script


WhatFT

Question


  • Group:  Members
  • Topic Count:  142
  • Topics Per Day:  0.03
  • Content Count:  511
  • Reputation:   7
  • Joined:  02/15/12
  • Last Seen:  

Can anyone help me edit this script made by AnnieRuru? Just wanted to remove/change the "ID START to ID END" and make it array like the godly script from the lower part of the script..

prontera,150,180,5	script	kjdhfksj	100,{
	mes "what do you want?";
	next;
	if ( select ( "Gears", "Extend my items" ) == 1 ) {
		mes "what item you want";
		next;
		.@category_select = select ( "Accessory", "Lower Gears", "Mid Gears", "Head Gears", "Godly Gears" );
		mes "what item you want";
		next;
		if ( .@category_select != 5 )
			.@id_select = select( getd( "."+ .category$[ .@category_select ] +"_id_menu$" ) ) -1;
		else
			.@id_select = select( .god_id_menu$ ) -1;
		mes "how many days";
		next;
		.@days = select( .day_menu$ );
		if ( countitem( .rentitem ) < .@days ) {
			mes "sorry insufficient ticket!";
			close;
		}
		mes "here's you're item!";
		if ( .@category_select == 1 || .@category_select == 5 )
			delitem .rentitem, .@days *2;
		else
			delitem .rentitem, .@days;
		if ( .@category_select != 5 )
			rentitem getd( "."+ .category$[ .@category_select ] +"_id_start" ) + .@id_select, 60*60*24* .@days;
		else
			rentitem .god_id[ .@id_select ], 60*60*24* .@days;
	}
	else {
		getinventorylist;
		for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) {
			if ( compare( .id_compare$, "#"+ @inventorylist_id[.@i] +"#" ) ) {
				.@item_id[.@c] = @inventorylist_id[.@i];
				.@expire[.@c] = @inventorylist_expire[.@i];
				.@menu$ = .@menu$ + getitemname( @inventorylist_id[.@i] ) +":";
				.@c++;
			}
		}
		if ( !.@c ) {
			mes "there is no rental item in your inventory";
			close;
		}
		mes "which item";
		next;

		.@s = select( .@menu$ ) -1;
		if ( countitem( .@item_id[.@s] ) >= 2 ) {
			mes "there are more than 1 of "+ getitemname( .@item_id[.@s] ) +" in your inventory. Make sure there is only 1 of them in your inventory.";
			close;
		}
		mes "how many days";
		next;
		.@days = select( .day_menu$ );
		if ( countitem( .rentitem ) < .@days ) {
			mes "sorry insufficient ticket!";
			close;
		}
		mes "here's you're item!";
		if ( .@item_id[.@s] >= 8000 && .@item_id[.@s] < 9000 )
			delitem .rentitem, .@days;
		else
			delitem .rentitem, .@days *2;
		delitem .@item_id[.@s], 1;
		rentitem .@item_id[.@s], .@expire[.@s] - gettimetick(2) + 60*60*24* .@days;
		close;
	}
	close;
OnInit:
	setarray .category$[1], "accessory", "lower", "mid", "head";
	for ( .@i = 1; .@i <= 10; .@i++ )
		.day_menu$ = .day_menu$ + .@i +":";
	.id_compare$ = "#";

	set .rentitem, 24042; // itemID to rent
	// Accessory items
	.accessory_id_start = 20000;
	.accessory_id_end = 20005;
	for ( .@i = .accessory_id_start; .@i <= .accessory_id_end; .@i++ ) {
		.accessory_id_menu$ = .accessory_id_menu$ + getitemname( .@i ) +":";
		.id_compare$ = .id_compare$ + .@i +"#";
	}
	// Lower Gears
	.lower_id_start = 8000;
	.lower_id_end = 8021;
	for ( .@i = .lower_id_start; .@i <= .lower_id_end; .@i++ ) {
		.lower_id_menu$ = .lower_id_menu$ + getitemname( .@i ) +":";
		.id_compare$ = .id_compare$ + .@i +"#";
	}
	// Mid Gears
	.mid_id_start = 8022;
	.mid_id_end = 8036;
	for ( .@i = .mid_id_start; .@i <= .mid_id_end; .@i++ ) {
		.mid_id_menu$ = .mid_id_menu$ + getitemname( .@i ) +":";
		.id_compare$ = .id_compare$ + .@i +"#";
	}
	// Head Gears
	.head_id_start = 8037;
	.head_id_end = 8059;
	for ( .@i = .head_id_start; .@i <= .head_id_end; .@i++ ) {
		.head_id_menu$ = .head_id_menu$ + getitemname( .@i ) +":";
		.id_compare$ = .id_compare$ + .@i +"#";
	}
	// Godly Item IDs
	setarray .god_id, 2629, 2410;
	.@size = getarraysize( .god_id );
	for ( .@i = 0; .@i < .@size; .@i++ ) {
		.god_id_menu$ = .god_id_menu$ + getitemname( .god_id[.@i] ) +":";
		.id_compare$ = .id_compare$ + .god_id[.@i] +"#";
	}
	end;
}

Bump!

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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