Szukam skryptu do NG żeby na pasku na górze pokazywało ile zostało many do następnego mlvla. Podobno to zależy od profesji, nie jestem pewien ale jeśli tak to szukam dla druta.
Ostatnio zmieniony przez AlfonZik : 26-01-2009, 14:17
Const
KeyWord='mlvl'; // KeyWord to check mana needed
procedure Event_Message(Channel: integer; Name, Text: String);
begin
updateworld;
If Name=Self.Name then
If Pos(KeyWord, Text) <> 0 then
Self.DisplayText('Mana needed to next Magic Level ('+inttostr ( (1.1^( Self.Skills.Magic.Level )*1600/100) * (100 - Self.Skills.Magic.Percentage) ) +')');
end;
begin
while not terminated do
begin processEvents;
sleep(150);
end;
end;
OWN3DCytat został ukryty, ponieważ ignorujesz tego użytkownika. Pokaż cytat.
Const
StopAt=30;//Stop Atack at 30% hp
AttackAt=60;//Retrum atack at 60%+ hp
TrainName=['Monk'];//
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;
Przepraszam za moje posty - czasami nie mam czasu aby sformułować je krócej.
Const
Loot_Food = [3598]
Var
Looting: Boolean
Procedure Event_ContainerOpened(Index, ID: integer; Name: String);
begin
Looting := True;
end;
Function GetItemFromOpenBackpack(ID, Index: 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;
if x = Index then Continue;
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 SortLoot: Boolean;
var
Item: TItem
begin
Result := False
for x := Low(Loot_Food) to High(Loot_Food) do
begin
if x > High(Loot_Food) then break;
Item := GetItemFromOpenBackpack(Loot_Food[x], x);
If Item <> nil then
begin
Item.MoveToBody(Self.Arrow, 0);
Result := True;
Exit;
end;
end;
end;
begin
Looting := False
while not Terminated do
begin
ProcessEvents;
UpdateWorld;
if Looting then
begin
Looting := SortLoot;
end;
Sleep(100);
end;
end;
Ostatnio zmieniony przez Gray : 29-01-2009, 18:40
Ostatnio zmieniony przez Evó : 29-01-2009, 18:53
Aktualnie 1 użytkowników przegląda ten temat. (0 użytkowników i 1 gości)
Zakładki