Forum o botach do gry "Tibia"
1. Wlacz w obecnosci slima [1]
const Food_Id = 3606; // id jedzenia MinManaToEaT = 100; // przy ilu many ma jeść StrongWeaponID = 3320 // id mocniejszej broni WeakWeaponID = 3293 // id broni do skillowania NonWeaponID = 3003 HealAtHp = 700 // przy ilu hp ma sie leczyc UhAtHp = 300 // przy ilu hp ma uzywac potinow KillAtHp = 350 // przy ilu hp ma zabic slima ITEM_RUNE_UH = 3160 // id uzywanych health potionow MaxCreatures = 2 // jezeli bedzie wiecej niz tyle potworow, bot zacznie zabijac MaxTime = [2,0,0]; // czas trenowania [godziny,minuty,sekundy] UsePercent=0; minMana = 25; // minimalna mana minHealth = 350; // hp przy ktorym bot zacznie leczyc sie za pomoca potionow lub Exura Vita maxHealth = 700; // hp przy ktorym bot zacznie leczyc sie Exura lub Exura Gran MinHealthPercent =50; MaxHealthPercent=70; useGran = 0; //1 jezeli chcesz leczyc sie Exura Vita zanim zacznie uzywac potiony dir='d:\ouch.wav' //patch to your sound file DoPause=0 // 1 jezeli za szybko zabijasz slimy var MotherSlime,CreatureID,AttackingID, X1, Y1: integer; Finished,Finish: Boolean; StartTime: Float; MaxSeconds: Integer; TempHp:integer; procedure WalkTo(X, Y, Z: integer); begin Sleep(1000); repeat Sleep(1000); UpdateWorld; Self.MoveTo(X, Y, Z); until (abs(Self.X - X) < 1) and (abs(Self.Y - Y) < 1) end; function IsBesideYou(c: TCreature): boolean; begin UpdateWorld; if (abs(c.X-self.X) <= 1) and (abs(c.Y-self.Y) <= 1) then begin if c.Z = self.Z then begin Result := True; Exit; end; end; Result := False; end; function GetNumberOfAttackingCreatures: integer; begin UpdateWorld; Result := 0; for x := 0 to Creatures.Count - 1 do begin if (Abs(Creatures.Creature[x].X - Self.X) <= 1) and (Abs(Creatures.Creature[x].Y - Self.Y) <= 1) and (Creatures.Creature[x].Z = Self.Z) and (Creatures.Creature[x].NPC) then Result := Result + 1; end; end; Function IsCreatureBeside(Id:integer) :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].Z=Self.Z) then if (Creatures.Creature[x].NPC=true) then if (ABS(Creatures.Creature[x].X-Self.X)=1) or ((Creatures.Creature[x].X-Self.X)=0) then If (Creatures.Creature[x].Id=Id) then Result:=True; end; end; function GetAttackedCreature: 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].Attacking = True then begin Result := Creatures.Creature[x]; Exit; end; end; end; function GetItemFromOpenBackpack(ID: integer): TItem; var x: integer; 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 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 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 GetFollowedCreatureID: Integer; begin Result := 0; 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; Procedure Heal begin if usepercent=0 then begin UpdateWorld; if (Self.Health <= minHealth) then begin if (Self.Mana >= minMana) and useGran then begin Self.Say('Exura Vita'); Sleep(100); end; else begin Self.Containers.UseItemWithSelf(3160); Sleep(100); end; end; else begin if (Self.Health <= maxHealth) and (Self.Mana >= minMana ) then begin Self.Say('Exura Gran'); //change this to Exura or Exura Gran as u wish Sleep(1000); end; end; Sleep(100); end else begin UpdateWorld; Health:=Self.Health*100/Self.MaximumHealth if (Health <= minHealthpercent) then begin if (Self.Mana >= minMana) and useGran then begin Self.Say('Exura vita'); Sleep(100); end; else begin Self.Containers.UseItemWithSelf(3160); Sleep(100); end; end; else begin if (Health <= maxHealthPercent) and (Self.Mana >= minMana ) then begin Self.Say('Exura Gran'); //change this to Exura or Exura Gran as u wish Sleep(1000); end; end; Sleep(100); end If Self.Mana>Self.MaximumMana-5 then Self.Say('exura') end; Procedure EatFood if Self.Mana < MinManaToEat then begin UpdateWorld; for container := 0 to Self.Containers.Count - 1 do begin UpdateWorld; for item := 0 to Self.Containers.Container[container].Count - 1 do begin UpdateWorld; if Self.Containers.Container[container].Item[item].ID = Food_Id then Self.Containers.Container[container].Item[item].Use; end; end; end; Procedure PutWeaponInHand(ID:Integer); var Weapon:TItem; begin Updateworld; Weapon:= GetItemFromOpenBackpack(Id); if Weapon <> nil then begin Weapon.MoveToBody(self.RightHand, 0); sleep(1000); end; end; Procedure KillMother begin If Self.Health < KillAtHp then Begin UpdateWorld; Self.Balanced 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 Creatures.Creature[x].Attacking := true; PutWeaponInHand(StrongWeaponID); end; end; end; end; end; Procedure AOS begin Result := nil; updateworld for x := 0 to Creatures.Count - 1 do begin if x >= Creatures.Count then Break; if (Creatures.Creature[x].Name<>'Slime') and (Creatures.Creature[x].Name <> Self.Name) and (Creatures.Creature[x].Z= Self.Z)then begin PlaySound('d:\ouch.wav'); {If Creatures.Creature[x].X>Self.X then begin If (Screen.Tile[7, 6].Item[Screen.Tile[7, 6].Count - 1].ID=3503) or (Screen.Tile[7, 6].Item[Screen.Tile[7, 6].Count - 1].ID=3504)then Screen.Tile[7, 6].Item[Screen.Tile[7, 6].Count - 1].MoveToBody(Self.Arrow,0) end else If (Screen.Tile[7, 6].Item[Screen.Tile[7, 6].Count - 1].ID<>3503) and (Screen.Tile[7, 6].Item[Screen.Tile[7, 6].Count - 1].ID<>3504)then Self.Arrow.MoveToGround(Self.X, Self.Y+1, Self.Z, 0);} end end; end; Procedure ChangeWeapon var id:integer; Begin Updateworld; Id:=Self.Attacking; begin for x := 0 to Creatures.Count - 1 do begin if x >= Creatures.Count then Break; if (Creatures.Creature[x].Z=Self.Z) then if (Creatures.Creature[x].NPC=true) then if (Creatures.Creature[x].Name<>'Slime') then If (Creatures.Creature[x].Id=Id) then PutWeaponInHand(StrongWeaponID); end; end; end function GMDetected: boolean; begin Result := False; UpdateWorld; for x := 0 to Creatures.Count - 1 do begin if Creatures.Creature[x].GM then begin PlaySound(dir); Result := True; end; end; end; Procedure LureCheck Begin UpdateWorld; If GetNumberOfAttackingCreatures > MaxCreatures then Begin UpdateWorld; for x := 0 to Creatures.Count - 1 do begin UpdateWorld; if (Creatures.Creature[x].Id <> AttackingID) and (Creatures.Creature[x].Id<>MotherSlime) then Begin PutWeaponInHand(StrongWeaponID); Sleep(1000); Creatures.Creature[x].Attacking:=True Sleep(5000); While GetNumberOfAttackingCreatures > MaxCreatures do Sleep(1000); PutWeaponInHand(WeakWeaponID) End; end; end; End
2.Wez matke na follow
var koniec:boolean; mon1,mon2:creature; function HowMuchAtk:integer; var x,i:integer; begin UpdateWorld; i:=0; result:=0; for x := 0 to Creatures.Count - 1 do begin if (Abs(Creatures.Creature[x].X - Self.X) <= 1) and (Abs(Creatures.Creature[x].Y - Self.Y) <= 1) and (Creatures.Creature[x].Z = Self.Z) and (Creatures.Creature[x].NPC) then result:=result+1; end; end; procedure checklife; var i,x:integer; cont:tcontainer; begin updateworld; for i:=0 to self.Containers.count-1 do begin for x:=0 to self.containers.container[i].count-1 do begin if self.containers.container[i].item[x].id = 2874 then begin cont:=self.containers.container[i]; self.containers.container[i].item[x].usewithself; sleep(100); if cont.count = 20 then cont.item[cont.count-1].movetoground(self.x,self.y,self.z,0); cont.item[cont.count-1].movetocontainer(cont,0,0); break; exit; end; end; end; end; procedure Event_Message(Channel: integer; Name, Text: String); begin if (name=self.name) and (text='stop') then koniec:=true; end; procedure GetMonsters; var x,i:integer; begin UpdateWorld; i:=0; for x := 0 to Creatures.Count - 1 do begin if (Abs(Creatures.Creature[x].X - Self.X) <= 1) and (Abs(Creatures.Creature[x].Y - Self.Y) <= 1) and (Creatures.Creature[x].Z = Self.Z) and (Creatures.Creature[x].NPC) then begin if i=0 then begin mon1:=Creatures.Creature[x]; i:=i+1; end else if i=1 then begin mon2:=creatures.creature[x]; i:=i+1; end; end; end; end; function getmom:creature; var i:integer; begin updateworld; result:=0; for i:=0 to creatures.count-1 do if creatures.creature[i].following=true then result:=creatures.creature[i]; if result=0 then self.displaytext('Musisz pierw dac followa na matke!'); end; var id:integer; mom:creature; begin for i:=0 to 30 do begin mom:=getmom; if mom>0 then break; end; if mom=0 then begin self.displaytext('nie znaleziono matki! Koniec petli'); exit; end; self.displaytext('matka znaleziona!'); koniec:=false; id:=mom.id; while koniec=false do begin if self.health > 150 then begin GetMonsters; if HowMuchAtk=2 then if mon1.id=id then mon2.attacking := true else mon1.attacking:=true; ProcessEvents; sleep(1000); end else begin checklife; sleep(2010); end; end; end;
3.Wez matke na follow
const Food_Id = 3606; //change this to the desired itemid MinManaToEaT = 100; StrongWeaponID = 3320 //3318 - k axe WeakWeaponID = 3293 NonWeaponID = 3003 HealAtHp = 700 UhAtHp = 300 KillAtHp = 350 ITEM_RUNE_UH = 3160 MaxCreatures = 2 //if there are more creature than that,you would change to strong weapon MaxTime = [2,0,0]; //The maximum training time (hours, minutes, seconds) UsePercent=0; minMana = 25; //minimum mana minHealth = 350; //Health to start healing with UH or Exura Vita maxHealth = 700; //Health to start healing with Exura or Exura Gran MinHealthPercent =50; MaxHealthPercent=70; useGran = 0; //1 if u want to use Exura Vita before start using UH} dir='d:\ouch.wav' //patch to your sound file DoPause=0 //put 1 if you kill slimes too fast, 0 for standard use (maybe working) var MotherSlime,CreatureID,AttackingID, X1, Y1: integer; Finished,Finish: Boolean; StartTime: Float; MaxSeconds: Integer; TempHp:integer; procedure WalkTo(X, Y, Z: integer); begin Sleep(1000); repeat Sleep(1000); UpdateWorld; Self.MoveTo(X, Y, Z); until (abs(Self.X - X) < 1) and (abs(Self.Y - Y) < 1) end; function IsBesideYou(c: TCreature): boolean; begin UpdateWorld; if (abs(c.X-self.X) <= 1) and (abs(c.Y-self.Y) <= 1) then begin if c.Z = self.Z then begin Result := True; Exit; end; end; Result := False; end; function GetNumberOfAttackingCreatures: integer; begin UpdateWorld; Result := 0; for x := 0 to Creatures.Count - 1 do begin if (Abs(Creatures.Creature[x].X - Self.X) <= 1) and (Abs(Creatures.Creature[x].Y - Self.Y) <= 1) and (Creatures.Creature[x].Z = Self.Z) and (Creatures.Creature[x].NPC) then Result := Result + 1; end; end; Function IsCreatureBeside(Id:integer) :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].Z=Self.Z) then if (Creatures.Creature[x].NPC=true) then if (ABS(Creatures.Creature[x].X-Self.X)=1) or ((Creatures.Creature[x].X-Self.X)=0) then If (Creatures.Creature[x].Id=Id) then Result:=True; end; end; function GetAttackedCreature: 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].Attacking = True then begin Result := Creatures.Creature[x]; Exit; end; end; end; function GetItemFromOpenBackpack(ID: integer): TItem; var x: integer; 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 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 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 GetFollowedCreatureID: Integer; begin Result := 0; 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; Procedure Heal begin if usepercent=0 then begin UpdateWorld; if (Self.Health <= minHealth) then begin if (Self.Mana >= minMana) and useGran then begin Self.Say('Exura Vita'); Sleep(100); end; else begin Self.Containers.UseItemWithSelf(3160); Sleep(100); end; end; else begin if (Self.Health <= maxHealth) and (Self.Mana >= minMana ) then begin Self.Say('Exura Gran'); //change this to Exura or Exura Gran as u wish Sleep(1000); end; end; Sleep(100); end else begin UpdateWorld; Health:=Self.Health*100/Self.MaximumHealth if (Health <= minHealthpercent) then begin if (Self.Mana >= minMana) and useGran then begin Self.Say('Exura vita'); Sleep(100); end; else begin Self.Containers.UseItemWithSelf(3160); Sleep(100); end; end; else begin if (Health <= maxHealthPercent) and (Self.Mana >= minMana ) then begin Self.Say('Exura Gran'); //change this to Exura or Exura Gran as u wish Sleep(1000); end; end; Sleep(100); end If Self.Mana>Self.MaximumMana-5 then Self.Say('exura') end; Procedure EatFood if Self.Mana < MinManaToEat then begin UpdateWorld; for container := 0 to Self.Containers.Count - 1 do begin UpdateWorld; for item := 0 to Self.Containers.Container[container].Count - 1 do begin UpdateWorld; if Self.Containers.Container[container].Item[item].ID = Food_Id then Self.Containers.Container[container].Item[item].Use; end; end; end; Procedure PutWeaponInHand(ID:Integer); var Weapon:TItem; begin Updateworld; Weapon:= GetItemFromOpenBackpack(Id); if Weapon <> nil then begin Weapon.MoveToBody(self.RightHand, 0); sleep(1000); end; end; Procedure KillMother begin If Self.Health < KillAtHp then Begin UpdateWorld; Self.Balanced 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 Creatures.Creature[x].Attacking := true; PutWeaponInHand(StrongWeaponID); end; end; end; end; end; Procedure AOS begin Result := nil; updateworld for x := 0 to Creatures.Count - 1 do begin if x >= Creatures.Count then Break; if (Creatures.Creature[x].Name<>'Slime') and (Creatures.Creature[x].Name <> Self.Name) and (Creatures.Creature[x].Z= Self.Z)then begin PlaySound('d:\ouch.wav'); {If Creatures.Creature[x].X>Self.X then begin If (Screen.Tile[7, 6].Item[Screen.Tile[7, 6].Count - 1].ID=3503) or (Screen.Tile[7, 6].Item[Screen.Tile[7, 6].Count - 1].ID=3504)then Screen.Tile[7, 6].Item[Screen.Tile[7, 6].Count - 1].MoveToBody(Self.Arrow,0) end else If (Screen.Tile[7, 6].Item[Screen.Tile[7, 6].Count - 1].ID<>3503) and (Screen.Tile[7, 6].Item[Screen.Tile[7, 6].Count - 1].ID<>3504)then Self.Arrow.MoveToGround(Self.X, Self.Y+1, Self.Z, 0);} end end; end; Procedure ChangeWeapon var id:integer; Begin Updateworld; Id:=Self.Attacking; begin for x := 0 to Creatures.Count - 1 do begin if x >= Creatures.Count then Break; if (Creatures.Creature[x].Z=Self.Z) then if (Creatures.Creature[x].NPC=true) then if (Creatures.Creature[x].Name<>'Slime') then If (Creatures.Creature[x].Id=Id) then PutWeaponInHand(StrongWeaponID); end; end; end function GMDetected: boolean; begin Result := False; UpdateWorld; for x := 0 to Creatures.Count - 1 do begin if Creatures.Creature[x].GM then begin PlaySound(dir); Result := True; end; end; end; Procedure LureCheck Begin UpdateWorld; If GetNumberOfAttackingCreatures > MaxCreatures then Begin UpdateWorld; for x := 0 to Creatures.Count - 1 do begin UpdateWorld; if (Creatures.Creature[x].Id <> AttackingID) and (Creatures.Creature[x].Id<>MotherSlime) then Begin PutWeaponInHand(StrongWeaponID); Sleep(1000); Creatures.Creature[x].Attacking:=True Sleep(5000); While GetNumberOfAttackingCreatures > MaxCreatures do Sleep(1000); PutWeaponInHand(WeakWeaponID) End; end; end; End
w tym /\ Ustaw id broni i broni do skilla
4. Monk train na ng i mc
Const PercentToStopAttacking = 20 // how much % monster should have to stop attacking it? PercentToAttackAgain = 40 var Creature : TCerature; function GetAttackedCreature: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].Attacking=true then begin Result := Creatures.Creature[x]; Exit; end; end; end; While not terminated do begin if PercentToStopAttacking > PercentToAttackAgain then begin Self.DisplayText('You must have the PercentToStopAttacking LOWER then the PercentToAttackAgain!'); exit; end; UpdateWorld; Creature := GetAttackedCreature; if Creature <> nil then begin if Creature.health <= PercentToStopAttacking then begin Creature.attacking := false; repeat If Creature.Health > PercentToAttackAgain then Creature.Attacking := true; UpdateWorld; sleep(500); until (Creature.Health = 0) or (Creature.health >= PercentToAttackAgain) or (terminated); if Creature <> nil then if Creature.health >= PercentToAttackAgain then Creature.Attacking := true; end; end; sleep(500); end;
Dziekuje Bardzo
pozdrawia wasz administrator
rafek1241
Offline