TiBiA cHeAtS
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Scripts Mais Usados

Ir para baixo

Scripts Mais Usados Empty Scripts Mais Usados

Mensagem  CrOnUs[AdMIN] Seg Jan 26, 2009 3:08 am

Basketball
Scripts:D :

Script de atacar tal bixo primeiro

Const
Name=['Nome Do bixo'];
SwitchAt=30;// the % of the current attacked monster
//that if the monster has lass % hp than this, we Will NOt change to the stronger monster.
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) <= 4) and (abs(c.Y-self.Y) <= 4) 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.Creature[x].Name) then
begin
sleep(100);
updateworld;
Creatures.Creature[x].attacking:=true;
B:=true;
end;
end;
end;
end;
Sleep(100);
end;
end;

Script de dar Exura Sio!! \/

Const
MinSelfHP = 0; //Life para dar exura sio
MinPlayerHP = 30; // %(porcento) Do HP de outros players
PlayerName = ['Nome do player','Nome do player']; //Players para healar

//-------------------------------------------------------//

var
Creature: TCreature;
CreatureName: string;

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 (AnsiLowerCase(Creatures.Creature[x].Name) = AnsiLowerCase(Name)) and (Creatures.Creature[x].Visible) then
begin
Result := Creatures.Creature[x];
Exit;
end;
end;
end;


while not Terminated do
begin
UpdateWorld;
if (Self.Health < MinSelfHP) and (Self.Mana>140) then
begin
Self.Say('exura sio "'+Self.Name);
Sleep(1000);
end else for i := Low(PlayerName) to High(PlayerName) do
begin
Creature := GetCreatureByName(PlayerName[i]);
If Creature<> nil then
begin
if (Creature.Health < MinPlayerHP) and (Self.Mana > 140) then
begin
Self.Say('Exura Sio "'+PlayerName[i])
Sleep(1000);
break;
end;
end;
end;
Sleep(100);
end;


Colocar Stone Skin Amulet e Might Ring


var
RingID: integer;
AmuletID: integer;
ShieldID: integer;
XbowID: integer;


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;

begin
RingID := 3048; //ID Number de algum anel que vc queira no caso mana ou migth
AmuletID := 3081; //ID number do stone skin amulet
while not Terminated do
begin
UpdateWorld;
if RingID <> 0 then
begin
if Self.Ring.ID = 0 then
begin
Ring := GetItemFromOpenBackpack(RingID);
if Ring <> nil then
begin
Ring.MoveToBody(Self.Ring, 0);
end;
end;
end;
UpdateWorld;
if AmuletID <> 0 then
begin
if Self.Amulet.ID = 0 then
begin
Amulet := GetItemFromOpenBackpack(AmuletID);
if Amulet <> nil then
begin
Amulet.MoveToBody(Self.Amulet, 0);
end;
end;
end;
Sleep(100);
end;
end;

Combo UE ( exevo gran mas vis , flam , frigo , tera )

Const
Leader='Noob do caralho';//Nome de quem vai dar a UE.
KeyWord='agora!';//palavra-chave para dar UE.

procedure Event_Message(Channel: integer; Name, Text: String);
begin
If Name=Leader then
If Pos(KeyWord, Text) <> 0 then
Self.Say('exevo gran mas vis');
end;

begin
while not terminated do
begin
processEvents;

sleep(100);
end;
end;

Dar Utamo Vita Quando Acabar


while not terminated do
begin
UpdateWorld;
if not Self.MagicShield then
begin
Self.Say('Utamo Vita');
Sleep(2000);
end;
sleep(100);
end;

Deslogar em X Minutos

Const
Minutes = 400 // logout after how many minutes since loaded script?

begin
Sleep(Minutes*60000);
Self.Logout(True);
end;

Usar Health potions e Mana potions

const
////////// Potion Healing //////////

Minimum_Potion_Health = 800
Health_Potion_ID = 239

////////////////////////////////////

////////// Spell Healing //////////

Minimum_Spell_Health = 1500
Healing_Spell = 'exura'
Mana_Needed = 20

