• 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!

on spawn

mmheo

New Member
Joined
Sep 14, 2017
Messages
157
Reaction score
1
anyone can tell me why this script wont work??
Code:
function onSpawn(cid)
      if isMonster(cid) and  getCreatureSkullType(cid)  == 3  then
               setCreatureMaxHealth(cid, getCreatureHealth(cid) + (getCreatureHealth(cid) * 0.10))
               doCreatureAddHealth(cid, getCreatureHealth(cid) * 0.10)
              elseif isMonster(cid) and  getCreatureSkullType(cid)  == 4 then
               setCreatureMaxHealth(cid, getCreatureHealth(cid) + (getCreatureHealth(cid) * 0.20))
               doCreatureAddHealth(cid, getCreatureHealth(cid) * 0.20)
                     elseif isMonster(cid) and  getCreatureSkullType(cid)  == 5  then
               setCreatureMaxHealth(cid, getCreatureHealth(cid) + (getCreatureHealth(cid) * 0.30))
               doCreatureAddHealth(cid, getCreatureHealth(cid) * 0.30)
       end
 
   return true
end


i use this
Feature - [CreatureEvent] OnSpawn(cid)

0.4
 
Last edited:
I think this function is useless in the code:
isMonster (cid)

or register it in the monster:
<script>
<event name="name from creatureevent.xml">
</script>
 
Last edited:
Back
Top