- 精华
- 阅读权限
- 90
- 好友
- 相册
- 分享
- 听众
- 收听
- 注册时间
- 2018-9-30
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
连接到服务端,找到
/root/scripts/item/SkillRecipe.lua
将第7行 local nRetCode = player.DoCustomOTAction(0, true, 96, TARGET.NO_TARGET, 0, "scripts/item/SkillRecipe.lua", GLOBAL_STRING_TABLE.LEARN_SKILL_RECIPE) 修改为 local nRetCode = player.DoCustomOTAction(0, true, 1, TARGET.NO_TARGET, 0, "scripts/item/SkillRecipe.lua", GLOBAL_STRING_TABLE.LEARN_SKILL_RECIPE)
其中1就是控制读条的函数,16帧是1秒,96对应原读条6秒,注意不要改成0,不然无法学习秘籍,这个文件还控制配方学习读条.修改后无需同步到客户端即可生效.
附上完整文件内容,可直接复制使用
- Include("scripts/Include/Player.lh");
- Include("scripts/Include/Item.lh");
- Include("scripts/Include/SkillRecipe.lh")
- function OnUse(player,item)
- if (SkillRecipeTable[item.dwIndex]) then
- local nRetCode = player.DoCustomOTAction(0, true, 1, TARGET.NO_TARGET, 0, "scripts/item/SkillRecipe.lua", GLOBAL_STRING_TABLE.LEARN_SKILL_RECIPE)
- if nRetCode == true then
- player.SetCustomInteger4(27, item.dwID)
- end
- end
- return false, false
- end
- function OnCustomEvent(player, target)
- local dwID = player.GetCustomInteger4(27)
- local item = GetItem(dwID)
- if item then
- if player.GetItemAmount(ITEM_TABLE_TYPE.OTHER, item.dwIndex) >= 1 then
- local nSkillID = SkillRecipeTable[item.dwIndex].SkillID
- if player.GetSkillLevel(nSkillID) > 0 then
- local result = player.CanLearnSkillRecipe(SkillRecipeTable[item.dwIndex].RecipeID, SkillRecipeTable[item.dwIndex].RecipeLevel)
- if result then
- player.AddSkillRecipe(SkillRecipeTable[item.dwIndex].RecipeID, SkillRecipeTable[item.dwIndex].RecipeLevel)
- player.SendSystemMessage(string.format(GLOBAL_STRING_TABLE.SKILL_RECIPE_RESULT.SUCCESS, item.szName))
- player.CostItem(ITEM_TABLE_TYPE.OTHER, item.dwIndex, 1)
- else
- player.SendSystemMessage(string.format(GLOBAL_STRING_TABLE.SKILL_RECIPE_RESULT.HAVE_LEARN, item.szName))
- end
- else
- player.SendSystemMessage(string.format(GLOBAL_STRING_TABLE.SKILL_RECIPE_RESULT.NOT_LEARN_SKILL, item.szName))
- end
- end
- end
- end
复制代码
|
|