Raised This Month: $51 Target: $400
 12% 

Power Auto Responder / Power Macros 2007


Post New Thread Reply   
 
Thread Tools Display Modes
chris
Senior Member
Join Date: Mar 2007
Location: America
Old 01-03-2008 , 21:01   Re: Power Auto Responder / Power Macros 2007
Reply With Quote #11

Nice plugin. Using it on my server.
+Karma
__________________
chris is offline
Send a message via AIM to chris
stylerro
Senior Member
Join Date: Mar 2007
Old 01-04-2008 , 02:47   Re: Power Auto Responder / Power Macros 2007
Reply With Quote #12

can u to add screens or a little mouvie? tks
stylerro is offline
BorysWWa
New Member
Join Date: Feb 2008
Old 02-16-2008 , 15:20   Re: Power Auto Responder / Power Macros 2007
Reply With Quote #13

Hello,
I have never used Regex, especially with Counter-Strike.
I have found some tutorials, but I don't know where to start from, especially when I don't know, how is regex implemented in CS.
Could You please provide me with some simple example of this a regex expression, which should be entered into powerautoresponder.ini, that would kick off when user enters in "say".. let's say "whatever" (without quoutation marks) for example?
Having such example would make it a lot easier to understand whole idea.

I gues, that when I want autoresponder to execute "blahblah.cfg" after someone writing "whatever" in say, I would need to include following lines:
Code:
<regex phrase catching this "whatever">
exec blahblah.cfg

<another regex phrase cathing other word...>
another thing to do...

etc.
etc.
and if I would like to use macros for that, I would need to substitute "exec blahblah.cfg" with "amx_macro samplemacro" (without quoutation marks) and include something like this in powermacros.ini:


Code:
 [samplemacro]
%s decided to execute blahblah.cfg on server console;chat;all
exec blahblah.cfg;servercmd
am I right?
Thank You in advance for help.

Best Regards,
Borys.
BorysWWa is offline
[DeathTV] Sid 6.7
Member
Join Date: Oct 2007
Old 02-17-2008 , 00:25   Re: Power Auto Responder / Power Macros 2007
Reply With Quote #14

howdy

the regex is the same syntax as Perl Regular Expressions

Quick regex examples
//catches the word whatever anywhere in their sentence
whatever
//catches only when they say whatever at the beginning of their sentence
^whatever
//when whatever is the only word spoken
^whatever$
//say you want to catch the words what and ever anywhere
what.*ever

Special characters
* - match preceding char at least zero times
+ - at least once
? - character may or may not be there
. - stands for any character
^ - this marks the beginning of a sentence
$ - end

search the net for perl regular expressions, you will eventually become ninja-like in your regex skills
__________________
Power Votes Core << Democracy at your fingertips
Get Mortal Kombat Miscstats for CS
[DeathTV] Sid 6.7 is offline
BorysWWa
New Member
Join Date: Feb 2008
Old 02-17-2008 , 12:08   Re: Power Auto Responder / Power Macros 2007
Reply With Quote #15

Thank You very much for a quich response.
Now (after correcting some of coding) everything works perfectly

Thanks a lot!
BorysWWa is offline
BorysWWa
New Member
Join Date: Feb 2008
Old 03-02-2008 , 16:33   Re: Power Auto Responder / Power Macros 2007
Reply With Quote #16

