Agora é só copilar e os char ao treinar vão aumentar a velocidade de ataque?
- Fórum
- OTServ
- Recursos
- Linguagens de Programação
- [Função] Doplayersetextraattackspeed
SN
[Função] Doplayersetextraattackspeed
Por Snowsz, 24 de fev. de 2012 em Linguagens de Programação
script
3
1.9k
1 ano depois...
info
Grupo: Visconde
Registrado: 09/08/10
Posts: 314
Reputação: +19
Char no Tibia: não tenho

09 de dezembro de 2013 às 17:36


info
Grupo: Artesão
Registrado: 22/01/12
Posts: 121
Reputação: +23
Char no Tibia: Not...
FUNÇÃO PARA QUEM TEM PROBLEMAS NO TFS 0.3.6PL1 TUTORIAL ABAIXO \/
Créditos:
50% darkhaos
50% Eu Snowsz por ter passado para versão TFS 0.3.6pl1
Função testada no TFS 0.3.6pl1.
* player.cpp
Procure:
Troque por isso
Procure:
Troque por isso:
No fim do arquivo coloque isto:
void Player::setPlayerExtraAttackSpeed(uint32_t speed) { extraAttackSpeed = speed; }* player.h
Depois de:
uint64_t getSpentMana() const {return manaSpent;}Coloque isto:
uint32_t getExtraAttackSpeed() const {return extraAttackSpeed;} void setPlayerExtraAttackSpeed(uint32_t speed);Depois de:
Coloque isto:
* luascript.cpp
Depois de:
Coloque isto:
Depois de:
int32_t LuaScriptInterface::luaDoPlayerAddSoul(lua_State* L) { //doPlayerAddSoul(cid, soul) int32_t soul = popNumber(L); ScriptEnviroment* env = getScriptEnv(); if(Player* player = env->getPlayerByUID(popNumber(L))) { player->changeSoul(soul); lua_pushboolean(L, true); } else { reportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushboolean(L, false); } return 1; }Coloque isto:
int32_t LuaScriptInterface::luaDoPlayerSetExtraAttackSpeed(lua_State *L) { uint32_t speed = popNumber(L); ScriptEnviroment* env = getEnv(); if(Player* player = env->getPlayerByUID(popNumber(L))){ player->setPlayerExtraAttackSpeed(speed); lua_pushnumber(L, true); } else { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushnumber(L, false); } return 1; }[/b] [b]* luacript.h
Depois de:
Coloque isto:
Como usar:
Para voltar ao normal use isto: