0 Members and 3 Guests are viewing this topic.
procedure MakeMine(ID: byte);begin if Chars[ID].Mines < Max_Mines then begin WriteConsole(ID,'You have set up a mine.',cBomb); Createbullet(GetPlayerStat(id,'X')+1,GetPlayerStat(id,'Y')-2,0,-4,0,7,ID); Createbullet(GetPlayerStat(id,'X')+0,GetPlayerStat(id,'Y')-2,0,-4,0,7,ID); Createbullet(GetPlayerStat(id,'X')-1,GetPlayerStat(id,'Y')-2,0,-4,0,7,ID); GetPlayerXY(ID,Chars[ID].Mine[Chars[ID].Mines+1].X,Chars[ID].Mine[Chars[ID].Mines+1].Y); Chars[ID].Mines := Chars[ID].Mines + 1; end else WriteConsole(ID,'Too much Mines planted',cError);end;
procedure AppOnIdle(Ticks: Integer);var i,j,k: Integer;begin for j := 1 to 32 do for i := 1 to 32 do for k := 1 to chars[i].mines do begin If (GetPlayerStat(j,'team') <> 5) then If (GetPlayerStat(j,'ID') <> GetPlayerStat(chars[i].Mine[k].owner,'ID')) then If (Distance(GetPlayerStat(j,'X'),GetPlayerStat(j,'Y'),chars[i].Mine[k].X,chars[i].Mine[k].Y) < 50) and (GetPlayerStat(j,'Team') <> GetPlayerStat(chars[i].Mine[k].owner,'Team')) and (Distance(GetPlayerStat(chars[i].Mine[k].owner,'X'),GetPlayerStat(chars[i].Mine[k].owner,'Y'),chars[i].Mine[k].X,chars[i].Mine[k].Y) > 70) then begin Nova(chars[i].Mine[k].X,chars[i].Mine[k].Y,0,10,10000,chars[i].Mine[k].owner,4,10); WriteConsole(chars[i].Mine[k].owner,'Someone just stepped one of your mines!',cBomb); WriteConsole(GetPlayerStat(j,'ID'),'BAAAAAAMM!!! It''s a trap!',$123456); end; end;end;