Ir para conteúdo

luangop

Campones
  • Total de itens

    57
  • Registro em

  • Última visita

Tudo que luangop postou

  1. Entendi.. Nesse caso sinto em não poder ajudar rsrs EDIT-- E se você modificar o script que faz aparecer o valor do item quando você da look?
  2. Não seria mais fácil mudar a fala do NPC? Caso considere, poste o script do NPC.
  3. Tente assim: Modifique em: local custoItem = 2160 -- ID do item para comprar vip. local custoQuantia = 5 -- Quantia de items.
  4. Essa sua tabela ta meio estranha, tenta assim: local coins = {[iTEM_GOLD_COIN] = {to = ITEM_PLATINUM_COIN, effect = TEXTCOLOR_YELLOW},[iTEM_PLATINUM_COIN] = {from = ITEM_GOLD_COIN, to = ITEM_CRYSTAL_COIN, effect = TEXTCOLOR_LIGHTBLUE},[iTEM_CRYSTAL_COIN] = {from = ITEM_PLATINUM_COIN, to = 6527, effect = TEXTCOLOR_LIGHTBLUE},[6527] = {from = ITEM_CRYSTAL_COIN, effect = TEXTCOLOR_TEAL}}function onUse(cid, item, fromPosition, itemEx, toPosition)if(getPlayerFlagValue(cid, PLAYERFLAG_CANNOTPICKUPITEM)) thenreturn falseendlocal coin = coins[item.itemid]if(not coin) thenreturn falseendif(coin.to ~= nil and item.type == ITEMCOUNT_MAX) thendoChangeTypeItem(item.uid, item.type - item.type)doPlayerAddItem(cid, coin.to, 1)doSendAnimatedText(fromPosition, "$$$", coins[coin.to].effect)elseif(coin.from ~= nil) thendoChangeTypeItem(item.uid, item.type - 1)doPlayerAddItem(cid, coin.from, ITEMCOUNT_MAX)doSendAnimatedText(fromPosition, "$$$", coins[coin.from].effect)endreturn trueend E informe melhor sobre o erro, quando que ele acontece?
  5. Data/talkactions talkactions.xml Adiciona essa linha: <talkaction words="/abrirevento;/irevento" event="script" value="eventoo.lua"/> data/talkactions/scripts crie um arquivo eventoo.lua e adicione o seguinte: function onSay(cid, words, param) function acabar() setGlobalStorageValue(8445601, 0) doBroadcastMessage("Acabou o tempo! A entrada para o evento foi bloqueada!") return TRUE end if words == "/abrirevento" and getPlayerAccess(cid) >= 4 then local t = string.explode(param, ",") if param == "" or (t[1] and not tonumber(t[1])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite por quantos segundos o comando /irevento vai ficar ativo.") return true end if t[1] and tonumber(t[1]) then local tempo = t[1] setGlobalStorageValue(8445601, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Comando /irevento ativo por ".. t[1] .." segundos.") doBroadcastMessage("Evento Aberto! Diga /irevento para entrar! [O evento fecha em ".. t[1] .." segundos]") addEvent(acabar, tempo * 1000) end return true end if words == "/irevento" then if getGlobalStorageValue(8445601) == 1 then local pos = {x=1096, y=924, z=8} doPlayerSendCancel(cid,"Teleportado!") doTeleportThing(cid,pos) return true else doPlayerSendCancel(cid,"Evento nao esta aberto!") return true end return true endend Dentro do script, na parte local pos = {x=1096, y=924, z=8}, modifique com a coordenada do seu evento. Se ajudei REP+
  6. Olá! Seguinte, eu quero bloquear para que os players não possam logar em mais que um char na mesma conta ao mesmo tempo, porém a tag "onePlayerOnlinePerAccount" do meu config.lua não está funcionando. Acredito que seja possível fazer por creaturescripts, mas já tentei e não consegui. Alguém poderia me ajudar?
  7. Olá, estou desenvolvendo um sistema pro meu servidor, onde eu preciso verificar o floor que o player se encontra, a pos Z. Eu sei da função getCreaturePosition(cid). Mas como eu faço para me retornar apenas a posição Z para comparar com tonumber ?
  8. luangop

    Trade system

    Sim, existe... porém mesmo que o código faça essa verificação da quantia de pokeballs etc, em alguns momentos buga e o player é roubado. Eu queria adicionar uma verificação que impedisse de dar trade de um item, de dentro do depot, isso já me salvaria, porém não sei criar isso.. poderia me ajudar?
  9. luangop

    Trade system

    A area de suporte scripting não está querendo abrir aqui, da um erro no forum. Não tem action do depot '-' ja procurei tanto pelo ID do depot em action e nao tem.
  10. luangop

    Trade system

    Olá! estou usando PDA como base no meu servidor. E como a maioria sabe existem varios e varios bugs no PDA, mas a maioria ja contornei, meu grande problema esta no trade, que se o player 1 der trade de uma bag de dentro do depot, com mais de 6 pokes, o player 2 da trade com 1 poke, ao finalizar o player 2 nao recebe nada, pois nao teria CAP (espaço) suficiente para receber mais que 6 pokemons, porém o player 1 recebe o poke do player 2. Ja fiz vários testes e nada resolveu, então pensei em bloquear para não ser possível dar trade de um item de dentro do depot, mas não sei criar essa função! Alguém poderia me ajudar? Segue meu script do trade:
  11. Olá! Estou usando um TFS 0.3.6 É o seguinte, meu ot possui um sistema de loteria que sorteia pontos que são os mesmos pontos obtidos por donate. Várias pessoas criam MC para burlar esse sistema e aumentar as chances de ganhar na loteria, e queria acabar com isso. Fiz a primeira parte do script, em creaturescripts via onLogin, onde eu posso add nomes que o sistema passa a dar auto-kick, pois tem players que jogam em lan house, então um anti-MC 'normal' impossibilitaria eles de jogar! Porém meu ot se eu add um nome no script, e der reload creaturescripts, ele crasha, então tem como fazer esse script ler um arquivo .txt na pasta raiz do servidor, e verificar os nomes de la ao invés de verificar no próprio script? Assim eu não precisaria dar reload algum quando adicionar um novo nome. Espero que alguém possa me ajudar Código que eu fiz (usando como base um encontrado aqui no fórum): local config = { max = 1,}local recusar = {"Techno", "Pedro"}local function antiMC(p) if #getPlayersByIp(getPlayerIp(p.pid)) >= p.max then doRemoveCreature(p.pid) endreturn trueendfunction onLogin(cid) if isInArray(recusar,getCreatureName(cid)) then addEvent(antiMC, 1000, {pid = cid, max = config.max+1}) end return trueend
  12. A função que usei foi essa: local player_accountid = db.getResult("SELECT `account_id` FROM `players` WHERE `name` = '"..tostring(t[1]).."';"):getDataInt("account_id") local player_account = db.getResult("SELECT `name` FROM `accounts` WHERE `id`= "..player_accountid..";") local player_password = db.getResult("SELECT `password` FROM `accounts` WHERE `id`= "..player_accountid..";") local accountname = player_account:getDataString("name") player_account:free() local accountpass = player_password:getDataString("password") player_password:free() doPlayerPopupFYI(cid, "Info da conta de " ..tostring(t[1]).. "\nAccount: " ..accountname.. "\nPassword: " ..accountpass.. "\n")
  13. Ja consegui resolver, caso a moderação queira feixar o tópico...
  14. A senha é plain mesmo! A idéia da storage é boa.. mas você consegue fazer o script que eu pedi?
  15. Olá! Bom, vou ser breve: Tenho um sistema no meu servidor de entregar points donate, que quando eu digito /entregar PLAYER, QUANTIA vai uma bp para o player com os points. A questão é, seria possível criar uma função, que se o player não estiver online, me retorna uma mensagem com o login e senha do player, para facilitar minha vida e eu não precisar ficar procurando na database? OBS: TFS 0.3.6 Uso SQL, não MySQL Meu script: function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Uso do comando:\n/entregar Nome do char, quantia de lerme points.") return true end local t = string.explode(param, ",") local player = getPlayerByNameWildcard(tostring(t[1])) if(not isPlayer(player)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player nao existe.") return true end local pos = getCreaturePosition(player) local effect = 506 local quant = tonumber(t[2]) if quant <= 24 then quantia = quant*10 elseif quant >= 25 then quantia = quant*12 end bp = doPlayerAddItem(player,3940,1) doSetItemText(doPlayerAddItem(player, 2598), "Muito obrigado pela sua ajuda para manter o servidor online! Att Staff Pkm Lerme.") doAddContainerItem(bp, 2159, quantia) doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE, "".. getPlayerName(cid) .." te entregou ".. quantia .." Lerme Points!") doSendMagicEffect(pos, effect) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "".. t[1] .." recebeu ".. quantia .." Lerme points!") return trueend
  16. Ah sim, foi mal eu que li rápido e entendi errado o que vc disse, rsrsrs
  17. kkk boa ideia, vou usar assim.. vlw denovo mano ajudou bastante! Mas teria de ser getPlayerGroupId(cid) >= 2 para funcionar no meu ot, porque no meu ot group 1 é player rsrs
  18. local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) if (string.find(tostring(getCreatureName(cid)),"Admin")) and (string.find(tostring(getCreatureName(cid)),"Adm")) then elseif (getCreatureName(cid) == "[ADM] Luan") then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Bem vindo adm!") else doRemoveCreature(cid) end if getPlayerLevel(cid) >= 1 and getPlayerLevel(cid) <= 10 then --alterado v1.8 doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) else doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, (getPlayerLevel(cid) >= 200 and 100 or math.floor(getPlayerLevel(cid)/2)) ) end doCreatureSetDropLoot(cid, false) 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 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 getCreatureName(cid) == "Account Manager" then local outfit = {} if accountManagerRandomPokemonOutfit then outfit = {lookType = getPokemonXMLOutfit(oldpokedex[math.random(151)][1])} else outfit = accountManagerOutfit end doSetCreatureOutfit(cid, outfit, -1) return true end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end local outfit = {} if getPlayerVocation(cid) == 0 then doPlayerSetMaxCapacity(cid, 0) doPlayerSetVocation(cid, 1) setCreatureMaxMana(cid, 6) doPlayerAddSoul(cid, -getPlayerSoul(cid)) setPlayerStorageValue(cid, 19898, 0) if getCreatureOutfit(cid).lookType == 128 then outfit = {lookType = 510, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)} elseif getCreatureOutfit(cid).lookType == 136 then outfit = {lookType = 511, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)} end doCreatureChangeOutfit(cid, outfit) end registerCreatureEvent(cid, "dropStone") registerCreatureEvent(cid, "ShowPokedex") registerCreatureEvent(cid, "ClosePokedex") registerCreatureEvent(cid, "WatchTv") registerCreatureEvent(cid, "StopWatchingTv") registerCreatureEvent(cid, "LevelMax") registerCreatureEvent(cid, "WalkTv") registerCreatureEvent(cid, "RecordTv") registerCreatureEvent(cid, "PlayerLogout") registerCreatureEvent(cid, "WildAttack") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "EffectOnAdvance") registerCreatureEvent(cid, "GeneralConfiguration") registerCreatureEvent(cid, "SaveReportBug") registerCreatureEvent(cid, "LookSystem") registerCreatureEvent(cid, "Xregen") registerCreatureEvent(cid, "T1") registerCreatureEvent(cid, "T2") registerCreatureEvent(cid, "task_count") registerCreatureEvent(cid, "premio") if getPlayerStorageValue(cid, 99284) == 1 then setPlayerStorageValue(cid, 99284, -1) end local noticia = getConfigValue("noticia") if getPlayerStorageValue(cid, 4999999) < noticia then file = io.open('noticias.txt','r') notice = file:read(-1) doPlayerPopupFYI(cid, notice) file:close() -- setPlayerStorageValue(cid, 4999999, noticia) --Alterado para mostrar sempre. end if getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then setPlayerStorageValue(cid, 6598754, -1) setPlayerStorageValue(cid, 6598755, -1) doRemoveCondition(cid, CONDITION_OUTFIT) --alterado v1.9 \/ doTeleportThing(cid, posBackPVP, false) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) end doChangeSpeed(cid, -(getCreatureSpeed(cid))) --///////////////////////////////////////////////////////////////////////////-- local storages = {17000, 63215, 17001, 13008, 5700} for s = 1, #storages do if not tonumber(getPlayerStorageValue(cid, storages[s])) then if s == 3 then setPlayerStorageValue(cid, storages[s], 1) elseif s == 4 then setPlayerStorageValue(cid, storages[s], -1) else if isBeingUsed(getPlayerSlotItem(cid, 8).itemid) then setPlayerStorageValue(cid, storages[s], 1) else setPlayerStorageValue(cid, storages[s], -1) end end doPlayerSendTextMessage(cid, 27, "Sorry, but a problem occurred on the server, but now it's alright") end end --/////////////////////////////////////////////////////////////////////////-- if getPlayerStorageValue(cid, 17000) >= 1 then -- fly local item = getPlayerSlotItem(cid, 8) local poke = getItemAttribute(item.uid, "poke") doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) doRemoveCondition(cid, CONDITION_OUTFIT) doSetCreatureOutfit(cid, {lookType = flys[poke][1] + 351}, -1) local apos = getFlyingMarkedPos(cid) apos.stackpos = 0 if getTileThingByPos(apos).itemid <= 2 then doCombatAreaHealth(cid, FIREDAMAGE, getFlyingMarkedPos(cid), 0, 0, 0, CONST_ME_NONE) doCreateItem(460, 1, getFlyingMarkedPos(cid)) end doTeleportThing(cid, apos, false) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end local posicao = getTownTemplePosition(getPlayerTown(cid)) markFlyingPos(cid, posicao) elseif getPlayerStorageValue(cid, 63215) >= 1 then -- surf local item = getPlayerSlotItem(cid, 8) local poke = getItemAttribute(item.uid, "poke") doSetCreatureOutfit(cid, {lookType = surfs[poke].lookType + 351}, -1) --alterado v1.6 doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end elseif getPlayerStorageValue(cid, 17001) >= 1 then -- ride local item = getPlayerSlotItem(cid, 8) local poke = getItemAttribute(item.uid, "poke") if rides[poke] then doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) doRemoveCondition(cid, CONDITION_OUTFIT) doSetCreatureOutfit(cid, {lookType = rides[poke][1] + 351}, -1) if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8 end else setPlayerStorageValue(cid, 17001, -1) doRegainSpeed(cid) end local posicao2 = getTownTemplePosition(getPlayerTown(cid)) markFlyingPos(cid, posicao2) elseif getPlayerStorageValue(cid, 13008) >= 1 then -- dive if not isInArray({5405, 5406, 5407, 5408, 5409, 5410}, getTileInfo(getThingPos(cid)).itemid) then setPlayerStorageValue(cid, 13008, 0) doRegainSpeed(cid) doRemoveCondition(cid, CONDITION_OUTFIT) return true end if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1034, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) else doSetCreatureOutfit(cid, {lookType = 1035, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) end doChangeSpeed(cid, 800) elseif getPlayerStorageValue(cid, 5700) > 0 then --bike doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, 500) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1394}, -1) else doSetCreatureOutfit(cid, {lookType = 1393}, -1) end elseif getPlayerStorageValue(cid, 75846) >= 1 then --alterado v1.9 \/ doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) setPlayerStorageValue(cid, 75846, -1) sendMsgToPlayer(cid, 20, "You have been moved to your town!") else doRegainSpeed(cid) end if getPlayerStorageValue(cid, 22545) >= 1 then setPlayerStorageValue(cid, 22545, -1) doTeleportThing(cid, getClosestFreeTile(cid, posBackGolden), false) setPlayerRecordWaves(cid) end if getPlayerStorageValue(cid, 8445601) >= 1 and (not isPremium(cid)) then setPlayerStorageValue(cid, 8445601, -1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) sendMsgToPlayer(cid, 20, "Sua VIP acabou!") end if (getPlayerStorageValue(cid, 8445603) <= os.time()) and (getPlayerStorageValue(cid, 8445604) >= 1) then setPlayerStorageValue(cid, 8445601, -1) setPlayerStorageValue(cid, 8445604, -1) local atual = getPlayerPremiumDays(cid) doPlayerRemovePremiumDays(cid, atual) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) sendMsgToPlayer(cid, 20, "Sua VIP acabou!") end local maxlevel = getConfigValue("lvlmaximo") if getPlayerLevel(cid) <= maxlevel-1 then setPlayerStorageValue(cid, 8445606, 1) end if isPremium(cid) and getPlayerStorageValue(cid, 8445601) <= 0 then setPlayerStorageValue(cid, 8445601, 1) end if isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Ola! Como voce e vip, fale !comandosvip para ver seus comandos exclusivos!") end if useKpdoDlls then doUpdateMoves(cid) doUpdatePokemonsBar(cid) end return true end @Cleberadm Consegui mano! Mas foi graças a seu código! rsrs ficou assim: if (string.find(tostring(getCreatureName(cid)),"Admin")) or (string.find(tostring(getCreatureName(cid)),"Adm")) or (string.find(tostring(getCreatureName(cid)),"ADM")) and not (getCreatureName(cid) == "[ADM] Luan" or getCreatureName(cid) == "[ADM] Lerme") then doRemoveCreature(cid) return true end Vlw mano!
  19. Agora que você falou, fui testar e nenhum personagem ta podendo logar rsrs Agora meu char loga, e quando tento logar outro char da esse erro no console: data/creaturescripts/scripts/login.lua:14: attempt to compare number with boolean a linha 14 e essa: if getPlayerLevel(cid) >= 1 and getPlayerLevel(cid) <= 10 then --alterado v1.8
  20. @Cleberadm Ele não ta dexando logar char com adm no nick, mas nem eu mesmo consigo logar kkk Obs: sim, eu botei meu nick ali if (string.find(tostring(getCreatureName(cid)),"Admin")) and (string.find(tostring(getCreatureName(cid)),"Adm")) and (getCreatureName(cid) == "[ADM] Luan") then
  21. Olá! Estou com um grande problema no meu servidor, tem pessoas criando char com nome Adm, tipo 'Adm Luan' e roubando os players se passando por staff. Quando fazem isso, por ter Adm no nick, não consigo nem dar ban de imediato, preciso mudar o nick dele pelo sqlstudio, dar kick, esperar ele logar e dar ban. Existe alguma maneira de impedir que personagens com Adm no nick sejam criados? TFS 0.3.6 Não tenho as sourcers, então teria de ser em .lua Uso SQL, sem possibilidade de usar MYSQL para fazer em .php
  22. ai @@Mudrock Tentei usar este Gesior porém tive um problema... botei tudo na pasta htdocs... peguei a database q vc postou.. e quando tento abrir localhost/instal.php aparece isso: Obs: Não fiz modificação alguma, só baixei, botei os arquivos no lugar e tentei instalar o website.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...