Eross Posted May 15, 2021 Group: Members Topic Count: 155 Topics Per Day: 0.11 Content Count: 349 Reputation: 12 Joined: 04/05/20 Last Seen: April 19, 2023 Share Posted May 15, 2021 Hi ! Im trying to make a paid rename npc for homun and pet but its not working on my sql script query_sql "UPDATE `pet` SET `name` = '"+escape_sql(.@petnewname$)+"' WHERE `name` = '"+getpetinfo(2)+"'"; query_sql "UPDATE `homunculus` SET `name` = '"+escape_sql(.@name$)+"' WHERE `name` = '"+strcharinfo(0)+"'"; Its updating on my database but once I relog it will change back to old name ,... thanks Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted September 4, 2021 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10013 Reputation: 2345 Joined: 10/28/11 Last Seen: Monday at 04:56 PM Share Posted September 4, 2021 atcommand "@petrename "+.@name$; use this instead. if you are using the SQL method above, your char need to be disconnected from server before the SQL query is executed to update the server, otherwise your current character data will override the changes when it saved into database upon logout. Quote Link to comment Share on other sites More sharing options...
0 Eross Posted September 4, 2021 Group: Members Topic Count: 155 Topics Per Day: 0.11 Content Count: 349 Reputation: 12 Joined: 04/05/20 Last Seen: April 19, 2023 Author Share Posted September 4, 2021 26 minutes ago, Emistry said: atcommand "@petrename "+.@name$; use this instead. if you are using the SQL method above, your char need to be disconnected from server before the SQL query is executed to update the server, otherwise your current character data will override the changes when it saved into database upon logout. Thanks ! how about in homunculus sir ? Quote Link to comment Share on other sites More sharing options...
Question
Eross
Hi ! Im trying to make a paid rename npc for homun and pet but its not working on my sql script
query_sql "UPDATE `pet` SET `name` = '"+escape_sql(.@petnewname$)+"' WHERE `name` = '"+getpetinfo(2)+"'"; query_sql "UPDATE `homunculus` SET `name` = '"+escape_sql(.@name$)+"' WHERE `name` = '"+strcharinfo(0)+"'";
Its updating on my database but once I relog it will change back to old name ,... thanks
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.