ThyroDree 3 Posted February 11, 2014 this is the command for buy and Sell or trade example: i want to buy 1 Kiel Card @bst B> Kiel D-01 Card = PM Me Offer the broadcast Shows like this [Market] Admin : B> Kiel D-01 Card = PM Me Offer Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted February 11, 2014 http://rathena.org/board/topic/90929-rscript/ think I write another for hercules http://upaste.me/f7881058492d6f76b can someone convert this into plugin ? I wanna see how the player variable in pc.h is added Quote Share this post Link to post Share on other sites
0 ThyroDree 3 Posted February 11, 2014 (edited) i tried to add this on rathena svn but error x.x http://upaste.me/f7881058492d6f76b i this rathena http://rathena.org/b.../90929-rscript/ i cant find the src/custom/atcommand.inc and src/custom/atcommand_def.inc because im using a 16797 rathena svn [/size] and help can you help me [/size]add this src by not updating my svn because i changed alot of src on my rathena svn .[/size] OPPSS. already solve that for help AnnieRuru can u help me i cant add a delay i got this error when i put delay [Error]: delete_timer error : function mismatch 00427F30(connect_check_clear) != 00402E7D(pc_endautobonus) http://rathena.org/board/pastebin/1cvelflk4v6k/txt/ and follow this open your pc.h file[/size] make sure the int bst_delay; is inside the struct map_session_data[/size] struct map_session_data {....int bst_delay;}; Edited February 13, 2014 by AnnieRuru merge post Quote Share this post Link to post Share on other sites
0 ThyroDree 3 Posted February 13, 2014 help please i cant add delay on @bst Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted February 13, 2014 inside map_session_data function at pc.h add int bst_delay;.. what's so difficult =/ even Blue Jem on that topic also got it working fine in eathena Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted February 14, 2014 since you said rAthena, so I guess your server supported *bindatcmd just load this script, no need source modification - 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 + 60 > gettimetick(2) ) { message strcharinfo(0), "There is a 60 seconds delay of using this command again"; end; } @bst_delay = gettimetick(2); announce "[Market] "+ strcharinfo(0) +" : "+ implode( .@atcmd_parameters$," " ), bc_all, 0x9999FF; end;} Quote Share this post Link to post Share on other sites
0 ThyroDree 3 Posted February 17, 2014 since you said rAthena, so I guess your server supported *bindatcmd just load this script, no need source modification - 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 + 60 > gettimetick(2) ) { message strcharinfo(0), "There is a 60 seconds delay of using this command again"; end; } @bst_delay = gettimetick(2); announce "[Market] "+ strcharinfo(0) +" : "+ implode( .@atcmd_parameters$," " ), bc_all, 0x9999FF; end;} thanks but how to can i add the command will detect if the player don't put B> / T> / S> the command will not be broadcast. example @bst Hello. ( the commands will say " Market Symbol is Needed when using this command " B>,T> , S> , B/T> , or S/T>". ) Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted February 17, 2014 - 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; } .@symbol$ = substr( .@atcmd_parameters$, 0,1 ); if ( .@symbol$ != "B>" && .@symbol$ != "S>" && .@symbol$ != "T>" ) { message strcharinfo(0), "Market Symbol is Needed when using this command ( B> S> T> )"; end; } if ( @bst_delay + 60 > gettimetick(2) ) { message strcharinfo(0), "There is a 60 seconds delay of using this command again"; end; } @bst_delay = gettimetick(2); announce "[Market] "+ strcharinfo(0) +" : "+ implode( .@atcmd_parameters$," " ), bc_all, 0x9999FF; end;} Quote Share this post Link to post Share on other sites
0 ThyroDree 3 Posted February 19, 2014 - 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; } .@symbol$ = substr( .@atcmd_parameters$, 0,1 ); if ( .@symbol$ != "B>" && .@symbol$ != "S>" && .@symbol$ != "T>" ) { message strcharinfo(0), "Market Symbol is Needed when using this command ( B> S> T> )"; end; } if ( @bst_delay + 60 > gettimetick(2) ) { message strcharinfo(0), "There is a 60 seconds delay of using this command again"; end; } @bst_delay = gettimetick(2); announce "[Market] "+ strcharinfo(0) +" : "+ implode( .@atcmd_parameters$," " ), bc_all, 0x9999FF; end;} Thanks! I will try this later Quote Share this post Link to post Share on other sites
0 ThyroDree 3 Posted March 13, 2014 Up for this i got a problem the problem is after @bst B> Tao Gunka = PM ME B>Tao Gunka = PM ME is Broadcasting i just want it to broadcast on Chat Box Only here: Quote Share this post Link to post Share on other sites
0 quesoph 105 Posted March 13, 2014 - script test#444 -1,{OnCommand: $@input$ = implode(.@atcmd_parameters$," " ); $@name$ = strcharinfo(0); if ( !getstrlen( .@atcmd_parameters$ ) ) { message strcharinfo(0), "Please, enter a message (usage: @bst <message>)."; end; } .@symbol$ = substr( .@atcmd_parameters$, 0,1 ); if ( .@symbol$ != "B>" && .@symbol$ != "S>" && .@symbol$ != "T>" ) { message strcharinfo(0), "Market Symbol is Needed when using this command ( B> S> T> )"; end; } if ( bst_delay + 60 > gettimetick(2) ) { message strcharinfo(0), "There is a 60 seconds delay of using this command again"; end; } query_sql ("SELECT `char`.`account_id` FROM `char` JOIN `login` ON `char`.`account_id` = `login`.`account_id` WHERE `char`.`online` = 1", .@account_id); bst_delay = gettimetick(2); // delay while ( .@i < getarraysize(.@account_id) ) { if ( attachrid( .@account_id[.@i] ) ) dispbottom "[" + $@name$ + "]: " + $@input$; // display to every character on the server. detachrid; .@i++; } end;OnInit: bindatcmd "bst",strnpcinfo(0)+"::OnCommand", 0, 1; // bind @bst command. end;} Quote Share this post Link to post Share on other sites
0 Shatowolf 9 Posted March 13, 2014 http://rathena.org/board/topic/90929-rscript/ think I write another for hercules http://upaste.me/f7881058492d6f76b can someone convert this into plugin ? I wanna see how the player variable in pc.h is added What if for chatbox only? Quote Share this post Link to post Share on other sites
0 quesoph 105 Posted March 13, 2014 See this post! if you want it on chatbox. Quote Share this post Link to post Share on other sites
0 Shatowolf 9 Posted March 13, 2014 (edited) See this post! if you want it on chatbox. works at hercules? i got this error : [Warning]: script:implode: array length = 0 Edited March 13, 2014 by Meigan Quote Share this post Link to post Share on other sites
0 quesoph 105 Posted March 13, 2014 ^ It's working. I wouldn't post it if its not. Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted March 13, 2014 (edited) its working at the same time its throwing error implode command must have at least 1 index in the array or the server throws error rathena users quite easy, they have addrid - script bst_atcommand -1,{OnInit: bindatcmd "bst",strnpcinfo(0)+"::OnCommand"; end;OnCommand: if ( !.@atcmd_numparameters ) { message strcharinfo(0), "Please, enter a message (usage: @bst <message>)."; end; } .@symbol$ = substr( .@atcmd_parameters$, 0,1 ); if ( .@symbol$ != "B>" && .@symbol$ != "S>" && .@symbol$ != "T>" ) { message strcharinfo(0), "Market Symbol is Needed when using this command ( B> S> T> )"; end; } if ( @bst_delay + 60 > gettimetick(2) ) { message strcharinfo(0), "There is a 60 seconds delay of using this command again"; end; } @bst_delay = gettimetick(2); .name$ = strcharinfo(0); .message$ = implode( .@atcmd_parameters$," " ); addrid 0; dispbottom "[Market] "+ .name$ +" : "+ .message$; end;}EDIT: why the code broken...ok that [Market] makes this cannot be post on the board it's being read as bbcode hercules user might want to try my getmemberaid http://upaste.me/86b8111195ced159a Edited March 13, 2014 by AnnieRuru Quote Share this post Link to post Share on other sites
0 ThyroDree 3 Posted March 14, 2014 (edited) - script test#444 -1,{OnCommand: $@input$ = implode(.@atcmd_parameters$," " ); $@name$ = strcharinfo(0); if ( !getstrlen( .@atcmd_parameters$ ) ) { message strcharinfo(0), "Please, enter a message (usage: @bst <message>)."; end; } .@symbol$ = substr( .@atcmd_parameters$, 0,1 ); if ( .@symbol$ != "B>" && .@symbol$ != "S>" && .@symbol$ != "T>" ) { message strcharinfo(0), "Market Symbol is Needed when using this command ( B> S> T> )"; end; } if ( bst_delay + 60 > gettimetick(2) ) { message strcharinfo(0), "There is a 60 seconds delay of using this command again"; end; } query_sql ("SELECT `char`.`account_id` FROM `char` JOIN `login` ON `char`.`account_id` = `login`.`account_id` WHERE `char`.`online` = 1", .@account_id); bst_delay = gettimetick(2); // delay while ( .@i < getarraysize(.@account_id) ) { if ( attachrid( .@account_id[.@i] ) ) dispbottom "[" + $@name$ + "]: " + $@input$; // display to every character on the server. detachrid; .@i++; } end;OnInit: bindatcmd "bst",strnpcinfo(0)+"::OnCommand", 0, 1; // bind @bst command. end;} SORRY DOUBLE POST Edited March 14, 2014 by ThyroDree Quote Share this post Link to post Share on other sites
0 ThyroDree 3 Posted March 14, 2014 (edited) - script test#444 -1,{OnCommand: $@input$ = implode(.@atcmd_parameters$," " ); $@name$ = strcharinfo(0); if ( !getstrlen( .@atcmd_parameters$ ) ) { message strcharinfo(0), "Please, enter a message (usage: @bst <message>)."; end; } .@symbol$ = substr( .@atcmd_parameters$, 0,1 ); if ( .@symbol$ != "B>" && .@symbol$ != "S>" && .@symbol$ != "T>" ) { message strcharinfo(0), "Market Symbol is Needed when using this command ( B> S> T> )"; end; } if ( bst_delay + 60 > gettimetick(2) ) { message strcharinfo(0), "There is a 60 seconds delay of using this command again"; end; } query_sql ("SELECT `char`.`account_id` FROM `char` JOIN `login` ON `char`.`account_id` = `login`.`account_id` WHERE `char`.`online` = 1", .@account_id); bst_delay = gettimetick(2); // delay while ( .@i < getarraysize(.@account_id) ) { if ( attachrid( .@account_id[.@i] ) ) dispbottom "[" + $@name$ + "]: " + $@input$; // display to every character on the server. detachrid; .@i++; } end;OnInit: bindatcmd "bst",strnpcinfo(0)+"::OnCommand", 0, 1; // bind @bst command. end;} if i already tried this and working but when a type @bst B>Tao Gunka pa Message said [Player]: B>Tao Gunka i want to be like this [Market] Player : B>Tao Gunka i also can you teach me how can i change the color of the broadcast on chat box? i want to change it to Orange Color Edited March 14, 2014 by ThyroDree Quote Share this post Link to post Share on other sites
0 quesoph 105 Posted March 14, 2014 (edited) If you want a colored dispbottom, you need to add dispbottom2 by Dastgir Pojee.. @edit Not working. Edited March 14, 2014 by quesoph Quote Share this post Link to post Share on other sites
0 quesoph 105 Posted March 14, 2014 its working at the same time its throwing errorimplode command must have at least 1 index in the array or the server throws error Oh I get it now.. this would be the solution for that.. ^^ - script test#444 -1,{OnCommand: if ( !getstrlen( .@atcmd_parameters$ ) ) { message strcharinfo(0), "Please, enter a message (usage: @bst <message>)."; end; } $@input$ = implode(.@atcmd_parameters$," " ); $@name$ = strcharinfo(0); .@symbol$ = substr( .@atcmd_parameters$, 0,1 ); if ( .@symbol$ != "B>" && .@symbol$ != "S>" && .@symbol$ != "T>" ) { message strcharinfo(0), "Market Symbol is Needed when using this command ( B> S> T> )"; end; } if ( bst_delay + 60 > gettimetick(2) ) { message strcharinfo(0), "There is a 60 seconds delay of using this command again"; end; } query_sql ("SELECT `char`.`account_id` FROM `char` JOIN `login` ON `char`.`account_id` = `login`.`account_id` WHERE `char`.`online` = 1", .@account_id); bst_delay = gettimetick(2); // delay while ( .@i < getarraysize(.@account_id) ) { if ( attachrid( .@account_id[.@i] ) ) dispbottom "[Market]" + $@name$ + " : " + $@input$; // display to every character on the server. detachrid; .@i++; } end;OnInit: bindatcmd "bst",strnpcinfo(0)+"::OnCommand", 0, 1; // bind @bst command. end;} Quote Share this post Link to post Share on other sites
0 ThyroDree 3 Posted March 14, 2014 its working at the same time its throwing error implode command must have at least 1 index in the array or the server throws error Oh I get it now.. this would be the solution for that.. ^^ - script test#444 -1,{OnCommand: if ( !getstrlen( .@atcmd_parameters$ ) ) { message strcharinfo(0), "Please, enter a message (usage: @bst <message>)."; end; } $@input$ = implode(.@atcmd_parameters$," " ); $@name$ = strcharinfo(0); .@symbol$ = substr( .@atcmd_parameters$, 0,1 ); if ( .@symbol$ != "B>" && .@symbol$ != "S>" && .@symbol$ != "T>" ) { message strcharinfo(0), "Market Symbol is Needed when using this command ( B> S> T> )"; end; } if ( bst_delay + 60 > gettimetick(2) ) { message strcharinfo(0), "There is a 60 seconds delay of using this command again"; end; } query_sql ("SELECT `char`.`account_id` FROM `char` JOIN `login` ON `char`.`account_id` = `login`.`account_id` WHERE `char`.`online` = 1", .@account_id); bst_delay = gettimetick(2); // delay while ( .@i < getarraysize(.@account_id) ) { if ( attachrid( .@account_id[.@i] ) ) dispbottom "[Market]" + $@name$ + " : " + $@input$; // display to every character on the server. detachrid; .@i++; } end;OnInit: bindatcmd "bst",strnpcinfo(0)+"::OnCommand", 0, 1; // bind @bst command. end;} but AnnieRuru just used this to the old bst script to make color on chat announce "[Market] "+ strcharinfo(0) +" : "+ implode( .@atcmd_parameters$," " ), bc_all, 0x9999FF; end; } can u just add this ? Quote Share this post Link to post Share on other sites
0 leloush 7 Posted March 14, 2014 (edited) its working at the same time its throwing error implode command must have at least 1 index in the array or the server throws error Oh I get it now.. this would be the solution for that.. ^^ - script test#444 -1,{OnCommand: if ( !getstrlen( .@atcmd_parameters$ ) ) { message strcharinfo(0), "Please, enter a message (usage: @bst <message>)."; end; } $@input$ = implode(.@atcmd_parameters$," " ); $@name$ = strcharinfo(0); .@symbol$ = substr( .@atcmd_parameters$, 0,1 ); if ( .@symbol$ != "B>" && .@symbol$ != "S>" && .@symbol$ != "T>" ) { message strcharinfo(0), "Market Symbol is Needed when using this command ( B> S> T> )"; end; } if ( bst_delay + 60 > gettimetick(2) ) { message strcharinfo(0), "There is a 60 seconds delay of using this command again"; end; } query_sql ("SELECT `char`.`account_id` FROM `char` JOIN `login` ON `char`.`account_id` = `login`.`account_id` WHERE `char`.`online` = 1", .@account_id); bst_delay = gettimetick(2); // delay while ( .@i < getarraysize(.@account_id) ) { if ( attachrid( .@account_id[.@i] ) ) dispbottom "[Market]" + $@name$ + " : " + $@input$; // display to every character on the server. detachrid; .@i++; } end;OnInit: bindatcmd "bst",strnpcinfo(0)+"::OnCommand", 0, 1; // bind @bst command. end;} but AnnieRuru just used this to the old bst script to make color on chat >>> announce "[Market] "+ strcharinfo(0) +" : "+ implode( .@atcmd_parameters$," " ), bc_all, 0x9999FF; end; } can u just add this ? im wondering sir.. what u really want? lol just wondering.... someone gives a script using announce with a color.. and the other one gaves u with dispbottom.. and now u want them both ? if u add that line.. it will announce like what u showed in the previous post with a screenshot.(u don't want it right?) AFAIK.. dispbottom cant be in a color code..(not unless someone will do it for u and i believe it will required source modif.) no offense.. just wondering... Edited March 14, 2014 by leloush Quote Share this post Link to post Share on other sites
0 ThyroDree 3 Posted March 14, 2014 i just want to change the color of the message in the Chat Box and... i don't want the message to be like broadcast i just want it to broadcast on Chat Box Only but with Customized Color. Quote Share this post Link to post Share on other sites
0 leloush 7 Posted March 14, 2014 (edited) i just want to change the color of the message in the Chat Box and... i don't want the message to be like broadcast i just want it to broadcast on Chat Box Only but with Customized Color. and sadly dispbottom cant be in a customized color.. If you want a colored dispbottom, you need to add dispbottom2 by Dastgir Pojee.. @edit Not working. read this Edited March 14, 2014 by leloush Quote Share this post Link to post Share on other sites
0 ThyroDree 3 Posted March 14, 2014 i just want to change the color of the message in the Chat Box and... i don't want the message to be like broadcast i just want it to broadcast on Chat Box Only but with Customized Color. and sadly dispbottom cant be in a customized color.. > If you want a colored dispbottom, you need to add dispbottom2 by Dastgir Pojee.. @edit Not working. read this what this means? @editNot working. Quote Share this post Link to post Share on other sites
0 leloush 7 Posted March 14, 2014 (edited) i think, that is dispbottom2 by sir dats.. (it is a custom commands that will make dispbottom to have a color) and he said not working.. idk Edited March 14, 2014 by leloush Quote Share this post Link to post Share on other sites
this is the command for buy and Sell or trade
example:
i want to buy 1 Kiel Card
@bst B> Kiel D-01 Card = PM Me Offer
the broadcast Shows like this
Share this post
Link to post
Share on other sites