Advertisement
Guest User

Untitled

a guest
Jan 26th, 2015
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.55 KB | None | 0 0
  1. --Original function :
  2. function c_selectitem:evaluate()
  3.     if (Now() < ml_task_hub:ThisTask().networkLatency or Player.cp.current < tonumber(gCraftMinCP)) then
  4.         return false
  5.     end
  6.  
  7.     local synth = Crafting:SynthInfo()
  8.     if ( not synth and Crafting:IsCraftingLogOpen()) then
  9.         if ( Crafting:CanCraftSelectedItem() ) then
  10.             return true
  11.         end
  12.     end
  13.    
  14.     return false
  15. end
  16.  
  17. --Custom :
  18. function c_selectitem:evaluate()
  19.     if (Now() < ml_task_hub:ThisTask().networkLatency or Player.cp.current < tonumber(gCraftMinCP)) then
  20.    
  21.    
  22.    
  23.         return false
  24.     end
  25.  
  26.     local synth = Crafting:SynthInfo()
  27.     if ( not synth and Crafting:IsCraftingLogOpen()) then
  28.         if ( Crafting:CanCraftSelectedItem() ) then
  29.        
  30.         local neededfound=true;
  31.         for prio,skill in pairs(SkillMgr.SkillProfile) do
  32.             if ( skill.needed == "1" ) then
  33.                 local realskilldata2 = ActionList:Get(skill.id)
  34.                 local skid2 = skill.id
  35.                 if (not realskilldata2) then
  36.                     for skillname,data in pairs(SkillMgr.MatchingCraftSkills) do
  37.                         for job, skillid in pairs(data) do
  38.                             if (skillid == skill.id) then
  39.                                 skid2 = data[Player.job]
  40.                                 realskilldata2 = ActionList:Get(skid2)
  41.                             end
  42.                             if (realskilldata2) then
  43.                                 break
  44.                             end
  45.                         end
  46.                         if (realskilldata2) then
  47.                             break
  48.                         end
  49.                     end
  50.                 end
  51.                 if (not realskilldata2) then
  52.                     d("Missing :"..tostring(skill.name))
  53.                     neededfound=false;
  54.                 end
  55.             end
  56.         end
  57.         if (neededfound==false) then
  58.             return false
  59.         end    
  60.        
  61.        
  62.        
  63.             return true
  64.         end
  65.     end
  66.    
  67.     return false
  68. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement