Jump to content

Hawk Server's

Miembro
  • Contador contenido

    225
  • Ingreso

  • Última visita

  • Días ganados

    5

Mensajes publicados por Hawk Server's

  1. when xxxx.chat."El npc" begin

    say("en 2 horas ven")

    pc.setqf("tiempo",get_time()+7200)

    end

     

    when login or levelup or ... begin

    set_state("elotrostate")

    end

     

    algo así

    Teniendo tu el titulo de "Quest Master"

     

    deberias saber que eso no funcionara correctamente ni xq dios lo quiera xD

     

    xq al hablar con el npc luego cambias pj o vas a otro mapa y cambiara el state automaticamente sin esperar el tiempo...................

  2.  

    prueba con esta.

    -- MySQL
    function split(str, delim, maxNb)
    if str == nil then return str end
    if string.find(str, delim) == nil then return { str } end
    if maxNb == nil or maxNb < 1 then maxNb = 0 end
    local result = {}
    local pat = "(.-)" .. delim .. "()"
    local nb = 0
    local lastPos
    for part, pos in string.gfind(str, pat) do
    nb = nb + 1
    result[nb] = part
    lastPos = pos
    if nb == maxNb then break end
    end
    if nb ~= maxNb then result[nb + 1] = string.sub(str, lastPos) end
    return result
    end
    
    mysql_query = function(query)
    if not pre then
    local rt = io.open('CONFIG', 'r'):read('*all')
    pre = string.gsub(rt, '.+PLAYER_SQL:%s(%S+)%s(%S+)%s(%S+)%s(%S+).+', '-h%1 -u%2 -p%3 -D%4')
    end
    
    math.randomseed(os.time())
    
    local fi, t, out = 'mysql_data_'..math.random(10^9)+math.random(2^4,2^10),{},{}
    os.execute('mysql '..pre..' --e='..string.format('%q', query)..' > '..fi)
    
    for av in io.open(fi, 'r'):lines() do table.insert(t,split(av, '\t')) end; os.remove(fi);
    for i = 2, table.getn(t) do table.foreach(t[i],function(a, b)
    out[i-1] = out[i-1] or {}
    out[i-1][a] = tonumber(b) or b
    out[t[1][a]] = out[t[1][a]] or {}
    out[t[1][a]][i-1] = tonumber(b) or b
    end) end
    return out
    end
    -- End_Of_MySQL
    

    Ahora si puedo retirar pero es raro que no me crea la cuenta joer :/

  3. Si las tengo, si no las tubiera no hiciera el deposito luego de crear la cuenta manualmente :/

    mysql_query = function(query) 
        local rt = io.open('CONFIG','r'):read('*all') 
        local pre= string.gsub(rt,'.+PLAYER_SQL:%s(%S+)%s(%S+)%s(%S+)%s(%S+).+','-h%1 -u%2 -p%3 -D%4') 
        math.randomseed(os.time()) 
        local fi,t,out = 'mysql_data_'..math.random(10^9)+math.random(2^4,2^10),{},{} 
        os.execute('mysql '..pre..' --execute='..string.format('%q',query)..' > '..fi)   
        for av in io.open(fi,'r'):lines() do table.insert(t,split(av,'\t')) end; os.remove(fi); 
        for i = 2, table.getn(t) do table.foreach(t[i],function(a,b) 
            out[i-1]        = out[i-1] or {} 
            out[i-1][a]        = b 
            out[t[1][a]]    = out[t[1][a]] or {} 
            out[t[1][a]][i-1]    = b 
        end) end 
        return out 
    end
    
×
×
  • Crear nuevo...