Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » irc scripts  () 1 Vote
irc scripts [message #486839] Tue, 18 March 2014 15:17 Go to next message
Stallion is currently offline  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-,~,Smile 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-,~,Smile 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 #486854 is a reply to message #486839] Wed, 19 March 2014 06:08 Go to previous messageGo to next message
Tiny
Messages: 49
Registered: May 2011
Karma: 0
Recruit
Explain what your wanting it to do and that could help a lot more.
Re: irc scripts [message #486855 is a reply to message #486839] Wed, 19 March 2014 07:54 Go to previous messageGo to next message
danpaul88 is currently offline  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?


http://steamsignature.com/card/1/76561197975867233.png

[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 Go to previous messageGo to next message
Goldy58 is currently offline  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 Go to previous messageGo to next message
Stallion is currently offline  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 #486867 is a reply to message #486839] Thu, 20 March 2014 02:36 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
You can't parse the response to !pi in the same function call as you make the request, you have to parse it when it enters the onText callback a second time.

http://steamsignature.com/card/1/76561197975867233.png
Re: irc scripts [message #486868 is a reply to message #486839] Thu, 20 March 2014 04:11 Go to previous messageGo to next message
Tiny
Messages: 49
Registered: May 2011
Karma: 0
Recruit
You can do that via a %variable or hashtables.
Re: irc scripts [message #486870 is a reply to message #486839] Thu, 20 March 2014 06:53 Go to previous message
shaitan is currently offline  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 Razz).



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

Previous Topic: Thanks to the TT Devs.
Next Topic: [Request] Build server scripts
Goto Forum:
  


Current Time: Tue Apr 16 10:46:21 MST 2024

Total time taken to generate the page: 0.00658 seconds