EL Dragon Posted July 29, 2014 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
0 Skorm Posted July 29, 2014 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
0 EL Dragon Posted July 29, 2014 Author Posted July 29, 2014 (edited) is on line 17 error Edited July 29, 2014 by EL Dragon Quote
0 Potato Chips Posted September 2, 2014 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
0 Emistry Posted September 3, 2014 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
0 Potato Chips Posted September 3, 2014 Posted September 3, 2014 So I can install it by using npc or SQL table? Quote
0 Vince Jimenez Posted March 29, 2015 Posted March 29, 2015 is this working on eAmod ? can someone help me to work on eAmod server emulatr please ?P( Quote
0 Potato Chips Posted January 27, 2016 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
0 Skorm Posted January 30, 2016 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
0 Potato Chips Posted January 30, 2016 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
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
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.