private void roomUserManager_OnUserSays(object sender, UserSaysArgs e, out bool messageHandled) { RoomUser userSaying = e.user; string message = e.message; if ((!isOwnerOnly && canBeTriggered(message)) || (isOwnerOnly && userSaying.IsOwner() && canBeTriggered(message))) { // Send whisper to self ServerMessage servermsg = new ServerMessage(); servermsg.Init(Outgoing.Whisp); servermsg.AppendInt32(userSaying.VirtualID); servermsg.AppendString(message); servermsg.AppendInt32(0); servermsg.AppendInt32(0); servermsg.AppendInt32(-1); userSaying.GetClient().SendMessage(servermsg); handler.RequestStackHandle(item.Coordinate, null, userSaying, Games.Team.none); handler.OnEvent(item.Id); messageHandled = true; } else { messageHandled = false; } }
private void roomUserManager_OnBotTakeUser(object sender, EventArgs e) { RoomUser[] userArray = (RoomUser[])sender; if (userArray[0] != null && userArray[0].GetUsername().ToLower() == botname.ToLower()) { handler.RequestStackHandle(item, null, userArray[1], userArray[1].team); } }
private void gameManager_OnScoreChanged(object sender, TeamScoreChangedArgs e) { if (e.Points >= scoreLevel && !used) { used = true; handler.RequestStackHandle(item, null, e.user, e.Team); } }
private void roomUserManager_OnBotTakeItem(object sender, EventArgs e) { var user = (RoomUser)sender; if (user != null && user.GetUsername().ToLower() == botname.ToLower()) { handler.RequestStackHandle(item, null, null, Team.none); } }
private void roomUserManager_OnUserEnter(object sender, EventArgs e) { var user = (RoomUser)sender; if ((!user.IsBot && isOneUser && !string.IsNullOrEmpty(userName) && user.GetUsername() == userName) || !isOneUser) { InteractorGenericSwitch.DoAnimation(item); handler.RequestStackHandle(item, null, user, user.team); } }
private void roomUserManager_OnUserEnter(object sender, EventArgs e) { RoomUser user = (RoomUser)sender; if ((!user.IsBot && isOneUser && !string.IsNullOrEmpty(userName) && user.GetUsername() == userName) || !isOneUser) { handler.OnEvent(item.Id); handler.RequestStackHandle(item.Coordinate, null, user, Team.none); } }
public bool OnCycle() { cycleCount++; if (cycleCount > ((cyclesRequired * 10) - 0.5)) { handler.RequestStackHandle(item, null, null, Team.none); //InteractorGenericSwitch.DoAnimation(item); cycleCount = 0; } return(true); }
public bool OnCycle() { cycleCount++; if (cycleCount > cyclesRequired) { handler.RequestStackHandle(item.Coordinate, null, null, Games.Team.none); handler.OnEvent(item.Id); cycleCount = 0; } return(true); }
public bool OnCycle() { if (item.wiredEventUser.Count > 0) { for (int i = 0; i < item.wiredEventUser.Count; i++) { handler.RequestStackHandle(item, null, item.wiredEventUser[i], Team.none); } item.wiredEventUser.Clear(); } return(true); }
public bool OnCycle() { if (requiredCycles > currentCycle) { handler.RequestStackHandle(item.Coordinate, null, null, Team.none); handler.OnEvent(item.Id); resetTimer(); return(false); } else { currentCycle++; return(true); } }
public bool OnCycle() { if (currentCycle > requiredCycles) { if (requestQueue.Count > 0) { lock (requestQueue.SyncRoot) { while (requestQueue.Count > 0) { UserWalksFurniValue obj = (UserWalksFurniValue)requestQueue.Dequeue(); handler.RequestStackHandle(item.Coordinate, obj.item, obj.user, Games.Team.none); } } handler.OnEvent(item.Id); } return(false); } else { currentCycle++; return(true); } }
private void roomUserManager_OnUserSays(object sender, UserSaysArgs e, out bool messageHandled) { RoomUser userSaying = e.user; string message = e.message; if ((!isOwnerOnly && canBeTriggered(message)) || (isOwnerOnly && userSaying.IsOwner() && canBeTriggered(message))) { handler.RequestStackHandle(item.Coordinate, null, userSaying, Games.Team.none); handler.OnEvent(item.Id); messageHandled = true; } else { messageHandled = false; } }
public bool OnCycle() { if (currentCycle == -1) { return(true); } if (requiredCycles <= currentCycle) { currentCycle = -1; handler.RequestStackHandle(item, null, null, Team.none); } else { currentCycle++; } return(true); }
private bool roomUserManager_OnUserSays(object sender, UserSaysArgs e) { var userSaying = e.user; var message = e.message; if (userSaying == null || userSaying.GetClient() == null || triggerMessage.Length == 0) { return(false); } if ((!isOwnerOnly && canBeTriggered(message)) || (isOwnerOnly && userSaying.IsOwner() && canBeTriggered(message))) { if (handler.RequestStackHandle(item, null, userSaying, e.user.team)) { userSaying.WhisperComposer(message, 0); return(true); } } return(false); }
private void targetItem_OnUserWalksOnFurni(object sender, UserWalksOnArgs e) { RoomItem onItem = (RoomItem)sender; if (onItem.GetBaseItem().IsSeat) { if (onItem.TotalHeight - onItem.GetBaseItem().Height != e.user.Z) { return; } } else { if (onItem.TotalHeight != e.user.Z) { return; } } handler.RequestStackHandle(item, (RoomItem)sender, e.user, e.user.team); //InteractorGenericSwitch.DoAnimation(item); }
private void targetItem_OnUserWalksOffFurni(object sender, UserWalksOnArgs e) { handler.RequestStackHandle(item, (RoomItem)sender, e.user, e.user.team); InteractorGenericSwitch.DoAnimation(item); }
private void gameManager_OnGameStart(object sender, EventArgs e) { handler.RequestStackHandle(item.Coordinate, null, null, Team.none); handler.OnEvent(item.Id); }
private void onTrigger(ItemTriggeredArgs e) { handler.RequestStackHandle(item.Coordinate, e.TriggeringItem, e.TriggeringUser, Games.Team.none); handler.OnEvent(item.Id); }
private void gameManager_OnGameEnd(object sender, EventArgs e) { handler.RequestStackHandle(item, null, null, Team.none); //InteractorGenericSwitch.DoAnimation(item); }
private void onTrigger(ItemTriggeredArgs e) { handler.RequestStackHandle(item, e.TriggeringItem, e.TriggeringUser, Team.none); //InteractorGenericSwitch.DoAnimation(item); }