05.06.2016, 20:11
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:
Simple code:
Screens:
![[Image: 3rsqFnQ.jpg]](http://i.imgur.com/3rsqFnQ.jpg)
![[Image: 0avkhjl.jpg]](http://i.imgur.com/0avkhjl.jpg)
![[Image: ES9P5XA.jpg]](http://i.imgur.com/ES9P5XA.jpg)
Download:
http://speedy.sh/zca6q/clientBots.nut
http://www94.zippyshare.com/v/ttPown1T/file.html
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]](http://i.imgur.com/3rsqFnQ.jpg)
![[Image: 0avkhjl.jpg]](http://i.imgur.com/0avkhjl.jpg)
![[Image: ES9P5XA.jpg]](http://i.imgur.com/ES9P5XA.jpg)
Download:
http://speedy.sh/zca6q/clientBots.nut
http://www94.zippyshare.com/v/ttPown1T/file.html