Ir para conteúdo

Summ

Membro
  • Registro em

  • Última visita

Solutions

  1. Summ's post in (Resolvido)[ERRO] ONLOGIN CREATURESCRIPT was marked as the answer   
    local effect = 30 -- Efeito que vai usar local storage = 9994 -- Storage que o player precisa ter local tempo = 5 -- Tempo em segundos function onLogin(cid) if getPlayerStorageValue(cid, storage) == 1 then sendEffect(cid) end return true end function sendEffect(cid) if isPlayer(cid) then doSendMagicEffect(getThingPos(cid), effect) addEvent(sendEffect, tempo*1000, cid) else return false end return true end #editado
  2. Summ's post in (Resolvido)[phpmyadmin] SEM OPÇÃO DE CRIAR DATABASE was marked as the answer   
    what ? basta clicar em banco de dados e criar uma nova "database"...
  3. Summ's post in (Resolvido)O que eu fiz de errado? NPC simples was marked as the answer   
    local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} 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 creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local config = { strg1 = 200201, -- storage começando a task strg2 = 91001, -- storage finalizou a task (ganha qnd matar os monstros) idiom = 8971 } if msgcontains(msg:lower(),'task') then if getPlayerStorageValue(cid, config.strg2) < 1 then if getPlayerStorageValue(cid, config.strg1) < 1 then if getPlayerStorageValue(cid, config.idiom) == 1 then selfSay('Good one more coming soul of {portal}! Welcome, I hope you can help!', cid) talkState[talkUser] = 1 elseif getPlayerStorageValue(cid, config.idiom) == 2 then selfSay('Que bom mais uma alma vinda do {portal}! Seja bem vindo, espero que possa nos ajudar!.', cid) talkState[talkUser] = 1 end else selfSay('you have to finish the task', cid) talkState[talkUser] = 0 end else selfSay('Voce concluiu a missao, tome aqui um Sabre, use ele ate chegar no nivel 8 e fale com o Oraculo no templo!', cid) selfSay('Ele ira te mandar para Aurea, la fale com !', cid) doPlayerAddItem(cid, 2385, 1) talkState[talkUser] = 0 end elseif msgcontains(msg:lower(), 'portal') and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, config.idiom) == 1 then selfSay('Crystal angel one came down here and Aurea and opened a portal of humans who comes from another dimension for us {save}.', cid) talkState[talkUser] = 2 elseif getPlayerStorageValue(cid, config.idiom) == 2 then selfSay('Crystal uma anja desceu até aqui e em Aurea e abriu um portal de humanos que vem de outra dimensão para nós {salvar}.', cid) talkState[talkUser] = 2 end elseif msgcontains(msg:lower(), 'salvar') or msgcontains(msg:lower(), 'save') and talkState[talkUser] == 2 then if getPlayerStorageValue(cid, config.idiom) == 1 then selfSay('We are in an apocalyptic world, at war with several races. And you can be! {the chosen}', cid) talkState[talkUser] = 3 elseif getPlayerStorageValue(cid, config.idiom) == 2 then selfSay('Estamos em um mundo apocalíptico, em guerra com varias raças. E voce pode ser o {escolhido}!', cid) talkState[talkUser] = 3 end elseif msgcontains(msg:lower(), 'escolhido') or msgcontains(msg:lower(), 'the chosen') and talkState[talkUser] == 3 then if getPlayerStorageValue(cid, config.idiom) == 1 then selfSay('Congratulations, now with permission.', cid) selfSay('Such as our plague of {rats} in the city that are climbing down the drain!', cid) talkState[talkUser] = 4 elseif getPlayerStorageValue(cid, config.idiom) == 2 then selfSay('Calma primeiro precisamos treinar, voce deve nos ajudar com coisas {simples}, ate estar bem treinado!', cid) selfSay('Como por exemplo a nossa praga de {rats} na cidade que estão subindo pelos bueiros!', cid) talkState[talkUser] = 4 end elseif msgcontains(msg:lower(), 'rats') and talkState[talkUser] == 4 then if getPlayerStorageValue(cid, config.idiom) == 1 then selfSay('Okay, so help us get this over with and kill 10 rats in the gutter in front here.', cid) setPlayerStorageValue(cid, strg1, 1) talkState[talkUser] = 0 elseif getPlayerStorageValue(cid, config.idiom) == 2 then selfSay('Ok, então ajuda-nos a acabar com isso e mate 10 ratos no bueiro aqui na frente.', cid) setPlayerStorageValue(cid, strg1, 1) talkState[talkUser] = 0 end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  4. Summ's post in (Resolvido)[Pedido] Anihi Quest was marked as the answer   
    local config = { daily = "no", MinLevel = 20, MaxLevel = 30, storage = 7007 } function onUse(cid, item, frompos, item2, topos) if item.uid == 7007 and item.itemid == 1945 then player1pos = {x=1104, y=1054, z=8, stackpos=253} player1 = getThingfromPos(player1pos) player2pos = {x=1105, y=1054, z=8, stackpos=253} player2 = getThingfromPos(player2pos) player3pos = {x=1106, y=1054, z=8, stackpos=253} player3 = getThingfromPos(player3pos) player4pos = {x=1107, y=1054, z=8, stackpos=253} player4 = getThingfromPos(player4pos) if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then if getPlayerLevel(cid) >= config.MinLevel and getPlayerLevel(cid) <= config.MaxLevel then queststatus1 = getPlayerStorageValue(player1.uid,7007) queststatus2 = getPlayerStorageValue(player2.uid,7007) queststatus3 = getPlayerStorageValue(player3.uid,7007) queststatus4 = getPlayerStorageValue(player4.uid,7007) if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then nplayer1pos = {x=1146, y=1228, z=8} nplayer2pos = {x=1147, y=1228, z=8} nplayer3pos = {x=1149, y=1228, z=8} nplayer4pos = {x=1150, y=1228, z=8} doSendMagicEffect(player1pos,2) doSendMagicEffect(player2pos,2) doSendMagicEffect(player3pos,2) doSendMagicEffect(player4pos,2) doTeleportThing(player1.uid,nplayer1pos) doTeleportThing(player2.uid,nplayer2pos) doTeleportThing(player3.uid,nplayer3pos) doTeleportThing(player4.uid,nplayer4pos) doSendMagicEffect(nplayer1pos,10) doSendMagicEffect(nplayer2pos,10) doSendMagicEffect(nplayer3pos,10) doSendMagicEffect(nplayer4pos,10) doTransformItem(item.uid,item.itemid+1) else doPlayerSendCancel(cid,"Alguém em sua equipe já fez essa quest.") end else doPlayerSendTextMessage(cid, 19, "You no have level") end else doPlayerSendCancel(cid,"Você precisa de quatro jogadores para esta quest.") end elseif item.uid ==7007 and item.itemid == 1946 then if getPlayerAccess(cid) > 0 then doTransformItem(item.uid,item.itemid-1) else doPlayerSendCancel(cid,"Desculpe, não é possível.") end else return 0 end return 1 end Foi um erro bobo HAUSHAU, quando eu fui perceber o que tinha feito e vim corrigir tu já tinha postado.
  5. Summ's post in (Resolvido)Operadores was marked as the answer   
    if tempo == '50' then aqui você disse que se tempo for igual a string/texto '50' então ele iria executar uma ação, mas ... tu usou uma variável "tempo" e não definiu o valor dela.
     
    tempo = '50' -- Entre aspas simples '' ou aspas duplas "" o valor se torna um string/texto ...
    tempo = '50' -- Valor da variável ... lembre-se por estar entre aspas ela é uma string/texto if tempo ==  '50' then assim seria o modo correto.
    tempo = '50' if tempo == '50' then print('Congratulations') else print('Sorry hold up '.. tempo ..'s') end tempo = 1 repeat print(tempo) tempo = tempo + 1 until tempo == 50 Recomendo ver esses vídeos são 17 no total : https://www.youtube.com/playlist?list=PLqYboeh3Jru55Yq4J08zsBoOwwwjUtZNA
    O cara explica muito bem, ficando assim mais fácil de entender, após ver os 17 vídeos você vai ter uma noção básica pra começar a brincar com lua.
  6. Summ's post in (Resolvido)Error Guild was marked as the answer   
    ALTER TABLE guilds ADD checkdata INT(11) NOT NULL DEFAULT 0;
  7. Summ's post in (Resolvido)AJUDA NPC was marked as the answer   
    arrumado :
     
    http://pastebin.com/rGZ6qPnD
     
    se funcionar marque como melhor resposta pro tópico ficar como resolvido.
  8. Summ's post in (Resolvido)Erro was marked as the answer   
    ALTER TABLE players ADD frags_all INT(11) NOT NULL DEFAULT 0;
  9. o website dele não tinha painel admin ele teve que adicionar via comando :
    INSERT INTO `shop_offer` (`points`, `category`, `type`, `item`, `count`, `description`, `name`) VALUES ('10', '2', '5', '2160', '1', 'Descrição', 'NomeTeste');
  10. Summ's post in (Resolvido)Addon system não funciona was marked as the answer   
    function onUse(cid, item, itemEx, toPosition, fromPosition) local table = {19000, 264, 255} local pos = getPlayerPosition(cid) if getPlayerStorageValue(cid, table[1]) < 1 then doPlayerAddOutfit(cid, table[2], 1) doPlayerAddOutfit(cid, table[3], 1) doPlayerSendTextMessage(cid, 22, "Parabéns! Você ganhou um novo outfit.") doSendMagicEffect(pos, 30) setPlayerStorageValue(cid, table[1], 1) doRemoveItem(item.uid, 1) else return doPlayerSendCancel(cid, "Você já tem esse outfit.") end return true end Se não funcionar posta a tag do XML.
  11. Summ's post in (Resolvido)(DUVIDA) Como colocar uma mount/addon especifica a venda was marked as the answer   
    http://www.tibiaking.com/forum/topic/50629-addonmount-para-shopsystem-por-storage/
  12. Summ's post in (Resolvido)TFS 1.1 was marked as the answer   
    Funciona no ubuntu 14.04 e se não me falha a memória já rodei no debian 7.5
  13. Summ's post in (Resolvido)Erro table player_deaths was marked as the answer   
    CREATE TABLE `player_deaths` ( `id` int(11) NOT NULL AUTO_INCREMENT, `player_id` int(11) NOT NULL, `date` bigint(20) unsigned NOT NULL, `level` int(10) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `date` (`date`), KEY `player_deaths_ibfk_1` (`player_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=42 ; http://www.tibiaking.com/forum/topic/33611-tutorial-resolvendo-qualquer-erro-na-data-base/
  14. Summ's post in (Resolvido)[Ajuda] Script Teleport Yalahar Quest was marked as the answer   
    Não esqueça de configurar as coordenas.
    function onStepIn (cid, item, pos) local pos = {x = xxxx, y = xxxx, z = x} -- Configura as coordenadas aqui if item.actionid == 7809 then doTeleportThing(cid, pos) doSendMagicEffect(getThingFromPos(cid), 14) end return true end <movevent type="StepIn" actionid="7809" event="script" value="nomedoarquivo.lua"/>
  15. Summ's post in (Resolvido)[AJUDA] Modificar potions.lua was marked as the answer   
    local config = { removeOnUse = "yes", usableOnTarget = "yes", -- can be used on target? (fe. healing friend) splashable = "yes", range = -1, area = {1, 1} -- if not set correctly, the message will be sent only to user of the item } local multiplier = { health = 1.0, mana = 1.0 } local POTIONS = { [8704] = {empty = 7636, splash = 42, health = {50, 100}}, -- small health potion [7618] = {empty = 7636, splash = 42, health = {100, 200}}, -- health potion [7588] = {empty = 7634, splash = 42, health = {200, 350}, level = 50, vocations = {3, 4, 7, 8}, vocStr = "knights and paladins"}, -- strong health potion [7591] = {empty = 7635, splash = 42, health = {400, 600}, level = 80, vocations = {4, 8}, vocStr = "knights"}, -- great health potion [8473] = {empty = 7635, splash = 42, health = {650, 800}, level = 130, vocations = {4, 8}, vocStr = "knights"}, -- ultimate health potion [7620] = {empty = 7636, splash = 47, mana = {100, 150}}, -- mana potion [7589] = {empty = 7634, splash = 47, mana = {210, 290}, level = 50, vocations = {1, 2, 3, 5, 6, 7}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion [7590] = {empty = 7635, splash = 47, mana = {350, 450}, level = 80, vocations = {1, 2, 5, 6}, vocStr = "sorcerers and druids"}, -- great mana potion [8472] = {empty = 7635, splash = 43, health = {300, 450}, mana = {110, 190}, level = 80, vocations = {3, 7}, vocStr = "paladins"} -- great spirit potion } for index, potion in pairs(POTIONS) do if(type(index) == 'number')then for k, v in pairs(config) do if(not potion[k]) then potion[k] = v end end if(potion.removeOnUse) then potion.removeOnUse = getBooleanFromString(potion.removeOnUse) end if(potion.usableOnTarget) then potion.usableOnTarget = getBooleanFromString(potion.usableOnTarget) end if(potion.splashable) then potion.splashable = getBooleanFromString(potion.splashable) end if(type(potion.health) == 'table' and table.maxn(potion.health) > 1) then potion.health[1] = math.ceil(potion.health[1] * multiplier.health) potion.health[2] = math.ceil(potion.health[2] * multiplier.health) else potion.health = nil end if(type(potion.mana) == 'table' and table.maxn(potion.mana) > 1) then potion.mana[1] = math.ceil(potion.mana[1] * multiplier.mana) potion.mana[2] = math.ceil(potion.mana[2] * multiplier.mana) else potion.mana = nil end POTIONS[index] = potion end end function onUse(cid, item, fromPosition, itemEx, toPosition) local potion = POTIONS[item.itemid] if(not potion) then return false end if(not isPlayer(itemEx.uid) or (not potion.usableOnTarget and cid ~= itemEx.uid)) then if(not potion.splashable or not potion.splash) then return false end if(toPosition.x == CONTAINER_POSITION) then toPosition = getThingPosition(item.uid) end doDecayItem(doCreateItem(POOL, potion.splash, toPosition)) doRemoveItem(item.uid, 1) if(not potion.empty or potion.removeOnUse) then return true end if(fromPosition.x ~= CONTAINER_POSITION) then doCreateItem(potion.empty, fromPosition) else doPlayerAddItem(cid, potion.empty, 1) end return true end if(((potion.level and getPlayerLevel(itemEx.uid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(itemEx.uid)))) and not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) then doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_MONSTER, false, cid) return true end if(potion.range > 0 and cid ~= itemEx.uid and getDistanceBetween(getThingPosition(cid), getThingPosition(itemEx.uid)) > potion.range and not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_CANUSEFAR)) then doPlayerSendDefaultCancel(cid, RETURNVALUE_TOOFARAWAY) return true end if(potion.health and not doTargetCombatHealth(cid, itemEx.uid, COMBAT_HEALING, potion.health[1], potion.health[2], CONST_ME_MAGIC_BLUE, false)) then return false end if(potion.mana and not doTargetCombatMana(cid, itemEx.uid, potion.mana[1], potion.mana[2], CONST_ME_MAGIC_BLUE, false)) then return false end if(type(potion.area) == 'table' and table.maxn(potion.area) > 1) then for i, tid in ipairs(getSpectators(getThingPosition(itemEx.uid), potion.area[1], potion.area[2])) do if(isPlayer(tid)) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_MONSTER, false, tid) end end else doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_MONSTER, false, itemEx.uid) if(itemEx.uid ~= cid) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_MONSTER, false, cid) end end doRemoveItem(item.uid, 1) if(not potion.empty or potion.removeOnUse) then return true end if(fromPosition.x ~= CONTAINER_POSITION) then doCreateItem(potion.empty, fromPosition) else doPlayerAddItem(cid, potion.empty, 1) end return true end

Informação Importante

Confirmação de Termo