Forum o bocie TibiaNG oraz ElfBotNG
W liste wpisujemy z jakiego czaru jakiego potwora ma atakować.
[hide]
const frigo = ['banshee', 'bear', 'betrayed wraith', 'blue djinn', 'dark torturer', 'demon', 'destroyer', 'diabolic imp', 'dragon', 'dragon hatchling', 'dragon lord', 'dragon lord hatchling', 'dwarf geomancer', 'demon skeleton','fire devil', 'fire elemental', 'green djinn', 'hand of cursed fate', 'hellfire fighter', 'hellhound', 'kongra', 'lion', 'marid', 'merlkin', 'nomad', 'plaguesmith', 'priestess', 'rat', 'sibang', 'son of verminor', 'stone golem', 'tiger', 'undead dragon', 'war wolf','wyvern']; flam = ['ancient scarab','crypt shambler', 'azure frog', 'beholder', 'black knight', 'blightwalker', 'blood crab', 'bonebeast', 'braindeath', 'bug', 'carniphila', 'carrion worm', 'cave rat', 'centipede', 'crab', 'crocodile', 'dark monk', 'defiler', 'dwarf', 'dwarf guard', 'dwarf soldier', 'dworc fleshhunter', 'dworc venomsniper', 'dworc voodoomaster', 'elder beholder', 'gargoyle', 'gazer', 'ghoul', 'giant spider', 'hunter', 'lich', 'lizard sentinel', 'lizard snakecharmer', 'lizard templar', 'mammoth', 'monk', 'mummy', 'necromancer', 'nightmare', 'panda', 'phantasm', 'pirate buccaneer', 'pirate corsair', 'pirate cutthroat', 'pirate ghost', 'pirate marauder', 'pirate skeleton', 'poacher', 'poison spider', 'scarab', 'serpent spawn', 'slime', 'spectre', 'spit nettle', 'stalker', 'swamp troll', 'tarantula', 'terror bird', 'thornback tortoise', 'toad', 'tortoise', 'vampire', 'wasp']; tera = ['cyclops', 'cyclops drone', 'cyclops smith', 'elf arcanist', 'frost troll', 'fury', 'orc', 'orc berserker', 'orc leader', 'orc rider', 'orc shaman', 'orc spearman', 'orc warlord', 'orc warrior', 'quara constrictor', 'quara hydromancer', 'quara mantassin', 'quara pincher', 'quara predator', 'quara constrictor scout', 'quara hydromancer scout', 'quara mantassin scout', 'quara pincher scout', 'quara predator scout', 'troll', 'troll champion']; vis = ['acolyte of the cult', 'adept of the cult', 'chakoya toolshaper', 'chakoya tribewarden', 'chakoya windcaller', 'crystal spider', 'elephant', 'enlightened of the cult', 'frost dragon', 'frost dragon hatchling', 'frost giant', 'frost giantess', 'ghost', 'hydra', 'ice golem', 'ice witch', 'juggernaut', 'lost soul', 'novice of the cult', 'penguin', 'polar bear', 'water elemental', 'winter wolf']; mort = ['amazon', 'assassin', 'bandit', 'barbarian bloodwalker', 'barbarian brutetamer', 'barbarian headsplitter', 'barbarian skullhunter', 'dark apprentice', 'dark magician', 'elf', 'elf scout', 'goblin', 'hero', 'minotaur', 'minotaur archer', 'minotaur guard', 'minotaur mage', 'rotworm', 'smuggler', 'valkyrie', 'warlock', 'wild warrior', 'witch']; useWand = 1 // 1 to attack with wand also, 0 to do not attack with wand. function GetExoriType(Crea: TCreature): String; begin Result := ''; for z := Low(frigo) to High(frigo) do begin if AnsiLowerCase(Crea.Name) = AnsiLowerCase(frigo[z]) then Result := 'exori frigo'; end; for z := Low(flam) to High(flam) do begin if AnsiLowerCase(Crea.Name) = AnsiLowerCase(flam[z]) then Result := 'exori flam'; end; for z := Low(tera) to High(tera) do begin if AnsiLowerCase(Crea.Name) = AnsiLowerCase(tera[z]) then Result := 'exori tera'; end; for z := Low(vis) to High(vis) do begin if AnsiLowerCase(Crea.Name) = AnsiLowerCase(vis[z]) then Result := 'exori vis'; end; for z := Low(mort) to High(mort) do begin if AnsiLowerCase(Crea.Name) = AnsiLowerCase(mort[z]) then Result := 'exori mort'; end; end; function GetCreatureByID(ID: integer): TCreature; var x: integer; begin Result := nil; for x := 0 to Creatures.Count - 1 do begin if x >= Creatures.Count then Break; if Creatures.Creature[x].ID = ID then begin Result := Creatures.Creature[x]; Exit; end; end; end; begin sleepTime := 1100; if useWand = 0 then sleepTime := 1000; while not terminated do begin updateworld; if Self.Attacking <> nil then begin creature := GetCreatureByID(self.attacking); if creature <> nil then begin exori := GetExoriType(creature); if exori <> '' then begin updateworld; if (abs(creature.x - self.x) <= 3) and (abs(creature.y - self.y) <= 3) then begin if Self.Attacking > 0 then self.say(exori); end; end; end; end; sleep(sleepTime); end; end; [/hide]
Offline