Restore_Mana_At = 1400
Mana_Potion_ID = 237

////////////////////////////////////



while not Terminated do
begin
UpdateWorld;
if (Self.Health < Minimum_Potion_Health) then Self.Containers.UseItemWithSelf(Health_Potion_ID);
if (Self.Health < Minimum_Spell_Health) and (Self.Mana >= Mana_Needed) then
begin
Self.Say(Healing_Spell);
Sleep(1000);
end;
else if (Self.Mana < Restore_Mana_At) and (Self.Health > Minimum_Potion_Health) then
begin
Self.Containers.UseItemWithSelf(Mana_Potion_ID);
Sleep(1000);
end;
Sleep(100);
end;

Se GM aparecer falar Laaaag e logar

Const
TextToSay = 'laaaag'
DelayBeforeLog = 10 //in seconds

function GMDetected: boolean;
begin
Result := False;
UpdateWorld;
for x := 0 to Creatures.Count - 1 do
begin
if x >= Creatures.count then break;
if Creatures.Creature[x].GM then
begin
Result := True;
exit;
end;
end;
end;

while not terminated do
Begin
UpdateWorld;
if GMDetected then
begin
Self.Say(TextToSay);
sleep(DelayBeforeLog*1000);
Self.Logout(true);
break;
end;
sleep(2000);
end;

Reconectar e Abrir Backpack

const
Account = 1234567; // Sua conta
Password = 'xxxxxxxx'; // Sua senha
Character = 'xxxxxxxx'; // Nome do Char
World = 'Antica'; // Mundo Que vc Joga
ServerIP = ''; // Deixa em branco
procedure Login
var x: integer;
begin
repeat
Self.Login(Account, Password, Character, World, ServerIP);
Sleep(7000);
for x := 0 to 200 do
begin
if Self.Connected then Break;
Sleep(100);
end;
until Self.Connected;
end;
var x: integer;
while not Terminated do
begin
UpdateWorld;
if not Self.Connected then
begin
Login;
Sleep(2000);
UpdateWorld;
Self.Backpack.Open;
Sleep(2000)
UpdateWorld;
for x := 0 to Self.Containers.Container[0].Count do
begin
if x >= Self.Containers.Container[0].Count then Break;
if Self.Containers.Container[0].Item[x].Properties.Container then
begin
Self.Containers.Container[0].Item[x].OpenInNewWindow;
Sleep(2000);
end;
end;
end;
Sleep(1000);
end;

Em War Voce coloca para atacar alguem e o Script taca MW na frente

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
while not Terminated do
begin
UpdateWorld;
if Self.Attacking <> 0 then
begin
Creature := GetCreatureByID(Self.Attacking);
if Creature <> nil then
begin
case Creature.Direction of
0: Self.Containers.UseItemWithGround(3180, Creature.X, Creature.Y - 2, Creature.Z);
1: Self.Containers.UseItemWithGround(3180, Creature.X + 2, Creature.Y, Creature.Z);
2: Self.Containers.UseItemWithGround(3180, Creature.X, Creature.Y + 2, Creature.Z);
3: Self.Containers.UseItemWithGround(3180, Creature.X - 2, Creature.Y, Creature.Z);
end;
end;
end;
Sleep(2000);
end;
end;

Alertar quando tive poucas Spears

const
WeaponId = 3277; // Spear = 3277
WeaponOz = 20; // Spear = 20
AlertAmount = 5;
TimeWait = 3;
SoundNoWeapon = 'C:\Windows\Media\Windows XP Battery Critical.wav';
AlertSound = 'C:\Windows\Media\Windows XP Battery Critical.wav';

procedure Notify(Sound : String);
begin
if (Pos('.wav', AlertSound) <> 0) then PlaySound(AlertSound);
if (Pos('.wav', Sound) <> 0) then PlaySound(Sound);
end;

procedure CheckForWeapon;
var QtyMove : integer;
var QtyItems : integer;
var HasWeapons : boolean;
begin
QtyMove := 0;
HasWeapons := true;

