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

Zombie event - NEW version, bug free, updated

working correctly, has some bugs but they are for things I do with the gm for testing, but works well on target. I have a question, whether it is possible after the event, the "Zombies Event" to die or disappear
 
I have a question, player who will stay alive win the reward ?
 
I have a question, player who will stay alive win the reward ?
In onattack.lua are 2 lines with example rewards:
PHP:
doPlayerAddItem(winner, 2157, 5, true)
doPlayerAddItem(winner, 6119, 1, true)
Where are i can get zombie event without bugs?
I have ran this event over 100 times on server that I host and it works without any problems.
@MAPPERS
- event map [isle?] must has all tiles with flag 'no logout'
- on event map must not be 'teleport' that let players leave
- my map has all tiles with flag 'no pvp', but I added yesterday updated that fix bug when player die on arena
 
Sorry, where is line for write cords to make a tp ?
 
Last edited:
working correctly, has some bugs but they are for things I do with the gm for testing, but works well on target. I have a question, whether it is possible after the event, the "Zombies Event" to die or disappear
help? is possible?
 
Other zombie

Other zombie monster:
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Zombie Event" nameDescription="an event zombie" race="undead" experience="480" speed="320" manacost="0">
    <health now="37500" max="37500"/>
    <look type="311" corpse="9875"/>
    <targetchange interval="5000" chance="50"/>
    <strategy attack="100" defense="0"/>
    <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="death" interval="2000" chance="100" radius="3" target="0" min="-400" max="-600">
		<attribute key="areaEffect" value="mortarea"/>
	</attack>
		<attack name="death" interval="2000" chance="20" radius="3" target="0" min="-400" max="-600">
		<attribute key="areaEffect" value="mortarea"/>
	</attack>
    </attacks>
    <defenses armor="0" defense="0"/>
	<immunities>
		<immunity paralyze="1"/>
		<immunity invisible="1"/>
		<immunity fire="1"/>
		<immunity energy="1"/>
		<immunity poison="1"/>
	</immunities>	
    <voices interval="5000" chance="10">
        <voice sentence="You wont last long!"/>
        <voice sentence="Mmmmh.. braains!"/>
    </voices>
	<script>
		<event name="ZombieThink"/>
		<event name="ZombieDeath"/>
	</script>
    <loot>
	
    </loot>
</monster>
Monster from first post hits always when player is in range (1 sqm, sometimes it looks like 2 sqm for players [slow animation/lag], that's why I made THIS monster). This hit 1 time per 2 seconds, but all players around.
 
4. In onLogin function of ../data/creaturescripts/scripts/login.lua add:
Lua Code:

registerCreatureEvent(cid, "ZombieAttack")
should it be like this?

Code:
function onLogin(cid)
       registerCreatureEvent(cid, "ZombieAttack")
	local loss = getConfigValue('deathLostPercent')
	if(loss ~= nil) then
		doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
	end
 
i dont understand these
ZE_blockEnterItemPosition = {x= 873, y=997, z=7}
ZE_enterPosition = {x = 1638, y = 1530, z = 7}
ZE_kickPosition = {x=874, y=994, z=7}
ZE_spawnFromPosition = {x = 1617, y = 1514, z = 7}
ZE_spawnToPosition = {x = 1671, y = 1565, z = 7}
 
@aod
onLogin is OK.

i dont understand these
check first post:
PHP:
-- CONFIG
ZE_DEFAULT_NUMBER_OF_PLAYERS -- default number of players that can enter arena
ZE_ACCESS_TO_IGNORE_ARENA -- min. access of players that go arena, but are not counted as competitors
-- POSITIONS
ZE_blockEnterItemPosition -- position of item that block way to teleport to arena, even if item is not blocking way to TP, players cannot enter TP [blocked by script]
ZE_enterPosition -- position where spawn players when they enter teleport to arena
ZE_kickPosition -- position where go players when they 'die' by zombie or win arena
ZE_spawnFromPosition -- left,top, lowest level of arena
ZE_spawnToPosition - right, bottom, highest level of arena
-- ITEM IDS
ZE_blockEnterItemID -- ID of item that block way to arena
 
I got something wrong because zombie is killing for real, not kick. Can anyone tell me how to solve this?
 
I use tfs 0.4 and have this bug:
beztytuudyst.jpg



All time this bug spamming in console and create zombie in arena.. How I can fix this bug?
 
I use tfs 0.4 and have this bug:
beztytuudyst.jpg



All time this bug spamming in console and create zombie in arena.. How I can fix this bug?
It's bug in sources. In 0.3.6pl1 is function:
PHP:
int32_t LuaScriptInterface::luaDoCreateMonster(lua_State* L)
{
	//doCreateMonster(name, pos[, displayError = true])
	bool displayError = true;
	if(lua_gettop(L) > 2)
		displayError = popNumber(L);

	PositionEx pos;
	popPosition(L, pos);

	std::string name = popString(L);
	Monster* monster = Monster::createMonster(name.c_str());
	if(!monster)
	{
		if(displayError)
			errorEx("Monster with name '" + name + "' not found");

		lua_pushboolean(L, false);
		return 1;
	}

	if(!g_game.placeCreature(monster, pos))
	{
		delete monster;
		if(displayError)
			errorEx("Cannot create monster: " + name);

		lua_pushboolean(L, true);
		return 1;
	}

	ScriptEnviroment* env = getEnv();
	lua_pushnumber(L, env->addThing((Thing*)monster));
	return 1;
}
There is parameter:
doCreateMonster(name, pos[, displayError = true])
My script set it to false, so if you use 0.3.6pl1 there should be no error.
Error occur when script try to spawn monster on wall, water, lava etc.
 
doCreateMonster(name, pos[, displayError = true])

In TFS 0.4 its:
Code:
doCreateMonster(name, pos[COLOR="red"][, extend = false[, force = false[, displayError = true]]][/COLOR])

So should be:
Lua:
doCreateMonster(name, pos, false, false, false)
 
Back
Top