Líderes
Conteúdo Popular
Exibindo conteúdo com a maior reputação em 05/23/16 em todas áreas
-
|new gallery| jacques tony
Administrador reagiu a Tony por um tópico no fórum
1 ponto -
[Encerrado]Naruto OT Recrutamento!
dolver reagiu a BananaFight por um tópico no fórum
Seu projeto tem tudo para dar errado, não tem um objetivo, metas e muito menos uma ideia do que precisa ser feito. Para montar um projeto você precisa ser um líder, ter em mente o que você busca e os resultado que você quer. Você não pode se tornar um líder de um projeto sem conhecimentos básicos do assunto ( A menos que seja um investidor que vai comprar os resultados ), recomendo que junte informações sobre oque quer que tenha no seu servidor, decida os caminhos que pretende tomar ( esses caminhos podem mudar com o decorrer do projeto, mas tenha em mente coisas fundamentais no projeto, para ele não perder o foco ) e por fim, busque pessoas capacitadas para lhe ajudar. Ao buscar pessoas você deve oferecer uma perspectiva convincente da sua proposta, ou seja, você deve mostrar as vantagens que as pessoas que vierem a se juntar ao seu projeto terão, e o porque de elas deverem se juntar a você. Enfim, essa é uma critica construtiva para que consiga dar continuidade ao seu projeto, em momento nem um eu quis te diminuir ou desmotivas, muito pelo contrário, estou dando dicas para que você consiga terminar o seu projeto.1 ponto -
@edukf, vê se resolve: local SHOP_MSG_TYPE = MESSAGE_EVENT_ORANGElocal SQL_interval = 30function onThink(interval, lastExecution) local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';") if(result_plr:getID() ~= -1) then while(true) do local id = tonumber(result_plr:getDataInt("id")) local action = tostring(result_plr:getDataString("action")) local delete = tonumber(result_plr:getDataInt("delete_it")) local cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) then local itemtogive_id = tonumber(result_plr:getDataInt("param1")) local itemtogive_count = tonumber(result_plr:getDataInt("param2")) local container_id = tonumber(result_plr:getDataInt("param3")) local container_count = tonumber(result_plr:getDataInt("param4")) local add_item_type = tostring(result_plr:getDataString("param5")) local add_item_name = getItemNameById(tonumber(result_plr:getDataInt("param1"))) local add_item_count = tostring(result_plr:getDataInt("param2")) local received_item = 0 local full_weight = 0 if add_item_type == 'container' then container_weight = getItemWeightById(container_id, 1) if isItemRune(itemtogive_id) == TRUE then items_weight = container_count * getItemWeightById(itemtogive_id, 1) else items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) if isItemRune(itemtogive_id) == TRUE then full_weight = getItemWeightById(itemtogive_id, 1) else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) end end local free_cap = getPlayerFreeCap(cid) if full_weight <= free_cap then if add_item_type == 'container' then local new_container = doCreateItemEx(container_id, 1) local iter = 0 local dado = 0 while iter ~= container_count do if itemtogive_count > 100 then while itemtogive_count > 100 do doAddContainerItem(new_container, itemtogive_id, 100) iter = iter + 1 dado=dado+100 end doAddContainerItem(new_container, itemtogive_id, (itemtogive_count - dado)) iter = iter + 1 end end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) doItemSetAttribute(new_item, "description", "This item can only be used by the player ".. getPlayerName(cid) .."!") doItemSetAttribute(new_item, "aid", getPlayerGUID(cid)+10000) received_item = doPlayerAddItemEx(cid, new_item) end if received_item == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'Você recebeu >> '.. add_item_count ..' '.. add_item_name ..' << do Hospice shop.') db.query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.query("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_count ..' '.. add_item_name ..' << from Hospice shop is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_count ..' '.. add_item_name ..' << from Hospice shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '.. SQL_interval ..' seconds to get it.') end end if not(result_plr:next()) then break end end result_plr:free() end return trueend1 ponto
-
Exatamente como eu tinha dito: local config = { ids = {5926, 3940, 11119, 10518, 10521}, --ID do item. drop_effect = true --Efeito que aparecerá em cima da corpse (apenas para o dono da corpse). OPCIONAL! Se não quiser, coloque false.} function examine(cid, position, corpse_id, name) if not isPlayer(cid) then return true end local corpse = getTileItemById(position, corpse_id).uid if corpse <= 1 or not isContainer(corpse) then return true end for slot = 0, getContainerSize(corpse) - 1 do local item = getContainerItem(corpse, slot) if item.uid <= 1 then return true end if isInArray(config.ids, item.itemid) then doBroadcastMessage("[LOOT MENSAGEM]: O jogador ("..getCreatureName(cid)..") dropou um item exclusivo de um ("..name..").", 19) if config.drop_effect then doSendMagicEffect(position, config.drop_effect, cid) end end endend function onKill(cid, target) if not isMonster(target) then return true end local monster_name = getCreatureName(target) local corpse_id = getMonsterInfo(monster_name).lookCorpse addEvent(examine, 5, cid, getThingPos(target), corpse_id, monster_name) return trueend1 ponto
-
Mensagem ao dropar loot
gmstrikker reagiu a dalvorsn por uma questão
Tu precisa transformar o id em uma tabela, e mudar a verificação de "item.itemid == config.itemid" para isInArray(config.items, item.itemid)1 ponto -
Tenta usar esse shop.lua: local SHOP_MSG_TYPE = MESSAGE_EVENT_ORANGElocal SQL_interval = 30function onThink(interval, lastExecution) local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';") if(result_plr:getID() ~= -1) then while(true) do local id = tonumber(result_plr:getDataInt("id")) local action = tostring(result_plr:getDataString("action")) local delete = tonumber(result_plr:getDataInt("delete_it")) local cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) then local itemtogive_id = tonumber(result_plr:getDataInt("param1")) local itemtogive_count = tonumber(result_plr:getDataInt("param2")) local container_id = tonumber(result_plr:getDataInt("param3")) local container_count = tonumber(result_plr:getDataInt("param4")) local add_item_type = tostring(result_plr:getDataString("param5")) local add_item_name = getItemNameById(tonumber(result_plr:getDataInt("param1"))) local add_item_count = tostring(result_plr:getDataInt("param2")) local received_item = 0 local full_weight = 0 if add_item_type == 'container' then container_weight = getItemWeightById(container_id, 1) if isItemRune(itemtogive_id) == TRUE then items_weight = container_count * getItemWeightById(itemtogive_id, 1) else items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) if isItemRune(itemtogive_id) == TRUE then full_weight = getItemWeightById(itemtogive_id, 1) else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) end end local free_cap = getPlayerFreeCap(cid) if full_weight <= free_cap then if add_item_type == 'container' then local new_container = doCreateItemEx(container_id, 1) local iter = 0 while iter ~= container_count do doAddContainerItem(new_container, itemtogive_id, itemtogive_count) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) doItemSetAttribute(new_item, "description", "This item can only be used by the player ".. getPlayerName(cid) .."!") doItemSetAttribute(new_item, "aid", getPlayerGUID(cid)+10000) received_item = doPlayerAddItemEx(cid, new_item) end if received_item == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'Você recebeu >> '.. add_item_count ..' '.. add_item_name ..' << do Hospice shop.') db.query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.query("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_count ..' '.. add_item_name ..' << from Hospice shop is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_count ..' '.. add_item_name ..' << from Hospice shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '.. SQL_interval ..' seconds to get it.') end end if not(result_plr:next()) then break end end result_plr:free() end return trueend1 ponto
-
1 ponto
-
Mensagem ao dropar loot
gmstrikker reagiu a dalvorsn por uma questão
Creio eu que não exista um callback para isso em lua, e registrar uma creaturescript pra cada monstro é inviavel. Minha sugestão é que seja feito nas sources, diretamente na função void MonsterType::dropLoot(Container* corpse). Dai um meio facil de configurar seria criando um novo atributo dentro da tag do loot no xml do monstro identificando que esse item deve ter uma mensagem exclusiva. Ou de maneira alternativa, tu pode fazer um onKill registrado no player, que verifica o corpses a procura do item, e caso encontre manda a mensagem.1 ponto
Líderes está configurado para São Paulo/GMT-03:00