Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[POMOC] TA


Kartofell

Rekomendowane odpowiedzi

Opublikowano

Moj kolejny problem, albo bardziej pytanie do Was to jak ustawic w TA, zeby bot mial zawsze 2 kratki odstepu od potwora?

 

@Wiem, wiem to juz 2 albo 3 temat z innym pytaniem, ale prawda jest taka ze nikt nie odwiedzal tamtych tematow i zeby otrzymac nowa odpowiedz musial zrobic nowy temat.

Walmart_moonwalk_cart.gif?

Pozdro!

Opublikowano

Moj kolejny problem, albo bardziej pytanie do Was to jak ustawic w TA, zeby bot mial zawsze 2 kratki odstepu od potwora?

 

@Wiem, wiem to juz 2 albo 3 temat z innym pytaniem, ale prawda jest taka ze nikt nie odwiedzal tamtych tematow i zeby otrzymac nowa odpowiedz musial zrobic nowy temat.

 

Na pewno grasz Sorkiem,Druidem lub Pallem :D potrzebujesz Keep Distance powiem ci ze tez potrzebuje tego ale nie moge nigdzie znalezc nawet na oficjalnej stronie TibiaAuto.

35bh8wo.png

exModerator

Opublikowano

 

import time

def getPathToEx (selfPos, targetPos, minDist, maxDist):

ab = time.clock()

if selfPos['z'] != targetPos['z']:

return False;

currentDist = max(abs(selfPos['x'] - targetPos['x']),abs(selfPos['y'] - targetPos['y']));

if(currentDist == maxDist):

return False;

if (selfPos['x'] - targetPos['x']) <= 0: dxMin = maxDist;

else: dxMin = 0;

if (selfPos['x'] - targetPos['x']) >= 0: dxMax = maxDist;

else: dxMax = 0;

if (selfPos['y'] - targetPos['y']) <= 0: dyMin = maxDist;

else: dyMin = 0;

if (selfPos['y'] - targetPos['y']) >= 0: dyMax = maxDist;

else: dyMax = 0;

tile = 0;

minWalkPos = {};

tmpPos = {};

minWalkDist = 100;

maxTaxi = -1;

tmpDist = -1;

tmpWalkDist = -1;

tmpMaxTaxi = -1;

tryDist = maxDist;

point = [];

while tryDist >= minDist:

for y in range(targetPos['y'] - dyMin, targetPos['y'] + dyMax + 1):

for x in range(targetPos['x'] - dxMin, targetPos['x'] + dxMax + 1):

tmpDist = max(abs(targetPos['x'] - x),abs(targetPos['y'] - y));

if tmpDist == tryDist:

point += [[x,y]];

while len(point) > 0:

p = point.pop(random.randint(0,len(point)-1));

x = p[0];

y = p[1];

tmpWalkDist = abs(selfPos['x'] - x) + abs(selfPos['y'] - y);

tmpPos = {};

tmpPos['x'] = x;

tmpPos['y'] = y;

tmpPos['z'] = selfPos['z'];

tmpMaxTaxi = abs(targetPos['x'] - x) + abs(targetPos['y'] - y)

#print tmpPos,(tmpWalkDist < minWalkDist and tmpMaxTaxi+1 >= maxTaxi ),(tmpMaxTaxi >= tmpWalkDist and tmpMaxTaxi > maxTaxi),minWalkPos.get('x',0)-tmpPos.get('x',0),tmpPos.get('y',0)-minWalkPos.get('y',0);

#print tmpWalkDist,minWalkDist,tmpMaxTaxi,maxTaxi;

if (tmpWalkDist < minWalkDist and tmpMaxTaxi+1 >= maxTaxi ) or (tmpMaxTaxi >= tmpWalkDist and tmpMaxTaxi > maxTaxi) or minWalkDist == 100:

if tmpPos != selfPos:

if tamap.isPointAvailable(x, y, selfPos['z']) and tamap.getPointUpDown(x, y, selfPos['z']) == 0:

minWalkDist = tmpWalkDist;

minWalkPos = tmpPos;

maxTaxi = tmpMaxTaxi;

if minWalkDist != 100:

return minWalkPos;

tryDist -= 1;

return False;

def facing(direction):

return [-abs(direction%4-1)+1,-abs(direction%4-2)+1];

class ModuleKeepDistance:

RUN = True;

walkTo = False;

def getName(self):

tasender.sendTAMessage("Start KeepDistance to Toggle with \'%ta dist\'");

return "Keep Distance";

def getVersion(self):

return "1.0";

def getFunDef(self,nr):

if (nr==0): return (0,800,self.findPath);

if (nr==1): return (0,300,self.walkToPoint);

if (nr==2): return (1,0,self.walkToPoint2);

if (nr==3): return (2,0,self.toggle);

return ();

def getConfigParam(self,nr):

if (nr==0): return ('minDistance','Def:3, Distance to stay over.');

if (nr==1): return ('maxDistance','Def:3, Max Distance to try for.');

if (nr==2): return ('hardCreatures','Eg:demon,fury (List of hard creatures to keep minDist+1 distance from)');

if (nr==3): return ('followCreatures','Monsters that you want to follow that are either really easy, or distance fighters');

return ();

def findPath (self, params):

if self.RUN:

me = tareader.readSelfCharacter();

targID = tareader.getAttackedCreature();

if targID != 0:

targ = tareader.getCharacterByTibiaId (targID);

try: minDist = int(params['minDistance']);

except: minDist = 3;

try: maxDist = int(params['maxDistance']);

except: maxDist = 100;

hList = params['hardCreatures'].lower().split(',');

isHard = int(hList.count(targ['name'].lower()) != 0);

minDist += isHard;

face = facing(targ['lookDirection']);

monToMe = [(me['x']-targ['x']),(me['y']-targ['y'])];

isRunning = int((face[0]*monToMe[0] + face[1]*monToMe[1]) < 0);#will bring to 1 less than maxDist if monster is running

#print "first:", isRunning;

followCreature = params['followCreatures'].lower().split(',');

isRunning = int(followCreature.count(targ['name'].lower()) != 0);

#print "sec:", isRunning;

if isRunning:

maxDist = 1;

minDist = 1;

isToofar = max(abs(me['x'] - targ['x']),abs(me['y'] - targ['y'])) > maxDist;

isNotBestDiag = abs(me['x'] - targ['x'])+abs(me['y'] - targ['y']) < minDist*2;

isClose = max(abs(me['x'] - targ['x']),abs(me['y'] - targ['y'])) <= minDist;

print 1

if isToofar or (isNotBestDiag and isClose):

#print {'x':me['x'],'y':me['y'],'z':me['z']},{'x':targ['x'],'y':targ['y'],'z':targ['z']}

self.walkTo = getPathToEx({'x':me['x'],'y':me['y'],'z':me['z']},{'x':targ['x'],'y':targ['y'],'z':targ['z']},minDist,minDist)

#print 'defl',self.walkTo;

self.walkToPoint(params);

return;

def walkToPoint (self, params):

me = tareader.readSelfCharacter();

if self.RUN:

if tareader.getAttackedCreature() == 0:

self.walkTo = False;

return;

targ = tareader.getCharacterByTibiaId (tareader.getAttackedCreature());

if targ['hpPercLeft'] == 0:

tasender.walkOnTAMap(me['x'],me['y'],me['z']);

self.walkTo = False;

return;

if self.walkTo != False:

print 2

tasender.walkOnTAMap(self.walkTo['x'],self.walkTo['y'],self.walkTo['z']);

return;

def walkToPoint2 (self, params,(type,channel,nick,message)):

if self.RUN:

me = tareader.readSelfCharacter();

if nick == me['name'] and self.walkTo != False:

print 3

tasender.walkOnTAMap(self.walkTo['x'],self.walkTo['y'],self.walkTo['z']);

return;

def toggle (self, params, message):

if message == "%ta dist":

self.RUN = not self.RUN;

tasender.sendTAMessage("Keep Distance is = "+str(self.RUN));

return;

tibiaauto.registerPlugin(ModuleKeepDistance);

 

#print getPathToEx({'x':0,'y':2,'z':0},{'x':0,'y':0,'z':0 },6,6+1)

 

52126142219396245817.jpeg

Opublikowano

 

import time

def getPathToEx (selfPos, targetPos, minDist, maxDist):

ab = time.clock()

if selfPos['z'] != targetPos['z']:

return False;

currentDist = max(abs(selfPos['x'] - targetPos['x']),abs(selfPos['y'] - targetPos['y']));

if(currentDist == maxDist):

return False;

if (selfPos['x'] - targetPos['x']) <= 0: dxMin = maxDist;

else: dxMin = 0;

if (selfPos['x'] - targetPos['x']) >= 0: dxMax = maxDist;

else: dxMax = 0;

if (selfPos['y'] - targetPos['y']) <= 0: dyMin = maxDist;

else: dyMin = 0;

if (selfPos['y'] - targetPos['y']) >= 0: dyMax = maxDist;

else: dyMax = 0;

tile = 0;

minWalkPos = {};

tmpPos = {};

minWalkDist = 100;

maxTaxi = -1;

