level 1
大美美fG
楼主
local Timer1ID = 1
local Timer2ID = 2
local Interval1 = 60000
local Interval2 = 60000
local time = 1800
monster_mgr = { monsters =
{
{ "白野猪1"},
{ "白野猪8"},
{ "沃玛卫士1"},
{ "钳虫8"}
}
}
function on_map_create(map)
lualib:AddTrigger(map, lua_trigger_enter_map, "on_trigget_enter_map")
lualib:AddTimer(map, Timer1ID, Interval1, "on_time")
lualib:AddTimer(map, Timer2ID, Interval2, "on_time")
lualib:AddTrigger(map, lua_trigger_leave_map, "on_trigget_leave_map")
end
--[[function monster_mgr:gen_monster(map)
lualib:Map_GenMonster(map, 32, 34, 10, 4, target_info1["白野猪1""白野猪8""沃玛卫士""钳虫"], 10, false)
end
]]
function on_time(map, time_id)
local monster_count = lualib:Map_GetMonsterCount(map, "", true, true)
if monster_count >= 1 then
lualib:SysMsg_SendMapMsg(map, "剩余怪物数量"..monster_count.."个!")
else
if monster_group_count<4 then
monster_group_count=monster_group_count+1
monster_table:gen_monster(map_guid)
else
lualib:SysMsg_SendMapMsg(map, "恭喜你通过了测试副本!")
lualib:Map_GenNpc(map, "测试活动奖励使者", 39, 29, 1, 1)
lualib: DisableTimer(map,1)
-- lualib:SysMsg_SendTriggerMsg(player, "恭喜你通过了测试副本!")
end
end
end
function on_time(map,time_id)
lualib:Map_ClearDgnMonster(map_guid)
end
function on_map_destroy()
end
function on_leave_map(player)
map_guid = lualib:MapGuid(player)
lualib:Map_DestroyDgn(map_guid)
end
报错:调用函数on_time1失败:该函数不存在!.
这是什么原因
2016年07月13日 07点07分
1
local Timer2ID = 2
local Interval1 = 60000
local Interval2 = 60000
local time = 1800
monster_mgr = { monsters =
{
{ "白野猪1"},
{ "白野猪8"},
{ "沃玛卫士1"},
{ "钳虫8"}
}
}
function on_map_create(map)
lualib:AddTrigger(map, lua_trigger_enter_map, "on_trigget_enter_map")
lualib:AddTimer(map, Timer1ID, Interval1, "on_time")
lualib:AddTimer(map, Timer2ID, Interval2, "on_time")
lualib:AddTrigger(map, lua_trigger_leave_map, "on_trigget_leave_map")
end
--[[function monster_mgr:gen_monster(map)
lualib:Map_GenMonster(map, 32, 34, 10, 4, target_info1["白野猪1""白野猪8""沃玛卫士""钳虫"], 10, false)
end
]]
function on_time(map, time_id)
local monster_count = lualib:Map_GetMonsterCount(map, "", true, true)
if monster_count >= 1 then
lualib:SysMsg_SendMapMsg(map, "剩余怪物数量"..monster_count.."个!")
else
if monster_group_count<4 then
monster_group_count=monster_group_count+1
monster_table:gen_monster(map_guid)
else
lualib:SysMsg_SendMapMsg(map, "恭喜你通过了测试副本!")
lualib:Map_GenNpc(map, "测试活动奖励使者", 39, 29, 1, 1)
lualib: DisableTimer(map,1)
-- lualib:SysMsg_SendTriggerMsg(player, "恭喜你通过了测试副本!")
end
end
end
function on_time(map,time_id)
lualib:Map_ClearDgnMonster(map_guid)
end
function on_map_destroy()
end
function on_leave_map(player)
map_guid = lualib:MapGuid(player)
lualib:Map_DestroyDgn(map_guid)
end
报错:调用函数on_time1失败:该函数不存在!.
这是什么原因