Jump to content

  •  

Photo

Function Problem - mail to getitem conversion


  • Please log in to reply
No replies to this topic

#1 Diurnal

Diurnal

    Member

  • Members
  • PipPip
  • 23 posts

Posted 06 December 2016 - 05:52 AM

Hello,

 

I have disabled mail system on my server and found a an automated events script that uses mail system to give the prizes.

function Func_Prizes {
	announce "Congrats "+strcharinfo(0,getarg(0))+", a winner in the "+getarg(1)+" Event.",bc_all|bc_blue;
	query_sql("INSERT INTO `mail` (send_name,dest_id,title,message,nameid,amount,identify,zeny,time) VALUES ("+
		"'no-reply',"+getarg(0)+",'** "+getarg(1)+" **',"+
		"'Congratulations!% You have won % in the "+getarg(1)+" Event% % % % % % % %   [ Your reward is attached. ]',"+
		$@RewardID+","+$@RewardQNT+",1,"+$@RewardZeny+",UNIX_TIMESTAMP(NOW()))");
	announce "Rewards hava been sent via mail.",bc_self|bc_blue;
	query_sql("UPDATE `mail` SET message = REPLACE(message,'%',CHAR(13)) WHERE send_name = 'no-reply'");
}

Can anyone please help me convert this into getitem script command?






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users


This topic has been visited by 15 user(s)