tmpDist = -1;

tmpWalkDist = -1;

tmpMaxTaxi = -1;

tryDist = maxDist;

point = [];

while tryDist >= minDist:

for y in range(targetPos['y'] - dyMin, targetPos['y'] + dyMax + 1):

for x in range(targetPos['x'] - dxMin, targetPos['x'] + dxMax + 1):

tmpDist = max(abs(targetPos['x'] - x),abs(targetPos['y'] - y));

if tmpDist == tryDist:

point += [[x,y]];

while len(point) > 0:

p = point.pop(random.randint(0,len(point)-1));

x = p[0];

y = p[1];

tmpWalkDist = abs(selfPos['x'] - x) + abs(selfPos['y'] - y);

tmpPos = {};

tmpPos['x'] = x;

tmpPos['y'] = y;

tmpPos['z'] = selfPos['z'];

tmpMaxTaxi = abs(targetPos['x'] - x) + abs(targetPos['y'] - y)

#print tmpPos,(tmpWalkDist < minWalkDist and tmpMaxTaxi+1 >= maxTaxi ),(tmpMaxTaxi >= tmpWalkDist and tmpMaxTaxi > maxTaxi),minWalkPos.get('x',0)-tmpPos.get('x',0),tmpPos.get('y',0)-minWalkPos.get('y',0);

#print tmpWalkDist,minWalkDist,tmpMaxTaxi,maxTaxi;

if (tmpWalkDist < minWalkDist and tmpMaxTaxi+1 >= maxTaxi ) or (tmpMaxTaxi >= tmpWalkDist and tmpMaxTaxi > maxTaxi) or minWalkDist == 100:

if tmpPos != selfPos:

if tamap.isPointAvailable(x, y, selfPos['z']) and tamap.getPointUpDown(x, y, selfPos['z']) == 0:

minWalkDist = tmpWalkDist;

minWalkPos = tmpPos;

maxTaxi = tmpMaxTaxi;

if minWalkDist != 100:

return minWalkPos;

tryDist -= 1;

return False;

def facing(direction):

return [-abs(direction%4-1)+1,-abs(direction%4-2)+1];

class ModuleKeepDistance:

RUN = True;

walkTo = False;

def getName(self):

tasender.sendTAMessage("Start KeepDistance to Toggle with \'%ta dist\'");

return "Keep Distance";

def getVersion(self):

return "1.0";

def getFunDef(self,nr):

if (nr==0): return (0,800,self.findPath);

if (nr==1): return (0,300,self.walkToPoint);

if (nr==2): return (1,0,self.walkToPoint2);

if (nr==3): return (2,0,self.toggle);

return ();

def getConfigParam(self,nr):

if (nr==0): return ('minDistance','Def:3, Distance to stay over.');

if (nr==1): return ('maxDistance','Def:3, Max Distance to try for.');

if (nr==2): return ('hardCreatures','Eg:demon,fury (List of hard creatures to keep minDist+1 distance from)');

if (nr==3): return ('followCreatures','Monsters that you want to follow that are either really easy, or distance fighters');

return ();

def findPath (self, params):

if self.RUN:

me = tareader.readSelfCharacter();

targID = tareader.getAttackedCreature();

if targID != 0:

targ = tareader.getCharacterByTibiaId (targID);

try: minDist = int(params['minDistance']);

except: minDist = 3;

try: maxDist = int(params['maxDistance']);

except: maxDist = 100;

hList = params['hardCreatures'].lower().split(',');

isHard = int(hList.count(targ['name'].lower()) != 0);

minDist += isHard;

face = facing(targ['lookDirection']);

monToMe = [(me['x']-targ['x']),(me['y']-targ['y'])];

isRunning = int((face[0]*monToMe[0] + face[1]*monToMe[1]) < 0);#will bring to 1 less than maxDist if monster is running

#print "first:", isRunning;

followCreature = params['followCreatures'].lower().split(',');

isRunning = int(followCreature.count(targ['name'].lower()) != 0);

#print "sec:", isRunning;

if isRunning:

maxDist = 1;

minDist = 1;

isToofar = max(abs(me['x'] - targ['x']),abs(me['y'] - targ['y'])) > maxDist;

isNotBestDiag = abs(me['x'] - targ['x'])+abs(me['y'] - targ['y']) < minDist*2;

isClose = max(abs(me['x'] - targ['x']),abs(me['y'] - targ['y'])) <= minDist;

print 1

if isToofar or (isNotBestDiag and isClose):

#print {'x':me['x'],'y':me['y'],'z':me['z']},{'x':targ['x'],'y':targ['y'],'z':targ['z']}

