PDA

View Full Version : FFAC/Tool : how to use : msn/aim/icq bot | skill


hackziner
07-15-2007, 13:07
Require:

Lastest version of FFAC/Tool installed and ffac_sys.inc to compile
http://forums.alliedmods.net/showthread.php?t=55731

IM BOT

How to use im bot function of FFAC/Tool ?

FFAC/Tool support 3 im service : msn, aim and icq.
FFAC/Tool isn't an im client, it just sends message to python & php bot on the ffac server.

Bots capacities :
MSN : 10 msg by min. max
AIM : 100 msg by min. max
ICQ : 100 msg by min. max
MSN : about 500 contact
AIM : more than 200
ICQ : more than 200
MSN : 30 sec delay
AIM : 5 sec delay
ICQ : 5 sec delay

FFAC/Tool functions

ffac_msn_message2admin(msg[128])
ffac_msn_message2admin2(msg[128],ident[32],nickname[32])
ffac_msn_message(msg[128],msncontact[128])

Here are the 3 differents way to send a message. Functions are the same for aim & icq : ffac_aim_message2admin(msg[128]), ...


ffac_msn_message2admin(msg[128])
ffac_msn_message2admin2(msg[128],ident[32],nickname[32])Both function are used to send message to adress defined with the FFAC cvar ffac_msn_contact, ffac_aim_contact, ffac_aim_contact.

The first allow allow to send a message without reporting the sender identity. The second allow to report the sender identity.
ffac_msn_contact, ... are supposed to contain admin contact adress.

ffac_msn_message(msg[128],msncontact[128])The last one is done to send message to other people than admins.

faq

How to add a contact ?

-Send a message, the bot will drop the message and add the contact in the contact list


How ti remove a contact ?

-You can't

How to get the contact list ?

-You can't

How to send a message to several contact ?

-"[email protected];[email protected];[email protected]"

Please use icq adress without "-"

Sample

#include <amxmodx>
#include <amxmisc>
#include <ffac_sys>

#define PLUGIN "FFAC ICQ bot sample"
#define VERSION "0.1"
#define AUTHOR "hackziner"

#define PUB_TASK 22215


public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
ffac_register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar("ffac_icq_bot_version",VERSION,FCVAR_SERVER)
register_clcmd("say", "handle_say")
}


public handle_say(id)
{
new said[128]

read_args(said,128)

if( containi(said, "admin") != -1 )
{
new szName[32]
new szAuthID[32]
get_user_name(id,szName,32)
get_user_authid(id,szAuthID,32)
ffac_icq_message2admin2(said,szAuthID,szName)
}
}


Skill

What's ffac skill ?

FFAC skill is a score based on your victim or killer skill.
Imagine you've 50 000 of skill and you kill someone with 70 000, you'll get something like 100 points. The next round this person kill you, he'll get something like 60 points.

You can spend 30 hours by week, if you're bad your skill'll low :) It depends on who you kill.

how to:

You can't get the skill of a player before his auth on ffac.

when a player is auth on ffac the function

ffac_client_auth(id) is called

ffac_get_skill(id) return the skill as int


Sample:

#include <amxmodx>
#include <amxmisc>
#include <ffac_sys>

#define PLUGIN "FFAC skill sample"
#define VERSION "0.1"
#define AUTHOR "hackziner"

#define PUB_TASK 22215


public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
ffac_register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar("ffac_skill_sample",VERSION,FCVAR_SERVER)
}


public ffac_client_auth(id)
{
new skill = ffac_get_skill(id)
if (skill<40000) client_print ( id, "You're weak !")
}

Vanquishe[rR]
02-26-2010, 01:47
how do you complie
ffac_sys.inc to compile