Ir para conteúdo

luangop

Campones
  • Total de itens

    57
  • Registro em

  • Última visita

Posts postados por luangop

  1. 49 minutos atrás, Josegvb disse:

     

    npc nao tem fala alguma, é um npc de trade q multiplica o valor do item pela quantidade

     

    de qualquer jeito só pra vc ver ai o script do npc

      Mostrar conteúdo oculto

    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

    npcHandler:addModule(FocusModule:new())

     

     

    é isso ^^ e nao eu prefiro mduar o preço tb quero q nao apareça mais esse "gold coins" 

      Mostrar conteúdo oculto

    <?xml version="1.0" encoding="UTF-8"?>

    <npc name="Mark" script="default.lua" walkinterval="0" floorchange="0" speed="0">

    <health now="150" max="150"/>

    <look type="606" head="91" body="114" legs="86" feet="0"/>

    <parameters>

    <parameter key="message_greet" value="Olá amigo consumidor, eu tenho artigos para lhe ajudar em sua jornada, diga {trade} para ver as ofertas, ou {sell mais nome do item} para me vender algum loot!!"/>

    <parameter key="message_farewell" value="Good bye!"/>

    <parameter key="message_idletimeout" value="Good bye!"/>

    <parameter key="message_walkaway" value="Good bye!"/>

    <parameter key="module_shop" value="1"/>

    <parameter key="shop_buyable" value= "poke ball,2394,500;

    great ball,2391,2000;

    super ball,2393,5000;

    ultra ball,2392,13000;

    small potion,12347,500;

    great potion,12348,1000;

    ultra potion,12346,2200;

    hyper potion,12345,5000;

    full restore,12343,10000;

    revive,12344,25000;

    medicine,12349,1000;"/>

    <parameter key="shop_sellable" value= "electric box,12176,2000;

    nail,12157,1000;

    sandbag,12177,2000;

    comb,12179,5000;

    fur,12181,3300;

    ruby,12188,8000;

    essence of fire,12162,50;

    small stone,12337,50;

    pot of moss bug,12171,200;

    screw,12164,50;

    straw,2694,50;

    water gems,12161,50;

    remains of magikarp,12334,100;

    teeth,12175,200;

    bottle of poison,12165,50;

    water pendant,12170,200;

    feather,12200,500;

    seed,12163,50;

    pair of leaves,12155,200;

    apple bite,12173,200;

    bat wing,12182,400;

    pot of lava,12152,400;

    fire pendant,12286,200;

    bug venom,12185,400;

    bug antenna,12184,400;

    venom pendant,12282,200;

    pot of venom,12288,400;

    iron bracelet,12192,50;

    ice orb,12201,500;

    gosme,12202,500;

    darkness gem,12745,50;

    bug gosme,13783,50;

    enchanted gem,13785,50;

    horn,13789,1000;"/>

    </parameters>

    </npc>

     

    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. 2 horas atrás, Josegvb disse:

    ola xtibianos dessa ves to chegando pra pedir 1 ajudinha em uma coisa basica, no DINHEIRO do servidor

    eu uso a base DxP 

    o problema é que tipo queria colocase o preço real dos items e coisas, tipo um NAIL, o valor de cada um é 10$, ao juntar 100 seriam 1k = 1000

    mas no script pra o npc vender por 10$ eu preciso configurar assim:

     

    nail,12157,1000;

     

    sendo entao no jogo 1000 seria 10$....

    ai quando tu fala pra o npc sell 1 nail ele responde

     

    Do you want to sell 1 nail for 1000 gold coins?

     

    ai eles pegam 10$...

    entao queria saber como eu faço pra arrumar o valor das granas? eu quero que 10 seja 10$ nao 1000 sendo 10$

     

    Não seria mais fácil mudar a fala do NPC? 

    Caso considere, poste o script do NPC.

  3. 10 horas atrás, Caktchup disse:

    Olá galera, to com 1 ot, aqui queria que alguem se tive-se gentileza modificar esse script. de Vip, tipo ele e aquele !Buyvip remove 2kk, queria coloca para ele remover X item e uma quantidade

     

     

      Mostrar conteúdo oculto

    -- Script SYtem vip 1.0 --

    function onSay(cid, words, param)

    if(words == "!buyvip") then

    local price = 2000000

    if doPlayerRemoveMoney(cid, 2000000) == TRUE then

    local days = 30

    local daysvalue = days * 24 * 60 * 60

    local storageplayer = getPlayerStorageValue(cid, 13540)

    local timenow = os.time()

    if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then

    time = timenow + daysvalue

    else

    time = storageplayer + daysvalue

    end

    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.")

    setPlayerStorageValue(cid, 13540, time)

    local quantity = math.floor((getPlayerStorageValue(cid, 13540) - timenow)/(24 * 60 * 60))

    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.")

    else

    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa de "..price.." gp's para colocar vip.")

    end

    elseif(words == "!vipdays") then

    local timenow = os.time()

    local quantity = math.floor((getPlayerStorageValue(cid, 13540) - timenow)/(24 * 60 * 60))

    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no seu character.")

    elseif(words == "/checkvip") then

    if getPlayerAccess(cid) == 5 then

    if not param then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")

    end

    local player = getPlayerByName(param)

    local pid = getPlayerByNameWildcard(param)

    if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.")

    return TRUE

    end

    local timenow = os.time()

    local quantity = math.floor((getPlayerStorageValue(player, 13540) - timenow)/(24 * 60 * 60))

    doPlayerPopupFYI(cid, "O jogador tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no character.") 

    return TRUE

    end

    elseif(words == "/addvip") then

    if getPlayerAccess(cid) == 5 then

    local t = string.explode(param, ",")

    if not t[2] then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")

    end

    local player = getPlayerByName(t[1])

    local days = t[2]

    local pid = getPlayerByNameWildcard(t[1])

    if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.")

    return TRUE

    end

    local daysvalue = days*3600*24

    local storageplayer = getPlayerStorageValue(player, 13540)

    local timenow = os.time()

    local time = storageplayer <= 0 and (timenow + daysvalue) or (storageplayer + daysvalue)

    doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adicionados "..days.." dias de VIP no seu character.")

    setPlayerStorageValue(player, 13540, time)

    local quantity = math.floor((getPlayerStorageValue(player,13540) - timenow)/(3600*24))

    doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem "..quantity.." dias de VIP restantes.")

    end

    elseif(words == "/delvip") then

    if getPlayerAccess(cid) == 5 then 

    local dec = MESSAGE_INFO_DESCR

    if(param == "") then return TRUE,doPlayerSendTextMessage(cid,18,"Command param required.")end

    local C,t = {},string.explode(param, ",")

    C.pos = getPlayerPosition(cid)

    C.uid = getCreatureByName(t[1])

    C.time = ((tonumber(t[2]) == nil) and 1 or tonumber(t[2]))*3600*24 --Tempo da vip por dia.

    C.days = (tonumber(t[2]) == nil) and 1 or tonumber(t[2]) --Dias de vip.

    local pid = getPlayerByNameWildcard(t[1])

    if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.")

    return TRUE

    end

    if(getPlayerStorageValue(C.uid,13540) < C.time)then

    doPlayerSendTextMessage(cid,dec,'O jogador '..t[1]..' não possui '..C.days..' dias de vip.')

    else

    doPlayerSendTextMessage(cid,dec,'Você removeu '..C.days..' dias de vip do player '..t[1]..'.')

    setPlayerStorageValue(C.uid,13540,getPlayerStorageValue(C.uid,13540)-C.time)

    end

    doSendMagicEffect(C.pos, math.random(28,30)) 

    end

    end

    return TRUE

    end

     

    Tente assim:

    Spoiler

    -- Script SYtem vip 1.0 --

    function onSay(cid, words, param)

        if(words == "!buyvip") then

            local custoItem = 2160 -- ID do item para comprar vip.

            local custoQuantia = 5 -- Quantia de items.

            if doPlayerRemoveItem(cid, custoItem, custoQuantia) == TRUE then

                local days = 30

                local daysvalue = days * 24 * 60 * 60

                local storageplayer = getPlayerStorageValue(cid, 13540)

                local timenow = os.time()

                if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then

                    time = timenow + daysvalue

                else

                    time = storageplayer + daysvalue

                end

                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.")

                setPlayerStorageValue(cid, 13540, time)

                local quantity = math.floor((getPlayerStorageValue(cid, 13540) - timenow)/(24 * 60 * 60))

                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.")

            else

                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa de ".. custoQuantia .." ".. getItemNameById(custoItem) .." para colocar vip.")

            end

        elseif(words == "!vipdays") then

            local timenow = os.time()

            local quantity = math.floor((getPlayerStorageValue(cid, 13540) - timenow)/(24 * 60 * 60))

            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no seu character.")

        elseif(words == "/checkvip") then

            if getPlayerAccess(cid) == 5 then

                if not param then

                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")

                end

                local player = getPlayerByName(param)

                local pid = getPlayerByNameWildcard(param)

                if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then

                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.")

                    return TRUE

                end

                local timenow = os.time()

                local quantity = math.floor((getPlayerStorageValue(player, 13540) - timenow)/(24 * 60 * 60))

                doPlayerPopupFYI(cid, "O jogador tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no character.") 

                return TRUE

            end

        elseif(words == "/addvip") then

            if getPlayerAccess(cid) == 5 then

                local t = string.explode(param, ",")

                if not t[2] then

                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")

                end

                local player = getPlayerByName(t[1])

                local days = t[2]

                local pid = getPlayerByNameWildcard(t[1])

                if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then

                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.")

                    return TRUE

                end

                local daysvalue = days*3600*24

                local storageplayer = getPlayerStorageValue(player, 13540)

                local timenow = os.time()

                local time = storageplayer <= 0 and (timenow + daysvalue) or (storageplayer + daysvalue)

                doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adicionados "..days.." dias de VIP no seu character.")

                setPlayerStorageValue(player, 13540, time)

                local quantity = math.floor((getPlayerStorageValue(player,13540) - timenow)/(3600*24))

                doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem "..quantity.." dias de VIP restantes.")

            end

        elseif(words == "/delvip") then

            if getPlayerAccess(cid) == 5 then 

                local dec = MESSAGE_INFO_DESCR

                if(param == "") then return TRUE,doPlayerSendTextMessage(cid,18,"Command param required.")end

                local C,t = {},string.explode(param, ",")

                C.pos = getPlayerPosition(cid)

                C.uid = getCreatureByName(t[1])

                C.time = ((tonumber(t[2]) == nil) and 1 or tonumber(t[2]))*3600*24 --Tempo da vip por dia.

                C.days = (tonumber(t[2]) == nil) and 1 or tonumber(t[2]) --Dias de vip.

                local pid = getPlayerByNameWildcard(t[1])

                if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then

                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.")

                    return TRUE

                end

                if(getPlayerStorageValue(C.uid,13540) < C.time)then

                    doPlayerSendTextMessage(cid,dec,'O jogador '..t[1]..' não possui '..C.days..' dias de vip.')

                else

                    doPlayerSendTextMessage(cid,dec,'Você removeu '..C.days..' dias de vip do player '..t[1]..'.')

                        setPlayerStorageValue(C.uid,13540,getPlayerStorageValue(C.uid,13540)-C.time)

                    end

                    doSendMagicEffect(C.pos, math.random(28,30)) 

                end

            end

            return TRUE

        end

     

    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. Em 03/10/2016 at 21:25, Justiceiro751 disse:

    Alguém poderia me ajudar a criar um script para GM e ADM que bloqueia e desbloqueia um comando ?

    Ex GM/ADM: /abrirevento 15 -- aqui iria abrir o evento por 15 segundos, então o player teria que digitar /irevento dentro de 15 segundos.

    após passar 15 segundos, o player não iria conseguir mais entrar no evento, ou seja, não irá conseguir usar o comando /irevento.

     

    Pergunta: Mas como seria o evento ?

    Resposta: O player seria movido para uma determinada localização no mapa definida pelo criador do script.

    @UP.

     

    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. 26 minutos atrás, dalvorsn disse:

    Adiciona essa função na sua lib:

    function getPlayersOnlineByAccount( accountId )    local ret = {}  for _, uid in pairs(getPlayersOnline()) do    if accountId == getPlayerAccountId(uid) then      table.insert(ret, uid)    end  end  return retend

     

    E no login.lua coloque o seguinte código:

    if getPlayersOnlineByAccount(getPlayerAccountId(cid)) > 1 then  -- mensagem   return falseend

     

    erro.png

    Deu esse erro :/

     

    erro.png.de046b23973f01d3c46908b1c3f3ca99.png

  7. 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?

  8. 1 hora atrás, dalvorsn disse:

    Existe uma creature event chamada onTradeAccept(cid, target, item, targetItem). Observe que voce tem 4 parametros que te possibilitam fazer essa verificação, e outras mais caso queira.

    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. 15 horas atrás, Josegvb disse:

    boa sorte tentando arrumar isso mas area errada, isso é la no suporte scripting

    A area de suporte scripting não está querendo abrir aqui, da um erro no forum.

     

    15 horas atrás, KarlKalvin disse:

    Posso te ajudar a resolver mas como é PDA tem que ser gambiarra vai no action.xml vê qual arquivo tá setando o depot e manda pra mim... aqui

     

    Não tem action do depot '-' ja procurei tanto pelo ID do depot em action e nao tem.

  10. 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:

    Spoiler

    local xhelds = {
    [1] = {name = "X-Defense(Tier: 1)"},
    [2] = {name = "X-Defense(Tier: 2)"},
    [3] = {name = "X-Defense(Tier: 3)"},
    [4] = {name = "X-Defense(Tier: 4)"},
    [5] = {name = "X-Defense(Tier: 5)"},
    [6] = {name = "X-Defense(Tier: 6)"},
    [7] = {name = "X-Defense(Tier: 7)"},
    [8] = {name = "X-Attack(Tier : 1)"},
    [9] = {name = "X-Attack(Tier : 2)"},
    [10] = {name = "X-Attack(Tier: 3)"},
    [11] = {name = "X-Attack(Tier: 4)"},
    [12] = {name = "X-Attack(Tier: 5)"},
    [13] = {name = "X-Attack(Tier: 6)"},
    [14] = {name = "X-Attack(Tier: 7)"},
    [15] = {name = "X-Return(Tier: 1)"},
    [16] = {name = "X-Return(Tier: 2)"},
    [17] = {name = "X-Return(Tier: 3)"},
    [18] = {name = "X-Return(Tier: 4)"},
    [19] = {name = "X-Return(Tier: 5)"},
    [20] = {name = "X-Return(Tier: 6)"},
    [21] = {name = "X-Return(Tier: 7)"},
    [22] = {name = "X-Hellfire(Tier: 1)"},
    [23] = {name = "X-Hellfire(Tier: 2)"},
    [24] = {name = "X-Hellfire(Tier: 3)"},
    [25] = {name = "X-Hellfire(Tier: 4)"},
    [26] = {name = "X-Hellfire(Tier: 5)"},
    [27] = {name = "X-Hellfire(Tier: 6)"},
    [28] = {name = "X-Hellfire(Tier: 7)"},
    [29] = {name = "X-Cooldown(Tier: 1)"},
    [30] = {name = "X-Cooldown(Tier: 2)"},
    [31] = {name = "X-Cooldown(Tier: 3)"},
    [32] = {name = "X-Cooldown(Tier: 4)"},
    [33] = {name = "X-Cooldown(Tier: 5)"},
    [34] = {name = "X-Cooldown(Tier: 6)"},
    [35] = {name = "X-Cooldown(Tier: 7)"},
    [36] = {name = "X-Boost(Tier: 1)"},
    [37] = {name = "X-Boost(Tier: 2)"},
    [38] = {name = "X-Boost(Tier: 3)"},
    [39] = {name = "X-Boost(Tier: 4)"},
    [40] = {name = "X-Boost(Tier: 5)"},
    [41] = {name = "X-Boost(Tier: 6)"},
    [42] = {name = "X-Boost(Tier: 7)"},
    [43] = {name = "X-Agility(Tier: 1)"},
    [44] = {name = "X-Agility(Tier: 2)"},
    [45] = {name = "X-Agility(Tier: 3)"},
    [46] = {name = "X-Agility(Tier: 4)"},
    [47] = {name = "X-Agility(Tier: 5)"},
    [48] = {name = "X-Agility(Tier: 6)"},
    [49] = {name = "X-Agility(Tier: 7)"},
    [50] = {name = "X-Strafe(Tier: 1)"},
    [51] = {name = "X-Strafe(Tier: 2)"},
    [52] = {name = "X-Strafe(Tier: 3)"},
    [53] = {name = "X-Strafe(Tier: 4)"},
    [54] = {name = "X-Strafe(Tier: 5)"},
    [55] = {name = "X-Strafe(Tier: 6)"},
    [56] = {name = "X-Strafe(Tier: 7)"},
    [57] = {name = "X-Rage(Tier: 1)"},
    [58] = {name = "X-Rage(Tier: 2)"},
    [59] = {name = "X-Rage(Tier: 3)"},
    [60] = {name = "X-Rage(Tier: 4)"},
    [61] = {name = "X-Rage(Tier: 5)"},
    [62] = {name = "X-Rage(Tier: 6)"},
    [63] = {name = "X-Rage(Tier: 7)"},
    }

    local yhelds = {
    [1] = {name = "Y-Regeneration(Tier: 1)"},
    [2] = {name = "Y-Regeneration(Tier: 2)"},
    [3] = {name = "Y-Regeneration(Tier: 3)"},
    [4] = {name = "Y-Regeneration(Tier: 4)"},
    [5] = {name = "Y-Regeneration(Tier: 5)"},
    [6] = {name = "Y-Regeneration(Tier: 6)"},
    [7] = {name = "Y-Regeneration(Tier: 7)"},
    [8] = {name = "Y-Cure(Tier: 1)"},
    [9] = {name = "Y-Cure(Tier: 2)"},
    [10] = {name = "Y-Cure(Tier: 3)"},
    [11] = {name = "Y-Cure(Tier: 4)"},
    [12] = {name = "Y-Cure(Tier: 5)"},
    [13] = {name = "Y-Cure(Tier: 6)"},
    [14] = {name = "Y-Cure(Tier: 7)"},
    }

    function onTradeRequest(cid, target, item)

        for a, b in pairs (pokeballs) do
            if b.use == item.itemid then
                doPlayerSendCancel(cid, "You can't trade this item.")
            return false
            end
        end
        
        if isContainer(item.uid) then
           local bagItems = getItensUniquesInContainer(item.uid)
           if #bagItems >= 1 then
              doPlayerSendCancel(cid, "Has a Unique Item in this bag, you can't trade this item.")     --alterado v1.6
              return false
           end     
        elseif getItemAttribute(item.uid, "unique") then    --alterado v1.6
           doPlayerSendCancel(cid, "It is a Unique Item, you can't trade this item.")
           return false
        end   
        
        if isContainer(item.uid) then
           local itens = getPokeballsInContainer(item.uid)
           if #itens >= 1 then                             
              for i = 1, #itens do
                  local lvl = getItemAttribute(itens, "level")
                  local name = getItemAttribute(itens, "poke")
                  if not lvl then
                     doItemSetAttribute(itens, "level", pokes[name].level)     --alterado v1.6
                  end
               end
           end
        elseif isPokeball(item.itemid) then
           local lvl = getItemAttribute(item.uid, "level")
           local name = getItemAttribute(item.uid, "poke")
           if not lvl then
              doItemSetAttribute(item.uid, "level", pokes[name].level)
           end
        end
        
        if getPlayerStorageValue(cid, 52480) >= 1 then             --alterado v1.6.1
           doPlayerSendTextMessage(cid, 20, "You can't do that while be in a duel!")
           return false
        end
        
        if isPokeball(item.itemid) then
           local name = getItemAttribute(item.uid, "poke")            --alterado v1.8 \/
           local boost = getItemAttribute(item.uid, "boost") or 0
           local nick = getItemAttribute(item.uid, "nick") or ""
        
           local str = "Pokemon in trade: "
           str = str.."Name: "..name.."   Boost: "..boost.."   "
           if nick ~= "" then str = str.."Nick: "..nick.."" end
           local heldx = getItemAttribute(item.uid, "heldx")
           local heldy = getItemAttribute(item.uid, "heldy")
           if heldx and heldy then
    str = str.."Holding: "..(xhelds[heldx].name).." and "..(yhelds[heldy].name)..". "
    elseif heldx then
    str = str.."Holding: "..(xhelds[heldx].name)..". "
    elseif heldy then
    str = str.."Holding: "..(yhelds[heldy].name)..". "
    end
           sendMsgToPlayer(target, 20, str)
        end
                                                                --alterado v1.8 \/
        if isContainer(item.uid) then
           local itens = getPokeballsInContainer(item.uid)
           if #itens >= 1 then                             
              for i = 1, #itens do
                  if isPokeball(getThing(itens).itemid) then
                     local name = getItemAttribute(itens, "poke")            
                     local boost = getItemAttribute(itens, "boost") or 0
                     local nick = getItemAttribute(itens, "nick") or ""
                            local heldx = getItemAttribute(itens, "heldx")
           local heldy = getItemAttribute(itens, "heldy")
        
                     local str = "Pokemon in trade: "
                     str = str.."Name: "..name.."   Boost: "..boost.."   "
                     if nick ~= "" then str = str.."Nick: "..nick.."" end
                      if heldx and heldy then
    str = str.."Holding: "..(xhelds[heldx].name).." and "..(yhelds[heldy].name)..". "
    elseif heldx then
    str = str.."Holding: "..(xhelds[heldx].name)..". "
    elseif heldy then
    str = str.."Holding: "..(yhelds[heldy].name)..". "
    end
                     sendMsgToPlayer(target, 20, str)
                     doPlayerSendTextMessage(target, MESSAGE_STATUS_CONSOLE_BLUE, "Cuidado! Se voce esta recebendo pokemons no trade, verifique se tera lugar\nsuficiente na sua bag, considerando que so pode ter 6 pokes na bag.\nCaso nao tenha, recuse o trade ou sera roubado.")
                  end
              end
           end       
        end
        

    return true
    end

    local function noCap(cid, sid)
        if isCreature(cid) then
            doPlayerSendCancel(cid, "You can't carry more than six pokemons, trade cancelled.")
        end
        if isCreature(sid) then
            doPlayerSendCancel(sid, "You can't carry more than six pokemons, trade cancelled.")
        end
    end

    function onTradeAccept(cid, target, item, targetItem)

        local pbs = #getPokeballsInContainer(item.uid)
        local cancel = false
        local p1 = 0
        local p2 = 0
        local itemPokeball = isPokeball(item.itemid) and 1 or 0
        local targetItemPokeball = isPokeball(targetItem.itemid) and 1 or 0

        if getPlayerMana(cid) + itemPokeball > 6 then  --alterado v1.6
           cancel = true
           p1 = cid
        end
        if getPlayerMana(target) + targetItemPokeball > 6 then  --alterado v1.6
           cancel = true
           p2 = target
        end
        
        if pbs > 0 and getCreatureMana(target) + pbs > 6 + targetItemPokeball then
            cancel = true    
            p1 = target
        end

        pbs = #getPokeballsInContainer(targetItem.uid)

        if pbs > 0 and getCreatureMana(cid) + pbs > 6 + itemPokeball then
            cancel = true
            p2 = cid
        end

        if cancel then
            addEvent(noCap, 20, p1, p2)
        return false
        end

        if itemPokeball == 1 and targetItemPokeball == 1 then
            setPlayerStorageValue(cid, 8900, 1)
            setPlayerStorageValue(target, 8900, 1)
        end

    return true
    end

     

  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. 16 minutos atrás, Lumus disse:

    Compartilhe com a comunidade qual foi a solução... as vezes alguém pode ter a mesma dúvida.

    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. 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

     

  14. 8 minutos atrás, Cleberadm disse:

    Eu tava vendo um jeito de ficar melhor, usa o (getPlayerGroupId(cid) == 1) no lugar do -> not (getCreatureName(cid) == "[ADM] Luan" or getCreatureName(cid) == "[ADM] Lerme")

     

    cheguei baixar um aqui pra testar kk tava sem 

    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

  15. 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!

  16. 3 minutos atrás, Cleberadm disse:

    Com outros nomes está entrando? vou ver aqui perai...

    Agora que você falou, fui testar e nenhum personagem ta podendo logar rsrs

    6 minutos atrás, Cleberadm disse:

    Com outros nomes está entrando? vou ver aqui perai...

     

    tenta

     if (string.find(tostring(getCreatureName(cid)),"Admin")) and (string.find(tostring(getCreatureName(cid)),"Adm")) thenelseif (getCreatureName(cid) == "[ADM] Luan") thendoPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Bem vindo adm!")elsedoRemoveCreature(cid)       end 

     

    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

  17.  

    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

     

     

  • Quem Está Navegando   0 membros estão online

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