Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
New Wired!
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Anglo" data-source="post: 412120" data-attributes="member: 76256"><p>I'll walk you through the steps I'd take while I'm adding wired (it'll be using an example I've just made up), however you can really do these in any order just as long as it's done properly.</p><p>[spoiler=Wired_Id and WiredBoxType]</p><p>Navigate to <strong>WiredBoxType.cs </strong>which is in the Wired folder, before you enter the Boxes folder.</p><p>From here you have to add your wired to the enum for it to work and get a wired_id, I recommend giving it a name that's similar to the others and follows their ordering so for me I will add <strong>EffectUserSit, </strong>the outcome will look like</p><p>[spoiler=WiredBoxType.cs][PHP]</p><p> EffectShowMessage,</p><p> EffectTeleportToFurni,</p><p> EffectToggleFurniState,</p><p> EffectKickUser,</p><p> EffectMatchPosition,</p><p> EffectMoveAndRotate,</p><p> EffectMoveFurniToNearestUser,</p><p> EffectMoveFurniFromNearestUser,</p><p> EffectMuteTriggerer,</p><p> EffectGiveReward,</p><p> EffectExecuteWiredStacks,</p><p> EffectUserSit,</p><p>[/PHP][/spoiler]</p><p></p><p>Next head on over to <strong>WiredBoxTypeUtility.cs</strong> and under the WiredBoxType FromWiredId <em>and</em> inside the switch(Id) you want to select any number that isn't already chosen and return it with the enum you just created, my example being EffectUserSit. Under the WiredBoxType GetWiredId you want to decide what return number you want to give it, for me I'm going to give mine a 7 as I've taken a look at the different wired that looks under there and compared it to mine.</p><p>[spoiler=WiredBoxTypeUtility.cs][PHP]</p><p> //Inside the Switch(Id)</p><p> case 60:</p><p> return WiredBoxType.EffectRegenerateMaps;</p><p> case 61:</p><p> return WiredBoxType.EffectGiveUserBadge;</p><p> case 62:</p><p> return WiredBoxType.EffectUserSit;</p><p></p><p> //Inside the Switch(Type)</p><p> case WiredBoxType.EffectGiveUserBadge:</p><p> case WiredBoxType.EffectRegenerateMaps:</p><p> case WiredBoxType.EffectKickUser:</p><p> case WiredBoxType.EffectSetRollerSpeed:</p><p> case WiredBoxType.EffectUserSit:</p><p> return 7;</p><p>[/PHP][/spoiler]</p><p>Here you've created the wired_id that you use for when adding to the furniture table, this will be whatever number you used within Switch(Id) so mine will be 62.</p><p></p><p>Now I'd head over to Boxes and Effects and paste in my code (didn't actually code a wired box this is just an example), ensuring that I change the WiredBoxType Type</p><p>[spoiler=Old and new][PHP]</p><p> //Old version</p><p> public WiredBoxType Type { get { return WiredBoxType.EffectShowMessage; } }</p><p> //New Version</p><p> public WiredBoxType Type { get { return WiredBoxType.EffectUserSit; } }</p><p>[/PHP][/spoiler]</p><p>There shouldn't be any errors emulator wise now, with the thought that the wired doesn't have errors in the code. Read the next spoiler if you need the interaction_type.</p><p>[/spoiler]</p><p>[spoiler=Interaction_type]</p><p>The interaction_types available are wired_trigger, wired_effect and wired_condition with the exception of some one or two having just wired - it's self explanatory that you yourself decide if it's a trigger, effect or condition.</p><p>[/spoiler]</p></blockquote><p></p>
[QUOTE="Anglo, post: 412120, member: 76256"] I'll walk you through the steps I'd take while I'm adding wired (it'll be using an example I've just made up), however you can really do these in any order just as long as it's done properly. [spoiler=Wired_Id and WiredBoxType] Navigate to [B]WiredBoxType.cs [/B]which is in the Wired folder, before you enter the Boxes folder. From here you have to add your wired to the enum for it to work and get a wired_id, I recommend giving it a name that's similar to the others and follows their ordering so for me I will add [B]EffectUserSit, [/B]the outcome will look like [spoiler=WiredBoxType.cs][PHP] EffectShowMessage, EffectTeleportToFurni, EffectToggleFurniState, EffectKickUser, EffectMatchPosition, EffectMoveAndRotate, EffectMoveFurniToNearestUser, EffectMoveFurniFromNearestUser, EffectMuteTriggerer, EffectGiveReward, EffectExecuteWiredStacks, EffectUserSit, [/PHP][/spoiler] Next head on over to [B]WiredBoxTypeUtility.cs[/B] and under the WiredBoxType FromWiredId [I]and[/I] inside the switch(Id) you want to select any number that isn't already chosen and return it with the enum you just created, my example being EffectUserSit. Under the WiredBoxType GetWiredId you want to decide what return number you want to give it, for me I'm going to give mine a 7 as I've taken a look at the different wired that looks under there and compared it to mine. [spoiler=WiredBoxTypeUtility.cs][PHP] //Inside the Switch(Id) case 60: return WiredBoxType.EffectRegenerateMaps; case 61: return WiredBoxType.EffectGiveUserBadge; case 62: return WiredBoxType.EffectUserSit; //Inside the Switch(Type) case WiredBoxType.EffectGiveUserBadge: case WiredBoxType.EffectRegenerateMaps: case WiredBoxType.EffectKickUser: case WiredBoxType.EffectSetRollerSpeed: case WiredBoxType.EffectUserSit: return 7; [/PHP][/spoiler] Here you've created the wired_id that you use for when adding to the furniture table, this will be whatever number you used within Switch(Id) so mine will be 62. Now I'd head over to Boxes and Effects and paste in my code (didn't actually code a wired box this is just an example), ensuring that I change the WiredBoxType Type [spoiler=Old and new][PHP] //Old version public WiredBoxType Type { get { return WiredBoxType.EffectShowMessage; } } //New Version public WiredBoxType Type { get { return WiredBoxType.EffectUserSit; } } [/PHP][/spoiler] There shouldn't be any errors emulator wise now, with the thought that the wired doesn't have errors in the code. Read the next spoiler if you need the interaction_type. [/spoiler] [spoiler=Interaction_type] The interaction_types available are wired_trigger, wired_effect and wired_condition with the exception of some one or two having just wired - it's self explanatory that you yourself decide if it's a trigger, effect or condition. [/spoiler] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
New Wired!
Top