Jump to content
  • 0

Converting into mail type reward


Radian

Question


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

Hi guys, Im not sure how i can convert this getitem into a mail system reward. Im endorsing the mail system for the players to use it more often.

So here's the script part for the reward :

	for ( .@i = 0; .@i < $@arenamemberscount; ++.@i ) {
		attachrid $@arenamembers[.@i];
		for ( .@j = 0; .@j < getarg(2); .@j += 2 ) {
			getitem getelementofarray( getarg(1), .@j ), getelementofarray( getarg(1), .@j +1 );
			showdigit gettimetick(2) - .time, 0;
		}
	}

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

@Radian ROFL !!!

why not just ask me personally on discord ?

 

L_reward:
	bg_get_data getarg(0), 1;
	deletearray .@itemid;
	deletearray .@itemamount;
	for ( .@i = 0; .@i < getarg(2) /2; ++.@i ) {
		.@itemid[.@i] = getelementofarray( getarg(1), .@i *2 );
		.@itemamount[.@i] =  getelementofarray( getarg(1), ( .@i *2 ) +1 );
	}
	for ( .@i = 0; .@i < $@arenamemberscount; ++.@i ) {
		attachrid $@arenamembers[.@i];
		showdigit gettimetick(2) - .time, 0;
		mail getcharid(0), "XXXRO auto-reward", "BG: Arathi Basin", "Congratulations ~ This is your reward for participating.",
			0, .@itemid, .@itemamount;
	}
	detachrid;
	return;

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.01
  • Content Count:  208
  • Reputation:   60
  • Joined:  09/23/17
  • Last Seen:  

47 minutes ago, Radian said:

Hi guys, Im not sure how i can convert this getitem into a mail system reward. Im endorsing the mail system for the players to use it more often.

So here's the script part for the reward :


	for ( .@i = 0; .@i < $@arenamemberscount; ++.@i ) {
		attachrid $@arenamembers[.@i];
		for ( .@j = 0; .@j < getarg(2); .@j += 2 ) {
			getitem getelementofarray( getarg(1), .@j ), getelementofarray( getarg(1), .@j +1 );
			showdigit gettimetick(2) - .time, 0;
		}
	}

 

I believe you have to upgrade your rA to the latest version as the mail script command was just released

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

1 minute ago, TheDerpySupport said:

I believe you have to upgrade your rA to the latest version as the mail script command was just released

I just did. And cant figure it out how to convert that part into the latest script command for the mail.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

Just now, AnnieRuru said:

@Radian ROFL !!!

why not just ask me personally on discord ?

 


L_reward:
	bg_get_data getarg(0), 1;
	deletearray .@itemid;
	deletearray .@itemamount;
	for ( .@i = 0; .@i < getarg(2) /2; ++.@i ) {
		.@itemid[.@i] = getelementofarray( getarg(1), .@i *2 );
		.@itemamount[.@i] =  getelementofarray( getarg(1), ( .@i *2 ) +1 );
	}
	for ( .@i = 0; .@i < $@arenamemberscount; ++.@i ) {
		attachrid $@arenamembers[.@i];
		showdigit gettimetick(2) - .time, 0;
		mail getcharid(0), "XXXRO auto-reward", "BG: Arathi Basin", "Congratulations ~ This is your reward for participating.",
			0, .@itemid, .@itemamount;
	}
	detachrid;
	return;

 

Hahaha.. People might find this useful if they search for it :ani_swt3:

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

On 4/13/2018 at 11:48 PM, Radian said:

Hahaha.. People might find this useful if they search for it :ani_swt3:

Also note it only supports up to 5 items types, so of your item array is longer.might not work as you like.

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