if Self.LeftHand.Amount <= AlertAmount then
begin
sleep(TimeWait * 1000);

if Self.LeftHand.Amount <= AlertAmount then
begin
HasWeapons := false;

for x := 0 to Self.Containers.Count - 1 do
begin
if HasWeapons then Break;

if Self.Containers.Container[x].Count - 1 then
begin

for y := 0 to Self.Containers.Container[x].Count - 1 do
begin
if Self.Containers.Container[x].Item[y].ID = WeaponId then
begin
QtyItems := Abs(Self.Capacity / WeaponOz);

if QtyItems >= 1 then
begin
if Self.Containers.Container[x].Item[y].Amount >= QtyItems then QtyMove := QtyItems;
else QtyMove := Self.Containers.Container[x].Item[y].Amount;

QtyMove := QtyMove - 1;

if QtyMove then
begin
Self.Containers.Container[x].Item[y].MoveToBody(Self.LeftHand, QtyMove);
HasWeapons := true;
Break;
end;
end;
end;
end;
end;
end;
end;
end;

if not HasWeapons then Notify(SoundNoWeapon);
end;

begin
while not Terminated do
begin
UpdateWorld;
CheckForWeapon;
sleep(1000);
end;
end;

Alertar quando acabar food

Const
FoodID = 1111 // Coloke aki o Id da food
MusicPath = 'C:\Windows\Media\Notify.wav' // This is the main alert of windows.

while not terminated do
begin
UpdateWorld;
a:=0;
For x:= 0 to Self.Containers.Count - 1 do
begin
for y := 0 to Self.Containers.Container[x].Count - 1 do
begin
if Self.Containers.Container[x].Item[y].ID = FoodID
then a := 1;
Sleep(100);
end;
sleep(100);
end;
sleep(100);
if a = 0 then PlaySound(MusicPath);
end;

Auto Hmm vs Stalker

Const
Hmm=3333; // Coloke o Id da HMM
MiniHealth=400;//valor minimo de Vida.. caso vc tenha menos que 400 usará uh sosinho
var
Creature:TCreature;
LOCKID:integer;

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;

Solta exana pox com mais de 5 de Poison

var
MaxPoison: integer;

procedure Event_Notice(Text: string);
var
PoisonAmount: string;
begin
UpdateWorld;
if Self.Mana < 30 then Exit;
if not Self.Poisoned then Exit;
if Pos('You lose ', Text) = 0 then Exit;
if Pos(' hitpoints.', Text) = 0 then Exit;
PoisonAmount := Text;
Delete(PoisonAmount, 1, 9);
PoisonAmount := Copy(PoisonAmount, 1, Pos(' ', PoisonAmount) - 1);
if IntToStr(PoisonAmount) > MaxPoison then Self.Say('exana pox');
end;

begin
MaxPoison := 5;
while not Terminated do
begin
ProcessEvents;
Sleep(100);
end;
end;

Solta Exori Con

const
Delay = 2000; //exaut para cada exori con 2 sec
MinimumManaToCast = 60; // mana que precisa para soltar exori con
MinimumMonsterHealth = 60; // Contado em Pircentagem se o monstro tiver 1k de lifer com 60 soltara exori com com 600 de life..
SpellRange = 3; // soltara 3 exori con

function GetCreatureByID(ID: integer): TCreature;
var
x: integer;
begin
Result := nil;
for x := 0 to Creatures.Count - 1 do
if Creatures.Creature[x].ID = ID then
Result := Creatures.Creature[x];
end;

var
Attacking : TCreature;
Range: Integer;
begin
while not Terminated do
begin
UpdateWorld;

Attacking:=GetCreatureByID(Self.Attacking);
if (Assigned(Attacking)) then
begin
Range := Round(Sqrt(Sqr(Self.X - Attacking.X) + Sqr(Self.Y - Attacking.Y)));
if (Range <= SpellRange) and (Attacking.Health >= MinimumMonsterHealth) and (Self.Mana >= MinimumManaToCast) then
Self.Say('exori con');
end;

