Jump to content
  • 0

About query_sql


Lil Troll

Question


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

Greetings fellas! :D

 

Anyone knows how to revert name back to normal? using this script?

mes "blablablabla"
menu ("yes",1nn,"revert",2nn)
1nn:
set @charname$,"+strcharinfo(0)+";
set @title$,[TITLE];
query_sql "UPDATE `char` SET name,'"+escape_sql(@title$)"' '"+ escape_sql(@charname$) + "'; WHERE `name`='" + escape_sql(@charname$) + "'";
2nn: ??
Edited by Lil Troll
Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

There is a mod drifting around that allows @fakename to show guild and party it would be much better to use that method instead of this one.

 

Then you could just do @fakename to remove the title...

 

I'll do I little looking for it and post back if I find it.

 

Edit--

http://rathena.org/board/topic/60188-fakename-show-guildparty/

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Greetings fellas! :D

 

Anyone knows how to revert name back to normal? using this script?

mes "blablablabla"
menu ("yes",1nn,"revert",2nn)
1nn:
set @charname$,"+strcharinfo(0)+";
set @title$,[TITLE];
query_sql "UPDATE `char` SET name,'"+escape_sql(@title$)"' '"+ escape_sql(@charname$) + "'; WHERE `name`='" + escape_sql(@charname$) + "'";
2nn: ??

Try : 

// Extract name with title
    explode(.@name$, strcharinfo(0), " ");
    set .@real_name$, .@name$[1];
    query_sql "UPDATE `char` SET `name` = '" + escape_sql(.@real_name$) + "' WHERE `char_id` = '" + getcharid(0) + "'";
    end;
Link to comment
Share on other sites


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

it wont work perfectly...certain players name have alots of spacing...

 

the best way you can try...i think is these...

  • save Original Name into a Permanent Character Variable. or other storing way like new sql table...or etc
  • when player want to revert their name, just set back the name according to the variable ..
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

it wont work perfectly...certain players name have alots of spacing...

 

the best way you can try...i think is these...

  • save Original Name into a Permanent Character Variable. or other storing way like new sql table...or etc
  • when player want to revert their name, just set back the name according to the variable ..

Lol i am thinking of that too. but too lazy to edit hahaha :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  341
  • Reputation:   43
  • Joined:  01/10/12
  • Last Seen:  

Hmm.. 'replacestr' might work as well.
 

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

I'm still sticking with this isn't a good idea... SQL updates in-game are very slow and often require a re-log. The fakename mod would be a much better choice and wouldn't write and rewrite entries to the database.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Ang besides if player update his name through sql and exceeds 23 characters it will be deleted. 

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