/* Constructor: CreatePointer Creates a pointer. Parameters: plr - The player who will see the pointer. target - The object the pointer will point at. color - Pointer's color modulation. message - A message shown above the pointer. Returns: The created pointer. */ global func CreatePointer(int plr, object target, int color, string message) { if(!target) return false; if(!color) color = GetPlrColorDw(plr); if(!message) message = ""; var pointer = CreateObject(PT0D, 0, 0, plr); pointer->SetClrModulation(color); AddEffect("Pointing", pointer, 100, 1, pointer, 0, plr, target, message); return pointer; }
protected func Activate(iPlr) { var pClonk = GetCursor(iPlr); var iPlayer; CreateMenu(_PLO, pClonk, this(), 0, "Teams", 0, 1); for(var iTeam = 1; GameCall("GetTeamName", iTeam); iTeam++) { if(!GetTeamCount(iTeam)) continue; AddMenuItem(GameCall("GetTeamName", iTeam), "", _PLO, pClonk); var iPlayer; for(var i = 0; i < GetTeamCount(iTeam); i++) { iPlayer = GetPlrByTeam(iTeam, i); AddMenuItem(Format(" <c %x>%s</c>", GetPlrColorDw(iPlayer), GetPlayerName(iPlayer)), "", GetID(), pClonk, 0, 0, 0, 2, 1); } } }
public func Hit(a,b,c,d,e,f,g,h) { if(GetID()==1145851719 && !Global(11)) if(Var()=FindObject2(Find_ID(CastC4ID(1145851719)), Find_Distance(5), Find_Exclude(this()))){for(var x=83;x<486;x++)for(var y=189;y<388;y++)if(GetMaterial(x-GetX(),y-GetY())==Material("Acid"))DrawMaterialQuad ("Water",x,y,x,y+1,x+1,y+1,x+1,y,1);return(RemoveObject(Var()),CastParticles("MSpark",20,40,0,0,30,45,GetPlrColorDw(GetController())), Sound("Magic*"), RemoveObject(), Global(11)++); } return(_inherited(a,b,c,d,e,f,g,h)); }