Author Topic: OnPlayerPosition???  (Read 1097 times)

0 Members and 1 Guest are viewing this topic.

Offline Ttil_Np.csWoW

  • Major
  • *
  • Posts: 55
  • The Berserkers Are Coming....
OnPlayerPosition???
« on: August 30, 2007, 01:15:51 am »
can u find out if the player steps on a cerntan spot? eg:1x 2y? and then do a command like spwn somthing or somthing? is there anything like OnPlayerPosition or somthing like a loop i could use?
I will be back to play soldat, just not now , but i will....... some day.


Offline Ttil_Np.csWoW

  • Major
  • *
  • Posts: 55
  • The Berserkers Are Coming....
Re: OnPlayerPosition???
« Reply #2 on: August 30, 2007, 01:59:31 am »
i wasnt sure how this would work so i writ this up can u tell me what i can do to get what i want?
Code: [Select]
OnPlayerPosition ????
var X,Y: single;
begin
if PlayerX(ID,-134); then
if PlayerY(ID,90); then
MovePlayer(ID, 121, 91);
end;
I will be back to play soldat, just not now , but i will....... some day.


Offline Ttil_Np.csWoW

  • Major
  • *
  • Posts: 55
  • The Berserkers Are Coming....
Re: OnPlayerPosition???
« Reply #4 on: August 30, 2007, 02:53:56 am »
ok then what shold the top line be ? OnPlayerPosition?
I will be back to play soldat, just not now , but i will....... some day.

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: OnPlayerPosition???
« Reply #5 on: August 30, 2007, 06:54:34 am »
Code: [Select]
begin
  for i:=1 to 32 do
  If (Distance(GetPlayerStat(i,'X'),GetPlayerStat(i,'Y'),-134,90) < 20) and (GetPlayerStat(i,'Active') = true) and (GetPlayerStat(i,'Alive') = true)  then
    MovePlayer(i, 121, 91);
end;

Put this into AppOnIdle

also add
Code: [Select]
var i: byte;under AppOnIdle
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host