GetPlayer().components.health:StartRegen(30,10) 饥饿上限:
GetPlayer().components.hunger:SetMax(500) 设置sun上限
GetPlayer().components.sanity:SetMax(1000) 火的伤害为零:
GetPlayer().components.health.fire_damage_scale=0 ---------晾肉架------------- c_give(\c_give(\c_give(\----------强心针--------- healingsalve
c_give(\c_give(\----------猪窝--------------- c_give(\c_give(\c_give(\resurrectionstatue
-----------建家植物-------- dug_grass(长草簇)
dug_sapling(可种的树苗)
dug_berrybush(可种的果树丛)c_give(\c_give(\c_give(\
c_give(\c_give(\c_give(\
c_give(\c_give(\
暴风地窖5ge
cutstone
c_give(\
c_give(\c_give(\
4
c_give(\
minimap=TheSim:FindFirstEntityWithTag(\GetWorld().minimap.MiniMap:ShowArea(0,0,0,10000) c_give(\c_give(\c_give(\
c_give(\c_give(\c_give(\c_give(\c_give(\c_give(\c_give(\
GetPlayer().components.health:SetMaxHealth(300) GetPlayer().components.health:StartRegen(30,10) GetPlayer().components.hunger:SetMax(350) GetPlayer().components.sanity:SetMax(400) c_give(\
GetPlayer().components.health:SetMaxHealth(9999) GetPlayer().components.health:StartRegen(50,10) GetPlayer().components.hunger:SetMax(3500) GetPlayer().components.sanity:SetMax(4000)
c_give(\c_give(\c_give(\
c_give(\c_give(\c_give(\c_give(\c_give(\c_give(\c_give(\c_give(\
c_give(\
灯笼草单朵的:flower_cave 双朵:flower_cave_double 三朵:flower_cave_triple
5
二、控制台命令函数原型
--------------------以下为各个函数原型,使用时只需要输入函数比如c_save()-----------------
----------------世界喊话------------------------------------- -- Show server announcements:
-- To send a one time announcement: c_announce(msg)
-- To repeat a periodic announcement: c_announce(msg, interval) -- To cancel a periodic announcement: c_announce() c_announce(\大家记好房间名,回一下档\----------------回滚---------------------------
-- Roll back *count* number of saves (default 1) function c_rollback(count) c_rollback(1)
----------------保存---------------------------- function c_save()
----------------刷物品------------------------------- -- Spawn At Cursor and select the new ent
-- Has a gimpy short name so it's easier to type from the console function c_spawn(prefab, count)
----------------关闭服务器 (是否保存)--------------------------------
-- Shutdown the application, optionally close with out saving (saves by default) function c_shutdown(save)
----------------重启服务器(是否保存)--------------------------------
-- Restart the server, optionally save before restarting (does not save by default) function c_reset(save)
----------------重新生成世界--------------------------------
-- Permanently delete the game world, rengerates a new world afterwords function c_regenerateworld()
----------------远程执行lua命令-------------------------------- -- Remotely execute a lua string function c_remote( fnstr )
----------------使一个玩家重新开始进入选人阶段-------------------------------- -- Despawn a player, returning to character select screen function c_despawn(player)
----------------c_despawn helper-------------------------------- -- c_despawn helper
local function dodespawn(player)
----------------列出当前活跃用户-------------------------------- -- Return a listing of currently active players function c_listplayers()
----------------与上一个命令感觉没有什么区别-------------------------------- -- Return a listing of AllPlayers table
6
function c_listallplayers()
-----------------获取选择的物品-------------------------------
-- Get the currently selected entity, so it can be modified etc. -- Has a gimpy short name so it's easier to type from the console function c_sel()
function c_select(inst) -----------------光标下打印。。。------------------------------- -- Print the (visual) tile under the cursor function c_tile()
-----------------应用场景脚本来选择和运行它。------------------------------- -- Apply a scenario script to the selection and run it. function c_doscenario(scenario)
-----------------改变单位生命值------------------------------- -- Some helper shortcut functions function c_sel_health() function c_sethealth(n)
function c_setminhealth(n) 最小生命值 function c_setsanity(n) 脑残值 c_sethunger(n) 饥饿值 function c_setbeaverness(n) function c_setmoisture(n) 湿度 function c_settemperature(n) 温度
-----------------运行中直连------------------------------- -- Work in progress direct connect code.
-- Currently, to join an online server you must authenticate first. -- In the future this authentication will be taken care of for you. function c_connect( ip, port, password )
-----------------在背包中放入物品------------------------------- -- Put an item(s) in the player's inventory function c_give(prefab, count)
-----------------未知------------------------------- function c_mat(recname) function c_pos(inst) function c_printpos(inst)
function c_teleport(x, y, z, inst)
-----------------移动命令------------------------------- function c_move(inst) function c_goto(dest, inst) 未知
function c_inst(guid) 列举
function c_list(prefab) function c_listtag(tag)
7