Jump to content
  • 0

Question

Posted (edited)

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

7 answers to this question

Recommended Posts

Posted

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;
Posted

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

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

Posted

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.

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