Jump to content
  • 0

help NPC Email Updater Script


LordJasz

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   0
  • Joined:  05/21/18
  • Last Seen:  

Sup people.
I'm trying to create a npc that will update the emails and I don't know what is wrong...
Here is the script.

prontera,156,145,4	script	Test NPC::test	589,{
set .@accountid,getcharid(3);
    mes "Do you want to register your email to receive our news?";
    menu "Let's go!",-,"Nah, I'm okay.",L_No;
	next;
	mes "Type your email.";
    input (.@email,5,39);
	query_sql ( "UPDATE `login` SET `email` VALUE "+.@email" WHERE `account_id` LIKE "+.@accountid+"");
	next;
	mes "Muito bem seu e-mail foi cadastrado/atualizado!";
    close;
L_No:
	mes "Tudo bem."
	close;
}

Is anything right at least? Lol

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

while (input (.@email$,5,39));
query_sql ( "UPDATE `login` SET `email` = '"+escape_sql(.@email$)+"' WHERE `account_id` LIKE "+.@accountid+"");

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   0
  • Joined:  05/21/18
  • Last Seen:  

12 hours ago, Emistry said:

while (input (.@email$,5,39));
query_sql ( "UPDATE `login` SET `email` = '"+escape_sql(.@email$)+"' WHERE `account_id` LIKE "+.@accountid+"");

 

Thanks! 100% Working.

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