[source] | guide_examples [title] | DataStorage 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=692 [code] | local globalDataStorage = _DataStorageService:GetGlobalDataStorage("globalDS") keyInfo = DataStorageKeyInfo() keyInfo.Key = "Key" keyInfo.Version = "Version1" globalDataStorage:SetByInfoAndWait(keyInfo, "Value") -- 기존 버전의 "Value" 값을 덮어 쓰는 대신 새로운 버전을 만들어 저장합니다. keyInfo.Key = "Key" keyInfo.Version
[source] | guide_examples [title] | 스프라이트 색상을 픽셀 단위로 설정하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=693 [code] | [client only] void ResetColorTest() { local newWidth = _UtilLogic:RandomIntegerRange(8, 32) local newHeight = _UtilLogic:RandomIntegerRange(8, 32) local r = _UtilLogic:RandomDouble() local g = _UtilLogic:RandomDouble() local b = _UtilLogic:RandomDouble() -- ResetW
[source] | guide_examples [title] | 액션을 예약하고 실행하는 TimerService [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=47 [code] | Method: [server only] void OnBeginPlay() { local callBack = function() log("CallBack! : "..tostring(os.date())) end log("SetTimer! :"..tostring(os.date())) _TimerService:SetTimer(self, callBack, 3, true) }
[source] | guide_examples [title] | mLua [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1287 [code] | @MaxLength(5) property string NewVlaue = "test"
[source] | guide_examples [title] | Lazy Map [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1401 [code] | [server only] void NewMethod2 (Entity portalEntity) { local entityRef = portalEntity.PortalComponent.PortalEntityRef --load LazyMap local name = entityRef.Name }
[source] | examples [title] | GlobalDataStorage [page] | apiReference/Misc/GlobalDataStorage [code] | local ds = _DataStorageService:GetGlobalDataStorage("StorageName") local minDate = DateTime(2023, 03, 09, 20, 20, 0, 0) local maxDate = DateTime(2023, 03, 09, 22, 20, 0, 0) -- 값을 저장할 때 버전 값을 함께 지정한 경우에만 조회할 수 있습니다. local errorCode, versionPages = ds:GetVersionsAndWait("Key", SortDirection.Ascend
[source] | guide_examples [title] | 정규식 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1041 [code] | local input = "One car red car blue car" local pattern = "(\\w+)\\s+(car)" local regex = Regex(pattern, RegexOption.IgnoreCase) local match = regex:Match(input) while match.Success do log(match.Text) match = match:NextMatch() end -- (결과) -- One car -- red car -- blue car
[source] | guide_examples [title] | Command Console 명령어 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1195 [code] | findproperty [-path path] [-name name [match_type=contains] [comparison_type=ordinal]] [-component_name name [match_type=contains] [comparison_type=ordinal]] [-out stream] [-err stream]
[source] | examples [title] | CreatorDataStorage [page] | apiReference/Misc/CreatorDataStorage [code] | local ds = _DataStorageService:GetCreatorDataStorage() local keyInfo = DataStorageKeyInfo("Key", "Version", "Tag") local errorCode, value = ds:GetByInfoAndWait(keyInfo) if errorCode ~= 0 then error("Failed to GetByInfoAndWait. Error : " + tostring(errorCode)) return end
[source] | guide_examples [title] | 날짜와 시간 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=691 [code] | local date = DateTime(2022, 4, 10) log(date:ToFormattedString("g")) -- 04/10/2022 00:00 log(date:ToFormattedString("g", "pt-BR")) -- 10/04/2022 00:00
[source] | guide_examples [title] | 효과적으로 DataStorage 사용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1073 [code] | Property: [None] integer meso = 0 [None] integer cash = 0 Method: [server only] boolean LoadCurrency() { local userDataStorage = _DataStorageService:GetUserDataStorage(self.Entity.PlayerComponent.UserId) if userDataStorage == nil then return end local errorCode, currencySt
[source] | guide_examples [title] | 날짜와 시간 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=691 [code] | local date = DateTime(2022, 8, 29, 19, 27, 15, 023) log(date:ToFormattedString("HH")) -- 19
[source] | guide_examples [title] | DataStorage 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=692 [code] | [server only] void SaveDataStorage() { local sortableDataStorage = _DataStorageService:GetSortableDataStorage("sortableDS") sortableDataStorage:SetAndWait("Score", 90) }
[source] | examples [title] | InputService [page] | apiReference/Services/InputService [code] | Property: [None] string CursorRUID_Normal = "3930c5d2e85b4bff8467aada64fda7f5" [None] string CursorRUID_Click = "79819392249746f88952f3b2321f2f17" [None] boolean IsClicking = nil Method: [client only] void OnUpdate (number delta) { local click = _InputService:IsKeyPressed(KeyboardKey.Mouse0) i
[source] | examples [title] | EntityService [page] | apiReference/Services/EntityService [code] | [server] void DestroyTargetEntity (string id) { local entity = _EntityService:GetEntity(id) _EntityService:Destroy(entity) }
[source] | examples [title] | TimerService [page] | apiReference/Services/TimerService [code] | Property: [None] integer TimerId = 0 Method: [server only] void OnBeginPlay { local repeatFunc = function() local transform = self.Entity.TransformComponent local zRot = transform.ZRotation transform.ZRotation = zRot - (360.0 / 60.0) end self.TimerId = _TimerService:SetTimerRepeat(rep
[source] | guide_examples [title] | CameraService를 활용한 카메라 제어 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=118 [code] | local cameraComponent = _CameraService:GetCurrentCameraComponent() log(cameraComponent)
[source] | guide_examples [title] | MSW MCP [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1368 [code] | { "mcpServers": { "msw-maker-mcp": { "command": "cmd.exe", "args": [ "/c", "call", "%LOCALAPPDATA%\\Nexon\\MapleStory Worlds\\MakerMCP\\msw-maker-mcp.bat" ] }, "msw-mcp": { "serverUrl": "https://msw-mcp.nexon.com/mcp", "headers": { "Authorization": "Bearer ${MSW
[source] | guide_examples [title] | mLua [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1287 [code] | ---@type string local testValue = "test"
[source] | guide_examples [title] | 메이플스토리 월드 루아 문법 확장 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1071 [code] | local str = 'Hello, ' str ..= 'MapleStory ' str ..= 'World!' print(str) -- Output : -- Hello, MapleStory World!
[source] | guide_examples [title] | 메이플스토리 월드 루아 문법 확장 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1071 [code] | local oddNumbers = {} for i = 1, 10 do if i % 2 == 0 then continue -- 짝수는 이후 작업을 하지 않음 end print("odd number : ", i) table.insert(oddNumbers, i) end -- Output : -- odd number : 1 -- odd number : 3 -- odd number : 5 -- odd number : 7 -- odd number : 9
[source] | examples [title] | GlobalDataStorage [page] | apiReference/Misc/GlobalDataStorage [code] | local ds = _DataStorageService:GetGlobalDataStorage("StorageName") local keyInfo = DataStorageKeyInfo() keyInfo.Key = "Key" keyInfo.Version = "Version1" ds:SetByInfoAndWait(keyInfo, "Value") -- 기존 버전의 "Value" 값을 덮어 쓰는 대신 새로운 버전을 만들어 저장합니다. keyInfo.Key = "Key" keyInfo.Version = "Version2" ds:Se
[source] | guide_examples [title] | 날짜와 시간 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=691 [code] | local date = DateTime(2022, 8, 29, 19, 7, 15, 023) log(date:ToFormattedString("MMM")) -- Aug log(date:ToFormattedString("MMM", "it-IT")) -- ago
[source] | guide_examples [title] | Command Console 명령어 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=1195 [code] | play [-debug] [-virtual_player player_number] [-out stream] [-err stream]
[source] | guide_examples [title] | 모바일 기기의 중력 센서 사용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=831 [code] | void GyroscopeCheck (boolean onoff) { if _MobileGyroscopeService:IsHWSupported() then if _MobileGyroscopeService:IsEnabled() then _MobileGyroscopeService:StopAndWait() else _MobileGyroscopeService:StartAndWait() end else _UIToast:ShowMessage("Failed to start
[source] | examples [title] | GlobalDataStoragePages [page] | apiReference/Misc/GlobalDataStoragePages [code] | while true do local datas = pages:GetCurrentPageDatas() for _, data in pairs(datas) do log(data.Name) end -- IsLastPage 프로퍼티를 통해 현재 페이지가 마지막 페이지인지 확인할 수 있습니다. if pages.IsLastPage == true then return end -- 다음 페이지의 데이터를 미리 불러오고 다음 페이지가 유효하지 않은 경우 조회를 마칩니다. local loadResultCo
[source] | guide_examples [title] | 날짜와 시간 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=691 [code] | local date = DateTime(2022, 4, 10) log(date:ToFormattedString("u")) -- 2022-04-10 00:00:00Z
[source] | guide_examples [title] | DataStorage 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=692 [code] | log("# Test_DataStorage_TransactDelete") local transactDs = _DataStorageService:GetGlobalDataStorage(self.TransactionTestDsName) local keys1 = {"key1-1", "key1-2", "key1-3"} local keys2 = {"key2-1", "key2-2", "key2-3"} local code1, resultKeys1 = transactDs:TransactDeleteAndWait(keys1) log("code1: ".
[source] | guide_examples [title] | 엔티티를 탐색하는 EntityService [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=201 [code] | void GetEntitiesSpawnedByModelExample() { local model = _EntityService:GetEntityByPath("/maps/map02/npc-5396_1").Model local entities = _EntityService:GetEntitiesSpawnedByModel(model) for i, entity in pairs(entities) do log(entity.Name) end }
[source] | guide_examples [title] | DataStorage 활용하기 [page] | https://maplestoryworlds-creators.nexon.com/ko/docs?postId=692 [code] | [server only] void SaveDataStorage() { local globalDataStorage = _DataStorageService:GetGlobalDataStorage("globalDS") local keyInfo = DataStorageKeyInfo("key", "Tag", "Version1") -- 이처럼 생성 시 각 값을 지정하거나, 빈 생성자로 생성 후 원하는 값만 채울 수도 있습니다. keyInfo = DataStorageKeyInfo() keyInfo.Key = "Key"