Daniel Braga
New Member
- Joined
- Mar 17, 2018
- Messages
- 53
- Reaction score
- 1
I would like a spell that leaves the enemy locked for 3 seconds, during those seconds there is 1 animation on the target.
int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_Sta te * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv ( ) ; Player * player = env -> getPlayerByUID ( ( uint32_t ) popNumber ( L ) ) ; if ( ! player ) { errorEx ( getError ( LUA_ERROR_PLAYER_NOT_FOUND ) ) ; lua_pushboolean ( L , false ) ; } else lua_pushnumber ( L , player -> getSecureMode ( ) ) ; return 1 ; }
int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_Sta te * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv ( ) ; Player * player = env -> getPlayerByUID ( ( uint32_t ) popNumber ( L ) ) ; if ( ! player ) { errorEx ( getError ( LUA_ERROR_PLAYER_NOT_FOUND ) ) ; lua_pushboolean ( L , false ) ; } else lua_pushnumber ( L , player -> getSecureMode ( ) ) ; return 1 ; }
int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_Sta te * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv ( ) ; Player * player = env -> getPlayerByUID ( ( uint32_t ) popNumber ( L ) ) ; if ( ! player ) { errorEx ( getError ( LUA_ERROR_PLAYER_NOT_FOUND ) ) ; lua_pushboolean ( L , false ) ; } else lua_pushnumber ( L , player -> getSecureMode ( ) ) ; return 1 ; }
int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_Sta te * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv ( ) ; Player * player = env -> getPlayerByUID ( ( uint32_t ) popNumber ( L ) ) ; if ( ! player ) { errorEx ( getError ( LUA_ERROR_PLAYER_NOT_FOUND ) ) ; lua_pushboolean ( L , false ) ; } else lua_pushnumber ( L , player -> getSecureMode ( ) ) ; return 1 ; }
int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_Sta te * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv ( ) ; Player * player = env -> getPlayerByUID ( ( uint32_t ) popNumber ( L ) ) ; if ( ! player ) { errorEx ( getError ( LUA_ERROR_PLAYER_NOT_FOUND ) ) ; lua_pushboolean ( L , false ) ; } else lua_pushnumber ( L , player -> getSecureMode ( ) ) ; return 1 ; }
int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_Sta te * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv ( ) ; Player * player = env -> getPlayerByUID ( ( uint32_t ) popNumber ( L ) ) ; if ( ! player ) { errorEx ( getError ( LUA_ERROR_PLAYER_NOT_FOUND ) ) ; lua_pushboolean ( L , false ) ; } else lua_pushnumber ( L , player -> getSecureMode ( ) ) ; return 1 ; }
int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_Sta te * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv ( ) ; Player * player = env -> getPlayerByUID ( ( uint32_t ) popNumber ( L ) ) ; if ( ! player ) { errorEx ( getError ( LUA_ERROR_PLAYER_NOT_FOUND ) ) ; lua_pushboolean ( L , false ) ; } else lua_pushnumber ( L , player -> getSecureMode ( ) ) ; return 1 ; }
int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_Sta te * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv ( ) ; Player * player = env -> getPlayerByUID ( ( uint32_t ) popNumber ( L ) ) ; if ( ! player ) { errorEx ( getError ( LUA_ERROR_PLAYER_NOT_FOUND ) ) ; lua_pushboolean ( L , false ) ; } else lua_pushnumber ( L , player -> getSecureMode ( ) ) ; return 1 ; }
int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_Sta te * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv ( ) ; Player * player = env -> getPlayerByUID ( ( uint32_t ) popNumber ( L ) ) ; if ( ! player ) { errorEx ( getError ( LUA_ERROR_PLAYER_NOT_FOUND ) ) ; lua_pushboolean ( L , false ) ; } else lua_pushnumber ( L , player -> getSecureMode ( ) ) ; return 1 ; }
int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_Sta te * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv ( ) ; Player * player = env -> getPlayerByUID ( ( uint32_t ) popNumber ( L ) ) ; if ( ! player ) { errorEx ( getError ( LUA_ERROR_PLAYER_NOT_FOUND ) ) ; lua_pushboolean ( L , false ) ; } else lua_pushnumber ( L , player -> getSecureMode ( ) ) ; return 1 ; }
int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_Sta te * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv ( ) ; Player * player = env -> getPlayerByUID ( ( uint32_t ) popNumber ( L ) ) ; if ( ! player ) { errorEx ( getError ( LUA_ERROR_PLAYER_NOT_FOUND ) ) ; lua_pushboolean ( L , false ) ; } else lua_pushnumber ( L , player -> getSecureMode ( ) ) ; return 1 ; }
int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_Sta te * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv ( ) ; Player * player = env -> getPlayerByUID ( ( uint32_t ) popNumber ( L ) ) ; if ( ! player ) { errorEx ( getError ( LUA_ERROR_PLAYER_NOT_FOUND ) ) ; lua_pushboolean ( L , false ) ; } else lua_pushnumber ( L , player -> getSecureMode ( ) ) ; return 1 ; }
int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_Sta te * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv ( ) ; Player * player = env -> getPlayerByUID ( ( uint32_t ) popNumber ( L ) ) ; if ( ! player ) { errorEx ( getError ( LUA_ERROR_PLAYER_NOT_FOUND ) ) ; lua_pushboolean ( L , false ) ; } else lua_pushnumber ( L , player -> getSecureMode ( ) ) ; return 1 ; }
int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_Sta te * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv ( ) ; Player * player = env -> getPlayerByUID ( ( uint32_t ) popNumber ( L ) ) ; if ( ! player ) { errorEx ( getError ( LUA_ERROR_PLAYER_NOT_FOUND ) ) ; lua_pushboolean ( L , false ) ; } else lua_pushnumber ( L , player -> getSecureMode ( ) ) ; return 1 ; }
int32_t LuaScriptInterface::luaGetPlayerSecureMode(lua_Sta te* L)
{
//getPlayerSecureMode(cid)
ScriptEnviroment* env = getEnv();
Player* player = env->getPlayerByUID((uint32_t)popNumber(L));
if(!player)
{
errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND));
lua_pushboolean(L, false);
}
else
lua_pushnumber(L, player->getSecureMode());
return 1;
}
function onStatsChange(cid, attacker, type, combat, value)
if isPlayer(attacker)==true and isPlayer(cid)==true then
if getPlayerSecureMode(cid) and combat ~= COMBAT_HEALING then
return false
end
end
return true
end
Tfs VersionI would like a spell that leaves the enemy locked for 3 seconds, during those seconds there is 1 animation on the target.
OTX 8.60Versão Tfs
I'll be looking at what I can do with it, but what I would like was 1 spell that left the target locked for 3 seconds, and during those 3 seconds there was 1 animation (effect) on top of that locked target.Desenvolvi este sistema para criar uma aura de imortalidade e foi usado para equilibrar o modo de luta.
luascript.cpp
ExplicaçãoC++:int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_State * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv() ; Player * player = env -> getPlayerByUID((uint32_t) popNumber(L)); if (! player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } else lua_pushnumber(L, player -> getSecureMode()); retorno 1; } int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_State * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv() ; Player * player = env -> getPlayerByUID((uint32_t) popNumber(L)); if (! player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } else lua_pushnumber(L, player -> getSecureMode()); retorno 1; } int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_State * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv() ; Player * player = env -> getPlayerByUID((uint32_t) popNumber(L)); if (! player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } else lua_pushnumber(L, player -> getSecureMode()); retorno 1; } int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_State * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv() ; Player * player = env -> getPlayerByUID((uint32_t) popNumber(L)); if (! player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } else lua_pushnumber(L, player -> getSecureMode()); retorno 1; } int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_State * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv() ; Player * player = env -> getPlayerByUID((uint32_t) popNumber(L)); if (! player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } else lua_pushnumber(L, player -> getSecureMode()); retorno 1; } int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_State * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv() ; Player * player = env -> getPlayerByUID((uint32_t) popNumber(L)); if (! player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } else lua_pushnumber(L, player -> getSecureMode()); retorno 1; } int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_State * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv() ; Player * player = env -> getPlayerByUID((uint32_t) popNumber(L)); if (! player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } else lua_pushnumber(L, player -> getSecureMode()); retorno 1; } int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_State * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv() ; Player * player = env -> getPlayerByUID((uint32_t) popNumber(L)); if (! player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } else lua_pushnumber(L, player -> getSecureMode()); retorno 1; } int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_State * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv() ; Player * player = env -> getPlayerByUID((uint32_t) popNumber(L)); if (! player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } else lua_pushnumber(L, player -> getSecureMode()); retorno 1; } int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_State * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv() ; Player * player = env -> getPlayerByUID((uint32_t) popNumber(L)); if (! player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } else lua_pushnumber(L, player -> getSecureMode()); retorno 1; } int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_State * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv() ; Player * player = env -> getPlayerByUID((uint32_t) popNumber(L)); if (! player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } else lua_pushnumber(L, player -> getSecureMode()); retorno 1; } int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_State * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv() ; Player * player = env -> getPlayerByUID((uint32_t) popNumber(L)); if (! player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } else lua_pushnumber(L, player -> getSecureMode()); retorno 1; } int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_State * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv() ; Player * player = env -> getPlayerByUID((uint32_t) popNumber(L)); if (! player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } else lua_pushnumber(L, player -> getSecureMode()); retorno 1; } int32_t LuaScriptInterface :: luaGetPlayerSecureMode ( lua_State * L ) { //getPlayerSecureMode(cid) ScriptEnviroment * env = getEnv() ; Player * player = env -> getPlayerByUID((uint32_t) popNumber(L)); if (! player) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } else lua_pushnumber(L, player -> getSecureMode()); retorno 1; }[/CÓDIGO] luascript.cpp getPlayerSecureMode (CID) [B]permite essa função[/B] Código C++: Código C++: [CODE=cpp]int32_t LuaScriptInterface::luaGetPlayerSecureMode(lua_State* L) { //getPlayerSecureMode(cid) ScriptAmbiente* env = getEnv(); Player* player = env->getPlayerByUID((uint32_t)popNumber(L)); if(!jogador) { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } senão lua_pushnumber(L, jogador->getSecureMode()); retorno 1; }[/CÓDIGO] Simples e fácil vou deixar um exemplo. Lua: [CODE=lua]função onStatsChange(cid, atacante, tipo, combate, valor) if isPlayer(attacker)==true e isPlayer(cid)==true então se getPlayerSecureMode(cid) e combat ~= COMBAT_HEALING então retorna falso fim fim retornar verdadeiro fim
quando o player está com getPlayerSecureMode, está protegido contra coisa, uma aura algo assim usa sua imaginação, ou outro comando é voltar ao normal.
Maybe you could use this and make it into a spell?I would like a spell that leaves the enemy locked for 3 seconds, during those seconds there is 1 animation on the target.
No way, polimorf.
video time >>1:12 a 1:20s <<
Please watch the video so you can understand better.
and almost the same as the video, I would like the target to be stunned for 2s, and while it is stunned change its outfic to another one, or to an animation. After the spells time expired, he returned to normal.
No way, polimorf.
o nome do feitiço que você quer é "polimorfo", aliás, o feitiço de Lulu não trava o alvo, apenas o faz se mover muito lentamente enquanto muda sua aparênI
setNoMove(cid, true)
, which blocks player moving, but after using it and pressing arrow, there appeared weird animations in client.newer tibia version support rooted condition now:as it was never used on real Tibia.
this, I would like the enemy to stay without casting spells, but keep taking damageBloqueado por movimento ou por lançar feitiços/causar dano?
Bloquear feitiços/danos pode ser obtido usando a condição CONDITION_PACIFIED.
Sobre travar andando, não recomendo. O cliente do Tibia não está preparado para lidar com o bloqueio de caminhada, pois nunca foi usado no Tibia real.
Algumas versões do TFS possuem a funçãosetNoMove(cid, true)
, que bloqueia a movimentação do jogador, mas depois de usá-la e pressionar a seta, apareceram animações estranhas no cliente.
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, 512)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 43)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -4.0, -0, -3.1, -0)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 43)
local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
--setConditionParam(condition, CONDITION_PARAM_SPEED, -40)
setConditionFormula(condition, -0.9, 0, -0.9, 0)
setCombatCondition(combat, condition)
arr = {
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 3, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0}
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function onCastSpell(cid, var)
doSendAnimatedText(getPlayerPosition(cid), "Elmantist ..", 208)
return doCombat(cid, combat, var)
end
----------------------------------------