Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[Tibia Bot NG]Problem Gold Depositer


Rekomendowane odpowiedzi

Opublikowano

Witam :) Wczoraj zrobilem sobie postac sorcerer'a... Wyszedlem z rooka, nabilem 12 lvl i postawilem bota na Trollach zeby zbieral kase. Na forum tibii bot ng widzialem skrypt [http://forums.tibiabot.com/showthread.php?t=100065&highlight=gold+depositer] ktory odnosi GP do dp. zrobilem wszystko jak tam pisze no ale jest jakis blad :P. Gdy mam 40capa postac miala wyjsc z trolli i podazac do banku a nastepnie wrocic na expa i zaczac zbierac kase od nowa :P. Niestety tak sie nie stalo ;> moj 12 lvl w drodze wyjsciowej z expa, zatrzymuje sie caly czas w tym samym miejscu i nic nie robi :P Pomozcie! Zrobilem te Waypointy [ z trolli do banku,z banku do trolli ] ... Nie wiem czy ja jestem glupi ze nie umiem zrobic skryptu

TIBIA TO ZŁO i O!
Opublikowano

No to tak ;D waypoint na trollach gdzie ma expic ;] dziala idealnie, waypoint co idzie od banku do trolli tez dziala pieknie ;] ale waypoint z trolli do banku juz nie dziala tak pieknie ;] zatrzymuje sie na jednym odcinku[ dla sprawdzenia ustawilem na tym malym odcinku waypointy no i suprise ;P nie chodzi ;p]

TIBIA TO ZŁO i O!
Opublikowano

OK :) Menfis mam nadzieje ze teraz tez pomozesz ;) Co mowilem o tym krotkim odcinku gdzie bot nie mogl chodzic :) ustawilem z 20 wpt na nim;p kazda krateczka pokoleji.. Ok ;D Bot wyszedl z miejscowki poszedl ladnie do banku:) ale tutaj jak to zobaczylem to juz sie zblokowalem...;D

Postac wchodzi do banku :) pisze Hi... Bankier odpowida Blablabla [otworzylo sie to okienko rozmowy z NPCs]

Juz sobie mysle :D No nareszcie pieknie dziala ;] a tu kolejny Suprise ... Bot zamiast pisac w Oknie rozmowy [NPCs] pisze na defaulcie... Zdolowalem sie tym zdarzeniem i mam nadzieje ze mi pomozesz :)

Dam ten skrypt co go uzywam :) Pomoz prosze cie ;D

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

const

CaveToBankWaypoints = 'C:\trolledobanku.wpt'

BankToCaveWaypoints = 'C:\bankdotrolli.wpt'

 

GoldAmount = 600;

WaitTime = 10;

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

 

 

 

 

var

Coins: integer;

 

 

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;

 

 

Procedure UseTile(X,Y,Z: Integer);

Var

Tile: TTile;

begin

if Z = Self.Z then

begin

Tile := GetTileFromXYZ(X, Y, Z);

Tile.Item[1].Use;

end;

else Unreachable := True;

end;

 

Procedure UseRope(X,Y,Z: Integer);

begin

if Z = Self.Z then

begin

Self.Containers.UseItemWithGround(3003, X, Y, Z);

end;

else Unreachable := True;

end;

 

Procedure MoveTo(X,Y,Z: Integer);

begin

if Z = Self.Z then

begin

Self.MoveTo(X,Y,Z);

end;

else Unreachable := True;

end;

 

Procedure UseShovel(X,Y,Z: Integer);

begin

if Z = Self.Z then

begin

Self.Containers.UseItemWithGround(3457, X, Y, Z);

Self.Containers.UseItemWithGround(5710, X, Y, Z);

Sleep(1000);

Self.MoveTo(X, Y, Z);

end;

else Unreachable := True;

end;

 

 

Procedure WaypointToAction(X,Y,Z,Action :Integer);

begin

UpdateWorld;

Case Action of

1: UseRope(X,Y,Z);

2: UseTile(X,Y,Z);

3: MoveTo(X, Y+1, Z+1);

4: MoveTo(X, Y-1, Z-1);

5: MoveTo(X, Y, Z-1);

6: MoveTo(X, Y, Z);

7: UseShovel(X,Y,Z-1);

8: MoveTo(X, Y, Z);

9: Sleep(X*1000);

else

MoveTo(X,Y,Z);

end;

end;

 

 

Function WaypointReached(X,Y,Z,Action :Integer): Boolean;

begin

UpdateWorld;

Result := False;

Case Action of

1: if (Z = Self.Z + 1) then Result := True;