Sleep(Delay);
end;
end;

Monk Treiner

Const
StopAt=50;//para de atacar qn tiver com 50% de vida
AttackAt=60;// ataca monk/player com mais de 50% de Life
TrainName=['Monk','FrinedName1','FriendName2'];//vc pode alterar caso nao seja em mundo pvp
var
creature:tcreature;

function GetCreatureByNameHPHIGH(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
if Creatures.Creature[x].z=Self.Z then
if Creatures.Creature[x].Health>AttackAt then
begin
Result := Creatures.Creature[x];
Exit;
end;
end;
end;
function Attacking: 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].Attacking then
begin
Result := True;
Exit;
end;
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;


begin

while not Terminated do
begin
UpdateWorld;
if not attacking then
begin
For x:=low(TrainName) to high(trainName) do
begin
If self.attacking<>0 then break;
Creature:=GetCreatureByNameHPHIGH(TrainName[x]);
if Creature <> nil then
creature.attacking:=true;
sleep(100); updateworld;
end;
end;
if attacking then
begin
Creature:=GetAttackedCreature;
if Creature <> nil then
if creature.Health < StopAt then creature.attacking:=false;
end;
sleep(1000);
end;
end;

Rainbow Outfit

var
head, primary, secondary, detail: integer;
begin
while not Terminated do
begin
UpdateWorld;
head := Random(0,110);
primary := Random(0,110);
secondary := Random(0,110);
detail := Random(0,110);
Self.ChangeOutfit(Self.Outfit, head, primary, secondary, detail, 0);
Sleep(100);
end;
end;


Última edição por CrOnUs[AdMIN] em Qui Jun 24, 2010 10:18 am, editado 1 vez(es)
CrOnUs[AdMIN]
CrOnUs[AdMIN]
Admin

Mensagens : 52
Data de inscrição : 25/01/2009
Idade : 33

https://tibiaabout.forumeiros.com

Ir para o topo Ir para baixo

Scripts Mais Usados Empty Mais Scripts:

Mensagem  CrOnUs[AdMIN] Ter Fev 03, 2009 2:58 pm

Usar Gfb com muitos bixos na tela

Const
MinMonsters = 5 //Quantidade de Bixo na tela
GFB_ID = 0 // Id Da Gfb
Delay = 1600 // Exausted por runa (1000 = 1 segundo)
ShootOnSelf = 1 // 1: Usa a Runa no seu pé, 0 : Usa a Runa no Monstro

while not terminated do
begin
A := 0;
UpdateWorld;
for i := 0 to creatures.count - 1 do
begin
if (i >= Creatures.Count) or (Terminated) then break;
if Creatures.Creature.Z = self.Z then
if Creatures.Creature.NPC then
A := A + 1;
end;
if A >= MinMonsters then
begin
if ShootOnSelf
then Self.Containers.UseItemWithSelf(GFB_ID)
else Self.Containers.UseItemWithCreature(GFB_ID,Creatures.Creature);
sleep(Delay);
end;
sleep(500);
end;

Alertar tal bixo na tela

Const
MonsterName = 'Toad' //Nome do bixo

while not terminated do
begin
updateworld;
for i:= 0 to creatures.count -1 do
begin
if Creatures.Creature.Name = MonsterName
then playsound('C:\Windows\Media\Notify.wav');
sleep(100);
end;
sleep(100);
end;

Alertar com poucas mfs ou potions

Const
UH_ID = 3160 // Coloke o id Da Potion Ou da Uh
MF_ID = 2874 // Coloke o Id da Mana Potion ou Demais Manas
UH_Alert = 5 // ALerta Qnd Tiver com Menos que 5 Uh Ou Potion
MF_Alert = 10 // Alerta Qnd tiver com Menas que 10 Manas

