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

Monster summons do not die....??

murat65

Hoster
Joined
Mar 30, 2008
Messages
133
Reaction score
1
Location
Germany
My problem is that the monsters who get summoned by monsters dont die btw. they loose all hp and stuck but not die (i mean the monster like demon who get summoned from orshabaal) but the problem is that every monster do the same what can i do ? any way to fix it ?
 
Maybe, but can you tell us what distro you are using, give us a copy of your orshabaal and demon script. While you're at it, check if player summons will die.. Not sure if they are related but could be good for someone that knows:)
 
you was right :S the same at normal player summons ... they dont die they just stuck and have no name no hp but they atk and block the wpt
 


you see ?

it´s no matter what monster i summon or what monster players summon, after they die they dont die they are there like statures and heal herself if i atk one they atk...
 
Check:

login.lua
creaturescripts.xml
+ scripts in lua file
globalevents.xml
demon.xml - search for script line, if exist remove it
config.lua - rarely

Probably in login.lua is something what executes on onKill or something similar what is integrated with summons.
You have to solve this problem self, in 99% problem is in login.lua and creaturescripts.
 
Creature scripts:
<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
<!-- ChaitoSoft.com -->
<event type="login" name="PlayerLogin" event="script" value="login.lua"/>
<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
<event type="receivemail" name="Mail" event="script" value="mail.lua"/>
<event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
<event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/>
<event type="think" name="Idle" event="script" value="idle.lua"/>
<event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>
<event type="death" name="PythiusDead" script="pythius_the_rotten.lua" />
<event type="death" name="monster2" event="script" value="monster2.lua"/>
<event type="death" name="inquisitionPortals" script="teleports_inquisition.lua"/>
<event type="login" name="FirstItems" event="script" value="firstitems.lua"/>
<event type="login" name="freebless" event="script" value="freebless80.lua"/>
<event type="kill" name="KilledMonstersCounter" script="monster_counter.lua"/>
<event type="look" name="fraglook" event="script" value="fraglook.lua"/>
<event type="advance" name="levelUp" event="script" value="levelUp.lua"/>
<event type="login" name="PromoteVocation" event="script" value="PromoteVoc.lua"/>
<event type="login" name="Outfita" event="script" value="outfit.lua"/>
<!-- Custom systems -->
<event type="kill" name="Inq" event="script" value="Inquisition.lua"/>

<event type="kill" name="PlayerKill" event="script" value="arenakill.lua"/>
<event type="death" name="inquisitionPortals" event="script" value="inquisitionPortals.lua"/>
<event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/>
<event type="logout" name="demonOakLogout" event="script" value="demonOakLogout.lua"/>
<event type="death" name="demonOakDeath" event="script" value="demonOakDeath.lua"/>
<event type="death" name="Azerus" event="script" value="azerus.lua"/>
<event type="kill" name="KillingInTheNameOf" event="script" value="killinginthenameof.lua"/>
</creaturescripts>

Login.lua :

local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)
accountManager = "Account Manager"
managerCounter = 0

for i, player in ipairs(getOnlinePlayers()) do
if accountManager:lower() == player:lower() then
managerCounter = managerCounter + 1
end
end

if managerCounter >= 3 then
return false
end
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
end

