Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
G2O Client side bots
#1
Hi, it`s my simple bots module for G2O, it`s only working on client side and doesn`t have sync for all players. If you have some problem, please send me  a message.


Functions:

Code:
createNpc(name, instance);
destroyNpc(npc_pointer);

equipArmorNpc(npc_pointer, armor);
unEquipArmorNpc(npc_pointer);
equipItem(npc_pointer, item);
unEquipMeleeWeaponNpc(npc_pointer);
unEquipRangedWeaponNpc(npc_pointer);
setAdditionalVisualsNpc(npc_pointer, bodyModel, bodyTextueID, headTextureID);
setPositionNpc(npc_pointer, x, y, z);
setAngleNpc(npc_pointer, angle);
setWeaponModeNpc(npc_pointer, weapon_mode);
playAnimNpc(npc_pointer, anim);
stopAnimNpc(npc_pointer);
setAttributeNpc(npc_pointer, index, value);
setTalentNpc(npc_pointer, index, value);
setHitChanceNpc(npc_pointer, index, value);
selectSpellNpc(npc_pointer, spell);
useSpellNpc(npc_pointer, enemy_pointer);


Simple code: 

Code:
enum WeaponMode
{
    NPC_WEAPON_NONE,
    NPC_WEAPON_FIST,
    NPC_WEAPON_DAG,
    NPC_WEAPON_1HS,
    NPC_WEAPON_2HS,
    NPC_WEAPON_BOW,
    NPC_WEAPON_CBOW,
    NPC_WEAPON_MAG,
    NPC_WEAPON_MAX,
};

enum Attribute
{
    NPC_ATR_HITPOINTS,
    NPC_ATR_HITPOINTS_MAX,
    NPC_ATR_MANA,
    NPC_ATR_MANA_MAX,
    NPC_ATR_STRENGTH,
    NPC_ATR_DEXTERITY,
    NPC_ATR_REGENERATEHP,
    NPC_ATR_REGENERATEMANA,
    NPC_ATR_MAX
};

enum Hitchance
{
    NPC_HITCHANCE_1H,
    NPC_HITCHANCE_2H,
    NPC_HITCHANCE_BOW,
    NPC_HITCHANCE_CROSSBOW,
    NPC_HITCHANCE_MAX
};

local botOne;
local botTwo;

addEvent("onInit", function()
{
    enableDebugMode(true);
    setPosition(0, 200, 0);
    
    botOne = createNpc("Dragon 1", "DRAGON_FIRE");
    botTwo = createNpc("Dragon 2", "DRAGON_FIRE");
    
    setAttributeNpc(botOne, Attribute.NPC_ATR_MANA, 9999999999);
    setAttributeNpc(botOne, Attribute.NPC_ATR_MANA_MAX, 9999999999);
    setAttributeNpc(botTwo, Attribute.NPC_ATR_MANA, 9999999999);
    setAttributeNpc(botTwo, Attribute.NPC_ATR_MANA_MAX, 9999999999);    
    
    setPositionNpc(botOne, 0, 200, -1000);
});

function onKey(key, letter)
{
    if(key == KEY_V)
        selectSpellNpc(botOne, "itru_waterfist");
    else if(key == KEY_G)
        useSpellNpc(botOne, getNpcPointer("Dragon 2"));
};

Screens: 

[Image: 3rsqFnQ.jpg]

[Image: 0avkhjl.jpg]

[Image: ES9P5XA.jpg]

Download: 

http://speedy.sh/zca6q/clientBots.nut

http://www94.zippyshare.com/v/ttPown1T/file.html
Reply


Messages In This Thread
G2O Client side bots - by KimiorV - 05.06.2016, 20:11
RE: G2O Client side bots - by Nubzior - 05.06.2016, 20:25
RE: G2O Client side bots - by KimiorV - 05.06.2016, 20:28
RE: G2O Client side bots - by Sative - 09.06.2016, 12:46
RE: G2O Client side bots - by KimiorV - 09.06.2016, 20:11

Possibly Related Threads…
Thread Author Replies Views Last Post
  [New G2O][Client-Side] GUI Patrix 1 3,345 02.01.2021, 05:22
Last Post: Patrix
  [G2O] SpeedBlock Marbar 16 11,058 13.10.2020, 15:32
Last Post: Sative
  [New G2O][Client-Side] LocalStorage Patrix 0 2,426 08.05.2020, 16:38
Last Post: Patrix
  [New G2O] Module example Patrix 4 7,688 17.05.2019, 01:30
Last Post: Patrix
  [New G2O][Client-Side] Music Module Nubzior 3 5,914 24.05.2018, 08:07
Last Post: Nubzior
  G2O - Client Side Bots(0.0.4) KimiorV 16 17,013 16.01.2017, 10:47
Last Post: KimiorV
  [DEV] G2O Bot module Sative 64 59,212 25.11.2016, 20:13
Last Post: HammelGammel

Forum Jump:


Users browsing this thread: 1 Guest(s)