
bonehell
Membro
-
Registro em
-
Última visita
Histórico de Curtidas
-
bonehell deu reputação a Mek Fiuchem em [DUVIDA] Como Posso dar look No Player e ver os fragsCrie na pasta Data/Creaturescripts/script o arquivo fraglook.lua
e cole isso
function getPlayerFrags(cid) local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = {date = result:getDataInt("date")} if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } return size.day + size.week + size.month end function onLogin(cid) registerCreatureEvent(cid, "fraglook") return true end function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and thing.uid ~= cid then doPlayerSetSpecialDescription(thing.uid,'[Frags: '..getPlayerFrags(thing.uid)..']') return true elseif thing.uid == cid then doPlayerSetSpecialDescription(cid,'[Frags: '..getPlayerFrags(cid)..']') local string = 'You see yourself.' if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then string = string..' You are '.. getPlayerGroupName(cid) ..'.' elseif getPlayerVocation(cid) ~= 0 then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end string = string..getPlayerSpecialDescription(cid)..'' if getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil then string = string..' You are '.. (getPlayerSex(cid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(cid)) ..'.' end if getPlayerGuildId(cid) > 0 then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].' string = string..'nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then string = string..'nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end return true end Agora no Data/Creaturescripts/creaturescripts.xml adicione essas tags: <event type="login" name="fraglook_register" event="script" value="fraglook.lua"/> <event type="look" name="fraglook" event="script" value="fraglook.lua"/>
Ajudei ? Rep+ Please
-
bonehell deu reputação a vankk em (Resolvido)[PEDIDO] sumon spellVai summonar o monstro Vankk for president e pode ter no máximo 5 summons.
local config = { max_summons = 5, monster_summon = "Vankk for president", } function onCastSpell(cid, var) if #getCreatureSummons(cid) < config.max_summons then doConvinceCreature(cid, doSummonCreature(config.monster_summon, getThingPos(cid))) else doPlayerSendTextMessage(cid, 19, "You can only have ".. config.max_summons .. " summons.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) end return true end
-
bonehell deu reputação a ViitinG em (Resolvido)NPC (Teleport por Item)Não testei :
local lugar = {x=102, y=1027, z=7} local item = 2160 local quantidade = 10 local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function santaNPC(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if (parameters.present == true) then if(doPlayerRemoveItem(cid,item,quantidade) == true) then doTeleportThing(cid, lugar) npcHandler:say('Voce foi teleportado.',cid) else npcHandler:say('Voce não tem o item para ser teleportado',cid) end npcHandler:resetNpc() return true end end npcHandler:setMessage(MESSAGE_GREET, "Ola|PLAYERNAME|. Eu posso te levar para alguns lugares,fale {lugar}.") local noNode = KeywordNode:new({'no'}, santaNPC, {present = false}) local yesNode = KeywordNode:new({'yes'}, santaNPC, {present = true}) local node = keywordHandler:addKeyword({'lugar'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Vou te levar para um lugar,digite {yes}'}) node:addChildKeywordNode(yesNode) node:addChildKeywordNode(noNode) npcHandler:addModule(FocusModule:new()) -
bonehell deu reputação a Tricoder em POTIONS ERRO [QUANTIDADE]@bonehell
Vai em game.cpp, procure por:
void Game::showHotkeyUseMessage(Player* player, Item* item) { int32_t subType = -1; if(item->hasSubType() && !item->hasCharges()) subType = item->getSubType(); const ItemType& it = Item::items[item->getID()]; uint32_t count = player->__getItemTypeCount(item->getID(), subType, false); char buffer[40 + it.name.size()]; if(count == 1) sprintf(buffer, "Using the last %s...", it.name.c_str()); else sprintf(buffer, "Using one of %d %s...", count, it.pluralName.c_str()); player->sendTextMessage(MSG_INFO_DESCR, buffer); } Substitua por:
void Game::showHotkeyUseMessage(Player* player, Item* item) { const ItemType& it = Item::items[item->getID()]; uint32_t count = player->__getItemTypeCount(item->getID(), -1); char buffer[40 + it.name.size()]; if(count == 1) sprintf(buffer, "Using the last %s...", it.name.c_str()); else sprintf(buffer, "Using one of %d %s...", count, it.pluralName.c_str()); player->sendTextMessage(MSG_INFO_DESCR, buffer); } Poste se resolveu ou não, por favor.
-
bonehell deu reputação a Tricoder em POTIONS ERRO [QUANTIDADE]Esta é uma mensagem automática, este tópico foi movido para a área correta.
Regras do fórum: http://www.tibiaking.com/forum/topic/1281-regras-gerais/#comment-7680
Este tópico foi movido:
De: OTServ > Notícias e OTServ Geral
Para: Suporte OTServ > OTServ > Suporte de OTServ Geral
-
bonehell deu reputação a AndreAzevedo em POTIONS ERRO [QUANTIDADE]Ai tem a solução. Do erro, vai ter que fazer uma compilação e editar os arquivos. Tem tudo e o Link da Source caso não tenha. http://www.tibiaking.com/forum/topic/65370-erro-source/
-
bonehell deu reputação a Fir3element em POTIONS ERRO [QUANTIDADE]source do otserv, tem tutoriais na área de programação