local accountManager = getPlayerAccountManager(cid)
if(accountManager == MANAGER_NONE) then
local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
if(lastLogin > 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
else
str = str .. " Please choose your outfit."
doPlayerSendOutfitWindow(cid)
end

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
elseif(accountManager == MANAGER_NAMELOCK) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
elseif(accountManager == MANAGER_ACCOUNT) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
end

if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end

registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")

registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end
registerCreatureEvent(cid, "Inq")
registerCreatureEvent(cid,'points')
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "attackguild")
registerCreatureEvent(cid, "advance")
registerCreatureEvent(cid, "FimVip")
registerCreatureEvent(cid, "KilledMonstersCounter")
registerCreatureEvent(cid, "fraglook")
registerCreatureEvent(cid, "freebless80")
registerCreatureEvent(cid, "SkullCheck")
registerCreatureEvent(cid, "demonOakLogout")
registerCreatureEvent(cid, "levelUp")
registerCreatureEvent(cid, "demonOakDeath")
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "bluelegs")
registerCreatureEvent(cid, "VipReceive")
registerCreatureEvent(cid, "FirstItems")
registerCreatureEvent(cid, "Promot")
registerCreatureEvent(cid, "PlayerKill")
registerCreatureEvent(cid, "KillingInTheNameOf")
registerCreatureEvent(cid, "PythiusDead")
registerCreatureEvent(cid, "ExpVip")
registerCreatureEvent(cid, "levelplayer")
registerCreatureEvent(cid, "ZombieAttack")
registerCreatureEvent(cid, "zombieevent")

if (InitArenaScript ~= 0) then
InitArenaScript = 1

for i = 42300, 42309 do
setGlobalStorageValue(i, 0)
setGlobalStorageValue(i+100, 0)
end
end

if getPlayerStorageValue(cid, 42309) < 1 then
for i = 42300, 42309 do
setPlayerStorageValue(cid, i, 0)
end
end

if getPlayerStorageValue(cid, 42319) < 1 then
for i = 42310, 42319 do
setPlayerStorageValue(cid, i, 0)
end
end

if getPlayerStorageValue(cid, 42329) < 1 then
for i = 42320, 42329 do
setPlayerStorageValue(cid, i, 0)
end
end
if getPlayerStorageValue(cid, 42355) == -1 then
setPlayerStorageValue(cid, 42355, 0)
end
setPlayerStorageValue(cid, 42350, 0)
setPlayerStorageValue(cid, 42352, 0)
return true
end
 
DEMON:

