Author Topic: Summon/Appear Script.  (Read 1018 times)

0 Members and 1 Guest are viewing this topic.

Offline Netherdrake

  • Major(1)
  • Posts: 12
  • Climber of Heaven
Summon/Appear Script.
« on: May 10, 2008, 10:55:55 am »
Can some1 make me an /summon (player number) and /appear (player number) script? it's maybe useful, and i would like it :D sorry my english
Netherdrake .CoH

Offline Boblekonvolutt

  • Soldier
  • **
  • Posts: 222
  • "YOU are a CAR."
Re: Summon/Appear Script.
« Reply #1 on: May 10, 2008, 12:49:12 pm »
What exactly would it do...?

Offline Iq Unlimited

  • Flagrunner
  • ****
  • Posts: 864
  • mr. foobar2000
Re: Summon/Appear Script.
« Reply #2 on: May 10, 2008, 01:03:36 pm »
Move the person to you i guess.

Offline Boblekonvolutt

  • Soldier
  • **
  • Posts: 222
  • "YOU are a CAR."
Re: Summon/Appear Script.
« Reply #3 on: May 10, 2008, 01:19:43 pm »
And /appear would be getting teleported to a person?

Date Posted: May 10, 2008, 07:15:35 pm
Code: [Select]
function OnCommand(ID: Byte; Text: String);
begin
  if (LowerCase(GetPiece(Text, ' ', 0)) = '/summon') then
    MovePlayer(StrToInt(GetPiece(Text, ' ', 1)), GetPlayerStat(ID, 'X'), GetPlayerStat(ID, 'Y'));

  if (LowerCase(GetPiece(Text, ' ', 0)) = '/appear') then
    MovePlayer(ID, GetPlayerStat(StrToInt(GetPiece(Text, ' ', 1)), 'X'), GetPlayerStat(StrToInt(GetPiece(Text, ' ', 1)), 'Y'));
end;

Offline Netherdrake

  • Major(1)
  • Posts: 12
  • Climber of Heaven
Re: Summon/Appear Script.
« Reply #4 on: May 11, 2008, 03:57:12 am »
I tried that, but what does this mean?
Netherdrake .CoH

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: Summon/Appear Script.
« Reply #5 on: May 11, 2008, 05:53:34 am »
lol Boblekonvolutt missed a small part i guess =P
try this
Code: [Select]
function OnCommand(ID: Byte; Text: String): boolean;
begin
  if (LowerCase(GetPiece(Text, ' ', 0)) = '/summon') then
    MovePlayer(StrToInt(GetPiece(Text, ' ', 1)), GetPlayerStat(ID, 'X'), GetPlayerStat(ID, 'Y'));

  if (LowerCase(GetPiece(Text, ' ', 0)) = '/appear') then
    MovePlayer(ID, GetPlayerStat(StrToInt(GetPiece(Text, ' ', 1)), 'X'), GetPlayerStat(StrToInt(GetPiece(Text, ' ', 1)), 'Y'));
end;

Offline Netherdrake

  • Major(1)
  • Posts: 12
  • Climber of Heaven
Re: Summon/Appear Script.
« Reply #6 on: May 11, 2008, 06:09:52 am »
thanks danmer, now /appear is working but /summon isn't, can you fix that, plz?  :-\
Netherdrake .CoH

Offline Boblekonvolutt

  • Soldier
  • **
  • Posts: 222
  • "YOU are a CAR."
Re: Summon/Appear Script.
« Reply #7 on: May 11, 2008, 07:23:51 am »
 ::)

MovePlayer wont move bots, so /summon will only work on players.

Offline Netherdrake

  • Major(1)
  • Posts: 12
  • Climber of Heaven
Re: Summon/Appear Script.
« Reply #8 on: May 11, 2008, 07:33:53 am »
Lol, no wonder it didn't work... i tried it on a Boogie Man that i spawned, thanks you two  ;D
Netherdrake .CoH