Postado Janeiro 17, 2011 14 anos Bom, esses Scripts não foram todos feitos por mim, portanto no final do posto estarão os devidos créditos. 1º passo: Para utilizar o script, você deve ir nas tools do seu bot, e na ultima opção, Scripts. Uma caixa de dialogo irá aparecer, dentro dela você da um ctrl+v do script desejado e clica em execute script! PS: você troca todas as informações em azul pelas suas. Scripts: 1- reconect 2- Usar Obsidian Knife nos corpos 3- Utilizar runa no seu amigo 4- Usar potion(qualquer uma) em X hp - muda a vida mínima e o id da potion de sua preferência 5- caçar na diagonal (bom pra draggys, entre outros) 6- usar certa magia em certo monstro 7- preferência de monstro p/ atacar 8 - Logar com certa quantidade de exp 9 - TREINO c/ slime 10 - depositer, dos mais simples 1- reconect esse script faz seu char relogar e abrir a BP sozinho. Citar const Account = '13214'; Password = 'gas461'; Character = 'Exemplo'; World = 'Trimera'; Ip = ''; NumberOfBackpacks = *; var x: integer; procedure Login; begin repeat Self.Login(Account, Password, Character, World, Ip); for x := 0 to 200 do begin if Self.Connected then Break; Sleep(100); end; Sleep(2000); until Self.Connected; end; begin while not Terminated do begin if not Self.Connected then begin Login; UpdateWorld; Self.Backpack.OpenInNewWindow; for x := 0 to NumberOfBackpacks - 1 do begin if x >= NumberOfBackpacks then Break; Sleep(2000); UpdateWorld; Self.Containers.Container[0].Item[x].OpenInNewWindow; end; end; Sleep(1000); end; end; 2- Usar Obsidian Knife nos corpos (trocar pelo ip dos monstros que você quer) Citar const obsidian_knife = 5908; skin_body = [4011, 4047, 4052, 4057]; function searchIntArray(id:integer): boolean; var i: integer; begin result := false; for i := low(skin_body) to high(skin_body) do begin if skin_body = id then result := true; end; end; function GetItemFromOpenBackpack(ID: integer): TItem; var y: integer; begin Result := nil; for x := 0 to Self.Containers.Count - 1 do begin if x >= Self.Containers.Count then Break; for y := 0 to Self.Containers.Container[x].Count - 1 do begin if y >= Self.Containers.Container[x].Count then Break; if Self.Containers.Container[x].Item[y].ID = ID then begin Result := Self.Containers.Container[x].Item[y]; Exit; end; end; end; end; function SkinBodies(id:integer): Boolean; var x, y: integer; knife: TItem; t: integer; begin UpdateWorld; knife := GetItemFromOpenBackpack(obsidian_knife); if knife = nil then begin Self.DisplayText('An Obsidian Knife could not be found, please open a container with it.'); exit; end; t := -1; for x := -1 to 1 do begin for y := -1 to 1 do begin // if Screen.Tile[7+x, 5+y].Count >= 3 then begin // t := -2 // end else t := -1; if searchIntArray(Screen.Tile[7+x, 5+y].Item[screen.Tile[7+x, 5+y].Count+t].ID) = true then begin UpdateWorld; knife := GetItemFromOpenBackpack(obsidian_knife); if knife <> nil then begin knife.UseWithGround(Self.X+X, Self.Y+Y, Self.Z); Self.DisplayText('Attempted to skin a creature with the ID ' + IntToStr(Screen.Tile[7+x, 5+y].Item[screen.Tile[7+x, 5+y].Count-1].ID) + '.'); Sleep(100); UpdateWorld; end; end; end; end; end; begin while not terminated do begin UpdateWorld; SkinBodies(skin_body); Sleep(100); end; end 3- Utilizar runa no seu amigo Citar const MiniCreatureHP = 50; // % da vida do seu amigo, ou sua. ITEM_RUNE_UH = 3160; // id da runa Name='Oh Hai'; //nome doseu amigo, ou seu mesmo var Creature: TCreature; CreatureName: string; function IsCreatureVisible(Name: string): boolean; var x: integer; begin Result := False; for x := 0 to Creatures.Count - 1 do begin if x >= Creatures.Count then Break; if Creatures.Creature[x].Name = Name then begin if Creatures.Creature[x].Visible then begin Result := True; Exit; end; end; end; end; function GetCreatureByName(Name: string): 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].Name = Name) then begin Result := Creatures.Creature[x]; Exit; end; end; end; begin while not Terminated do begin UpdateWorld; Creature := GetCreatureByName(Name); If Creature<> nil then If IsCreatureVisible(Name) then begin if ((Creature.Health) <(MiniCreatureHP)) and ((Self.Mana)>(70)) then Self.Say('exura sio "'+Name) else if ((Creature.Health) <(MiniCreatureHP)) then Self.Containers.UseItemWithCreature(ITEM_RUNE_UH, Creature); end; Sleep(1000); end; end; 4- Usar potion(qualquer uma) em X hp - muda a vida mínima e o id da potion de sua preferência Citar const MinHealth = 500; ID_Potion = 239; NumberOfVialsToDrink = 1; Delay = 2; var I: Integer; begin while not Terminated do begin UpdateWorld; if Self.Health <= MinHealth then for I:=1 to NumberOfVialsToDrink do begin if (Terminated) then break; Self.Containers.UseItemWithSelf(ID_Potion); Sleep(Delay*1000); end; Sleep(500); end; end; 5- caçar na diagonal (bom pra draggys, entre outros) Citar 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; function GetTileFromXYZ(X, Y, Z: integer): TTile; begin Result := nil; if abs((Self.X - 7) - X) > 14 then Exit; if abs((Self.Y - 5) - Y) > 11 then Exit; if Self.Z <> Z then Exit; Result := Screen.Tile[abs((Self.X - 7) - X), abs((Self.Y - 5) - Y)]; end; function TileIsWalkable(X, Y, Z: integer): boolean; const Ramps = [1950, 1952, 1954, 1956, 385, 1947, 434, 414, 604] var Tile: TTile; begin Result := True; Tile := GetTileFromXYZ(X, Y, Z); If (Tile <> nil) and (Tile.Count <> 0) then for i := 0 to Tile.Count - 1 do begin if Tile.Item.Properties.Hole then Result := False; else if Tile.Item.Properties.Stairs then Result := False; else if not Tile.Item.Properties.Walkable then Result := False; else for j := Low(Ramps) to High(Ramps) do if Tile.Item.ID = Ramps[j] then Result := False; end; end; while not Terminated do begin UpdateWorld; if Self.Attacking then begin Monster := GetCreatureByID(Self.Attacking); if Monster <> nil then Case Monster.Direction of 0:begin if (Self.X = Monster.X) and (Self.Y = Monster.Y-1) and (Self.Z = Monster.Z) then begin if TileIsWalkable(Monster.X-1, Monster.Y-1, Monster.Z) then Self.MoveTo(Monster.X-1, Monster.Y-1, Monster.Z); else if TileIsWalkable(Monster.X+1, Monster.Y-1, Monster.Z) then Self.MoveTo(Monster.X+1, Monster.Y-1, Monster.Z); end; end; 1:begin if (Self.X = Monster.X+1) and (Self.Y = Monster.Y) and (Self.Z = Monster.Z) then begin if TileIsWalkable(Monster.X+1, Monster.Y-1, Monster.Z) then Self.MoveTo(Monster.X+1, Monster.Y-1, Monster.Z); else if TileIsWalkable(Monster.X+1, Monster.Y+1, Monster.Z) then Self.MoveTo(Monster.X+1, Monster.Y+1, Monster.Z); end; end; 2:begin if (Self.X = Monster.X) and (Self.Y = Monster.Y+1) and (Self.Z = Monster.Z) then begin if TileIsWalkable(Monster.X-1, Monster.Y+1, Monster.Z) then Self.MoveTo(Monster.X-1, Monster.Y+1, Monster.Z); else if TileIsWalkable(Monster.X+1, Monster.Y+1, Monster.Z) then Self.MoveTo(Monster.X+1, Monster.Y+1, Monster.Z); end; end; 3:begin if (Self.X = Monster.X-1) and (Self.Y = Monster.Y) and (Self.Z = Monster.Z) then begin if TileIsWalkable(Monster.X-1, Monster.Y-1, Monster.Z) then Self.MoveTo(Monster.X-1, Monster.Y-1, Monster.Z); else if TileIsWalkable(Monster.X-1, Monster.Y+1, Monster.Z) then Self.MoveTo(Monster.X-1, Monster.Y+1, Monster.Z); end; end; end; end; Sleep(250); end; 6- usar certa magia em certo monstro Citar MonsterName = ['Enlightened Of The Cult','Nightmare']// o nome dos monstros aqui <<<< Attack_Spell = 'Exori Gran' // o nome da magia aqui<<<< Min_Mana = 350 // minimo de mana pra usar o spell<<< Min_Monster_HP = 0 // hp mínimo do monstro - eu acho inútil deixe 0 Max_Monster_HP = 10000 //o hp máximo do monstro - depende de cada um Range = 1 //O máximo de sqm que o monstro pode estar de você var x: Integer; Creature:TCreature; 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; function GetCreatureByName(Name: string): 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].Name = Name then begin Result := Creatures.Creature[x]; Exit; end; end; end; function IsCreatureAttackable(c: TCreature): boolean; begin UpdateWorld; Result := False; if (c.Z = self.Z) and (abs(c.X-self.X) <= Range) and (abs(c.Y-self.Y) <= Range) and (c.outfit<>0) and (c.Health >= Min_Monster_HP) and (c.Health <= Max_Monster_HP) then begin Result := True; end; end; while not Terminated do begin UpdateWorld; Creature := GetCreatureByID(Self.Attacking); if (Self.Mana >= Min_Mana) and (Creature <> nil) then for i := low(monstername) to high(monstername) do begin if (MonsterName = Creature.Name) and (IsCreatureAttackable(Creature)) then begin Self.Say(Attack_Spell); sleep(2000); end; end; sleep(100); end; 7 preferência de monstro p/ atacar Citar Const Name=['Frost Giantess']; // aqui você põe o nome do monstro para atacar primeiro SwitchAt=10; // aqui é a porcentagem de vida que o monstro que você esta atacando, para esse cript não atuar function GetPlace(st:string):integer; var x:integer; begin Result:=1000; for x:=Low(Name) To High(Name) do begin if Name[x]=st then Result:=x; 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; function IsCreatureBesideYou(c: TCreature): boolean; begin UpdateWorld; Result := False; if (abs(c.X-self.X) <= 6) and (abs(c.Y-self.Y) <= 6) then begin if c.Z = self.Z then begin Result := True; end; end; end; var x:integer; b:boolean; begin while not terminated do begin b:=false; updateworld; If (Self.Attacking<>0) then begin Creature:=GetCreatureByID(Self.Attacking); if Creature<>nil then if SwitchAt<Creature.Health then begin for x := 0 to Creatures.Count - 1 do begin updateworld; if b then break; if x >= Creatures.Count then Break; if Creatures.Creature[x].NPC then if Creatures.Creature[x].z=self.z then if Creatures.Creature[x].Name<>self.name then if Creatures.Creature[x].Attacking = false then if IsCreatureBesideYou(Creatures.Creature[x]) then if GetPlace(Creature.Name)>GetPlace(Creatures.Creatur e[x].Name) then begin sleep(100); updateworld; Creatures.Creature[x].attacking:=true; B:=true; end; end; end; end; Sleep(100); end; end; 8 - Logar com certa quantidade de exp Citar Const Exp = 6300 // a quantidade de exp pra você logar (6300 = lvl 9) while not terminated do begin UpdateWorld; if Self.Experience >= Exp then Self.Logout(True); Sleep(1000); end; 9 - TREINO c/ slime, muito util ( cuidado com os bot killers de plantão, até em mundos opitional pvp eles podem te empurrar) (para utiliza-lo você começa a seguir uma slime, e da execute script) Citar function Attacking: boolean; begin UpdateWorld; for x := 0 to Creatures.Count - 1 do begin UpdateWorld; if Creatures.Creature[x].Attacking then begin Result := True; Exit; end; end; Result := False; Exit; end; function GetFollowedCreatureID: integer; begin UpdateWorld; for x := 0 to Creatures.Count - 1 do begin UpdateWorld; if Creatures.Creature[x].Following then begin Result := Creatures.Creature[x].ID; Exit; end; end; end; var MotherSlime, X1, Y1: integer; begin MotherSlime := GetFollowedCreatureID; while not Terminated do begin UpdateWorld; if not Attacking then begin UpdateWorld; for x := 0 to Creatures.Count - 1 do begin UpdateWorld; if Creatures.Creature[x].ID <> MotherSlime then begin if (Creatures.Creature[x].Name <> Self.Name) and Creatures.Creature[x].NPC then begin UpdateWorld; X1 := Creatures.Creature[x].X; Y1 := Creatures.Creature[x].Y; if (X1 - Self.X = 1) or (X1 - Self.X = 0) or (X1 - Self.X = -1) then begin UpdateWorld; if (Y1 - Self.Y = 1) or (Y1 - Self.Y = 0) or (Y1 - Self.Y = -1) then begin Creatures.Creature[x].Attacking := true; Break; end; end; end; end; end; end; Sleep(1000); end; end; 10 - depositer, dos mais simples, não funciona na versão 8.7, mas nas anteriores funciona. faça um waypoint até o banco e clique em adicionar script, selecione esse (deve estar salvo no seu computador) e pronto Citar begin UpdateWorld; Sleep(2000); Self.NPCSay('hi'); Sleep(2000); Self.NPCSay('deposit all'); Sleep(2000); Self.NPCSay('yes'); Sleep(2000); Self.NPCSay('bye'); end; ~~Créditos~~ TibiaScript xuztek Henrikues [P]rinT ScreeN. Editado Janeiro 18, 2011 14 anos por henrikues (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.