<?xml version="1.0" encoding="UTF-8"?>
<monster name="Demon" nameDescription="a demon" race="fire" experience="6000" speed="280" manacost="0">
<health now="8200" max="8200"/>
<look type="35" corpse="5995"/>
<targetchange interval="5000" chance="10"/>
<strategy attack="100" defense="0"/>
<script>
<event name="KillingInTheNameOf"/>
</script>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="1"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="0"/>
</flags>
<attacks>
<attack name="melee" interval="2000" skill="80" attack="120"/>
<attack name="manadrain" interval="3000" chance="15" range="7" min="-0" max="-120"/>
<attack name="fire" interval="4000" chance="60" range="7" radius="7" target="1" min="-150" max="-250">
<attribute key="shootEffect" value="fire"/>
<attribute key="areaEffect" value="firearea"/>
</attack>
<attack name="firefield" interval="1000" chance="15" range="7" radius="1" target="1">
<attribute key="shootEffect" value="fire"/>
</attack>
<attack name="energy" interval="3000" chance="10" length="8" spread="0" min="-300" max="-460">
<attribute key="areaEffect" value="purpleenergy"/>
</attack>
<attack name="energy" interval="3000" chance="7" range="3" radius="1" target="1" min="-210" max="-300">
<attribute key="shootEffect" value="energy"/>
<attribute key="areaEffect" value="energy"/>
</attack>
<attack name="speed" interval="5000" chance="10" range="7" speedchange="-220" duration="5000">
</attack>
</attacks>
<defenses armor="30" defense="30">
<defense name="healing" interval="2000" chance="10" min="90" max="200">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
<defense name="speed" interval="1000" chance="5" speedchange="60" duration="20000">
<attribute key="areaEffect" value="redshimmer"/>
</defense>
</defenses>
<elements>
<element firePercent="100"/>
<element physicalPercent="25"/>
<element earthpercent="40"/>
<element energyPercent="50"/>
<element deathPercent="20"/>
<element icePercent="-12"/>
<element holyPercent="-12"/>
</elements>
<immunities>
<immunity lifedrain="1"/>
<immunity paralyze="1"/>
<immunity invisible="1"/>
</immunities>
<summons maxSummons="1">
<summon name="fire elemental" interval="4000" chance="10" max="1"/>
</summons>
<voices interval="5000" chance="10">
<voice sentence="MUHAHAHAHA!" yell="1"/>
<voice sentence="I SMELL FEEEEEAAAR!" yell="1"/>
<voice sentence="CHAMEK ATH UTHUL ARAK!" yell="1"/>
<voice sentence="Your resistance is futile!"/>
<voice sentence="Your soul will be mine!" yell="0"/>
</voices>
<loot>
<item id="2148" countmax="90" chance="40000"/><!-- gold coin -->
<item id="2148" countmax="70" chance="40000"/><!-- gold coin -->
<item id="2148" countmax="38" chance="40000"/><!-- gold coin -->
<item id="7368" countmax="5" chance="15390"/><!-- assassin star -->
<item id="2152" countmax="1" chance="69660"/><!-- platinum coin -->
<item id="5954" chance="630"/><!-- demon horn -->
<item id="2164" chance="160"/><!-- might ring -->
<item id="2462" chance="1260"/><!-- devil helmet -->
<item id="2432" chance="3950"/><!-- fire axe -->
<item id="2470" chance="450"/><!-- golden legs -->
<item id="2514" chance="540"/><!-- mastermind shield -->
<item id="2472" chance="70"/><!-- magic plate armor -->
<item id="2795" countmax="6" chance1="66010"/><!-- fire mushroom -->
<item id="2179" chance="1130"/><!-- golden ring -->
<item id="7590" chance="10000"/><!-- great mana potion -->
<item id="7590" chance="10000"/><!-- great mana potion -->
<item id="8473" chance="12500"/><!-- ultimate health potion -->
<item id="8473" chance="12500"/><!-- ultimate health potion -->
<item id="1987" chance="100000"><!-- bag -->
<inside>
<item id="2520" chance="650"/><!-- demon shield -->
<item id="2418" chance="1580"/><!-- golden sickle -->
<item id="2176" chance="2570"/><!-- orb -->
<item id="2387" chance="19260"/><!-- double axe -->
<item id="1982" chance="1340"/><!-- purple tome -->
<item id="2393" chance="1790"/><!-- giant sword -->
<item id="2214" chance="590"/><!-- ring of healing -->
<item id="2149" chance="9400"/><!-- small emerald -->
<item id="2165" chance="1500"/><!-- stealth ring -->
<item id="2151" chance="3500"/><!-- talon -->
<item id="7590" chance="10000"/><!-- great mana potion -->
<item id="8473" chance="12500"/><!-- ultimate health potion -->
<item id="2171" chance="610"/><!-- platinum amulet -->
<item id="2396" chance="680"/><!-- ice rapier -->
<item id="7382" chance="90"/><!-- demonrage sword -->
<item id="7393" chance="110"/><!-- demon trophy -->
</inside>
</item>
</loot>
</monster>
 
Global events:
<?xml version="1.0" encoding="UTF-8"?>
<globalevents>
<!-- Server Events -->
<globalevent name="clean" interval="3600" event="script" value="clean.lua"/>
<!-- Examples -->
<!-- <globalevent name="timer_example" time="21:35:11" event="script" value="my_script.lua"/> -->

<globalevent name="save" interval="1800" event="script" value="save.lua"/>
<globalevent name="effects" interval="1" event="script" value="effects.lua"/>

</globalevents>
 
First make backup of every file you will edit.

Scripts what may be bugged:


1. Creatureevents.xml
Remove all these lines in your creatureevents.xml:
Code:
<event type="death" name="PythiusDead" script="pythius_the_rotten.lua" />
<event type="death" name="monster2" event="script" value="monster2.lua"/>
<event type="death" name="inquisitionPortals" script="teleports_inquisition.lua"/>
<event type="kill" name="KilledMonstersCounter" script="monster_counter.lua"/>
<event type="kill" name="Inq" event="script" value="Inquisition.lua"/>
<event type="kill" name="PlayerKill" event="script" value="arenakill.lua"/>
<event type="death" name="inquisitionPortals" event="script" value="inquisitionPortals.lua"/>
<event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/>
<event type="death" name="demonOakDeath" event="script" value="demonOakDeath.lua"/>
<event type="death" name="Azerus" event="script" value="azerus.lua"/>
<event type="kill" name="KillingInTheNameOf" event="script" value="killinginthenameof.lua"/>
Restart the server (recommended) and check for results.

2. Demon.xml and Orshabaal.xml
This may be bugged
Code:
<script>
<event name="KillingInTheNameOf"/>
</script>
Remove this part, reload monsters on your server or restart the server (recommended). Summon a brand new monster. If problem still occurs go to point 3.

3. Login.lua
Some of scripts in login.lua may be bugged, try to remove this part:
Code:
registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")

registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end
registerCreatureEvent(cid, "Inq")
registerCreatureEvent(cid,'points')
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
registerCreatureEvent(cid, "attackguild")
registerCreatureEvent(cid, "advance")
registerCreatureEvent(cid, "FimVip")
registerCreatureEvent(cid, "KilledMonstersCounter")
registerCreatureEvent(cid, "fraglook")
registerCreatureEvent(cid, "freebless80")
registerCreatureEvent(cid, "SkullCheck")
registerCreatureEvent(cid, "demonOakLogout")
registerCreatureEvent(cid, "levelUp")
registerCreatureEvent(cid, "demonOakDeath")
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "bluelegs")
registerCreatureEvent(cid, "VipReceive")
registerCreatureEvent(cid, "FirstItems")
registerCreatureEvent(cid, "Promot")
registerCreatureEvent(cid, "PlayerKill")
registerCreatureEvent(cid, "KillingInTheNameOf")
registerCreatureEvent(cid, "PythiusDead")
registerCreatureEvent(cid, "ExpVip")
registerCreatureEvent(cid, "levelplayer")
registerCreatureEvent(cid, "ZombieAttack")
registerCreatureEvent(cid, "zombieevent")
And like in point 1, restart your server. If now everything works good, I recommend to open all these scripts in Notepad++, use CTRL + F and choose option "Search in all opened files" for these things: onKill, kill, death, onDeath etc. This may save your time.

4. effect.lua
Go to data/globalevents/scripts/effect.lua copy and paste it here.

5. Demon.xml and Orshabaal.xml
You have to remove "loot part" from both of them. If solved by this, probably there was a problem.
 
Last edited:
Post your spell script. The script that lets you summon the monster, not the creaturescripts or the globalevents.
This spell is integrated in sources. And is used in xml monster's files, like in this:
Code:
<summons maxSummons="4">
<summon name="Demon" interval="4000" chance="10" max="1"/>
</summons>
 
Idk what about trying to add this into creaturescripts? The whole idea of it is to check if monster is at 0 health ,if so, its gonna remove the creature
Code:
function onThink(cid, interval)
if isCreature(cid) and getCreatureHealth(cid) == 0 then
doRemoveCreature(cid)
end
return true
end
Idk if that would help tho i just wrote it out of nothing lol
@murat65
 
maybe that can be bugged ?
Code:
function onDeath(cid, corpse, killer)
        local summons = monsters[getCreatureName(cid)]
        if summons then
                for i, v in pairs(summons) do
                        addEvent(doSummonCreature, v.delay, i, v.pos)
                end
        end
        return TRUE
end
 
Finally I got It.

Code:
<event type="kill" name="KilledMonstersCounter" script="monster_counter.lua"/>

That was the problem.
<event type="kill" name="KilledMonstersCounter" script="monster_counter.lua"/>
 
Back
Top