Jump to content
  • 0

bindatcmd @bst Help


EL Dragon

Question


  • Group:  Members
  • Topic Count:  86
  • Topics Per Day:  0.02
  • Content Count:  591
  • Reputation:   146
  • Joined:  06/19/12
  • Last Seen:  

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

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  


/*

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;

}

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  86
  • Topics Per Day:  0.02
  • Content Count:  591
  • Reputation:   146
  • Joined:  06/19/12
  • Last Seen:  

is on line 17 error  -_-

Edited by EL Dragon
Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

Change strlen to getstrlen.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  54
  • Reputation:   1
  • Joined:  08/28/14
  • Last Seen:  

Hello, How do I install this?
via NPC?
if this is to SQL  /  PHP ADMIN please enlighten me @Skorm Ty

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  54
  • Reputation:   1
  • Joined:  08/28/14
  • Last Seen:  

So I can install it by using npc or SQL table?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  68
  • Reputation:   1
  • Joined:  10/16/12
  • Last Seen:  

is this working on eAmod ? can someone help me to work on eAmod server  emulatr please ?P(

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  54
  • Reputation:   1
  • Joined:  08/28/14
  • Last Seen:  

 

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.

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

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;
}
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  54
  • Reputation:   1
  • Joined:  08/28/14
  • Last Seen:  

 

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 by Potato Chips
Link to comment
Share on other sites

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.

×
×
  • Create New...