Jump to content
  • 0

Rent Item


mrlongshen

Question


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

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
Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

right after the header add

if ( getgmlevel() < 99 ) end;
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.02
  • Content Count:  55
  • Reputation:   0
  • Joined:  09/26/20
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

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 ?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

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 !

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