Giter Club home page Giter Club logo

advanced-nutscript's People

Contributors

10sa avatar gitter-badger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

advanced-nutscript's Issues

libs/sh_plugin.lua 320번째 항목 오류

도움말에서 플러그인 항목 선택시 아래와 같은 에러 메세지 발생
[ERROR] gamemodes/nutscript/gamemode/libs/sh_plugin.lua:320: attempt to concatenate field 'desc' (a nil value)

  1. unknown - gamemodes/nutscript/gamemode/libs/sh_plugin.lua:320
  2. DoClick - gamemodes/nutscript/gamemode/derma/cl_help.lua:50
    3. InternalDoClick - lua/vgui/dtree_node.lua:62
    4. DoClick - lua/vgui/dtree_node.lua:32
    5. unknown - lua/vgui/dlabel.lua:232

아래는 libs/sh_plugin.lua 파일의 320번째 항목이 포함된 314 ~ 326번째 항목에 작성된 내용
if (CLIENT) then
AdvNut.hook.Add("BuildHelpOptions", "nut_PluginHelp", function(data)
data:AddHelp("플러그인", function()
local html = ""

		for k, v in SortedPairs(nut.plugin.buffer) do
			html = html.."<p><b>"..(v.name or k).."</b><br /> 제작자 : "..(v.author or "익명").."<br /> 설명 : "..v.desc or nut.lang.Get("no_desc").."</p>" <- 에러의 원인으로 예상되는 항목
		end

		return html
	end, "icon16/plugin.png")
end)

end

인벤토리 오류 외

인벤토리에서 착용형 아이템을 사용할 경우 해당 아이템이 사용되지만 장비된 아이템 항목으로 이동이 되지 않는 현상이 발생
추가적으로 무기 아이템의 경우 아래의 오류 메시지가 발생

[ERROR] gamemodes/hl2rp/gamemode/schema/items/base/sh_weapon.lua:55: attempt to compare number with nil

  1. run - gamemodes/hl2rp/gamemode/schema/items/base/sh_weapon.lua:55
  2. Call - gamemodes/nutscript/gamemode/libs/sh_item.lua:270
    3. unknown - gamemodes/nutscript/gamemode/libs/sh_item.lua:769
    4. func - gamemodes/nutscript/gamemode/libs/external/sh_netstream2.lua:106
    5. unknown - lua/includes/extensions/net.lua:32