Hello again!
I have managed to spend some time learnig this PAR, and I think it's great!
Only thing, that's it's missing is possibility to run macro (amx_macro) without specifying player, that this macro should be run on. - it's usefull for macros, that are player independent like "map-change" macros (ie - I have created a macro, that checks, if Headshot-only mode is on, and adds this info into rules, so that players were aware of that), and so on.
Another thing is MOTD - I can't make this examplary motd macro ([welcomemsg]) to work - it shows as many motd's as there are lines in it (and only if i substitute conmotd with motd - with conmotd it doesn't work at all) - witch means, that when I turn off "im", player will see motd showing one (first) line, wich in this case is "=========================", then, when he closes this motd, he will see another one showing next line and so on. It would be nice to implement output to a file - something like
ls 1;"filename.txt"
"blahblahblah";fileadd
"blah2blah2blah2";fileadd
this would create file "filename.txt" with two lines above in it.

"filename.txt";fileclear would delete file filename.txt and create new - empty one named the same
"filename.txt";filedel would delete file filename.txt

this could be used to create dynamic motd's, altering maps.ini files, config files and so on...

and one more thing: global variables - something like loadstring but global - after finishing macro, value would not be erased - some additional cvars could be registered for that purpose - something like:
par_var1
par_var2
...
par_var10
This would make it possible (along with task scheduler) to limit uses of macro to, for example - once an hour. - this would prevent users from overusing of some macros.
What do You think about this?

BR,
Borys

Last edited by BorysWWa; 03-02-2008 at 16:50.
BorysWWa is offline
[DeathTV] Sid 6.7
Member
Join Date: Oct 2007
Old 03-03-2008 , 19:29   Re: Power Auto Responder / Power Macros 2007
Reply With Quote #17

Hi man,
I'll do my best here to answer

amx_macro without player
I could do targetless macros, if you do a macro without a player target and the macro has some action lines that target player only, it will target everyone, or if you do some loadvar setting it may throw runtime errors. Of course if one knows what they are doing there is no problem. The cyclic macro is the only macro that doesn't have a target right now. I could do it like this: you could execute them from "server" like amx_maro server somemacroname, and you wouldn't need a player to execute them on.

welcomemsg
Yeah it's meant for console only and to be called from the connect macro.
It would be easy to add file I/O such as fileadd and filedel, lots of possibilities. Best to add the filename in position 6, and use the first 5 loadstrings as format input. Good idea.
Also, you sure it doesn't work in its native form? try to execute it on yourself in its unchanged form.

global vars
loadvars positions 6-10 are never reset so you can use those, unless you are talking about variables that persist after map change. In another scenario I could institute a symbol table inside PAR, that way you could name variables anything in the world and treat them as you would other loadvars. Cvars would also be an easy approach as that could be natively used already, and I think this is what you want because they always persist in memory. What approach would you be likely to use (upper loadvars 6-10, symbol table, cvars)?

the whole thing is basically an interpreted language, it feels good not to use the compiler once in a while
__________________
Power Votes Core << Democracy at your fingertips
Get Mortal Kombat Miscstats for CS
[DeathTV] Sid 6.7 is offline
BorysWWa
New Member
Join Date: Feb 2008
Old 03-04-2008 , 15:04   Re: Power Auto Responder / Power Macros 2007
Reply With Quote #18

Hello!

Quote:
amx_macro without player
I could do targetless macros, if you do a macro without a player target and the macro has some action lines that target player only, it will target everyone, or if you do some loadvar setting it may throw runtime errors. Of course if one knows what they are doing there is no problem. The cyclic macro is the only macro that doesn't have a target right now. I could do it like this: you could execute them from "server" like amx_maro server somemacroname, and you wouldn't need a player to execute them on.
This would be great! I'm really looking forward for such update. Right Now I need to assign such macros to [connect], so that it's executed each time someone connects to server. Unfortunatelly right know that's only way to make sure, that macro is executed on each mapchange.
Maybe You could also add another predefined, targetless macro like [onmapchange].. this might also be helpfull.

Quote:
welcomemsg
Yeah it's meant for console only and to be called from the connect macro.
It would be easy to add file I/O such as fileadd and filedel, lots of possibilities. Best to add the filename in position 6, and use the first 5 loadstrings as format input. Good idea.
Great! Can't wait to see results of these ideas

Quote:
Also, you sure it doesn't work in its native form? try to execute it on yourself in its unchanged form.
Ok, I have checked it, and it works well. It just didn't came to me to look for MOTD in console

Quote:
global vars
loadvars positions 6-10 are never reset so you can use those, unless you are talking about variables that persist after map change. In another scenario I could institute a symbol table inside PAR, that way you could name variables anything in the world and treat them as you would other loadvars. Cvars would also be an easy approach as that could be natively used already, and I think this is what you want because they always persist in memory. What approach would you be likely to use (upper loadvars 6-10, symbol table, cvars)?
loadvars 6-10, as You mentioned, are erased after map change, which makes it impossible to use for general server management/maintenance/administate/status.
Symbol table would be nice, as long, as values in it would piersist after map change.
But, if that is not possible, Cvars would suffice. They are easy to use, standard, and easy to be manipulated from any other plugin (like task scheduler and so on).

Thank Yo uvery much, for such a quick response I appreciate Your effort to keep this plugin as good, as it's possible

BR,
Borys
BorysWWa is offline
Paxy
New Member
Join Date: Jul 2008
Old 07-03-2008 , 06:05   Re: Power Auto Responder / Power Macros 2007
Reply With Quote #19

Hi,
Great job !
Is there any way to place a trigger that would execute command on server side, based on number of players.
When number of players are below half of max, do map change, or ....
Paxy is offline
[DeathTV] Sid 6.7
Member
Join Date: Oct 2007
Old 07-03-2008 , 22:10   Re: Power Auto Responder / Power Macros 2007
Reply With Quote #20

yes, under your cyclic macro add this code


li 1,players
//assuming maxplayers is 16
li 2,16
lessint 1,2
ifyes amx_map de_dust;servercmd



It will run this code once every minute

To Borys: I may add those updates in a week or two
__________________
Power Votes Core << Democracy at your fingertips
Get Mortal Kombat Miscstats for CS
[DeathTV] Sid 6.7 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:55.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode