hakuren Posted December 13, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 12/02/11 Last Seen: November 6, 2023 Share Posted December 13, 2013 (edited) how can mysql receive data like char.sql i like to make a npc that has a sql function ex. npc has categories like "Jumping, Pushing, Hiding" when player A talks to that npc all the chosen categories will record to sql can someone help me with this sql table must like this char_id | selections or tell me if this can be done or not thank you in advance Edited December 13, 2013 by hakuren Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted December 18, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted December 18, 2013 /* create table npc_categories ( char_id int(11), categories varchar(20) ) engine = innodb; */ prontera,156,189,6 script kjdhfksdjf 100,{ mes "blah"; next; .@s = select(.menu$) -1; mes .string$[.@s]; query_sql "insert into npc_categories values ( "+ getcharid(0) +", '"+ escape_sql( .string$[.@s] ) +"' )"; close; OnInit: setarray .string$, "Jumping", "Pushing", "Hiding"; for ( .@i = 0; .@i < 3; .@i++ ) .menu$ = .menu$ + .string$[.@i] +":"; end; }start learn sql from herehttp://www.w3schools.com/sql/ Quote Link to comment Share on other sites More sharing options...
Patskie Posted December 13, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: November 10, 2024 Share Posted December 13, 2013 Refer to query_sql command Quote Link to comment Share on other sites More sharing options...
hakuren Posted December 13, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 12/02/11 Last Seen: November 6, 2023 Author Share Posted December 13, 2013 Refer to query_sql command yes sir but how can i create a data like that can you make me one for example purposes please? Quote Link to comment Share on other sites More sharing options...
15peaces Posted December 13, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 143 Reputation: 8 Joined: 02/11/13 Last Seen: 1 hour ago Share Posted December 13, 2013 query_sql "<your sql commandline>",<your output variable>; ... Quote Link to comment Share on other sites More sharing options...
hakuren Posted December 13, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 12/02/11 Last Seen: November 6, 2023 Author Share Posted December 13, 2013 (edited) query_sql "<your sql commandline>",<your output variable>; ... so sir how can i make a sql table? can you make me that example please Edited December 13, 2013 by hakuren Quote Link to comment Share on other sites More sharing options...
hakuren Posted December 20, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 12/02/11 Last Seen: November 6, 2023 Author Share Posted December 20, 2013 /* create table npc_categories ( char_id int(11), categories varchar(20) ) engine = innodb; */ prontera,156,189,6 script kjdhfksdjf 100,{ mes "blah"; next; .@s = select(.menu$) -1; mes .string$[.@s]; query_sql "insert into npc_categories values ( "+ getcharid(0) +", '"+ escape_sql( .string$[.@s] ) +"' )"; close; OnInit: setarray .string$, "Jumping", "Pushing", "Hiding"; for ( .@i = 0; .@i < 3; .@i++ ) .menu$ = .menu$ + .string$[.@i] +":"; end; }start learn sql from herehttp://www.w3schools.com/sql/ wow it works! thank you! Quote Link to comment Share on other sites More sharing options...
Question
hakuren
how can mysql receive data like char.sql i like to make a npc that has a sql function
ex. npc has categories like "Jumping, Pushing, Hiding"
when player A talks to that npc all the chosen categories will record to sql
can someone help me with this
sql table must like this char_id | selections
or tell me if this can be done or not
thank you in advance
Edited by hakurenLink to comment
Share on other sites
6 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.