Faction transfer command

  • Requested Faction transfer command.
  • using "/factiontransfer".
  • Arguments : Player Name, Faction Name or Faction ID.
  • Example : /factiontransfer Tensa CZ (Tensa's faction is changed "CZ (Citizen Faction Faction ID)".
  • This command is not responsible for problems caused by faction changes.

NextBot NPC의 function ENT:OnKilled에 아이템 스폰 구문을 넣었을 경우 발생하는 오류

local items = {}
	
for k, v in pairs( nut.item.GetAll() ) do
	if (v.category == "폐품") then
		items[k] = v
	end
end
	
local RandomItem = table.Random(items)
nut.item.Spawn(self:GetPos() + Vector(0, 0, 8), nil, RandomItem)

위와 같은 코드로 생겨난 아이템을 조준할 시, 클라이언트 사이드에서 나오는 오류

[ERROR] gamemodes/nutscript/gamemode/libs/external/sh_pon.lua:406: attempt to call a nil value

  1. decode - gamemodes/nutscript/gamemode/libs/external/sh_pon.lua:406
  2. GetData - gamemodes/nutscript/entities/entities/nut_item.lua:40
    3. DrawTargetID - gamemodes/nutscript/entities/entities/nut_item.lua:64
    4. Run - gamemodes/nutscript/gamemode/kernel/cl_kernel.lua:401
    5. unknown - gamemodes/nutscript/gamemode/kernel/cl_kernel.lua:172

nut.util.BlastDoor 오류

[ERROR] gamemodes/nutscript/gamemode/sh_util.lua:312: attempt to call method 'IsDoor' (a nil value)

  1. BlastDoor - gamemodes/nutscript/gamemode/sh_util.lua:312
  2. unknown - gamemodes/dissolution/entities/entities/nut_zombie/shared.lua:64
if (IsValid(entity) and string.find(entity:GetClass(), "door")) then
	if (!string.find(entity:GetModel(), "metal")) then
		timer.Simple(0.3, function()
			entity:EmitSound("physics/wood/wood_plank_break"..math.random(1, 4)..".wav", 100, math.random(90, 130))
			entity.nut_BreakHealth = (entity.nut_BreakHealth or 100) - math.random(5, 10)
			
			if (entity.nut_BreakHealth <= 0) then
				entity.nut_BreakHealth = 100
				nut.util.BlastDoor(entity, self:GetForward() * 600) -- 64번째 줄
				entity:EmitSound("physics/wood/wood_furniture_break"..math.random(1, 2)..".wav", 140)
				util.ScreenShake(entity:GetPos(), 8, 8, math.Rand(0.6, 0.8), 560)
			end

			local effect = EffectData()
			local position = entity:LocalToWorld(entity:OBBCenter()) + entity:GetRight()*math.random(-16, 16) + entity:GetUp()*math.random(-16, 16)
			
			effect:SetStart(position)
			effect:SetOrigin(position)
			util.Effect("GlassImpact", effect)

			util.ScreenShake(entity:GetPos(), 5, 5, math.Rand(0.2, 0.4), 360)
		end)

		self:PlaySequenceAndWait("swing", 1)
	end
end

Language Getter Bugs

I can Reported Many Language Missing Bugs (in 0.19.* version later).
If you Found Missing Language Bug, Please Reporting in Here.

(Report is must include missing language key.)

0.20.1 /mapsceneadd

[ERROR] gamemodes/nutscript/plugins/mapscene/sh_commands.lua:9: attempt to index global 'PLUGIN' (a nil value)

  1. onRun - gamemodes/nutscript/plugins/mapscene/sh_commands.lua:9
  2. RunCommand - gamemodes/nutscript/gamemode/libs/sh_commands.lua:54
    3. ParseCommand - gamemodes/nutscript/gamemode/libs/sh_commands.lua:137
    4. Process - gamemodes/nutscript/gamemode/libs/sh_chatbox.lua:440
    5. Run - gamemodes/nutscript/gamemode/kernel/sv_kernel.lua:275
    6. unknown - gamemodes/nutscript/plugins/customchatbox/sh_chatbox.lua:331
    7. func - gamemodes/nutscript/gamemode/libs/external/sh_netstream2.lua:106
    8. unknown - lua/includes/extensions/net.lua:32

캐릭터 삭제 후 오류

캐릭터 삭제 후 불러오기 메뉴에서 다음 버튼을 클릭하면 아래의 오류 메세지 발생
[ERROR] gamemodes/nutscript/gamemode/derma/cl_charmenu.lua:343: attempt to index a nil value

  1. DoClick - gamemodes/nutscript/gamemode/derma/cl_charmenu.lua:343
  2. unknown - lua/vgui/dlabel.lua:232

오류 메세지 발생 후 다음 버튼을 누르면 1페이지의 캐릭터와 2페이지의 캐릭터가 서로 겹쳐져서 나오며
다음 버튼을 다시 누르면 1페이지 캐릭터와 3페이지 캐릭터가 겹치는 문제가 발생

제안 #1

  • 플레이어의 체력/방어구 상태를 캐릭터 설명 아래에 표시
  • 플레이어가 사망 시, 끌고 다닐 수 있는 시체 생성(playermodel이 레그돌 소환이 불가능할 경우, 미리 지정해둔 대체 모델로 교환할 수 있도록 하는 보조 기능)
  • 시체 루팅, 인육 얻기
  • IC 채팅을 입력하는 대상으로부터 멀어질 수록, 글자 크기를 작게 조절
  • 플레이어가 하는 행동(인벤토리 열기, 아이템 줍기 등)을 ME로 자동 입력
  • 주류/마약 아이템 베이스
  • 수류탄과 같은 일회성 무기 사용 시, 인벤토리와 무기 슬롯에서 제거 / 또는, 인벤토리 안에서 바로 던질 수 있는 투척 무기 아이템 베이스

Config manager library

AdvNS require improved (Advanced) config management system. (ACMSystem)
In system panel, Require type. (but not supported)

So, Create Register function, Add more Advanced functions.
( Config table is must not Accept direct access. (Private) ) Accept Direct Access. (For legacy)

Example

  • Key "xxx" is Number value.
  • nut.config.xxx -> nut.config.Get("xxx")
  • nut.config.xxx = 2; -> nut.config.Register("xxx", 2, "number"); , nut.config.Set("xxx", 2);
  • nut.config.GetType("xxx"); // will be return "number".
  • nut.config.GetAll(); // Will be Return all config tables.
  • nut.config.ClientSend(client); // Send client to Config data. (Only Share/Client configs)

Config Struct

  • Value - Variable Type, Nullable (String, Number, Table, Function, others...)
  • Type - Must string, Nullable.
  • User - Where in using, Client, Server, Share.

If not Matched Set function argument type, Throw error.
Maybe this Function is Breaking config legacy.

nut.util.BlastDoor

[ERROR] gamemodes/nutscript/plugins/improveddoors/sh_plugin.lua:9: attempt to index local 'entity' (a nil value)

  1. IsDoor - gamemodes/nutscript/plugins/improveddoors/sh_plugin.lua:9
  2. BlastDoor - gamemodes/nutscript/plugins/improveddoors/sh_util.lua:5
    3. unknown - gamemodes/dissolution/entities/entities/nut_zombie/shared.lua:64

Timer Failed! [Simple][@gamemodes/dissolution/entities/entities/nut_zombie/shared.lua (line 58)]

			if (IsValid(entity) and string.find(entity:GetClass(), "door")) then
				if (!string.find(entity:GetModel(), "metal")) then
					timer.Simple(0.3, function() -- 58번 줄
						entity:EmitSound("physics/wood/wood_plank_break"..math.random(1, 4)..".wav", 100, math.random(90, 130))
						entity.nut_BreakHealth = (entity.nut_BreakHealth or 100) - math.random(5, 10)

						if (entity.nut_BreakHealth <= 0) then
							entity.nut_BreakHealth = 100
							nut.util.BlastDoor(entity, self:GetForward() * 600) -- 64번 줄
							entity:EmitSound("physics/wood/wood_furniture_break"..math.random(1, 2)..".wav", 140)
							util.ScreenShake(entity:GetPos(), 8, 8, math.Rand(0.6, 0.8), 560)
						end

						local effect = EffectData()
							local position = entity:LocalToWorld(entity:OBBCenter()) + entity:GetRight()*math.random(-16, 16) + entity:GetUp()*math.random(-16, 16)

							effect:SetStart(position)
							effect:SetOrigin(position)
						util.Effect("GlassImpact", effect)

						util.ScreenShake(entity:GetPos(), 5, 5, math.Rand(0.2, 0.4), 360)
					end)

					self:PlaySequenceAndWait("swing", 1)
				end
			end

캐릭터 로드 후 SetHealth 오류

캐릭터를 로드한 후 서버 콘솔에 아래와 같은 오류 발생
gamemodes/nutscript/gamemode/kernel/sv_kernel.lua:514: bad argument #1 to 'SetHealth' (number expected, got nil)

제안#2

  • 특정 팩션 캐릭터의 최대 체력/방어력 설정
  • ALT키를 누른 채로 걷을 때의 속도를 조절
  • LOOC 딜레이
  • 능력치 설정 명령어
  • 커스텀 스폰 지점
  • 문 소유 및 소유자 공유, 서버 종료 후에도 정보 저장 및 불러오기, 가능하다면 인터페이스 제공

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.