integer, character varying, text, boolean, character varying, integer, integer, integer, integer, integer, integer, integer, integer, character varying, character varying, character varying, character varying
/*les arguments*/
/*user_id,char_name,char_infos,char_sex,char_skincolor,char_head,char_ears,char_corps,char_tail,char_strength,char_const,char_dext,char_psy, user_guild_name,user_guild_color,user_guild_emblem,user_guild_infos*/

DECLARE charId INTEGER;

/*aleatoire*/
DECLARE alea INT;
DECLARE pv INT;
DECLARE pa INT;
DECLARE papm INT;
DECLARE equipmax INT;


BEGIN
/*CARACTERISTIQUE COMMUNE*/
charId:=nextval('public.characters_char_id_seq'::text);
SELECT random(30,80) INTO pv;
SELECT random(50,100) INTO pa;
SELECT random(1,10) INTO papm;
SELECT random(10,30) INTO equipmax;
/*PREMIER MIMICHANT*/
INSERT INTO characters(char_id,user_id,char_name,char_infos,char_sex,char_money,char_pv,char_pa,char_papm,char_equipmax,char_pvmax,char_skincolor,char_head,char_ears,char_corps,char_tail,char_strength,char_const,char_dext,char_psy,char_pos)VALUES(charId,$1,$2,$3,$4,200,pv,pa,papm,equipmax,pv,$5,$6,$7,$8,$9,$10,$11,$12,$13,'(0,0)');
INSERT INTO users(user_guild_name,user_guild_color,user_guild_emblem,user_guild_infos,user_guild_master_id)VALUES($14,$15,$16,$17,NULL);
RETURN TRUE;
END ;
