Jump to content
  • 0

NPC daily reward with rentitem


IsabelaFernandez

Question


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

Hello guys, I would like this NPC to deliver the reward with the rentitem command, 7200 (time) for example and, if possible, prevent the reward with another
char, only after 24h a single char and not several of the same account.

https://pastebin.com/zd9QFzsx

Thank you all ?

Edited by IsabelaFernandez
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

3 minutes ago, Disabled LOOLP said:

rentitem <ItemID>,<Time>;

 

yes, I know this command but couldn't insert it into this script because of the reward

https://pastebin.com/zd9QFzsx

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  233
  • Reputation:   49
  • Joined:  12/20/18
  • Last Seen:  

Altera o getitem do codigo por :

		for (int i = 0; i < @rewardamount; i++) {
		rentitem .rewardid,7200;
		}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

4 hours ago, IsabelaFernandez said:

Hello guys, I would like this NPC to deliver the reward with the rentitem command, 7200 (time) for example and, if possible, prevent the reward with another
char, only after 24h a single char and not several of the same account.

https://pastebin.com/zd9QFzsx

Thank you all ?

// by Mabuhay
// 24 hrs cd
// account bound
prontera,149,191,5	script	Daily Reward	911,{
	.@cd = 60*60*24; // 24 hrs
	.@time = gettimetick(2);
	if ( #DAILYRENTREWARD+.@cd > .@time ) {
		mes "Come back again after "+Time2Str(#DAILYRENTREWARD+.@cd)+" for your reward.";
		close;
	}
	mes "Here is your daily reward!";
	close2;
	rentitem 1201, 7200; // <id>, <time in seconds>
	#DAILYRENTREWARD = .@time;
	end;
}

Untested but should work

Edited by Mabuhay
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

8 minutes ago, Mabuhay said:

// by Mabuhay
// 24 hrs cd
// account bound
prontera,149,191,5	script	Daily Reward	911,{
	.@cd = 60*60*24; // 24 hrs
	.@time = gettimetick(2);
	if ( #DAILYRENTREWARD+.@cd > .@time ) {
		mes "Come back again after "+Time2Str(#DAILYRENTREWARD+.@cd)+" for your reward.";
		close;
	}
	mes "Here is your daily reward!";
	close2;
	rentitem 1201, 7200; // <id>, <time in seconds>
	#DAILYRENTREWARD = .@time;
	end;
}

Untested but should work

 

perfectly as i wanted to thank you so much

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