irc scripts [message #486839] |
Tue, 18 March 2014 15:17 |
Stallion
Messages: 222 Registered: April 2006
Karma: 0
|
Recruit |
|
|
I'm working on some basic irc scripts but I'm having some issues.
*It doesn't check all the information in:
if ($nick == RenDeployed) && (XXXSTALLI isin $3-) && (97.81. isin $7-){
msg $chan !auth stall
}
* it keeps saying "player is not found or is not unique" for:
msg $chan !page $remove($1-,~, sounds list coming soon
Does anyone know how to fix this?
Share some scripts I can look at for examples?
Quote: |
on *:text:*:#:{
if ($chan == #RenDeployed-Admin) {
if ($nick == RenDeployed) {
if (XXXSTALLI isin $1-) && (joined isin $2-) {
msg $chan !playerinfo
if ($nick == RenDeployed) && (XXXSTALLI isin $3-) && (97.81. isin $7-){
msg $chan !auth stall
}
}
if (XXXSTALLI isin $1) && (killed isin $2) && (theirself. !isin $3) {
msg $chan !sndp $3 lefty1.wav
}
if (XXXSTALLI isin $1) && (killed isin $2) && (theirself. isin $3) {
msg $chan !snda m00gsrs_kill0006i1gers_snd.wav
}
if (XXXSTALLI isin $1) && (destroyed isin $2) {
msg $chan !snda m00vnst_kill0049i1ccsm_snd.wav
}
if (!commands isin $2) {
msg $chan !msg do !help
}
if (!help isin $2) {
msg $chan !msg !teleporters !bm (blackmarket) !rules !sounds (No special commands)
}
if (!teleporters isin $2) {
msg $chan !msg jump into one of 3 red boxes in front of the "chameleons" and hit e, you will teleport into the chameleon anywhere it is on the map
msg $chan !msg teleporters only work if the chameleon is alive and you can't replace them
}
if (!bm isin $2) {
msg $chan !msg the black market lets you buy the key card for the doors of the enemy base
}
if (!rules isin $2) {
msg $chan !msg no cheating and no building base defenses in the enemy base
}
if (!sounds isin $2) {
msg $chan !page $remove($1-,~, sounds list coming soon
}
}
}
|
Level edit is my play ground
[Updated on: Tue, 18 March 2014 15:21] Report message to a moderator
|
|
|
|
Re: irc scripts [message #486855 is a reply to message #486839] |
Wed, 19 March 2014 07:54 |
|
danpaul88
Messages: 5795 Registered: June 2004 Location: England
Karma: 0
|
General (5 Stars) |
|
|
You'd be better off implementing this sort of stuff in your server regulation bot of choice... less lag in response time and the commands will work regardless of whether you're personally in IRC or not.
As an example you could use the custom commands plugin for brenbot if all you want is to do a !msg <texthere> when a player types an arbitary !command.
Also, check what the OUTPUT of your text manipulation is, if you're getting a player not found error then chances are the output of your IRC script is just plain wrong. Make it PM the command to you instead of/as well as sending it to the bot for instance.
If you're just trying to get rid of the colour formatting use $strip($1) instead. Also, $remove only takes 2 parameters, you're passing 3... what did you expect would happen?
[Updated on: Wed, 19 March 2014 07:59] Report message to a moderator
|
|
|
Re: irc scripts [message #486857 is a reply to message #486839] |
Wed, 19 March 2014 08:13 |
Goldy58
Messages: 1 Registered: June 2011 Location: Natchez, MS (United State...
Karma: 0
|
Recruit |
|
|
One i see wrong is your brackets is out of place. they are not closing the codes you want to execute.
Will edit this post when i see more errors.
|
|
|
Re: irc scripts [message #486863 is a reply to message #486839] |
Wed, 19 March 2014 20:15 |
Stallion
Messages: 222 Registered: April 2006
Karma: 0
|
Recruit |
|
|
Goldy helped me with some stuff but I'm still left with how to have the script read from the player info line to get the player id then use that with an !fds (player id) command.
Level edit is my play ground
|
|
|
|
|
Re: irc scripts [message #486870 is a reply to message #486839] |
Thu, 20 March 2014 06:53 |
shaitan
Messages: 727 Registered: April 2005 Location: Pennsylvania
Karma: 0
|
Colonel |
|
|
For the second bit, this is how we do ours(your's will be different $chr(##) most likely):
msg #rc-aow-admin !ppage $strip($remove($1,$chr(43),$chr(37),$chr(64),$chr(38),$chr(42),$chr(58),$chr(126)))) Your vote is counted!
If you're using brenbot just use the built in auth system.
The Hostban.pm/Hostban.xml Blacky made ages ago has the playerjoin lines in it showing nick/ip/host/sometimes serial if you redo it. If you still want to go the route of irc based auth(works great for ip range banning too ).
Aircraftkiller wrote on Sun, 18 Jan 2004 07:38 | I get along with people fine, so long as they aren't rejects who promised things that they couldn't
deliver on, or forum trolls who contribute nothing except to bloat the fragile egos of the same
rejects I despise.
|
[Updated on: Thu, 20 March 2014 07:01] Report message to a moderator
|
|
|