
markmv
Membro
-
Registro em
-
Última visita
Histórico de Curtidas
-
markmv deu reputação a Fir3element em (Resolvido)[DUVIDA] Spells por MagicLevel e por Leveltenta ai:
o level n ta alterando mt os valores, é bem chato de balancear isso
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) function onGetFormulaValues(cid, level, maglevel) if isInArray({4, 8}, getPlayerVocation(cid)) then -- knight min = ((level / 80.0) + (maglevel * 140) + 5) max = ((level / 90.0) + (maglevel * 145) + 7) elseif isInArray({3, 7}, getPlayerVocation(cid)) then -- paladin min = ((level / 80.0) + (maglevel * 73) + 5) max = ((level / 90.0) + (maglevel * 75) + 7) elseif isInArray({1, 2, 5, 6}, getPlayerVocation(cid)) then -- sorcerer/druid min = ((level / 80.0) + (maglevel * 15) + 5) max = ((level / 90.0) + (maglevel * 17) + 7) end return min, max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") function onCastSpell(cid, var) return doCombat(cid, combat, var) end -
markmv deu reputação a Fir3element em (Resolvido)[Duvida] Adicionando skill automatico@Summ
O limite é apenas no client, mostra 94 mas ataca como 350.
local firstItems = { [0] = {2173, 2525, 3965, 2124, 2457, 2647, 2643}, [1] = {2173, 2499, 8871, 2507, 2195, 8918, 8922}, [2] = {2173, 2499, 8871, 2507, 2195, 8918, 8922}, [3] = {2173, 2499, 8888, 2507, 2195, 8851, 6529, 7366, 2537}, [4] = {2173, 2499, 8889, 2507, 2195, 2537, 8926} } function onLogin(cid) if getCreatureName(cid) ~= "Account Manager" then if getPlayerStorageValue(cid, 25990) == -1 then local guid = getPlayerGUID(cid) local function addSkill(skillid, amount) db.executeQuery("UPDATE `player_skills` SET `value` = " .. amount .. " WHERE `player_id` = " .. guid .. " and `skillid` = " .. skillid) end local function addMagLevel(amount) db.executeQuery("UPDATE `players` SET `maglevel` = " .. amount .. " WHERE `id` = " .. guid) end local voc, bag = getPlayerVocation(cid), doPlayerAddItem(cid, 1988, 1) for i = 1, table.maxn(firstItems[voc]) do doPlayerAddItem(cid, firstItems[voc][i], 1) end doPlayerAddItem(cid, 2167, 2) doAddContainerItem(bag, 2160, 100) doAddContainerItem(bag, 2672, 10) setPlayerStorageValue(cid, 25990, 1) addEvent(function() doRemoveCreature(cid, true) if isInArray({1, 2, 5, 6}, voc) then addMagLevel(200) elseif voc == 3 or voc == 7 then addSkill(4, 350) addMagLevel(30) elseif voc == 4 or voc == 8 then addSkill(3, 350) addSkill(5, 350) addMagLevel(11) end end, 0.0001) end end return true end -
markmv deu reputação a Fir3element em (Resolvido)[TFS 0.4 Protocolo 8.60]tenta isso aq:
bool Player::canWalkthrough(const Creature* creature) const { if(creature == this || hasCustomFlag(PlayerCustomFlag_CanWalkthrough) || creature->isWalkable() || (creature->getMaster() && creature->getMaster() != this && canWalkthrough(creature->getMaster()))) return true; const Player* player = creature->getPlayer(); if(!player) return false; if((((g_game.getWorldType() == WORLDTYPE_OPTIONAL && #ifdef __WAR_SYSTEM__ !player->isEnemy(this, true) && #endif player->getVocation()->isAttackable()) || player->getTile()->hasFlag(TILESTATE_PROTECTIONZONE) || (player->getVocation()->isAttackable() && player->getLevel() < (uint32_t)g_config.getNumber(ConfigManager::PROTECTION_LEVEL))) && player->getTile()->ground && Item::items[player->getTile()->ground->getID()].walkStack) && (!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges) || player->getAccess() <= getAccess())) return true; return (player->isGhost() && getGhostAccess() < player->getGhostAccess()) || (isGhost() && getGhostAccess() > player->getGhostAccess()); } -
markmv deu reputação a Fir3element em (Resolvido)[TFS 0.4 Protocolo 8.60]andar por cima dos players é na função canWalkthrough (player.cpp)
hp/mana por % tem q fazer essas alterações:
protocolgame.cpp, substitua:
msg->put<uint16_t>(player->getHealth()); msg->put<uint16_t>(player->getPlayerInfo(PLAYERINFO_MAXHEALTH)); por:
if (player->getPlayerInfo(PLAYERINFO_MAXHEALTH) > 0) { msg->put<uint16_t>(uint16_t(player->getHealth() * 100 / player->getPlayerInfo(PLAYERINFO_MAXHEALTH))); msg->put<uint16_t>(100); } else { msg->put<uint16_t>(0); msg->put<uint16_t>(0); } substitua:
msg->put<uint16_t>(player->getPlayerInfo(PLAYERINFO_MANA)); msg->put<uint16_t>(player->getPlayerInfo(PLAYERINFO_MAXMANA)); por:
if (player->getPlayerInfo(PLAYERINFO_MAXMANA) > 0) { msg->put<uint16_t>(player->getPlayerInfo(PLAYERINFO_MANA) * 100 / player->getPlayerInfo(PLAYERINFO_MAXMANA)); msg->put<uint16_t>(100); } else { msg->put<uint16_t>(0); msg->put<uint16_t>(0); }