Opis forum
Trapowanie garnkami (albo innymi itemami, wystarczy zmienic ITEMID w const na id itema), w const wpisujemy: w NICK nazwa playera ktorego chcemy trapn±ć i DELAY, gdzie wpisujemy jaki ma być odstep czasu między rzuceniem itemu)
Kod:
const
DELAY = 500;
NICK = 'tu wpisac nick gracza;
ITEMID = 3465;
function getPlayer(name:string) : Creature;
begin
for i := 0 to Creatures.Count - 1 do
begin
if Creatures.Creature[i].name = name then
begin
result := Creatures.Creature[i];
exit;
end;
end;
end;
function getItem : item;
var
i,j:integer;
begin
for i:=0 to self.containers.count -1 do
begin
for j:=0 to self.containers.container[i].count -1 do
if self.containers.container[i].item[j].id = ITEMID then
begin
result := self.containers.container[i].item[j];
exit;
end;
end;
end;
procedure trap(name:string);
var
i,j:integer;
target : creature;
pot : item;
begin
updateworld;
target := getPlayer(name);
if target > nil then
begin
for i:=-1 to 1 do
begin
for j:=-1 to 1 do
if not ((j=0) and (i=0)) then
begin
updateworld;
pot := getItem;
if pot >=0 then
begin
pot.movetoground(target.x+i,target.y+j,target.z,1);
sleep(DELAY);
end else exit;
end;
end;
end;
end;
begin
trap(NICK);
end;
Offline