[BCSTORM] WIRED-ACTION: Kick

Results 1 to 16 of 16
  1. #1
    Account Upgraded | Title Enabled! =dj.matias= is offline
    MemberRank
    Apr 2008 Join Date
    FinlandLocation
    381Posts

    [BCSTORM] WIRED-ACTION: Kick

    Hi, I've coded many weeks ago Wired-action: Kick. And i want release it now. :)

    Find

    Code:
            actionresettimer,
    Add after:

    Code:
    actionkick,
    Find from WiredInteractor.cs:

    Code:
     case InteractionType.actionresettimer:
                            message = new ServerMessage(Outgoing.WiredEffect);
                            message.AppendBoolean(false);
                            message.AppendInt32(5);
                            message.AppendInt32(list.Count);
                            foreach (RoomItem item2 in list)
                            {
                                message.AppendInt32(item2.Id);
                            }
                            message.AppendInt32(Item.GetBaseItem().SpriteId);
                            message.AppendInt32(Item.Id);
                            message.AppendString(s);
                            message.AppendInt32(0);
                            message.AppendInt32(0);
                            message.AppendInt32(0);
                            message.AppendInt32(0);
                            message.AppendInt32(0);
                            message.AppendInt32(0);
                            Session.SendMessage(message);
                            break;
    Add after:

    Code:
    case InteractionType.actionkick:
                            message = new ServerMessage(Outgoing.WiredEffect);
                            message.AppendBoolean(false);
                            message.AppendInt32(0);
                            message.AppendInt32(list.Count);
                            foreach (RoomItem item2 in list)
                            {
                                message.AppendInt32(item2.Id);
                            }
                            message.AppendInt32(Item.GetBaseItem().SpriteId);
                            message.AppendInt32(Item.Id);
                            message.AppendString(s);
                            message.AppendInt32(0);
                            message.AppendInt32(0);
                            message.AppendInt32(7);
                            message.AppendInt32(0);
                            message.AppendInt32(0);
                            message.AppendInt32(0);
                            Session.SendMessage(message);
                            break;
    Find:

    Code:
    case "actionshowmessage":
                        return InteractionType.actionshowmessage;
    Add after:

    Code:
    case "actionkick":
                        return InteractionType.actionkick;
    Find:

    Code:
    case InteractionType.actionresettimer:
                        return "actionresettimer";
    Add after:

    Code:
    case InteractionType.actionkick:
                        return "actionkick";
    Find:

    case InteractionType.conditiontriggeronfurni:
    return new WiredInteractor();

    Add before:

    Code:
    case InteractionType.actionkick:
    Find from WiredLoader.cs:

    Code:
     case InteractionType.actionshowmessage:
                        trigger = new ShowMessage(string.Empty, room.GetWiredHandler(), item.Id);
                        trigger.LoadFromDatabase(dbClient, room);
                        HandleItemLoad(trigger, room.GetWiredHandler(), item);
                        break;
    Add after:

    Code:
    case InteractionType.actionkick:
                         trigger = new Kick(string.Empty, room.GetWiredHandler(), item.Id);
                        trigger.LoadFromDatabase(dbClient, room);
                        HandleItemLoad(trigger, room.GetWiredHandler(), item);
                        break;
    Find from WiredSaver.cs:

    Code:
      case InteractionType.triggerwalkofffurni:
                            list = new List<RoomItem>();
                            num3 = 0;
                            trigger2 = new WalksOffFurni(item, room.GetWiredHandler(), list, num3);
                            HandleTriggerSave(trigger2, room.GetWiredHandler(), room, itemID);
                            break;
    Add after:

    Code:
     case InteractionType.actionkick:
                            {
                                string message = string.Empty;
    
                                IWiredTrigger action = new Kick(message, room.GetWiredHandler(), itemID);
                                HandleTriggerSave(action, room.GetWiredHandler(), room, itemID);
                                break;
                            }
    Find:

    Code:
    case InteractionType.actionshowmessage:
                            num = clientMessage.PopWiredInt32();
                            trigger2 = new ShowMessage(clientMessage.PopFixedString(), room.GetWiredHandler(), itemID);
                            HandleTriggerSave(trigger2, room.GetWiredHandler(), room, itemID);
                            break;
    Add after:

    Code:
     case InteractionType.actionkick:
                            num = clientMessage.PopWiredInt32();
                            trigger2 = new Kick(clientMessage.PopFixedString(), room.GetWiredHandler(), itemID);
                            HandleTriggerSave(trigger2, room.GetWiredHandler(), room, itemID);
                            break;
    Find:

    Code:
    internal static bool TypeIsWired(InteractionType type)
            {
    Add:

    Code:
    case InteractionType.actionkick:
    Create new file Kick.cs to Wired -> Actions:

    Code:
    namespace Butterfly.HabboHotel.Rooms.Wired.WiredHandlers.Effects
    {
        using Butterfly.HabboHotel.Items;
        using Butterfly.HabboHotel.Rooms;
        using Butterfly.HabboHotel.Rooms.Games;
        using Butterfly.HabboHotel.Rooms.Wired;
        using Butterfly.HabboHotel.Rooms.Wired.WiredHandlers;
        using Butterfly.HabboHotel.Rooms.Wired.WiredHandlers.Interfaces;
        using Butterfly.Messages;
        using Database_Manager.Database.Session_Details.Interfaces;
        using HabboEvents;
        using System;
        using System.Runtime.InteropServices;
    
        internal class Kick : IWiredTrigger, IWiredEffect
        {
            private WiredHandler handler;
            private uint itemID;
            private string message;
    
            public Kick(string message, WiredHandler handler, uint itemID)
            {
                this.itemID = itemID;
                this.handler = handler;
                this.message = message;
            }
    
            public void DeleteFromDatabase(IQueryAdapter dbClient)
            {
                dbClient.runFastQuery("DELETE FROM trigger_item WHERE trigger_id = '" + this.itemID + "'");
            }
    
            public void Dispose()
            {
                this.message = null;
            }
    
            public bool Handle(RoomUser user, Team team, RoomItem item)
            {
                if (((user != null) && !user.IsBot) && (user.GetClient() != null))
                {
                    
                  
                    user.GetClient().SendNotif(message);
                    ButterflyEnvironment.GetGame().GetRoomManager().GetRoom(user.RoomId).GetRoomUserManager().RemoveUserFromRoom(user.GetClient(), true, false);
                    this.handler.OnEvent(this.itemID);
                    return true;
                }
                return false;
            }
    
            public bool IsSpecial(out SpecialEffects function)
            {
                function = SpecialEffects.None;
                return false;
            }
    
            public void LoadFromDatabase(IQueryAdapter dbClient, Room insideRoom)
            {
                dbClient.setQuery("SELECT trigger_data FROM trigger_item WHERE trigger_id = @id ");
                dbClient.addParameter("id", (int)this.itemID);
                this.message = dbClient.getString();
            }
    
            public void SaveToDatabase(IQueryAdapter dbClient)
            {
                WiredUtillity.SaveTriggerItem(dbClient, (int)this.itemID, "integer", string.Empty, this.message, false);
            }
        }
    }
    Change interaction type to actionkick on furni.

    Screen:



  2. #2
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,608Posts

    Re: [BCSTORM] WIRED-ACTION: Kick

    Good :) Thanks!

  3. #3
    Say whaaat pLEDGE is offline
    MemberRank
    Jun 2010 Join Date
    NorwayLocation
    299Posts

    Re: [BCSTORM] WIRED-ACTION: Kick

    As always, nice :-)

  4. #4
    Proficient Member asic is offline
    MemberRank
    Feb 2011 Join Date
    ScandinaviaLocation
    153Posts

    Re: [BCSTORM] WIRED-ACTION: Kick

    Nice release! Thanks! :)

  5. #5
    Eye Eye Capt'n Spheral is offline
    MemberRank
    May 2010 Join Date
    TumptonshireLocation
    2,488Posts

    Re: [BCSTORM] WIRED-ACTION: Kick

    Create new file Kick.cs to Wired -> Actions:
    Dont you mean

    Butterfly.HabboHotel.Rooms.Wired.WiredHandlers.Effects

  6. #6
    Account Upgraded | Title Enabled! =dj.matias= is offline
    MemberRank
    Apr 2008 Join Date
    FinlandLocation
    381Posts

    Re: [BCSTORM] WIRED-ACTION: Kick

    My emu contains folder in Butterfly - > HabboHotel - > Rooms -> Wired -> Actions

  7. #7
    Member BeatScript is offline
    MemberRank
    Aug 2011 Join Date
    FranceLocation
    64Posts

    Re: [BCSTORM] WIRED-ACTION: Kick

    Quote Originally Posted by JohnHearfield View Post
    Dont you mean

    Butterfly.HabboHotel.Rooms.Wired.WiredHandlers.Effects
    you're right, it's the same for me.

    thanks btw.

  8. #8
    Valued Member Miquos is offline
    MemberRank
    Oct 2012 Join Date
    The NetherlandsLocation
    101Posts

    Re: [BCSTORM] WIRED-ACTION: Kick

    Thanks man, the thing I've always missed everywhere ;P

    The best thing is the leave a message part xD

  9. #9
    Not so spooky... MrSpooks is offline
    MemberRank
    May 2010 Join Date
    Under a rockLocation
    1,068Posts

    Re: [BCSTORM] WIRED-ACTION: Kick

    yet again another great release cheers dude!

  10. #10
    Banned Divide is offline
    BannedRank
    Aug 2011 Join Date
    British CoderLocation
    1,013Posts

    Re: [BCSTORM] WIRED-ACTION: Kick

    BC Storm only?

  11. #11
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,608Posts

    Re: [BCSTORM] WIRED-ACTION: Kick

    Quote Originally Posted by Divide View Post
    BC Storm only?
    Or any other rename of butterfly.

  12. #12
    Proficient Member owot is offline
    MemberRank
    Jun 2010 Join Date
    185Posts

    Re: [BCSTORM] WIRED-ACTION: Kick

    You are an amazing person.

  13. #13
    Proficient Member Redirected is offline
    MemberRank
    Feb 2013 Join Date
    192Posts

    Re: [BCSTORM] WIRED-ACTION: Kick

    hrmm i think ive got something wrong but not sure what :S

    Emu starts up perfectly... but I buy the furniture and attempt to place it in my room but it goes straight back into my inventory. [yes i changed the interaction type]

  14. #14
    Enthusiast Cr3t0x is offline
    MemberRank
    Dec 2010 Join Date
    FranceLocation
    39Posts

    Re: [BCSTORM] WIRED-ACTION: Kick

    Or is situated the file WiredInteractor.cs? Do we owe creates it ?

  15. #15
    Banned Divide is offline
    BannedRank
    Aug 2011 Join Date
    British CoderLocation
    1,013Posts

    Re: [BCSTORM] WIRED-ACTION: Kick

    I think someone needs to remake the Match to Position wired.. =)

  16. #16
    Proficient Member Redirected is offline
    MemberRank
    Feb 2013 Join Date
    192Posts

    Re: [BCSTORM] WIRED-ACTION: Kick

    Can someone solve my issue in where I cant place the item in the room? hrmm



Advertisement