Jump to content
  • 0

help NPC Email Updater Script


Question

Posted

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

2 answers to this question

Recommended Posts

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

 

  • Upvote 1
  • 0
Posted
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.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...