While not terminated do
begin
UpdateWorld;
A:=0;
B:=0;
for i:= 0 to Self.Containers.Count -1 do
begin
for G:= 0 to Self.Containers.Container.Count -1 do
begin
if Self.Containers.Container.Item[G].ID = UH_ID
then A:= A +1;
if Self.Containers.Container.Item[G].ID = MF_ID then
if Self.Containers.Container.Item[G].amount = 10
then B:= B + 1;
Sleep(100);
end;
Sleep(100);
end;
if (A <= UH_Alert) or ( B <= MF_Alert ) then
PlaySound('C:\Windows\Media\Notify.wav');
sleep(100);
end;

Script de ficar na diagonal de tal bixo

Const
Wanted='Dragon';// Monstro que você vai ficar na diagonal
MinCreatureHP= 20 ;
RampsID = [1950, 1952, 1954, 1956, 385, 1947, 434, 414, 604]

var
x: Integer;

function IsCreatureBesideYou(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 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 IsTileWalkable(Tile: TTile): boolean;
begin
Result := True;
for Z := 0 to Tile.Count - 1 do
begin
if Tile.Item[Z].Properties.Hole then
begin
Result := False;
end
else if Tile.Item[Z].Properties.Stairs then
begin
Result := False;
end
else if not Tile.Item[Z].Properties.Walkable then
begin
OutputDebugString('Not Walk: ' + IntToStr(Tile.Item[Z].ID));
Result := False;
end;
else
begin
for x := low(RampsID) to high(RampsID) do
begin
if Tile.Item[Z].ID = RampsID[x] then Result := False;
end;
end;
end;
end;

function GetCreatureBesideYou: TCreature;
begin
UpdateWorld;
Result := Nil;
for x := 0 to Creatures.Count - 1 do
begin
UpdateWorld;
if (Creatures.Creature[x].Name=Wanted) then
if IsCreatureBesideYou(Creatures.Creature[x]) then
begin
if Creatures.Creature[x].ID <> Self.ID then
begin
UpdateWorld;
Result := Creatures.Creature[x];
Exit;
end;
end;
end;
end;

var
Moved:boolean;

begin
G:=false;
T:=false;
while not terminated do
begin
updateworld;
Creature:=GetCreatureBesideYou;
if Creature<>nil then
if Creatures.Creature[Wanted].Health > MinCreatureHP then
begin
if (Self.X<>Creature.X) and (Self.Y=Creature.Y) then
begin
Tile:=GetTileFromXYZ(Self.x,Self.y-1,self.z);
if Tile<>nil then
if IsTileWalkable(Tile) then
begin
Self.MoveUp;
Moved:=true;
end;
If (Moved=False) then
begin
Tile:=GetTileFromXYZ(Self.x,Self.y+1,self.z);
if Tile<>nil then
if IsTileWalkable(Tile) then
Self.MoveDown;
end;
end;
Moved:=false;
if (Self.X=Creature.X) and (Self.Y<>Creature.Y) then
begin
Tile:=GetTileFromXYZ(Self.x-1,Self.y,self.z);
if Tile<>nil then
if IsTileWalkable(Tile) then
begin
Self.MoveLeft;
Moved:=true;
end;
If (Moved=False) then
begin
Tile:=GetTileFromXYZ(Self.x+1,Self.y,self.z);
if Tile<>nil then
if IsTileWalkable(Tile) then
Self.MoveRight;
end;
end;
end;
sleep(1000);
end;
end;

Script de usar Utamo Vita ao ver tal bixo ou tal pessoa

Const
MonsterName = 'Demon Skeleton', 'Lord'Paulistinha' //Personagem Ou Criatura

while not terminated do
begin
updateworld;
for i := 0 to creatures.count - 1 do
begin
if creatures.creature.name = MonsterName then
if Creatures.Creature.npc = true then
if Creatures.Creature.Z = Self.Z then
begin
Self.say('utamo vita');
sleep(1000);
end;
end;
end;
Usar Health Potion + exura

const
minMana = 20; //minimo mana
minHealth = 600; //Life pra tomar o Pote
maxHealth = 780; //Life pra usar Exura abaixo disso
potionid = 266; //id da potion
spellnome = 'exura' //nome da magia

while not Terminated do
begin
UpdateWorld;
if (Self.Health < minHealth) then
begin
Self.Containers.UseItemWithSelf(potionid);
Sleep(1000);
end;
else
begin
if (Self.Health < maxHealth) and (Self.Mana > minMana ) then
begin
Self.Say(spellnome);
Sleep(1500);
end;
end;
Sleep(100);
end;

Alertar ao acabar CAP

Const
cap = 10 //Quanto de cap vai alertar

while not terminated do
begin
UpdateWorld;
if self.capacity < cap then
PlaySound('C:\Windows\Media\notify.wav');
Sleep(100);
end;

Script de Passar Obsidian Knife ou Woden Stak

const
obsidian_knife = 5908; //id da obsidian ou woden stak
skin_body = [4011, 4047, 4052, 4057]; //id dor corpos

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;

id de corpos mortos

4011 Minotaur
4025 Dragons
4047 Minotaur mage
4052 Minotaur archer
4057 Minotaur guard
4062 Dragon lord
4112 Behemoth
4212 Bonebeast
4321 Lizard Templar
4324 Lizard Sentinel
4327 Lizard Snakecharmer
4097 Demon
4137 Vampire

const
SpellList = ['exiva', 'utevo lux', 'exani tera', 'exura', 'exana pox',
'exori mort', 'exura gran', 'exani hur', 'exori flam', 'exori vis',
'utevo gran lux', 'exevo con', 'utamo vita', 'utani hur', 'exevo pan',
'exevo con pox', 'exevo con mort', 'exevo flam hur', 'exura sio',
'exeta res', 'exura vita', 'utani gran hur', 'exevo vis lux',
'utevo res ina', 'utevo res', 'exevo con flam', 'exana ina', 'utevo vis lux',
'exevo grav vita', 'exevo gran vis lux', 'exana mas mort', 'utana vid',
'exori', 'exori con', 'exori gran', 'exori hur', 'exori gran',
'exura gran mas res', 'exevo mort hur', 'exeta vis', 'exevo gran mas pox',
'adevo grav pox', 'adana pox', 'adura gran', 'adevo grav flam', 'adori',
'adeta sio', 'adori flam', 'adito grav', 'adevo grav vis', 'adevo res pox',
'adito tera', 'adori gran flam', 'adura vita', 'adevo mas pox', 'adori gran',
'adevo res flam', 'adevo ina', 'adevo mas flam', 'adana mort',
'adevo mas grav pox', 'adevo mas hur', 'adevo grav tera',
'adevo mas grav flam', 'adevo mas vis', 'adevo mas grav vis',
'adori vita vis', 'adana ani'];

procedure Event_Message(Channel: integer; Name, Text: String);
begin
UpdateWorld;
if (Channel = 1) and (Name <> Self.Name) then
begin
for x := Low(SpellList) to High(SpellList) do
begin
if (Pos(AnsiLowerCase(SpellList[x]), AnsiLowerCase(Text)) = 1) then
begin
if AnsiLowerCase(SpellList[x]) = AnsiLowerCase(Text) then
Break;
if (Text[Length(SpellList[x]) + 1] = ' ') and (Text[Length(SpellList[x]) + 2] = '"') then
Break;
end;
if x = High(SpellList) then
PlaySound('C:\WINDOWS\Media\Notify.wav');
end;
end;
end;

while not Terminated do
begin
UpdateWorld;
ProcessEvents;
Sleep(100);
end;

Script de caçar com Summons
Const
Ignore='Monk'; // if the creature is a Monk, we wont attack it.
var x : integer;
Looting:boolean;

function Attacking : 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].Attacking then
begin