self.walkTo = getPathToEx({'x':me['x'],'y':me['y'],'z':me['z']},{'x':targ['x'],'y':targ['y'],'z':targ['z']},minDist,minDist)

#print 'defl',self.walkTo;

self.walkToPoint(params);

return;

def walkToPoint (self, params):

me = tareader.readSelfCharacter();

if self.RUN:

if tareader.getAttackedCreature() == 0:

self.walkTo = False;

return;

targ = tareader.getCharacterByTibiaId (tareader.getAttackedCreature());

if targ['hpPercLeft'] == 0:

tasender.walkOnTAMap(me['x'],me['y'],me['z']);

self.walkTo = False;

return;

if self.walkTo != False:

print 2

tasender.walkOnTAMap(self.walkTo['x'],self.walkTo['y'],self.walkTo['z']);

return;

def walkToPoint2 (self, params,(type,channel,nick,message)):

if self.RUN:

me = tareader.readSelfCharacter();

if nick == me['name'] and self.walkTo != False:

print 3

tasender.walkOnTAMap(self.walkTo['x'],self.walkTo['y'],self.walkTo['z']);

return;

def toggle (self, params, message):

if message == "%ta dist":

self.RUN = not self.RUN;

tasender.sendTAMessage("Keep Distance is = "+str(self.RUN));

return;

tibiaauto.registerPlugin(ModuleKeepDistance);

 

#print getPathToEx({'x':0,'y':2,'z':0},{'x':0,'y':0,'z':0 },6,6+1)

 

OK :O

 

 

@Damster1

Gram pallkiem xD chociaz bocenie w zwarciu ma swoje +. Koncza sie speary to bije z mieczyka, a jak dropne speary to wali z nich ;D

Tak, exp na trollach...

Walmart_moonwalk_cart.gif?

Pozdro!

Opublikowano

OK :O

 

 

@Damster1

Gram pallkiem xD chociaz bocenie w zwarciu ma swoje +. Koncza sie speary to bije z mieczyka, a jak dropne speary to wali z nich ;D

Tak, exp na trollach...

 

 

Ja na razie nie expie bo miałem dzisiaj hacka ;/ 60cc poszło sie je**** :( aż szkoda gadać ;(

35bh8wo.png

exModerator

Opublikowano

Uhuh wspolczuje.

Ja nie expie, bo bocic palkiem sie srednio oplaca :x. Za duzo biegania w ta i spowrotem (chyba ze bot bedzie bic mieczem albo z potwora beda speary lecialy) wiec knighta zrobilem ; D Do rana na ratach powinien 8 wpasc.

Na jakim serwie grasz?

Walmart_moonwalk_cart.gif?

Pozdro!

Opublikowano

Uhuh wspolczuje.

Ja nie expie, bo bocic palkiem sie srednio oplaca :x. Za duzo biegania w ta i spowrotem (chyba ze bot bedzie bic mieczem albo z potwora beda speary lecialy) wiec knighta zrobilem ; D Do rana na ratach powinien 8 wpasc.

Na jakim serwie grasz?

 

Na guardi gram a miałem przed świętami kupić pacca ;(

35bh8wo.png

exModerator

Opublikowano

Loading script failed: there must be a call to tibiaauto.registerPlugin() (1/1) co to za problem o co chodzi pomocy

 

Skorzystałeś z tego tematu ??

 http://www.mpcforum.pl/topic/505256-tibiaauto-blad-unknown-character-oraz-tibia-version-mismatch-fix/ 

35bh8wo.png

exModerator

Opublikowano

ten błąd zawsze wyskakuje.

 

@kartofell

dałem ci skrypta na dystans między potworem weź to do notatnika i zapisz jako skrypt.py i wrzuć do folderu \tascripts\

w tibiaauto klikasz python scripts i na keep distance klikasz PPM-> enable

w show map zaznacz dwie opcje

w auto attack odznacz auto follow mode, force attack when attacked i ustaw consider monsters in range na 3

52126142219396245817.jpeg

Opublikowano

witam.. mam takie małe pytanie nie na ten temat.. czy dziś wyszła nowa wersja tibii ? bo próbuje odpalić tibie auto i nie wyszukuje mi postaci (unkown pisze), tak samo z mc coś tam pisze i się nie odpala.. a kilka godzin temu działało wszystko ;<

Opublikowano

@up

http://www.mpcforum.pl/topic/505256-tibiaauto-blad-unknown-character-oraz-tibia-version-mismatch-fix/

wersja tibii to 9.40 nie ma nowej.

 

@down

mój błąd.

zrobili update i jest 9.41.

52126142219396245817.jpeg

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...