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

Request: Script Spawn Rage Rep++

Printer

if Printer then print("LUA") end
Senator
Premium User
Joined
Dec 27, 2009
Messages
5,780
Solutions
31
Reaction score
2,299
Location
Sweden?
Spawn range: if a player attack a dragon then dragon have 100 hp if the player run and the dragon walk to far from the rage it get teleported back to the spot it got summoned but with 100hp left!

Rep++ for help
 
monster.cpp replace
[cpp]void Monster::onThink(uint32_t interval)
{
Creature::onThink(interval);
if(despawn())
{
g_game.removeCreature(this, true);
setIdle(true);
return;
}
[/cpp]
with
[cpp]void Monster::onThink(uint32_t interval)
{
Creature::onThink(interval);
if(despawn())
{
g_game.addMagicEffect(getPosition(), MAGIC_EFFECT_POFF);
Position p = g_game.getClosestFreeTile(this, masterPosition, true);
if(!p.x || g_game.internalTeleport(this, p, false) != RET_NOERROR) {
g_game.removeCreature(this, true);
setIdle(true);
return;
}

g_game.addMagicEffect(p, MAGIC_EFFECT_TELEPORT);
return;
}[/cpp]
  1. it depends on deSpawnRange & deSpawnRadius from config.lua
  2. don't ask for a lua script, this is the only way
 
Back
Top