Author Topic: Ready made: PlaceBot  (Read 9573 times)

0 Members and 1 Guest are viewing this topic.

Offline KwS Pall

  • Major(1)
  • Posts: 49
  • I'm going to write Tibia for Soldat
Re: Ready made: PlaceBot
« Reply #20 on: November 12, 2007, 10:15:25 am »
Code: [Select]
var
bots : array[1..6] of byte;
begin
bots[1] := PlaceBot('Poncho',GetPlayerStat(ID,'Team'),GetPlayerStat(ID,'X')+21,GetPlayerStat(ID,'Y'));
bots[2] := PlaceBot('Poncho',GetPlayerStat(ID,'Team'),GetPlayerStat(ID,'X')+10,GetPlayerStat(ID,'Y')+18);
bots[3] := PlaceBot('Poncho',GetPlayerStat(ID,'Team'),GetPlayerStat(ID,'X')-10,GetPlayerStat(ID,'Y')+18);
bots[4] := PlaceBot('Poncho',GetPlayerStat(ID,'Team'),GetPlayerStat(ID,'X')+10,GetPlayerStat(ID,'Y')-18);
bots[5] := PlaceBot('Poncho',GetPlayerStat(ID,'Team'),GetPlayerStat(ID,'X')-10,GetPlayerStat(ID,'Y')-18);
bots[6] := PlaceBot('Poncho',GetPlayerStat(ID,'Team'),GetPlayerStat(ID,'X')-21,GetPlayerStat(ID,'Y'));
end;
I'm going to write Tibia for Soldat

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: Ready made: PlaceBot
« Reply #21 on: November 12, 2007, 10:31:55 am »
Anyways... I guess you guys are missing the point of this code snippet.
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline lewymati

  • Major(1)
  • Posts: 38
Re: Ready made: PlaceBot
« Reply #22 on: June 23, 2008, 08:27:53 am »
:E
i'd like to take a look at this but...


"Not Found

The requested document was not found."

if some1 has that code plz send it somewhere :>

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: Ready made: PlaceBot
« Reply #23 on: June 23, 2008, 09:12:11 am »
:E
i'd like to take a look at this but...


"Not Found

The requested document was not found."

if some1 has that code plz send it somewhere :>
this should be it: http://nopaste.org/p/ak4udcFOk
(copied from mmod)

Offline shantec

  • Soldier
  • **
  • Posts: 140
  • Get ANGREH!!
Re: Ready made: PlaceBot
« Reply #24 on: June 24, 2008, 06:18:02 am »
[offtopic]
I've noticed that many (if not all) Avarax's "Ready Made" scripts have been removed from notepaste :S
Well, luckily at least few guys here, at soldatforums, has them all. Point of this stupid post was nothing, and my intention wasn't to insult anyone. If you however feel insulted, please, tell it to hand. Hand will listen you  [retard]
[/offtopic]
Also Known As REIMA


Lol Happles (happy apples)

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Ready made: PlaceBot
« Reply #25 on: June 24, 2008, 12:16:40 pm »
[offtopic]
I've noticed that many (if not all) Avarax's "Ready Made" scripts have been removed from notepaste :S
Well, luckily at least few guys here, at soldatforums, has them all. Point of this stupid post was nothing, and my intention wasn't to insult anyone. If you however feel insulted, please, tell it to hand. Hand will listen you [retard]
[/offtopic]
There is a point to what you are saying, don't completely rely on nopaste or any other paste sites.

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: Ready made: PlaceBot
« Reply #26 on: June 30, 2008, 08:52:50 pm »
ok i have read the code, but it doesnt include any commands to do it o_0 either i am utterly confused or missing the point
what are the commands?
and can u plz put this in a zip file?
« Last Edit: June 30, 2008, 08:55:04 pm by frosty »
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline Iq Unlimited

  • Flagrunner
  • ****
  • Posts: 864
  • mr. foobar2000
Re: Ready made: PlaceBot
« Reply #27 on: June 30, 2008, 11:20:52 pm »
frosty: it's a function to be implimented into your script, not a command or anything.

Offline Dark Dragon DX

  • Major(1)
  • Posts: 11
  • My Logo
    • My Library Of Files
Re: Ready made: PlaceBot
« Reply #28 on: July 15, 2008, 07:06:01 pm »
Now, unless it doesn't work on dedicated servers, everytime I use placebot in any way [PlaceBot('Poncho',GetPlayerStat(ID,'Team'),GetPlayerStat(ID,'X')+21,GetPlayerStat(ID,'Y'));] just like in the brackets, my server won't start.

Nevermind, I just started coding. I forgot to paste the code into my script file.   [retard]
« Last Edit: July 15, 2008, 07:09:07 pm by Dark Dragon DX »
Dark Dragon DX[/I]
My Library Of Files

Offline BondJamesBond

  • Flagrunner
  • ****
  • Posts: 986
    • http://tobylands.com
Re: Ready made: PlaceBot
« Reply #29 on: August 07, 2008, 02:49:17 am »
Hi, this is a great script. I changed it just lil' bit so the bots can't be added from ingame - and instead get added through the script.

But I have a problem of the bots warping when they are placed in a waypointed map. They try to jump, but just end up warping back to their spot for spawn.

Occasionally, one of 'em will break free... :(

Any reason for this? The server has survival mode on as well.
The computer is a moron.
?  - Peter Drucker

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Ready made: PlaceBot
« Reply #30 on: December 04, 2008, 11:28:12 am »
Code: [Select]
function PlaceBot(botname: string; team: byte; X,Y: single): byte;
var i,n,tempType: byte;
    spawn: array of byte;
    tempX,tempY: single;
begin
  SetArrayLength(spawn,0);
  n:=0;
  for i:=1 to 254 do
    If GetSpawnStat(i,'Active') = true then
      If GetSpawnStat(i,'Style') = team then begin
        n:=n + 1;
        SetArrayLength(spawn,n);
        spawn[n-1]:=i;
        SetSpawnStat(i,'Active',false);
      end;
  for i:=1 to 254 do
    If GetSpawnStat(i,'Active') = false then begin
      SetSpawnStat(i,'Active',true);
      tempType:=GetSpawnStat(i,'Style');
      tempX:=GetSpawnStat(i,'X');
      tempY:=GetSpawnStat(i,'Y');
      SetSpawnStat(i,'Style',team);
      SetSpawnStat(i,'X',X);
      SetSpawnStat(i,'Y',Y);
      break;
    end;
  result:=Command('/addbot' + inttostr(team) + ' ' + botname);
  SetSpawnStat(i,'Active',false);
  SetSpawnStat(i,'Style',tempType);
  SetSpawnStat(i,'X',tempX);
  SetSpawnStat(i,'Y',tempY);
  If n > 0 then
    for i:=0 to n-1 do
      SetSpawnStat(spawn[i],'Active',true);
end;

I copied this from MMod.