diff --git a/extensions/community/P2PCustomIDLocal.json b/extensions/community/P2PCustomIDLocal.json new file mode 100644 index 000000000..821c5758c --- /dev/null +++ b/extensions/community/P2PCustomIDLocal.json @@ -0,0 +1,278 @@ +{ + "author": "", + "category": "Network", + "extensionNamespace": "", + "fullName": "P2P Custom ID (Local)", + "gdevelopVersion": "", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCgkuc3Qye2ZpbGw6bm9uZTtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MjtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTE4LDE1SDE0Yy0xLjEsMC0yLTAuOS0yLTJWNWMwLTEuMSwwLjktMiwyLTJIMThjMS4xLDAsMiwwLjksMiwyVjEzQzIwLDE0LjEsMTkuMSwxNSwxOCwxNXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxNSIgeTE9IjEyIiB4Mj0iMTciIHkyPSIxMiIvPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI3LDI5SDIzYy0xLjEsMC0yLTAuOS0yLTJWMTljMC0xLjEsMC45LTIsMi0ySDI3YzEuMSwwLDIsMC45LDIsMlYyN0MyOSwyOC4xLDI4LjEsMjksMjcsMjl6Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjQiIHkxPSIyNiIgeDI9IjI2IiB5Mj0iMjYiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik05LDI5SDVjLTEuMSwwLTItMC45LTItMlYxOWMwLTEuMSwwLjktMiwyLTJIOWMxLjEsMCwyLDAuOSwyLDJWMjdDMTEsMjguMSwxMC4xLDI5LDksMjl6Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iNiIgeTE9IjI2IiB4Mj0iOCIgeTI9IjI2Ii8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIxNiwxNSAxNiwyMCAxMSwyNCAiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyMSIgeTE9IjI0IiB4Mj0iMTYiIHkyPSIyMCIvPg0KPC9zdmc+DQo=", + "name": "P2PCustomIDLocal", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Communication/43992dbee9241109878a5d9f5d8364acffdee7437491e95052e57144a94f1baa_Communication_phones_network_sharing.svg", + "shortDescription": "Works for local server if you are using a Default broker server.", + "version": "1.0.0", + "description": [ + "I am not responsible if you are using an custom local server in that way all players can leak everyone's IP address even scammers so I don't recommanded using this on Custom local server this was made to be used for local server not Public server Please don't try this on Public server...", + " Thanks.. Message by MaxRBLXYT.", + "", + "Custom ID's are Room1 , Room2 , Room3 if you are making your Manuel IP to custom Room1,Room2,Room3 for your friends to join easily.", + "", + "Scripting by MaxRBLXYT.", + "Made and decorated by Irshad111 and Published by Irshad111." + ], + "tags": [], + "authorIds": [ + "kSbnAfcMnTdMqsUDiyG4fCMqAQa2", + "229ldNSrKabCt1n9pnmycgo7Udo1" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Changes the P2P ID to the custom Room 1 ID. Use this at the beginning of the scene for it to work.", + "fullName": "Change the name of manual ID with custom ID Room1", + "functionType": "Action", + "name": "Room1_Action", + "sentence": "Change the name of the manual P2P ID to the custom ID 'Room 1'", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "P2P::DisconnectFromBroker" + }, + "parameters": [] + }, + { + "type": { + "value": "P2P::OverrideID" + }, + "parameters": [ + "\"Room1\"" + ] + }, + { + "type": { + "value": "P2P::UseDefaultBroker" + }, + "parameters": [] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Changes the P2P ID to the custom Room 2 ID. Use this at the beginning of the scene for it to work.", + "fullName": "Change the name of manual ID with custom ID Room2", + "functionType": "Action", + "name": "Room2_Action", + "sentence": "Change the name of the manual P2P ID to the custom ID'Room 2'", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "P2P::DisconnectFromBroker" + }, + "parameters": [] + }, + { + "type": { + "value": "P2P::OverrideID" + }, + "parameters": [ + "\"Room2\"" + ] + }, + { + "type": { + "value": "P2P::UseDefaultBroker" + }, + "parameters": [] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Changes the P2P ID to the custom Room 3 ID. Use this at the beginning of the scene for it to work.", + "fullName": "Change the name of manual ID with custom ID Room3", + "functionType": "Action", + "name": "Room3_Action", + "sentence": "Change the name of the manual P2P ID to the custom ID 'Room 3'", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "P2P::DisconnectFromBroker" + }, + "parameters": [] + }, + { + "type": { + "value": "P2P::OverrideID" + }, + "parameters": [ + "\"Room3\"" + ] + }, + { + "type": { + "value": "P2P::UseDefaultBroker" + }, + "parameters": [] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Checks if the player owns the ID and modifies the text to 'Please wait.'.", + "fullName": "If player owns the ID", + "functionType": "Condition", + "group": "Check if the player owns the ID Group.", + "name": "Check_If_player_owns_the_ID", + "sentence": "Checks if the player owns the ID for text _PARAM1_ and shows error message _PARAM2_ after the given time _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "P2P::OnConnection" + }, + "parameters": [] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Text", + "Text", + "=", + "P2P::GetLastConnectedPeer() + Error" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Select a Text object", + "name": "Text", + "supplementaryInformation": "TextObject::Text", + "type": "objectList" + }, + { + "description": "Error", + "longDescription": "Write an error to display to other players.", + "name": "Error", + "type": "string" + }, + { + "description": "Error delay time", + "longDescription": "\"The time in seconds before the error is shown, e.g. 0.4.\".", + "name": "Time", + "supplementaryInformation": "TextObject::Text", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Checks if the player does not own the ID and resets it to p2p::GetID() if not.", + "fullName": "If player does not own the ID", + "functionType": "Condition", + "group": "Check if the player owns the ID Group.", + "name": "If_Player_don_t_own_the_ID", + "sentence": "Checks if the player does not own the ID for text _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "P2P::OnDisconnection" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TextContainerCapability::TextContainerBehavior::SetValue" + }, + "parameters": [ + "Which_text_", + "Text", + "=", + "P2P::GetLastDisconnectedPeer() + P2P::GetID()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Select an text", + "name": "Which_text_", + "supplementaryInformation": "TextObject::Text", + "type": "objectList" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] +} \ No newline at end of file