Mostrando postagens com marcador Scripts. Mostrar todas as postagens
Mostrando postagens com marcador Scripts. Mostrar todas as postagens

domingo, 6 de julho de 2008

Com 6300 de exp char desloga

Char desloga quando tivér 6300 de exp, ou seja, quando estivér com mais ou menos 3% para o level 9.

Const
Exp = 6300

while not terminated do
begin
UpdateWorld;
if Self.Experience >= Exp
then Self.Logout(True);
Sleep(1000);
end;

Bota Spear na mão

Const
SmallStoneID = 3277
BackupWeaponID = 1781

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
while not Terminated do
begin
UpdateWorld;
if Self.LeftHand.ID <> SmallStoneID then
begin
Weapon := GetItemFromOpenBackpack(SmallStoneID);
if Weapon <> nil then
begin
Weapon.MoveToBody(Self.LeftHand,0);
Sleep(1000);
end;
else
begin
if Self.LeftHand.ID <> BackupWeaponID then
begin
Weapon := GetItemFromOpenBackpack(BackupWeaponID);
if Weapon <> nil then
begin
Weapon.MoveToBody(Self.LeftHand,0);
Sleep(1000);
end;
end;
Self.DisplayText('ow viado!! abre a bp de spears!!')
end;
end;
Sleep(500);
end;
end;

Bota Small Stones na mão

Const
SmallStoneID = 1781
BackupWeaponID = 3277

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
while not Terminated do
begin
UpdateWorld;
if Self.LeftHand.ID <> SmallStoneID then
begin
Weapon := GetItemFromOpenBackpack(SmallStoneID);
if Weapon <> nil then
begin
Weapon.MoveToBody(Self.LeftHand,0);
Sleep(1000);
end;
else
begin
if Self.LeftHand.ID <> BackupWeaponID then
begin
Weapon := GetItemFromOpenBackpack(BackupWeaponID);
if Weapon <> nil then
begin
Weapon.MoveToBody(Self.LeftHand,0);
Sleep(1000);
end;
end;
Self.DisplayText('Small Stones not found, Backup Weapon equipped instead!')
end;
end;
Sleep(500);
end;
end;

Troca Monk

Const
SwitchAt=50;// Troca de monk.Quando tivér (-) de x% de Life.
AttackAt=90;// Ataca o monk quando tivér mais de x% hp.

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].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
Creature:=GetCreatureByNameHPHIGH('Monk');
if Creature <> nil then
creature.attacking:=true;
end;
if attacking then
begin
Creature:=GetAttackedCreature;
if Creature <> nil then
if creature.Health < SwitchAt then creature.attacking:=false;
end;
sleep(1000);
end;
end;

Slime Treiner

Dê follow na slime "mãe" e depois execute o script.

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;

sábado, 5 de julho de 2008

Alerta de Cap

Const
cap = 10;// Escolha a Cap desejada para dar o alerta

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

Use Obsidian Knife ou Woden Stak

const
obsidian_knife = 5908; // Id da Obsidian ou Woden Stak
skin_body = [4011, 4047, 4052, 4057]; // Id dos 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 dos 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

Auto SSA junto com Auto Ring's

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 := 0; // Id do ring que queira usar
AmuletID := 3081; // Id do SSA, caso não queira, coloque 0
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;

Soltar Exura quando 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;

Usar Health Potion

const

PHealth = 245; // Life pra usar potion

while not Terminated do
begin
UpdateWorld;
if (Self.Health < PHealth) then
begin
Self.Containers.UseItemWithSelf(266);// Id da poção usada
Sleep(1000);
end;
end;

sexta-feira, 4 de julho de 2008

Fazer Enchanted Spear

Const
SpearID = 3277
Spell = 'Exeta con'
MinMana = 600
MinSoul = 5
WeaponID = 3291

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;

While not terminated do
begin
UpdateWorld;
if Self.Mana >= MinMana then
if Self.Soul >= MinSoul then
begin
Spear := GetItemFromOpenBackpack(SpearID);
if Spear <> nil then
Spear.MoveToBody(Self.RightHand,1);
Sleep(800);
UpdateWorld;
If Self.RightHand.ID = SpearID then
Self.Say(Spell);
UpdateWorld;
Weapon := GetItemFromOpenBackpack(WeaponID);
if Weapon <> nil then
Weapon.MoveToBody(Self.RightHand,0);
end;
sleep(500);
end;

Alerta 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;

Atacar Dragon Diagonal

Const
Wanted='Dragon';// whice monster to keep diagnoling
AttackAt = 25
RampsID = [1950, 1952, 1954, 1956, 385, 1947, 434, 414, 604]

var
x,Bla:Integer;
Looting: boolean;


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
updateworld;
G:=false;
T:=false;
while not terminated do
begin
Bla:=Self.Containers.Count;
updateworld;
Creature:=GetCreatureBesideYou;
if Creature<>nil then
if Creatures.Creature[x].Health>AttackAt 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;