# Vous Aimez Les Bots ? Venez Sur Leekwars

**URL:** <https://forum.gmstemple.com/t/vous-aimez-les-bots-venez-sur-leekwars/13784>\
**Category:** Discussions générales\
**Created:** [Août 6, 2014, 8:46 UTC](https://forum.gmstemple.com/t/vous-aimez-les-bots-venez-sur-leekwars/13784 "2014-08-06T08:46:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Althalus](https://forum.gmstemple.com/letter_avatar_proxy/v4/letter/a/50afbb/32.png) [@Althalus](https://forum.gmstemple.com/u/Althalus)\
**Post date:** [Août 6, 2014, 8:46 UTC](https://forum.gmstemple.com/t/vous-aimez-les-bots-venez-sur-leekwars/13784/1 "2014-08-06T08:46:12Z")

</div>

![Image IPB](http://leekwars.com/R/texture/leek/leek3_front_green.png)

Connaissez vous **LeekWars**?   
Non ? Vraiment ? C'est vraiment dommage...   
  
**LeekWars** est un "jeu" navigateur (si on peut dire ça...) où le but n'est pas de jouer, mais de **coder un IA de poireaux.**  
Ces poireaux vont se servir d'arme ou de "puces" (des sorts en quelques sorte) et disputer des matchs avec... d'autres poireaux !  
  
Vous voulez tester ? C'est par ici : [http://leekwars.com/](http://leekwars.com/) (mettez Kyria en parrain si vous testez)   
  
Pour donner une idée de comment se passe les combats avec les IA :   
- En solo : [http://leekwars.com/fight/2101885](http://leekwars.com/fight/2101885)  
- En equipe : [http://leekwars.com/fight/2111119](http://leekwars.com/fight/2111119)   
  
Donc, si vous avez l'âme d'un dev, n'hésitez pas à tester ![:P](https://forum.gmstemple.com/uploads/default/original/2X/c/cc783292fe974d5d5a7f19d3d82e7c9f95b28177.gif)   
  

> **Spoiler**
>
> Aller, petit bonus, un script d'IA pour bien commencer au lvl 1 ![:)](https://forum.gmstemple.com/uploads/default/original/2X/f/f31646767a12ff3f4d6b8c4766d2ea41b23d4ab9.gif)  
> 
> ```
> / ************************************
> * Globals
> *********************************** /
> global initiated = false;
> global selectedEnemy = false;
> global goingToMidde = false;
> 
> / ************************************
> * Libs
> *********************************** /
> function initBattle() {
> if(!initiated) {
> lama(); 
> setWeapon(WEAPON_DOUBLE_GUN);
> initiated = true;
> }
> }
> 
> /**
> * Select enemy from the list of enemy
> */
> function selectEnemy(){
> if(!selectedEnemy || isDead(selectedEnemy)) {
> selectedEnemy = getNearestEnemy();
> }
> }
> 
> /**
> * Attack mechanism
> */
> function attack(enemy) {
> useWeapon(enemy);
> useWeapon(enemy);
> }
> 
> /**
> * Moving actions.
> */
> function moveActions() {
> moveToward(selectedEnemy);
> }
> 
> / ************************************
> * MAIN IA
> *********************************** /
> initBattle();
> selectEnemy();
> 
> moveActions();
> 
> attack(selectedEnemy);
> 
> debug(getInstructionsCount()+"");
> ```

---

<div class="post-metadata">

**Author:** ![scor](https://forum.gmstemple.com/user_avatar/forum.gmstemple.com/scor/32/4603_2.png) [@scor](https://forum.gmstemple.com/u/scor)\
**Post date:** [Août 6, 2014, 5:20 UTC](https://forum.gmstemple.com/t/vous-aimez-les-bots-venez-sur-leekwars/13784/2 "2014-08-06T17:20:22Z")

</div>

Merci , je vais tester ca ![:)](https://forum.gmstemple.com/uploads/default/original/2X/f/f31646767a12ff3f4d6b8c4766d2ea41b23d4ab9.gif)

---

<div class="post-metadata">

**Author:** ![gms-mat](https://forum.gmstemple.com/user_avatar/forum.gmstemple.com/gms-mat/32/4267_2.png) [@gms-mat](https://forum.gmstemple.com/u/gms-mat)\
**Post date:** [Août 6, 2014, 7:28 UTC](https://forum.gmstemple.com/t/vous-aimez-les-bots-venez-sur-leekwars/13784/3 "2014-08-06T19:28:03Z")

</div>

Drole !

---

<div class="post-metadata">

**Author:** ![killquew](https://forum.gmstemple.com/letter_avatar_proxy/v4/letter/k/3da27b/32.png) [@killquew](https://forum.gmstemple.com/u/killquew)\
**Post date:** [Août 8, 2014, 5:03 UTC](https://forum.gmstemple.com/t/vous-aimez-les-bots-venez-sur-leekwars/13784/4 "2014-08-08T05:03:31Z")

</div>

petit soucis pour le script pour les niveau 1 changer   

> **Spoiler**
>
> function initBattle() {  
> if(!initiated) {  
> lama();   
> setWeapon(WEAPON\_DOUBLE\_GUN);  
>   
> pour   
> function initBattle() {  
> if(!initiated) {  
> lama();   
> setWeapon(WEAPON\_PISTOL);

  
  
pcq le double gun est niv 9 lol

---

<div class="post-metadata">

**Author:** ![Althalus](https://forum.gmstemple.com/letter_avatar_proxy/v4/letter/a/50afbb/32.png) [@Althalus](https://forum.gmstemple.com/u/Althalus)\
**Post date:** [Août 8, 2014, 8:57 UTC](https://forum.gmstemple.com/t/vous-aimez-les-bots-venez-sur-leekwars/13784/5 "2014-08-08T08:57:14Z")

</div>

Bien vu en effet ![:)](https://forum.gmstemple.com/uploads/default/original/2X/f/f31646767a12ff3f4d6b8c4766d2ea41b23d4ab9.gif) J'ai pas pensé à changer ça =]

---

<div class="post-metadata">

**Author:** ![sebo](https://forum.gmstemple.com/user_avatar/forum.gmstemple.com/sebo/32/4136_2.png) [@sebo](https://forum.gmstemple.com/u/sebo)\
**Post date:** [Août 14, 2014, 6:57 UTC](https://forum.gmstemple.com/t/vous-aimez-les-bots-venez-sur-leekwars/13784/6 "2014-08-14T06:57:48Z")

</div>

J'ai testé et c'est original comme jeu. ![:D](https://forum.gmstemple.com/uploads/default/original/2X/4/4e279733a789da83bda5b44aedcf6a0d5178edcb.gif)
