• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

creaturescripts, kill monster storage help

adamox223

New Member
Joined
Oct 21, 2017
Messages
100
Reaction score
4
Hello, i have a problem with one script, when i have right storage and i kill a monster it becomes a storage +1, it gives you exp but when i kill monster with a friend, it counts kill for me but not for him anymore, it works only for last hit but in script is set HP %, can anyone test or help ?


Code:
function onKill(cid, target, lastHit)
   if lastHit and getCreatureName(target):lower() == 'wolf' or getCreatureName(target):lower() == 'xxxx' and doCreatureAddHealth(target, -(getCreatureHealth(target)*(5/100))) then
      if getPlayerStorageValue(cid, 2000) == 124 then
      doPlayerAddExp(cid, 60000)
      doCreatureSay(cid, "Mission Complete.", TALKTYPE_ORANGE_1)
         setPlayerStorageValue(cid, 2000, 125)
      end
   end
   return true
end
 
Code:
function onKill(cid, target, lastHit)
if doCreatureAddHealth and getCreatureName(target):lower() == 'wolf' or getCreatureName(target):lower() == 'xxxx' and doCreatureAddHealth(target, -(getCreatureHealth(target)*(5/100))) then
 if getPlayerStorageValue(cid, 2000) == 124 then
 doPlayerAddExp(cid, 60000)
 doCreatureSay(cid, "Mission Complete.", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 2000, 125)
end
end
return true
end

its the solution ;p
 
Back
Top