• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Feature When summon death no corpse (Pokemon Application)

KylerXX

Active Member
Joined
Jun 24, 2010
Messages
439
Reaction score
30
Is a simply code, but maybe to someone is usefull.

Tested on TFS 0.3.6



Go to monster.cpp
And under this line
Lua:
Item* corpse = Creature::createCorpse(deathList);
Paste this
Lua:
uint8_t effect = 36;
	if(isSummon())
	{
       const Position& tmp = getPosition();
       g_game.addMagicEffect(tmp, effect);
	   return NULL;
    }
Modify the effect and done

;)
 
Last edited:
Not really, is more easy by lua, faster and also you can add animations or something

+1

Lua:
function onDeath(cid, corpse, killer)
	if(isMonster(cid) and getCreatureMaster(cid) ~= cid) then
		doRemoveItem(corpse.uid)
	end 
	return true
end
 
Last edited:
The same shiat, but using lua its more configurable and modificable.
 
it's not faster

I think the same, my reason is because by LUA you need to use more resources. Okay, by LUA you can configurate more easy, but C++ way do not use more resources and can be faster. This is the thing that I think.
 
I think the same, my reason is because by LUA you need to use more resources. Okay, by LUA you can configurate more easy, but C++ way do not use more resources and can be faster. This is the thing that I think.

In this small script it isn't so fast that you should use C++ (maybe 10[SUP]-5[/SUP] sec faster). As you said in lua you can make very fast configuration (you can remove it, add something and others) also it's more easier than changing sources, complie and replace complied server.
 
Calls to lua functions use more CPU cycles than pure C++, so it might be a problem if you want to keep cpu% to a minimum
 
I think the different it makes in this situation is negligible in today's computers, and its much easier to customize the effect in LUA rather then compiling the sources for such a small thing

my 2 cents :p
 
Back
Top