What's new

- TibiaAuto ta/dragi na skos

Status
Not open for further replies.

szczurek135

Active User
Joined
Nov 1, 2010
Messages
81
Reaction score
0
Witam mam pytanie da si? ustawi? w tibia auto aby posta? ustawia?a si? na skos draga ?? POMOCY Jak tak to napiszcie jak si? to robi :)
 

miro5847

Advanced User
Joined
Dec 12, 2008
Messages
211
Reaction score
17
Odp: ta/dragi na skos

Hmm... Nie jestem pewien, lecz najprawdopodobniej potrzebujesz jednego z Python scripts, gdy? w Tibii Auto bezpo?rednio takiego czego? zrobi? si? nie da. Tu jednak?e nie znajdziesz takiego skryptu, polecam oficjalne forum projektu:
Nie gwarantuj?, ?e dany skrypt ju? tu jest, mo?esz zawsze poprosi? kogo? o napisanie takiego.
Pami?taj, by przegl?da? poszczeg?lne fora, musisz si? zarejestrowa? i zalogowa?!
 

Marcinoos66

Senior User
Joined
Dec 18, 2008
Messages
1,196
Reaction score
99
Odp: ta/dragi na skos

Prosz? o to skrypt..

PHP:
class ModuleStandDiagonal:# MUST HAVE MAP RESEARCHED!!!!
    DiagOn = 1;
    itemId=0;
    itemX=0;
    itemY=0;
    itemPos=0;
    killTime=0;

    def getName(self):
        return "Stand Diagonal"

    def getVersion(self):
        return "1.00"

    def getFunDef(self,nr):
        if (nr==0): return (2,0,self.toggle);
        if (nr==1): return (0,300,self.diag);
        return ();

    def getConfigParam(self,nr):
        return ();

    def toggle(self,params,mess):
        selfCh = tareader.readSelfCharacter();
        if mess == "%ta diag":
            self.DiagOn = not(self.DiagOn);
            tasender.sendTAMessage('Stand Diagonal is '+ str(self.DiagOn));
        return();

    def facing(self,direction):
        return [-abs(direction%4-1)+1,-abs(direction%4-2)+1];

    def diag(self,params):
        if self.DiagOn:
            monsterID = tareader.getAttackedCreature();
            selfCh = tareader.readSelfCharacter();
            blockedPoints=[];
            for i in range(4):
                face = self.facing(i)
                for j in range(tareader.mapGetPointItemsCount(face[0],face[1],0)):
                    if tareader.mapGetPointItemId (face[0],face[1],0,j) == 99:
                        if monsterID == 0: monsterID = tareader.mapGetPointItemExtraInfo(face[0],face[1],0,j,1);
                        blockedPoints+=[(selfCh['x']+face[0],selfCh['y']+face[1],selfCh['z'])];
            if monsterID!=0 and monsterID > 0x40000000:
                if time.time()-self.killTime<2: return;
                monster = tareader.getCharacterByTibiaId(monsterID);
                face = self.facing(monster['lookDirection'])
                monToMe = [(selfCh['x']-monster['x']),(selfCh['y']-monster['y'])]
               
                if (face[0]*monToMe[0] + face[1]*monToMe[1]) >=0 and abs(monster['x'] - selfCh['x'])+abs(monster['y'] - selfCh['y'])==1:
                    possiblePoints=[];
                    for x in range(-1,2,2):
                        for y in range(-1,2,2):
                            pt=(selfCh['x']+x*(monster['y'] - selfCh['y']),selfCh['y']+y*(monster['x'] - selfCh['x']),selfCh['z']);
                            if possiblePoints.count(pt)==0 and blockedPoints.count(pt)==0 and tamap.isPointAvailableNoProh(pt[0],pt[1],pt[2]) and not tamap.getPointUpDownNoProh(pt[0],pt[1],pt[2]):
                                possiblePoints+=[pt];
                    if len(possiblePoints)==0: return;
                    ind=random.randint(0,len(possiblePoints)-1);
                    tasender.walkOnTAMap(possiblePoints[ind][0],possiblePoints[ind][1],possiblePoints[ind][2]);
            else: self.killTime=time.time();
        return;
tibiaauto.registerPlugin(ModuleStandDiagonal);
 
Status
Not open for further replies.
Top