Jump to content
clydelion

Send mail via scriptcommand

Recommended Posts

On 11/30/2012 at 1:36 AM, clydelion said:

Mail via Scriptcommand

With this mod, you can do something like this..

(The sample code in the background is outdated)

douypu.jpg

This is a scriptcommand I wanted when I still had a server. It can be used in Achievement Systems, WoE prizes, and other events. This is better than getitem because the recipient doesn't need to be online.

Usage:

* sendmail <Recipient's Char ID>,"<Sender's Name>","<Title>","<Body>",<zeny>,<item_id>,<amount>{,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>};

Description:

Uses the same functions as the default mail system, but this time, it is done via script. All item, recipent, message, and title assignment are done in the background. Enjoy this free release. :)

PS: This have not been used on a live server, if you discover a bug (or if there's something wrong with my coding) let me know. :D

My sample script:

This code will give the player a +10 Knife and 10,000 zennies upon reaching job level 10.

 

-<tab>script<tab>Mail Test<tab>-1,{
OnPCJobLvUpEvent:
if(JobLevel != 9) end;
set .charid, getcharid(0);
set .sender$, "Achievement System";
set .title$, "Basic Skills";
set .itemid, 1201;
set .itemamount, 1;
set .zeny, 10000;
set .refine, 10;
set .body$, "You have successfully unlocked the achievement '"+.title$+"'. You have received "+.itemamount+" "+getitemname(.itemid)+"s and "+.zeny+" zennies.";
sendmail .charid,.sender$,.title$,.body$,.zeny,.itemid,.itemamount,.refine;
end;
}
 

 

PS: This wasn't used on a live server, please report any bugs you encounter.

DIFF LINK

Are this added to latest rA svn?

Link to comment
Share on other sites

On 7/16/2022 at 10:11 PM, G-RO said:

Are this added to latest rA svn?

When you already have the RODEX MAIL.

Link to comment
Share on other sites

On 8/4/2022 at 12:51 AM, RikuTzy said:

When you already have the RODEX MAIL.

I mean the function to send email thru Script :). Is it existing now?

Link to comment
Share on other sites

8 hours ago, G-RO said:

I mean the function to send email thru Script :). Is it existing now?

 

*mail <destination id>,"<sender name>","<title>","<body>"{,<zeny>{,<item id array>,<item amount array>{,refine{,bound{,<item card0 array>{,<item card1 array>{,<item card2 array>{,<item card3 array>
		{,<random option id0 array>, <random option value0 array>, <random option paramter0 array>{,<random option id1 array>, <random option value1 array>, <random option paramter1 array>
		{,<random option id2 array>, <random option value2 array>, <random option paramter2 array>{,<random option id3 array>, <random option value3 array>, <random option paramter3 array>
		{,<random option id4 array>, <random option value4 array>, <random option paramter4 array>}}}}}}}}};

 

Link to comment
Share on other sites

4 hours ago, LearningRO said:

 

*mail <destination id>,"<sender name>","<title>","<body>"{,<zeny>{,<item id array>,<item amount array>{,refine{,bound{,<item card0 array>{,<item card1 array>{,<item card2 array>{,<item card3 array>
		{,<random option id0 array>, <random option value0 array>, <random option paramter0 array>{,<random option id1 array>, <random option value1 array>, <random option paramter1 array>
		{,<random option id2 array>, <random option value2 array>, <random option paramter2 array>{,<random option id3 array>, <random option value3 array>, <random option paramter3 array>
		{,<random option id4 array>, <random option value4 array>, <random option paramter4 array>}}}}}}}}};

 

wow thanks for this could you show some example how to define it in script? 🙂 thanks

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
Reply to this topic...

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

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.