Ir para conteúdo

MaXwEllDeN

Héroi
  • Registro em

  • Última visita

Solutions

  1. MaXwEllDeN's post in (Resolvido)Ajuda Hiraishin Kunai não teleportar dentro dentro de monstros! was marked as the answer   
    local pos = fromPosition local aqui = getPlayerPosition(cid) local vocs = {300, 301, 302, 303, 304, 305, 306, 307} local agua = {4610, 4612, 4611, 4664, 4613, 4666, 4646, 4654, 4609, 4665, 4608, 4625, 4665, 4666, 4645} local parede = {1030, 1029, 1025, 1026, 1027, 1259, 1028, 1032, 1034, 1033, 1536, 1533, 873, 919, 874, 1037, 2700, 2708, 4472, 4475, 4471, 3388, 3373, 3363, 3398, 3408, 3417, 3420, 3407, 3368, 2701, 5130, 6170, 6166, 1596, 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369, 3370, 3371, 3372, 3373, 3374, 3375, 3376, 3377, 3378, 3379, 3380, 3381, 3382, 3383, 3384, 3385, 3386, 3387, 3388, 3389, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, 3399, 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, 3409, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, 3420, 3421, 3422} local pedra = {874, 919, 873, 2707, 2784, 2778, 3330, 4471, 4475, 4473, 4472, 4474, 4468, 4478, 4469, 4470, 4479, 2703, 2704, 1534, 2739, 3867, 5324, 5316, 5315, 5317, 1600, 1597, 1601} function onUse(cid, item, fromPosition, itemEx, toPosition) if getDistanceBetween(aqui, toPosition) >= 8 then return doPlayerSendTextMessage(cid, 27, "Está muito longe.") elseif(not(isSightClear(aqui, toPosition, 1))) then return doPlayerSendTextMessage(cid, 27, "Isso é impossivel.") elseif(getTilePzInfo(aqui)) then return doPlayerSendCancel(cid, "Não pode usar a tecnica Deus Dragão em casas ou areas protegidas.") elseif(getTilePzInfo(toPosition)) then return doPlayerSendCancel(cid, "Não pode usar a tecnica Deus Dragão em casas ou areas protegidas.") elseif(isInArray(agua, itemEx.itemid)) then return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em agua") elseif(isInArray(parede, itemEx.itemid)) then return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em paredes") elseif(isInArray(pedra, itemEx.itemid)) then return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em pedras") elseif(not(isInArray(vocs, getPlayerVocation(cid)))) then return doPlayerSendTextMessage(cid, 27, "Desculpe, Apenas Minato pode usar a tecnica Deus Dragão.") elseif(isCreature(itemEx.uid)) then return doPlayerSendTextMessage(cid, 27, "Desculpe, mas você não pode teletransportar em criaturas.") end if(doTeleportThing(cid, toPosition, false)) then doSendMagicEffect(pos, 24) doSendMagicEffect(toPosition, 24) doCreatureSay(cid, "Shunshin", 19) return doSendDistanceShoot(pos, toPosition, 16) end return doPlayerSendCancel(cid, "Desculpe nao foi possivel.") end
  2. MaXwEllDeN's post in (Resolvido)NPC que troca item por Vocação! was marked as the answer   
    local pergaminhoid = 2154 -- Itemid do pergaminho local vocations = { [5] = {9, 10, 11}, [6] = {12, 13, 14}, [7] = {15, 16, 17}, [8] = {17, 15, 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:lower()) end function onThink() npcHandler:onThink() end local talkState = {} function creatureSayCallback(cid, typeb, msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if(not npcHandler:isFocused(cid)) then if msgcontains(msg, "hi") then talkState[talkUser] = 0 end return true end local voc = vocations[getPlayerVocation(cid)] if voc then if msgcontains(msg, "pergaminho") then if getPlayerItemCount(cid, pergaminhid) > 0 then local str = "" local ret = {} for _, v in pairs(voc) do str = str .. "{".. getVocationInfo(v).name .. "}, " table.insert(ret, getVocationInfo(v).name:lower()) end npcHandler:say("Ora ora, voce tem o pergaminho, então escolha sua vocaçao vip: ".. str:sub(1, #str - 2) .. ".", cid) talkState[talkUser] = ret else npcHandler:say("Você não tem o pergaminho.", cid) end elseif type(talkState[talkUser]) == "table" and isInArray(talkState[talkUser], msg:lower()) then if doPlayerRemoveItem(cid, pergaminhoid, 1) then for _, v in pairs(voc) do if getVocationInfo(v).name:lower() == msg:lower() then doPlayerSetVocation(cid, voc) break end end npcHandler:say("Ótima escolha, agora voce é {".. msg:lower() .. "}, até mais!", cid)                                 talkState[talkUser] = 0 else npcHandler:say("Você não tem o pergaminho.", cid) end end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  3. MaXwEllDeN's post in (Resolvido)Pedido Catapulta sistem was marked as the answer   
    local config = { shoot = "cima", -- Direção do tiro -- "cima" -- "baixo" -- "direita" -- "esquerda" damage = {100, 500}, -- Dano mínimo e máximo, respectivamente ammo_id = 2160, -- Itemid da pedra ammo_shoot = 10, -- Quantas stones para um "tiro" ammo_pos = {x = 160, y = 54, z = 7}, -- Posição onde as stones vão ficar } local area = createCombatArea({ {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1} }) local aux = { ["cima"] = {0, -10}, ["baixo"] = {0, 10}, ["direita"] = {10, 0}, ["esquerda"] = {-10, 0}, } function onUse(cid, item, frompos, item2, tp) local pos = {x = tp.x + aux[config.shoot][1], y = tp.y + aux[config.shoot][2], z = tp.z} local stones = getTileItemById(config.ammo_pos, config.ammo_id) if stones.uid == 0 or stones.type < config.ammo_shoot then return false end doRemoveItem(stones.uid, config.ammo_shoot) doAreaCombatHealth(cid, COMBAT_PHYSICALDAMAGE, pos, area, -config.damage[1], -config.damage[2], CONST_ME_HITAREA) return true end
  4. MaXwEllDeN's post in (Resolvido)Ordenar tabela was marked as the answer   
    Desse modo vai ordenar em ordem decrescente:
    local t = {{1,30},{2,35},{3,55},{4,20},{5,70}} table.sort(t, function(a, b) return a[2] > b[2] end) for i, v in ipairs(t) do print(v[1] .. " = ".. v[2]) end Desse em ordem decrescente:
    local t = {{1,30},{2,35},{3,55},{4,20},{5,70}} table.sort(t, function(a, b) return a[2] < b[2] end) for i, v in ipairs(t) do print(v[1] .. " = ".. v[2]) end
  5. MaXwEllDeN's post in (Resolvido)Editar portal pelo item.xml was marked as the answer   
    local config = { time = 5, -- Tempo, em segundos, que o teleport existir pos = {x = 1150, y = 848, z = 7}, -- Posição a onde o teleport vai levar } local function teleportRemove(pos) local tp = getTileItemById(pos, 1387).uid if tp > 100 then doRemoveItem(tp) return true end return false end local storage = 987123 -- storage local time = 5 -- tempo em segundos que o item vai ficar na posição. local pos = {} function terminus(cid) if isPlayer(cid) then for index, pid in pairs(pos) do if index == getCreatureName(cid) then local a = getTileItemById(pos[index], item) if a.uid > 0 then doRemoveItem(a.uid) end end end doPlayerSendTextMessage(cid, 22, "O item sumiu.") end end function onCastSpell(cid, var) local c_pos = getCreaturePosition(cid) doCreateTeleport(1387, config.pos , c_pos) doTeleportThing(cid, config.pos) addEvent(teleportRemove, config.time * 1000, c_pos) if getPlayerStorageValue(cid, storage) - os.time() <= 0 then pos[getCreatureName(cid)] = getCreaturePosition(cid) setPlayerStorageValue(cid, storage, os.time()+time) doCreateItem(item, getCreaturePosition(cid)) doSendMagicEffect(getCreaturePosition(cid), 3) addEvent(terminus, time*1000, cid) elseif getPlayerStorageValue (cid, storage) - os.time() >= 1 then for index, pid in pairs(pos) do if index == getCreatureName(cid) then doTeleportThing(cid, pid) doSendMagicEffect(getCreaturePosition(cid), 10) end end end return true end
  6. MaXwEllDeN's post in (Resolvido)Alavanca que tira pedra was marked as the answer   
    Na pasta actions/scripts crie um arquivo chamado alavancaPedra.lua, e adicione isso dentro:
    local config = { pedra_id = 1512, -- ItemID da pedra posicoes = { {x = 160, y = 54, z = 7}, {x = 120, y = 20, z = 7}, {x = 320, y = 18, z = 7}, {x = 128, y = 18, z = 7}, } } function onUse(cid) for _, pos in pairs(config.posicoes) do local pedra = getTileItemById(pos, config.pedra_id).uid if pedra > 100 then doRemoveItem(pedra else doCreateItem(config.pedra_id, 1, pos) end end return true end No arquivo actions/actions.xml adicione a seguinte tag:
    <action actionid="7728" event="script" value="alavancaPedra.lua"/>  Onde 7728 é a actionid que você deve colocar na alavanca pelo seu Map Editor.
  7. MaXwEllDeN's post in (Resolvido)[ACTION] Quest was marked as the answer   
    doPlayerAddItem(uid, itemid[, count/subtype = 1[, canDropOnMap = true[, slot = 0]]])
     
    Exemplo:
    doPlayerAddItem(cid, 2580, 1, false, CONST_SLOT_NECKLACE) -- Neck doPlayerAddItem(cid, 2120, 1, false, CONST_SLOT_HEAD) -- Head doPlayerAddItem(cid, 1987, 1, false, CONST_SLOT_BACKPACK) -- Backpack doPlayerAddItem(cid, 2376, 1, false, CONST_SLOT_RIGHT) -- Right Hand doPlayerAddItem(cid, 1988, 1, false, CONST_SLOT_LEFT) -- Left Hand doPlayerAddItem(cid, 2550, 1, false, CONST_SLOT_ARMOR) -- Armor doPlayerAddItem(cid, 526, 1, false, CONST_SLOT_RING) -- Ring doPlayerAddItem(cid, 2564, 1, false, CONST_SLOT_AMMO) -- Ammo CONST_SLOT_HEAD CONST_SLOT_NECKLACE CONST_SLOT_BACKPACK CONST_SLOT_ARMOR CONST_SLOT_RIGHT CONST_SLOT_LEFT CONST_SLOT_LEGS CONST_SLOT_FEET CONST_SLOT_RING CONST_SLOT_AMMO
    O tópico foi movido para a área correta, preste mais atenção da próxima vez!
    Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680

    Este tópico foi movido:
    De: "OTServ → Scripting → Actions e TalkActions"
    Para: "OTServ → Suporte OTServ → Suporte de Scripts"
  8. MaXwEllDeN's post in (Resolvido)[SCRIPT] Necessito ajuda com script was marked as the answer   
    É sim. Tanto que eu já havia feito um sistema assim.
     
     
    Forja
  9. MaXwEllDeN's post in (Resolvido)[AJUDA]COMO CRIO SCRIPTS? was marked as the answer   
    @Benny e @Ken Kaneki, vamos parar de brincadeira com o cara porque isso aqui não é Playground não. O post de ambos foi totalmente sem intenção de ajudar ou com alguma informação construtiva. 
     
     
    @MestruGusXD
    Você pode dar uma olhada nesse tópico:
     
    Aulas de Scripting Lua
  10. MaXwEllDeN's post in (Resolvido)"ROLETA" NÃO CONSIGO COLOCAR PRA FUNCIONAR 2 ACTION COM A MESMA SCRIPT was marked as the answer   
    Opa, perdão.
    local config = { premios = {13980, 13945, 13952, 13973, 13966, 13959, 13987, 13994}, --- Coloque o id que sera sorteado money = {2145, "small diamond"}, -- ID do diamond count = 3, -- Quantidade dos diamonds } function onUse(cid, item, fromPosition, itemEx, toPosition) if not doPlayerRemoveItem(cid, config.money[1], config.count) then doPlayerSendCancel(cid, "Você precisa de ".. config.count .." ".. config.money[2] .." pra usar o sorteador de items.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return false end local roleta = math.random(1, #config.premios) if config.premios[roleta] then doPlayerAddItem(cid, config.premios[roleta], 1) doBroadcastMessage(string.format("[SORTEADOR DE ITEM]: %s usou o sorteador de items e ganhou 1 %s.", getCreatureName(cid), getItemNameById(config.premios[roleta])), 22) doSendMagicEffect(getThingPos(cid), 14) return true end return false end
  11. MaXwEllDeN's post in (Resolvido)COMANDO PARA CRIAR TELEPORT was marked as the answer   
    /addtp 160, 54, 7
  12. MaXwEllDeN's post in (Resolvido)Duvida sobre function was marked as the answer   
    --getHouseFromPos(pos) local house = getHouseFromPos(getThingPos(cid)) doPlayerSendTextMessage(cid, 27, "HouseID: " .. house.id .. ".")  

    --getHouseFromPos(pos) local house = getHouseFromPos(getThingPos(cid)) doPlayerSendTextMessage(cid, 27, "HouseID: " .. house.id .. ".")
  13. MaXwEllDeN's post in (Resolvido)Dano em certo lugar sem usar area ({3, 1, 0} etc) was marked as the answer   
    Você pode utilizar isso

    doAreaCombatHealth(cid, type, pos, area, min, max, effect)
  14. MaXwEllDeN's post in (Resolvido)Falar saia e o npc desaparecer was marked as the answer   
    if msgcontains(message, 'saia') then local pos_npc = getThingPos(getNpcId()) doRemoveCreature(getNpcId()) addEvent(doCreateNpc, 4*1000, "Fulano", pos_npc) end
  15. MaXwEllDeN's post in (Resolvido)PEDIDO Talkaction 8.54 was marked as the answer   
    Max.xml
    <?xml version="1.0" encoding="UTF-8"?> <npc name="Max" script="max_viagem.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="278" head="58" body="95" legs="95" feet="95" addons="3"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|, gostaria de ir para {rio de janeiro}?"/> <parameter key="message_farewell" value="Good bye."/> </parameters> </npc> max_viagem.lua
    local pos = {x = 160, y = 54, z = 7} -- DESTINO 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:lower()) end function onThink() npcHandler:onThink() end local talkState = {} function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, "sim") or msgcontains(msg, "yes") then npcHandler:releaseFocus(cid) doTeleportThing(cid, pos) doSendMagicEffect(pos, 10) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  16. MaXwEllDeN's post in (Resolvido)[ERRO] Login.lua AJUDA was marked as the answer   
    local config = { loginMessage = getConfigValue('loginMessage') } function onLogin(cid) local loss = getConfigValue('deathLostPercent') if (loss ~= nil) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) end local accountManager = getPlayerAccountManager(cid) if (accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if (lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else str = str .. " Please choose your outfit." doPlayerSendOutfitWindow(cid) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif (accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif (accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") end if (not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end registerCreatureEvent(cid, "Mail") registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid, "killer") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "attackguild") registerCreatureEvent(cid, "advance") registerCreatureEvent(cid, "FimVip") registerCreatureEvent(cid, "forever amulet") registerCreatureEvent(cid, "SkullCheck") registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "PlayerKill") registerCreatureEvent(cid, "onPrepareDeath") registerCreatureEvent(cid, "ZombieAttack") if (InitArenaScript ~= 0) then InitArenaScript = 1 -- make arena rooms free for i = 42300, 42309 do setGlobalStorageValue(i, 0) setGlobalStorageValue(i+100, 0) end end -- if he did not make full arena 1 he must start from zero if getPlayerStorageValue(cid, 42309) < 1 then for i = 42300, 42309 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 2 he must start from zero if getPlayerStorageValue(cid, 42319) < 1 then for i = 42310, 42319 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 3 he must start from zero if getPlayerStorageValue(cid, 42329) < 1 then for i = 42320, 42329 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42355) == -1 then setPlayerStorageValue(cid, 42355, 0) -- did not arena level end setPlayerStorageValue(cid, 42350, 0) -- time to kick 0 setPlayerStorageValue(cid, 42352, 0) -- is not in arena return true end
  17. MaXwEllDeN's post in (Resolvido)[DUVIDA] Verificação players (função getTop()) was marked as the answer   
    Não estava funcionando porque skill possuía um valor nulo, já que não foi declarado. Tenta assim:
    local function getTop() -- função by vodkart local query = db.getResult("SELECT `name`, `level` FROM `players` WHERE `id` > 6 AND `group_id` < 2 ORDER BY `level` DESC, `name` ASC;") if (query:getID() ~= -1) then return {query:getDataString("name"),query:getDataInt("level")} end return false end function onAdvance(cid, skill, oldLevel, newLevel) local top = getTop() if skill == 8 then if newLevel > top[2] and getCreatureName(cid) ~= top[1] then doBroadcastMessage(getCreatureName(cid).." é o novo TOP do servidor, ele está no level " .. newLevel .. ".", 22) end end return true end
  18. MaXwEllDeN's post in (Resolvido)Alavanca para Teleport was marked as the answer   
    local pos_certa = {x = 1884, y = 1034, z = 11} -- Quando as alavancas estiverem na posição correta local pos_errada = {x = 1834, y = 1017, z = 11} -- Quando as alavancas não estiverem na posição correta local alavancas = { [1] = {x = 160, y = 54, z = 7}, [2] = {x = 160, y = 54, z = 7}, [3] = {x = 160, y = 54, z = 7}, [4] = {x = 160, y = 54, z = 7}, [5] = {x = 160, y = 54, z = 7}, } local levers = { -- Estado inicial [1] = "e", [2] = "e", [3] = "e", [4] = "e", [5] = "e", } local aux = {"e", "d"} function onStepIn(cid) for id, pos in ipairs(alavancas) do local itemid = levers[id] == "e" and 1945 or 1946 if getTileItemById(pos, itemid).uid < 100 then doSendMagicEffect(getThingPos(cid), 10) doTeleportThing(cid, pos_errada) doSendMagicEffect(getThingPos(cid), 10) return true end end doSendMagicEffect(getThingPos(cid), 10) doTeleportThing(cid, pos_certa, true) doSendMagicEffect(getThingPos(cid), 10) for id, pos in ipairs(alavancas) do local itemid = levers[id] == "e" and 1945 or 1946 local lv = getTileItemById(pos, itemid).uid if lv > 100 then doTransformItem(lv, math.random(1945, 1946)) end end return true end
  19. MaXwEllDeN's post in (Resolvido)[Ajuda] Recompensa diaria was marked as the answer   
    local config = { storage = 27364, exhauststorage = 20932, days = { ["Monday"] = {itemid = 2476, count = 1, storagevalue = 1}, ["Tuesday"] = {itemid = 2488, count = 1, storagevalue = 2}, ["Wednesday"] = {itemid = 2195, count = 1, storagevalue = 3}, ["Thursday"] = {itemid = 2497, count = 1, storagevalue = 4}, ["Friday"] = {itemid = 2270, count = 1, storagevalue = 5}, ["Saturday"] = {itemid = 2141, count = 1, storagevalue = 6}, ["Sunday"] = {itemid = 2656, count = 1, storagevalue = 7} }, } function onUse(cid, item, fromPosition, itemEx, toPosition) local x = config.days[os.date("%A",os.time())] if(getPlayerStorageValue(cid, config.storage) == x.storagevalue and os.time() - getPlayerStorageValue(cid, config.exhauststorage) < 86400) then return doPlayerSendCancel(cid, "The chest is empty, come back tomorrow for a new reward.") end local info = getItemInfo(x.itemid) if(x.count > 1) then text = x.count .. " " .. info.plural else text = info.article .. " " .. info.name end local item = doCreateItemEx(x.itemid, x.count) if(doPlayerAddItemEx(cid, item, false) ~= RETURNVALUE_NOERROR) then doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) text = "You have found a reward weighing " .. getItemWeight(item) .. " oz. It is too heavy or you have not enough space." else text = "You have received " .. text .. "." setPlayerStorageValue(cid, config.storage, x.storagevalue) setPlayerStorageValue(cid, config.exhauststorage, os.time()) end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, text) return true end
  20. MaXwEllDeN's post in (Resolvido)Conclui todas as Quest receber premio was marked as the answer   
    local quests = { anihi = 5010, lvp = 100, gh = 2471, poi = 5561, dh = 1007, dl = 8943 }     local STORAGE_PREMIO = 2683 local PREMIO_ID = 2469 function onSay(cid, words, param) if getPlayerStorageValue(cid, STORAGE_PREMIO) > 0 then doPlayerSendCancel(cid, "Você já recebeu seu prêmio.") return true end   for _, v in pairs(quests) do if getPlayerStorageValue(cid, v) < 1 then doPlayerSendTextMessage(cid, 20, "Voce nao completou todas as principais quests do servidor, complete-as e depois use este comando para ganhar seu premio.") return true end end      doPlayerSendTextMessage(cid, 20, "Voce ja completou as principais quests do Servidor, e por isso, ganhara um bom premio.")    doPlayerAddItem(cid, PREMIO_ID, 1)    setPlayerStorageValue(cid, STORAGE_PREMIO, 1)    return true end  
  21. MaXwEllDeN's post in (Resolvido)encrypted password was marked as the answer   
    encryptionType = "plain" Change this to 
     

    encryptionType = "sha1"
  22. MaXwEllDeN's post in (Resolvido)[Script] Npc Teleport was marked as the answer   
    local DESTINO = {x = 160, y = 54, z = 7} -- POSIÇÃO DE DESTINO local SAFFRON = {x = 160, y = 54, z = 7} -- POSIÇÃO DE Saffron   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:lower())   end function onThink()                  npcHandler:onThink()                  end local talkState = {}   function creatureSayCallback(cid, type, msg)    if(not npcHandler:isFocused(cid)) then       return false    end      local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid      if msgcontains(msg, "sim") or msgcontains(msg, "yes") then       selfSay("Aí está!", cid)       doSendMagicEffect(getThingPos(cid), 10)       npcHandler:releaseFocus(cid)       doTeleportThing(cid, DESTINO)       doSendMagicEffect(DESTINO, 10)    elseif msgcontains(msg, "nao") or msgcontains(msg, "no") then       selfSay("Aí está!", cid)       doSendMagicEffect(getThingPos(cid), 10)       npcHandler:releaseFocus(cid)       doTeleportThing(cid, SAFFRON)       doSendMagicEffect(SAFFRON, 10)    end      return true end     npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Amigo, aprenda a usar vírgulas. Por causa da falta delas não entendi bem o que você queria.
  23. MaXwEllDeN's post in (Resolvido)Npc travel por storage was marked as the answer   
    local STORAGE = 5021 -- Storage necessária para viajar local DESTINO = {x = 160, y = 54, z = 7} -- POSIÇÃO DE DESTINO   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:lower())   end function onThink()                  npcHandler:onThink()                  end local talkState = {}   function creatureSayCallback(cid, type, msg)    if(not npcHandler:isFocused(cid)) then       return false    end      local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid      if msgcontains(msg, "cinnabar") then       selfSay("Você deseja ser teletransportado para cinnabar?", cid)       talkState[talkUser] = 1    elseif msgcontains(msg, "yes") and talkState[talkUser] == 1 then       if getPlayerStorageValue(cid, STORAGE) > 0 then          selfSay("Aí está!", cid)          doSendMagicEffect(getThingPos(cid), 10)          npcHandler:releaseFocus(cid)          doTeleportThing(cid, DESTINO)          doSendMagicEffect(DESTINO, 10)       else          selfSay("Me desculpe, mas você não tem acesso a cinnabar.", cid)       end       talkState[talkUser] = 0    end      return true end     npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())  
  24. MaXwEllDeN's post in (Resolvido)Como que liga o auto-boder ? was marked as the answer   
    No RME é só apertar A, no teclado.
  25. MaXwEllDeN's post in (Resolvido)Display numérico de pots e magias was marked as the answer   
    Haha, por nada  
     
    Marca alí como Melhor Resposta, para que o tópico seja identificado como resolvido!

Informação Importante

Confirmação de Termo