Jump to content

Question

Posted (edited)

26180,Hellstone_Wing_Of_Lord,Hellstone Wing Of Lord,5,5,0,10,,0,,0,0xFFFFFFFF,7,2,4096,,1,1,2180,{ bonus bAllStats,40; bonus2 bAddRace,RC_DemiHuman,50; bonus2 bAddRace,RC_Boss,50; },{},{}

can i make this upper script a rental item ?
can i put like this ?


26180,Hellstone_Wing_Of_Lord,Hellstone Wing Of Lord,5,5,0,10,,0,,0,0xFFFFFFFF,7,2,4096,,1,1,2180,{ rentitem 26180; bonus bAllStats,40; bonus2 bAddRace,RC_DemiHuman,50; bonus2 bAddRace,RC_Boss,50; },{},{}

Edited by mrlongshen

8 answers to this question

Recommended Posts

  • 0
Posted
On 10/30/2013 at 2:25 AM, mrlongshen said:

 

this script work perfectly, but my player can use it. huhu. please add the gm function sir. Love it !

I have  bug here, if we enchant the item then the expiration time disappears. Can u do something for that plz.

Posted

Your script will give a new rental item everytime the player equip something.

Also it's

*rentitem <item id>,<time>;
*rentitem "<item name>",<time>;

 

To give a rental item, use npc script or an usable item

Posted

Your script will give a new rental item everytime the player equip something.

Also it's

*rentitem <item id>,<time>;

*rentitem "<item name>",<time>;

 

To give a rental item, use npc script or an usable item

 

@capuche can u make me some simple script so when i entered the ID its will be a rent item.

also can i send the rent item to specific user instead of trade ?

Posted
prontera,150,180,5	script	rent sample	74,{
	mes "input the item id. must be an equipable item.";
	input .@item_id;
	.@type = getiteminfo( .@item_id,2 );
	if ( .@type == -1 ) {
		mes "unknown item id";
		close;
	}
	if ( .@type != 4 && .@type != 5 ) {
		mes "you can't equip this item.";
		close;
	}
	next;
	mes "item ^ff0000"+ getitemname( .@item_id ) +"^000000 (^00ff00"+ .@item_id +"^000000)";
	mes "input the player name (he must be online)";
	input .@name$;
	.@account_id = getcharid( 3,.@name$ );
	if ( .@account_id ) {
		mes "item sent to "+ .@name$ +" (account id ^ff0000"+ .@account_id +"^000000)";
		close2;
		attachrid .@account_id;
		rentitem .@item_id, 10;// 10 secs
		end;
	}
	mes .@name$ +" not found";
	close;
}

change the time of the rent in the script

rentitem .@item_id, 10;// 10 secs

  • Upvote 1
Posted
prontera,150,180,5	script	rent sample	74,{
	mes "input the item id. must be an equipable item.";
	input .@item_id;
	.@type = getiteminfo( .@item_id,2 );
	if ( .@type == -1 ) {
		mes "unknown item id";
		close;
	}
	if ( .@type != 4 && .@type != 5 ) {
		mes "you can't equip this item.";
		close;
	}
	next;
	mes "item ^ff0000"+ getitemname( .@item_id ) +"^000000 (^00ff00"+ .@item_id +"^000000)";
	mes "input the player name (he must be online)";
	input .@name$;
	.@account_id = getcharid( 3,.@name$ );
	if ( .@account_id ) {
		mes "item sent to "+ .@name$ +" (account id ^ff0000"+ .@account_id +"^000000)";
		close2;
		attachrid .@account_id;
		rentitem .@item_id, 10;// 10 secs
		end;
	}
	mes .@name$ +" not found";
	close;
}

change the time of the rent in the script

rentitem .@item_id, 10;// 10 secs

 

@capuche, we cannot set the time on the npc instead of script sir ?

oh i forgot, the GM level must 90 above

Posted

we can yeah


prontera,150,180,5	script	rent sample	74,{
	mes "input the item id. must be an equipable item.";
	input .@item_id;
	.@type = getiteminfo( .@item_id,2 );
	if ( .@type == -1 ) {
		mes "unknown item id";
		close;
	}
	if ( .@type != 4 && .@type != 5 ) {
		mes "you can't equip this item.";
		close;
	}
	next;
	mes "item ^ff0000"+ getitemname( .@item_id ) +"^000000 (^00ff00"+ .@item_id +"^000000)";
	mes "input the time";
	input .@time;
	if ( .@time < 1 ) {
		mes "wrong time. must be > 0";
		close;
	}
	next;
	mes "now input the player name (he must be online)";
	input .@name$;
	.@account_id = getcharid( 3,.@name$ );
	if ( .@account_id ) {
		mes "item sent to "+ .@name$ +" (account id ^ff0000"+ .@account_id +"^000000)";
		close2;
		attachrid .@account_id;
		rentitem .@item_id, .@time;
		end;
	}
	mes .@name$ +" not found";
	close;
}

I didn't try it in my test server. Give feedback if you get any error.

Posted

we can yeah


prontera,150,180,5	script	rent sample	74,{
	mes "input the item id. must be an equipable item.";
	input .@item_id;
	.@type = getiteminfo( .@item_id,2 );
	if ( .@type == -1 ) {
		mes "unknown item id";
		close;
	}
	if ( .@type != 4 && .@type != 5 ) {
		mes "you can't equip this item.";
		close;
	}
	next;
	mes "item ^ff0000"+ getitemname( .@item_id ) +"^000000 (^00ff00"+ .@item_id +"^000000)";
	mes "input the time";
	input .@time;
	if ( .@time < 1 ) {
		mes "wrong time. must be > 0";
		close;
	}
	next;
	mes "now input the player name (he must be online)";
	input .@name$;
	.@account_id = getcharid( 3,.@name$ );
	if ( .@account_id ) {
		mes "item sent to "+ .@name$ +" (account id ^ff0000"+ .@account_id +"^000000)";
		close2;
		attachrid .@account_id;
		rentitem .@item_id, .@time;
		end;
	}
	mes .@name$ +" not found";
	close;
}

I didn't try it in my test server. Give feedback if you get any error.

 

this script work perfectly, but my player can use it. huhu. please add the gm function sir. Love it !

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...