Result := True;
Exit;
end;
end;


end;

function PlayerOnScreen : 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].Name<>Self.Name then
if not Creatures.Creature[x].NPC then
begin
Result :=true;
Exit;
end;
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 FindClosest : integer;
var i, l, closest_num, closest_range, last_closest_range : integer;
begin
if not attacking then
begin
closest_num := -1;
last_closest_range := 5000;
for i := 0 to Creatures.Count - 1 do
if (Creatures.Creature.Z = Self.Z) then
if (Creatures.Creature.NPC = true) then
if (Ignore<>Creatures.Creature.Name) then
begin
closest_range := Round(Sqrt(Sqr(Self.X - Creatures.Creature.X)) + Sqr(Self.Y - Creatures.Creature.Y));
if (closest_range < last_closest_range) then
begin
last_closest_range := closest_range;
closest_num := i;
end;
end;
Result := closest_num;
Exit;
end;
end;

var found, Bla,y : integer;
begin
updateworld;
Bla:=Self.Containers.Count;
Looting:=false;
while not terminated do
begin
UpdateWorld;
if Self.Containers.Count>Bla then begin D:=Self.Containers.Count; Looting:=true; end;
if (Looting=true) then
begin
updateworld;
Z:=self.x;
y:=self.y;
Self.DisplayText('Looting');
repeat
sleep(200);
updateworld;
until (Z<>Self.x) or (y<>self.y);
Looting:=false;
Self.DisplayText('Finished looting');
end;
updateworld;
found := FindClosest;
if (found <> -1) then
if (attacking=false) and (PlayerOnScreen=false) and (Looting=false) then
Creatures.Creature[found].Attacking := true;
Sleep(1000);
end;
end;




