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

monster spwan

ConAn Edujawa

Member
Joined
Feb 23, 2015
Messages
457
Reaction score
17
how i can make mosnter skull but the monster have red skull have more hp and more damge

exampile

if normal hunter have hp 100 and hit like 50

the hunter with red skull will have hp 200 and hit like 100

but the 2 monster have same name but one with skull and normal no have skull

i know bad english sorry for this

useing 0.4 C ~8.60
 
Updated a minute ago the scripts, are you sure that you add everything? Show me the error.

when update the scripts this error come

uzVlrd4.png
 
please read the script before post error
Code:
--Script made by GarQet--
function onThink(interval, lastExecution, thinkInterval)
   local maximum_percent_of_buff = 20
   for _, monster in ipairs(checkSpawnMonster()) do
       if isMonster(monster) and getCreatureStorage(monster, 110) ~= 1 then
           doCreatureSetStorage(monster, 110, 1)
           local percent = math.random(0, 2)
           local buff = math.random(1, 20)
           doCreatureSetStorage(monster, 111, buff / 100)
           if percent > 1 then
               if buff >= 15 then
                   doCreatureSetSkullType(monster, 5)
               elseif buff >= 10 then
                   doCreatureSetSkullType(monster, 4)
               elseif buff >= 5 then
                   doCreatureSetSkullType(monster, 3)
               end
               local correct = buff / 100
               setCreatureMaxHealth(monster, getCreatureHealth(monster) + (getCreatureHealth(monster) * correct))
               doCreatureAddHealth(monster, getCreatureHealth(monster) * correct)
               registerCreatureEvent(monster, "MonsterBoosted")
           end
       end
   end
   return true
end



Great job GarQet
 
Its working like random 1-20% of bonus hp and dmg. Skulls like: black for boosted minimum 15%, red minimum 10%, white minimum 5%.
 
Its working like random 1-20% of bonus hp and dmg. Skulls like: black for boosted minimum 15%, red minimum 10%, white minimum 5%.
yes i know but i need when monster spawn with skull 1 set lvl random like this
monster name {lvl 5}

skull 1 random lvl from 5 to 10

skull 2 random lvl from 15 to 20

skull 30 random lvl from 25 - 30


and how make monster with skull have different loot and different exp
 
Last edited:
Sorry bro but I won't help you with it. Its too much :)
yes its too much thx sosososososo much

but if u can fix this will be better i think

Code:
--Script made by GarQet--
function onStartup()
   local config = {
       traditional_name = "Hunter",
       boosted_monster = "Hunter2"
   }
  for _, monster in ipairs(getWorldCreatures(1)) do
       if isMonster(monster) and getCreatureName(monster) == config.traditional_name then
           registerCreatureEvent(monster, "DeathMonsterBoosted")
           local p = getCreaturePosition(monster)
           doCreatureSetStorage(monster, 111, p.x)
           doCreatureSetStorage(monster, 112, p.y)
           doCreatureSetStorage(monster, 113, p.z)
           local percent = math.random(0, 2)
           if percent > 1 then
               local pos = getCreaturePosition(monster)
               doRemoveCreature(monster)
               doCreateMonster(config.boosted_monster, pos)
           end
       end
   end
   return true
end
 
Back
Top