Postado Agosto 18, 2014 10 anos eu achei um topico em outro forum, que bota a barra de mana/vida por % só que nao sei onde coloca esse script alguem ajuda? segue abaixo o script: --Remove health/mana by percentages: Evil Hero(Zeriikler:Changed few things) function doPlayerAddManaPercent(cid, percent) local mana = getPlayerMaxMana(cid) doPlayerAddMana(cid, (mana / 100) * percent) return TRUE end function doPlayerAddHealthPercent(cid, percent) local health = getCreatureMaxHealth(cid) doCreatureAddHealth(cid, (health / 100) * percent) return TRUE end function doPlayerRemoveManaPercent(cid, percent) local mana = getPlayerMaxMana(cid) doPlayerRemoveMana(cid, (mana / 100) * percent) return TRUE end function doPlayerRemoveHealthPercent(cid, percent) local health = getCreatureMaxHealth(cid) doPlayerRemoveHealth(cid, (health / 100) * percent) return TRUE end --Remove HP/MANA function doPlayerRemoveHealth(cid, hp) doCreatureAddHealth(cid, -hp) return TRUE end function doPlayerRemoveMana(cid, mana) doPlayerAddMana(cid, -mana) return TRUE end onde coloca isso? void ProtocolGame::AddPlayerStats(NetworkMessage_ptr msg) { msg->AddByte(0xA0); msg->AddU16((uint16_t)std::ceil(player->getHealth() * 100 / player->getPlayerInfo(PLAYERINFO_MAXHEALTH))); msg->AddU16((uint16_t)100); msg->AddU32(uint32_t(player->getFreeCapacity() * 100)); uint64_t experience = player->getExperience(); if(experience > 0x7FFFFFFF) // client debugs after 2,147,483,647 exp msg->AddU32(0x7FFFFFFF); else msg->AddU32(experience); msg->AddU16(player->getPlayerInfo(PLAYERINFO_LEVEL)); msg->AddByte(player->getPlayerInfo(PLAYERINFO_LEVELPERCENT)); msg->AddU16((uint16_t)std::ceil(player->getMana() * 100 / player->getPlayerInfo(PLAYERINFO_MAXMANA))); msg->AddU16((uint16_t)100); msg->AddByte(player->getPlayerInfo(PLAYERINFO_MAGICLEVEL)); msg->AddByte(player->getPlayerInfo(PLAYERINFO_MAGICLEVELPERCENT)); msg->AddByte(player->getPlayerInfo(PLAYERINFO_SOUL)); msg->AddU16(player->getStaminaMinutes()); } Editado Agosto 18, 2014 10 anos por poko360 (veja o histórico de edições)
Postado Agosto 18, 2014 10 anos void ProtocolGame::AddPlayerStats(NetworkMessage_ptr msg) { msg->AddByte(0xA0); msg->AddU16((uint16_t)std::ceil(player->getHealth() * 100 / player->getPlayerInfo(PLAYERINFO_MAXHEALTH))); msg->AddU16((uint16_t)100); msg->AddU32(uint32_t(player->getFreeCapacity() * 100)); uint64_t experience = player->getExperience(); if(experience > 0x7FFFFFFF) // client debugs after 2,147,483,647 exp msg->AddU32(0x7FFFFFFF); else msg->AddU32(experience); msg->AddU16(player->getPlayerInfo(PLAYERINFO_LEVEL)); msg->AddByte(player->getPlayerInfo(PLAYERINFO_LEVELPERCENT)); msg->AddU16((uint16_t)std::ceil(player->getMana() * 100 / player->getPlayerInfo(PLAYERINFO_MAXMANA))); msg->AddU16((uint16_t)100); msg->AddByte(player->getPlayerInfo(PLAYERINFO_MAGICLEVEL)); msg->AddByte(player->getPlayerInfo(PLAYERINFO_MAGICLEVELPERCENT)); msg->AddByte(player->getPlayerInfo(PLAYERINFO_SOUL)); msg->AddU16(player->getStaminaMinutes()); } Tu tem as sources? Entenda tudo sobre VPS, DEDICADOS & HOSPEDAGENS. => Clique aqui Global Full Download 10.9x - TFS 1.2/FERUMBRAS/KRAILOS. => Clique aqui Muitos querem aquilo que você tem, mas vão desistir quando souberem o preço que você pagou. lu.lukinha [email protected]
Postado Agosto 18, 2014 10 anos Autor tenho nao =\ se voce souber pode me ensinar? REP+ =x Editado Agosto 18, 2014 10 anos por poko360 (veja o histórico de edições)
Postado Agosto 20, 2014 10 anos Você tem que ter as sources e adicionar esses codes no cpp dela, sem as sources não é possível. Entenda tudo sobre VPS, DEDICADOS & HOSPEDAGENS. => Clique aqui Global Full Download 10.9x - TFS 1.2/FERUMBRAS/KRAILOS. => Clique aqui Muitos querem aquilo que você tem, mas vão desistir quando souberem o preço que você pagou. lu.lukinha [email protected]
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.