Script de atacar tal bixo com tal magia
const
frigo = ['banshee'];
flam = ['ancient scarab'];
tera = ['cyclops'];
vis = ['acolyte of the cult'];
mort = ['black knight'];
useWand = 0 //se estiver com Wand 1 sem wand 0

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
if creature.visible then
self.say(exori);
end;
end;
end;
end;
sleep(sleepTime);
end;
end;
CrOnUs[AdMIN]
CrOnUs[AdMIN]
Admin

Mensagens : 52
Data de inscrição : 25/01/2009
Idade : 33

https://tibiaabout.forumeiros.com

Ir para o topo Ir para baixo

Scripts Mais Usados Empty Mais Scripts:

Mensagem  CrOnUs[AdMIN] Ter Fev 03, 2009 2:58 pm




[b]Soltar Exura quando for paralizado


const
minMana = 20; //Mana que precisa para soltar exura

while not Terminated do
begin
UpdateWorld;
if Self.Mana > minMana then
begin
if Self.Slowed then
Self.Say('exura');
Sleep(300);
end;
end;

Auto HMM in Stalker

Const
Hmm=3333; // Coloke o Id da HMM
MiniHealth=400;//valor minimo de Vida.. caso vc tenha menos que 400 usará uh sosinho
var
Creature:TCreature;
LOCKID:integer;

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;

begin
while not Terminated do
begin
updateworld;
Creature:=GetCreatureByName('Stalker');
if Creature<>nil then
begin
LOCKID:=Creature.ID;
While Creature <> nil do
begin
If self.Health>MiniHealth then
Self.Containers.UseItemWithCreature(Hmm, Creature);
Sleep(2000);
updateworld;
Creature:=GetCreatureByID(LOCKID);
end;
end;
Sleep(1000);
end;
end;

Entrar na casa caso seja atacado

Const
MoveWhere = 'north' // mude conforme o lado da porta

procedure Event_Attacked(ID:integer);
begin
UpdateWorld;
for i := 0 to Creatures.Count -1 do
begin
if Creatures.Creature.ID = ID then
if Creatures.Creature.NPC = false then
begin
case MoveWhere of
'north': Self.MoveUp;
'south': Self.MoveDown;
'east': Self.MoveLeft;
'west': Self.MoveRight;
end;
Leave := true;
end;
sleep(100);
end;
end;

while not terminated do
begin
updateWorld;
if (MoveWhere <> 'north') and (MoveWhere <> 'south') and (MoveWhere <> 'west') and (MoveWhere <> 'east')then
begin
Self.DisplayText('You MUST enter north, south, east or west! Script will close now, please try again.');
break;
end;
Leave := false;
UpdateWorld;
ProcessEvents;
if Leave then break;
sleep(500);
end;

Colocar e tirar Soft Boots

Const
Soft=6529;
Softbody=3549;
Bsteel=3079; // obs 3554 é id da stell boots pode alterar pelo da boh
ManaMin=300; // mana para colokar a soft
ManaMax=500; //mana para retirar a soft

var
FeetID: integer;

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;

begin
FeetID := Bsteel;
while not Terminated do
begin
UpdateWorld;
if Self.Mana > ManaMax then
begin
if Self.Feet.ID = Softbody then
begin
Feet := GetItemFromOpenBackpack(Bsteel);
if Feet <> nil then
begin
Feet.MoveToBody(Self.Feet, 0);
end;
end;
end
else
begin
Boh := GetItemFromOpenBackpack(Soft);
if Self.Mana < ManaMin then
if Self.Feet.ID = Bsteel then
begin
Boh.MoveToBody(Self.Feet, 0);
end;
end;
Sleep(100);
end;
end;


Soltar tal runa eu tal bixo ou player

Const
IgnoreList = d]Demon Skeleton','Demon','Rat','Skeleton'] // Monstros à jogar a runa(adiciona quantos quiser)
MaxMonsters = 1 // quantidade de bixo(s) para jogar a runa
RuneID = 3165 //ID da runa que você vai usar em tal bixo ou player

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;

while not terminated do
begin
A := 0;
UpdateWorld
For i := 0 to Creatures.Count -1 do
begin
if (i >= Creatures.Count) or (terminated) then break;
if (Creatures.Creature.NPC) and (Creatures.Creature.Z = Self.Z) then
begin
B := 0;
for g := Low(IgnoreList) To High(IgnoreList) do
begin
if AnsiLowerCase(Creatures.Creature.Name) = AnsiLowerCase(IgnoreList[g]) then
begin
B := 1;
break;
end;
sleep(10);
end;
if B = 0 then A := A + 1;
end;
Sleep(10);
end;
if A > MaxMonsters then
begin
UpdateWorld;
if Self.Attacking <> 0 then
Target := GetCreatureByID(Self.Attacking);
if Target <> nil then
Self.Containers.UseItemWithCreature(RuneID,Target);
Sleep(1000);
end;
Sleep(100);
end;

Soltar Exori com 4 bixos na tela

Const
MonstersNames = ['[color=red]Vampire','Mummy'] //Nome do(s) bixo(s)
NumberOfMonsters = 4 // Quantidade de Monstros
MinHealth = 800 //Minimo de Health
MinMana = 150 // Minimo de Mana (Para soltar exori)

function CountMonstersBesideYou:Integer;
begin
Result := 0;
UpdateWorld;
for i := 0 to creatures.Count -1 do
begin
if i >= Creatures.Count then break
for x := -1 to 1 do
begin
if x >= 2 then break
for y := -1 to 1 do
begin
if y > 1 then break;
if Creatures.Creature.NPC then
if (Creatures.Creature.x = Self.X +x) and (Creatures.Creature.y = Self.y + y) then
begin
for G := low(MonstersNames) to high(MonstersNames) do
begin
if Creatures.Creature.Name = MonstersNames[G] then
Result := Result + 1;
end;
end;
end;
end;
end;
end;

while not terminated do
begin
UpdateWorld;
if CountMonstersBesideYou >= NumberOfMonsters then
if Self.Mana >= MinMana then
if Self.Health > MinHealth then
Self.Say('exori');
sleep(100);
end;
CrOnUs[AdMIN]
CrOnUs[AdMIN]
Admin

Mensagens : 52
Data de inscrição : 25/01/2009
Idade : 33

https://tibiaabout.forumeiros.com

Ir para o topo Ir para baixo

Scripts Mais Usados Empty Re: Scripts Mais Usados

Mensagem  Conteúdo patrocinado


Conteúdo patrocinado


Ir para o topo Ir para baixo

Ir para o topo

- Tópicos semelhantes

 
Permissões neste sub-fórum
Não podes responder a tópicos