Advertisement
Guest User

Untitled

a guest
Mar 13th, 2012
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.52 KB | None | 0 0
  1.             local pointcap = 5
  2.            
  3.             if target.rank == 1 then pointcap = 3        //critter
  4.             elseif target.rank == 2 then pointcap = 4  //normal
  5.             elseif target.rank == 3 then pointcap = 8  //elite
  6.             elseif target.rank == 3.5 then pointcap = 25   //boss
  7.             elseif target.rank == 4 then pointcap = 25      //boss
  8.             end
  9.            
  10.             local rankmod = 1
  11.            
  12.             if target.rank == 1 then rankmod = 1
  13.             elseif target.rank == 2 then rankmod = 1
  14.             elseif target.rank == 3 then rankmod = 1.5
  15.             elseif target.rank == 3.5 then rankmod = 2
  16.             elseif target.rank == 4 then rankmod = 2
  17.             end
  18.  
  19.             local tameskill = self:combatMindpower() * ( 1 + 0.1 * self:getTalentLevel(self:getTalentFromId(self.T_ELITE_BEASTMASTERY)))
  20.             tameskill = (tameskill * tameskill)
  21.             game.logPlayer(self, "Debug: Tameskill: "..tameskill)
  22.            
  23.             local animalwill = (target:combatMindpower()*0.8 + target:combatPhysicalpower()*0.4 + target:combatSpellpower()*0.4)  * rankmod
  24.             if(target.type == "dragon")then animalwill = (animalwill * 1.5) end
  25.             if(target.level > self.level) then animalwill = animalwill * (1 + 0.05 * (target.level - self.level)) end
  26.             animalwill = (animalwill * animalwill)
  27.             game.logPlayer(self, "Debug: Animalwill: "..animalwill)
  28.            
  29.             if (rng.range(1, animalwill) < rng.range(1, tameskill)) then
  30.                 target:setEffect(self.EFF_SUPPRESSED, 4, {power=2})
  31.                 game.logPlayer(self, "#{bold}#You successfully further supress the animal!#{normal}#")
  32.             else
  33.                 game.logPlayer(self, "#{bold}#The animal resists your tame attempt!#{normal}#")
  34.             end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement