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

Solved Magic Forcefield Effect

GoalTV

NANI?!
Joined
Jul 23, 2011
Messages
589
Reaction score
53
Hello.

I'm stuck at Magic Forcefield to make custom effect i already did it when player log in or use talkactions just i can't find it for Magic Forcefield to change the effect of TP.

as on the sreen

04bab4499c15d72ae9a53a3b2f3d5d0f.gif


when log in or use /t i have effect CONST_ME_STUN but i can't find it for teleports i look in libs etc maybe i missed it.
I'm using R5 - 0.3.7-r5969-v8.60

Thanks For your Time
 
You must edit source code in teleport.cpp

Code:
  if(Creature* creature = thing->getCreature())
   {
     g_game.addMagicEffect(creature->getPosition(), MAGIC_EFFECT_TELEPORT, creature->isGhost());
     creature->getTile()->moveCreature(actor, creature, destTile);
     g_game.addMagicEffect(destTile->getPosition(), MAGIC_EFFECT_TELEPORT, creature->isGhost());
   }

You can change MAGIC_EFFECT_TELEPORT to your (you can get c++ name in files from source, I forgot what's name of this file, you must search) :p
 
Thank You all Works

I could not find this file with all the C++ so i just guss what it could be :D

if(Creature* creature = thing->getCreature())
{
g_game.addMagicEffect(creature->getPosition(), MAGIC_EFFECT_STUN, creature->isGhost());
creature->getTile()->moveCreature(actor, creature, destTile);
g_game.addMagicEffect(destTile->getPosition(), MAGIC_EFFECT_STUN, creature->isGhost());
}

Thanks Again :D
 
I cant get any of my tps i had place on the map to have effect( only those that were already in the ot , like the town one have effect) how can i get the oher tps that i place on the map with such effect?
Thanks in advance
Kind regards
-dredds.
 
I cant get any of my tps i had place on the map to have effect( only those that were already in the ot , like the town one have effect) how can i get the oher tps that i place on the map with such effect?
Thanks in advance
Kind regards
-dredds.

make sure your teleportation tile, e.x: "magic forcefield" in items.xml has "<attribute key="effect" value="teleport" />"

Full example:

<item id="1387" article="a" name="magic forcefield">
<attribute key="description" value="You can see the other side through it." />
<attribute key="type" value="teleport" />
<attribute key="effect" value="teleport" />
</item>
 
make sure your teleportation tile, e.x: "magic forcefield" in items.xml has "<attribute key="effect" value="teleport" />"

Full example:

<item id="1387" article="a" name="magic forcefield">
<attribute key="description" value="You can see the other side through it." />
<attribute key="type" value="teleport" />
<attribute key="effect" value="teleport" />
</item>
Thank You! I have the same issue, and "<attribute key="effect" value="teleport" />" was loosing, i put the code and now it works perfect!
 
Back
Top