EL Dragon Posted July 29, 2014 Group: Members Topic Count: 86 Topics Per Day: 0.02 Content Count: 591 Reputation: 146 Joined: 06/19/12 Last Seen: December 10, 2016 Share Posted July 29, 2014 I need a sql log for @ bst this is the script - script bst_atcommand -1,{ OnInit: bindatcmd "bst",strnpcinfo(0)+"::OnCommand"; end; OnCommand: if ( !getstrlen(.@atcmd_parameters$) ) { message strcharinfo(0), "Please, enter a message (usage: @bst <message>)."; end; } if ( @bst_delay + 1800 > gettimetick(2) ) { message strcharinfo(0), "There is a 30 min delay of using this command again"; end; } @bst_delay = gettimetick(2); announce "[Market] "+ strcharinfo(0) +" : "+ implode( .@atcmd_parameters$," " ), bc_all, 0x9999FF; end; } want the,Player_name ,the announce test,and the datum in bst_Market_log is stored hope someone can help me Quote Link to comment Share on other sites More sharing options...
0 Skorm Posted July 29, 2014 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted July 29, 2014 /* CREATE TABLE `ragnarok_logs`.`bst_market_log` ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT, `name` VARCHAR(30) NOT NULL DEFAULT '', `message` VARCHAR(150) NOT NULL DEFAULT '', `time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`)) ENGINE = MyISAM DEFAULT CHARACTER SET = utf8; */ - script bst_atcommand -1,{ OnInit: bindatcmd "bst",strnpcinfo(0)+"::OnCommand"; end; OnCommand: if ( !getstrlen(.@atcmd_parameters$) ) { message strcharinfo(0), "Please, enter a message (usage: @bst <message>)."; end; } if ( @bst_delay + 1800 > gettimetick(2) ) { message strcharinfo(0), "There is a 30 min delay of using this command again"; end; } @bst_delay = gettimetick(2); .@message$ = implode( .@atcmd_parameters$," " ); announce "[Market] "+ strcharinfo(0) +" : "+ .@message$, bc_all, 0x9999FF; query_logsql( "INSERT INTO `bst_market_log` ( `name`, `message` ) VALUES ( '"+escape_sql(strcharinfo(0))+"', '"+escape_sql( getstrlen(.@message$)>150?substr(.@message$,0,149):.@message$ )+"' );" ); end; } 1 Quote Link to comment Share on other sites More sharing options...
0 EL Dragon Posted July 29, 2014 Group: Members Topic Count: 86 Topics Per Day: 0.02 Content Count: 591 Reputation: 146 Joined: 06/19/12 Last Seen: December 10, 2016 Author Share Posted July 29, 2014 (edited) is on line 17 error Edited July 29, 2014 by EL Dragon Quote Link to comment Share on other sites More sharing options...
0 Skorm Posted July 29, 2014 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted July 29, 2014 Change strlen to getstrlen. Quote Link to comment Share on other sites More sharing options...
0 Potato Chips Posted September 2, 2014 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 54 Reputation: 1 Joined: 08/28/14 Last Seen: February 17, 2016 Share Posted September 2, 2014 Hello, How do I install this?via NPC?if this is to SQL / PHP ADMIN please enlighten me @Skorm Ty Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted September 3, 2014 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2371 Joined: 10/28/11 Last Seen: Tuesday at 12:58 PM Share Posted September 3, 2014 Hello, How do I install this? via NPC? if this is to SQL / PHP ADMIN please enlighten me @Skorm Ty SQL table load in phpmyadmin NPC save in NPC folder. Follow the NPC adding guide. Quote Link to comment Share on other sites More sharing options...
0 Potato Chips Posted September 3, 2014 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 54 Reputation: 1 Joined: 08/28/14 Last Seen: February 17, 2016 Share Posted September 3, 2014 So I can install it by using npc or SQL table? Quote Link to comment Share on other sites More sharing options...
0 Vince Jimenez Posted March 29, 2015 Group: Members Topic Count: 26 Topics Per Day: 0.01 Content Count: 68 Reputation: 1 Joined: 10/16/12 Last Seen: August 14, 2016 Share Posted March 29, 2015 is this working on eAmod ? can someone help me to work on eAmod server emulatr please ?P( Quote Link to comment Share on other sites More sharing options...
0 Potato Chips Posted January 27, 2016 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 54 Reputation: 1 Joined: 08/28/14 Last Seen: February 17, 2016 Share Posted January 27, 2016 Hello, How do I install this? via NPC? if this is to SQL / PHP ADMIN please enlighten me @Skorm Ty SQL table load in phpmyadmin NPC save in NPC folder. Follow the NPC adding guide. do you have a script that goes the same but will use @shout instead of @bst? @bst = Market @shout = shoutout or paging or recruiting I tried duplicating this script then changing the name still whenever I type @shout it will show as @bst. Quote Link to comment Share on other sites More sharing options...
0 Skorm Posted January 30, 2016 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted January 30, 2016 do you have a script that goes the same but will use @shout instead of @bst? @bst = Market @shout = shoutout or paging or recruiting I tried duplicating this script then changing the name still whenever I type @shout it will show as @bst. /* CREATE TABLE `ragnarok_logs`.`sout_market_log` ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT, `name` VARCHAR(30) NOT NULL DEFAULT '', `message` VARCHAR(150) NOT NULL DEFAULT '', `time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`)) ENGINE = MyISAM DEFAULT CHARACTER SET = utf8; */ - script sout_atcommand -1,{ OnInit: bindatcmd "shout",strnpcinfo(0)+"::OnCommand"; end; OnCommand: if ( !getstrlen(.@atcmd_parameters$) ) { message strcharinfo(0), "Please, enter a message (usage: @shout <message>)."; end; } if ( @sout_delay + 1800 > gettimetick(2) ) { message strcharinfo(0), "There is a 30 min delay of using this command again"; end; } @sout_delay = gettimetick(2); .@message$ = implode( .@atcmd_parameters$," " ); announce "[Recruiting] "+ strcharinfo(0) +" : "+ .@message$, bc_area, 0x99FFFF; query_logsql( "INSERT INTO `sout_market_log` ( `name`, `message` ) VALUES ( '"+escape_sql(strcharinfo(0))+"', '"+escape_sql( getstrlen(.@message$)>150?substr(.@message$,0,149):.@message$ )+"' );" ); end; } Quote Link to comment Share on other sites More sharing options...
0 Potato Chips Posted January 30, 2016 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 54 Reputation: 1 Joined: 08/28/14 Last Seen: February 17, 2016 Share Posted January 30, 2016 (edited) do you have a script that goes the same but will use @shout instead of @bst? @bst = Market @shout = shoutout or paging or recruiting I tried duplicating this script then changing the name still whenever I type @shout it will show as @bst. /* CREATE TABLE `ragnarok_logs`.`sout_market_log` ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT, `name` VARCHAR(30) NOT NULL DEFAULT '', `message` VARCHAR(150) NOT NULL DEFAULT '', `time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`)) ENGINE = MyISAM DEFAULT CHARACTER SET = utf8; */ - script sout_atcommand -1,{ OnInit: bindatcmd "shout",strnpcinfo(0)+"::OnCommand"; end; OnCommand: if ( !getstrlen(.@atcmd_parameters$) ) { message strcharinfo(0), "Please, enter a message (usage: @shout <message>)."; end; } if ( @sout_delay + 1800 > gettimetick(2) ) { message strcharinfo(0), "There is a 30 min delay of using this command again"; end; } @sout_delay = gettimetick(2); .@message$ = implode( .@atcmd_parameters$," " ); announce "[Recruiting] "+ strcharinfo(0) +" : "+ .@message$, bc_area, 0x99FFFF; query_logsql( "INSERT INTO `sout_market_log` ( `name`, `message` ) VALUES ( '"+escape_sql(strcharinfo(0))+"', '"+escape_sql( getstrlen(.@message$)>150?substr(.@message$,0,149):.@message$ )+"' );" ); end; } Thank you so much skorm, this is very helpful. Commend. Thanks again. Edited January 30, 2016 by Potato Chips Quote Link to comment Share on other sites More sharing options...
Question
EL Dragon
I need a sql log for @ bst this is the script
want the,Player_name ,the announce test,and the datum in bst_Market_log is stored
hope someone can help me
Link to comment
Share on other sites
10 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.