2: if (Z = Self.Z + 1) then Result := True;

3: if (Z = Self.Z) then Result := True;

4: if (Z = Self.Z) then Result := True;

5: if (Z = Self.Z) then Result := True;

6: if ((X = Self.X) and (Y = Self.Y) and (Z = Self.Z)) then Result := True;

7: if (Z = Self.Z) then Result := True;

8: if (abs(Z - Self.Z) = 1) then Result := True;

9: Result := True;

else

if ((X = Self.X) and (Y = Self.Y) and (Z = Self.Z)) then Result := True;

end;

end;

 

 

Function CountWaypoints(FilePath: String): Integre;

Var

i: Integer

WaypointFile: TextFile

begin

i := 0

AssignFile(WaypointFile, FilePath);

ReSet(WaypointFile);

while not EoF(WaypointFile) do

begin

temp:= ReadLn(WaypointFile);

i := i+1;

end;

Result:= (i/4);

end;

 

 

Function ExtractWaypointsFromFile(FilePath: String; Count: Integer): Integre;

Var

i: Integr

WaypointsArray: Integer

WaypointFile: TextFile

begin

WaypointsArray := VarArrayCreate([0, Count - 1, 0, 3], $C);

AssignFile(WaypointFile, FilePath);

ReSet(WaypointFile);

for i:=0 to Count-1 do

begin

WaypointsArray[i,0] := StrToInt(ReadLn(WaypointFile));

WaypointsArray[i,1] := StrToInt(ReadLn(WaypointFile));

WaypointsArray[i,2] := StrToInt(ReadLn(WaypointFile));

WaypointsArray[i,3] := StrToInt(ReadLn(WaypointFile));

end;

CloseFile(WaypointFile);

Result := WaypointsArray;

end;

 

 

procedure DepositeGold;

begin

UpdateWorld;

Sleep(2000);

Self.Say('hi');

Sleep(2000);

Self.Say('deposit');

Sleep(2000);

Self.Say(IntToStr(Coins));

Sleep(2000);

Self.Say('yes');

Sleep(2000);

Self.Say('bye');

end;

 

 

function CountItemAmountFromOpenBackpack(ID: integer): integer;

var

x: integer;

y: integer;

begin

Result := 0;

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 := Result + Self.Containers.Container[x].Item[y].Amount;

end;

end;

end;

end;

 

Procedure FollowWaypoint(FilePath: String)

begin

Index := 0

Unreachable := False

WaypointsCount := CountWaypoints(FilePath);

WP := ExtractWaypointsFromFile(FilePath, WaypointsCount);

 

while (Index <> (WaypointsCount-1)) and (not Terminated) do

begin

if Unreachable then

begin

Index := Index+1;

Unreachable := False;

end;

 

if Index = (WaypointsCount-1) then Index := 0;

if WaypointReached(WP[index,0],WP[index,1],WP[index,2],WP[index,3]) then

Index := Index +1;

 

WaypointToAction(WP[index,0],WP[index,1],WP[index,2],WP[index,3]);

 

Sleep(1000);

end;

end;

 

begin

updateworld

Coins := CountItemAmountFromOpenBackpack(3031);

if Coins < GoldAmount then Exit;

 

 

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

//***** Get from the Cave to the banker *****//

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

//

//

FollowWaypoint(CaveToBankWaypoints); //

//

//

//*******************************************//

 

 

While (Coins > 0) and (not terminated) do

begin

DepositeGold;

Sleep(WaitTime*1000);

updateworld;

Coins := CountItemAmountFromOpenBackpack(3031);

end;

if Terminated then Exit;

 

 

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

//**** Return from the banker to the cave ***//

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

//

//

FollowWaypoint(BankToCaveWaypoints); //

//

//

//*******************************************//

 

 

Sleep(1000);

end;

TIBIA TO ZŁO i O!
Opublikowano

Zamień :

procedure DepositeGold;

begin

UpdateWorld;

Sleep(2000);

Self.Say('hi');

Sleep(2000);

Self.Say('deposit');

Sleep(2000);

Self.Say(IntToStr(Coins));

Sleep(2000);

Self.Say('yes');

Sleep(2000);

Self.Say('bye');

end;

na

procedure DepositeGold;

begin

UpdateWorld;

Sleep(2000);

Self.NPCSay('hi');

Sleep(2000);

Self.NPCSay('deposit all');

Sleep(2000);

Self.NPCSay('yes');

Sleep(2000);

Self.NPCSay('bye');

end;

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
×
×
  • Dodaj nową pozycję...