• TibiaFace

    Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...

    .
    demo menumenu

    Afiliados



    Votar:

    no me Funciona el cast !

    Compartir:

    Ver el tema anterior Ver el tema siguiente Ir abajo  Mensaje (Página 1 de 1.)

    1no me Funciona el cast !  Empty no me Funciona el cast ! Mar Nov 28, 2017 6:33 pm

    lmiguelm26

    lmiguelm26
    Miembro
    Miembro
    Buenas noches , estoy intentado instalar el cast system en mi ot 8.60 0.4 ...el exe ya tiene integrado el cast..

    ya añadi esto en la database

    Código:


    ALTER TABLE  `players` ADD  `cast` TINYINT NOT NULL DEFAULT  '0',
    ADD  `castViewers` INT( 11 ) NOT NULL DEFAULT  '0',
    ADD  `castDescription` VARCHAR( 255 ) NOT NULL


    este es mi cast.lua

    Código:

    function onSay(cid, words, param, channel)
       local tmp = param:explode(" ")
       if not(tmp[1]) then
          return doPlayerSendCancel(cid, "Parameters needed")
       end
       
       if tmp[1] == "on" then
          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast has started.")
          doPlayerSetCastState(cid, true)
          doPlayerSave(cid)
       elseif getPlayerCast(cid).status == false then
          return doPlayerSendCancel(cid, "Your cast has to be running for this action.")
       elseif tmp[1] == "off" then
          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast has ended.")
          doPlayerSetCastState(cid, false)
                doPlayerSave(cid)
       elseif isInArray({"pass", "password", "p"}, tmp[1]) then
          if not(tmp[2]) then
             return doPlayerSendCancel(cid, "You need to set a password")
          end
          
          if tmp[2]:len() > 10 then
             return doPlayerSendCancel(cid, "The password is too long. (Max.: 10 letters)")
          end
          
          if tmp[2] == "off" then
             doPlayerSetCastPassword(cid, "")
             doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast password has been removed.")
          else
             doPlayerSetCastPassword(cid, tmp[2])
             doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast password was set to: " .. tmp[2])
          end
       elseif isInArray({"desc", "description", "d"}, tmp[1]) then
          local d = param:gsub(tmp[1]..(tmp[2] and " " or ""), "")
          
          if not(d) or d:len() == 0 then
             return doPlayerSendCancel(cid, "You need to specify a description.")
          end
          
          if d:len() > 50 then
             return doPlayerSendCancel(cid, "The description is too long. (Max.: 50 letters)")
          end
          
          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast description was set to: ")
          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, d)
          doPlayerSetCastDescription(cid, d)
       elseif tmp[1] == "ban" then
          if not(tmp[2]) then
             return doPlayerSendCancel(cid, "Specify a spectator that you want to ban.")
          end
          
          if doPlayerAddCastBan(cid, tmp[2]) then
             doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' has been banned.")
          else
             doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' could not be banned.")
          end
       elseif tmp[1] == "unban" then
          if not(tmp[2]) then
             return doPlayerSendCancel(cid, "Specify the person you want to unban.")
          end
          
          if doPlayerRemoveCastBan(cid, tmp[2]) then
             doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' has been unbanned.")
          else
             doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' could not be unbanned.")
          end
       elseif param == "bans" then
          local t = getCastBans(cid)
          local text = "Cast Bans:\n\n"
          for k, v in pairs(t) do
             text = text .. "*" .. v.name .. "\n"
          end
          if text == "Cast Bans:\n\n" then
             text = text .. "No bans."
          end
          doShowTextDialog(cid, 5958, text)
       elseif tmp[1] == "mute" then
          if not(tmp[2]) then
             return doPlayerSendCancel(cid, "Specify a spectator that you want to mute.")
          end
          
          if doPlayerAddCastMute(cid, tmp[2]) then
             doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' has been muted.")
          else
             doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' could not be muted.")
          end
       elseif tmp[1] == "unmute" then
          if not(tmp[2]) then
             return doPlayerSendCancel(cid, "Specify the person you want to unmute.")
          end
          
          if doPlayerRemoveCastMute(cid, tmp[2]) then
             doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' has been unmuted.")
          else
             doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' could not be unmuted.")
          end
       elseif param == "mutes" then
          local t = getCastMutes(cid)
          local text = "Cast Mutes:\n\n"
          for k, v in pairs(t) do
             text = text .. "*" .. v.name .. "\n"
          end
          if text == "Cast Bans:\n\n" then
             text = text .. "No mutes."
          end
          doShowTextDialog(cid, 5958, text)
       elseif param == "viewers" then
          local t = getCastViewers(cid)
          local text, count = "Cast Viewers:\n#Viewers: |COUNT|\n\n", 0
          for _,v in pairs(t) do
             count = count + 1
             text = text .. "*" .. v.name .."\n"
          end
          
          if text == "Cast Viewers:\n#Viewers: |COUNT|\n\n" then text = "Cast Viewers:\n\nNo viewers." end
          text = text:gsub("|COUNT|", count)
          doShowTextDialog(cid, 5958, text)
       elseif param == "status" then
          local t, c = getCastViewers(cid), getPlayerCast(cid)
          local count = 0
          for _,v in pairs(t) do count = count + 1 end
          
          doShowTextDialog(cid, 5958, "Cast Status:\n\n*Viewers:\n      " .. count .. "\n*Description:\n      "..(c.description == "" and "Not set" or c.description).."\n*Password:\n      " .. (c.password == "" and "Not set" or "Set - '"..c.password.."'"))
       elseif param == "update" then
          if getPlayerStorageValue(cid, 656544) > os.time() then
             return doPlayerSendCancel(cid, "You used this command lately. Wait: " .. (getPlayerStorageValue(cid, 656544)-os.time()) .. " sec.")
          end
          doPlayerSave(cid)
          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The cast settings have been updated.")
          doPlayerSetStorageValue(cid, 656544, os.time()+60)
       end
       return true
    end


    CUANDO INTENTO ACTIVAR EL CAST SALE : "Parameters needed


    GRACIAS POR SU AYUDA

    2 participantes

    2no me Funciona el cast !  Empty Re: no me Funciona el cast ! Mar Nov 28, 2017 6:42 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    porque el servior no contiene la estrura cast dentro de compialcion de exe del ot de tal forma es imposible que te funcione


    si te ayudamos porfavor comenta resuelto



    no me Funciona el cast !  YNU5B25
    2 participantes
    http://www.tibiaface.com

    3no me Funciona el cast !  Empty Re: no me Funciona el cast ! Mar Nov 28, 2017 6:52 pm

    lmiguelm26

    lmiguelm26
    Miembro
    Miembro
    [Tienes que estar registrado y conectado para ver este vínculo] estoy utilizando el exe de este ot ! se supone que tiene cast !

    2 participantes

    4no me Funciona el cast !  Empty Re: no me Funciona el cast ! Mar Nov 28, 2017 6:56 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    lo estas usando con mysql o sqlite por que el problema en mysql veo quea varias personas no ha sufrido de ese problema



    no me Funciona el cast !  YNU5B25
    2 participantes
    http://www.tibiaface.com

    5no me Funciona el cast !  Empty Re: no me Funciona el cast ! Mar Nov 28, 2017 6:57 pm

    lmiguelm26

    lmiguelm26
    Miembro
    Miembro
    estoy utilizando mysql

    2 participantes

    6no me Funciona el cast !  Empty Re: no me Funciona el cast ! Mar Nov 28, 2017 7:19 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    aqui los tienes los comandos

    Código:
    !cast on
    !cast off
    !cast pass
    !cast ban
    !cast unban
    !cast bans
    !cast mute
    !cast unmute
    !cast mutes
    !cast viewers
    !cast status
    !cast update



    no me Funciona el cast !  YNU5B25
    2 participantes
    http://www.tibiaface.com

    7no me Funciona el cast !  Empty Re: no me Funciona el cast ! Mar Nov 28, 2017 7:25 pm

    lmiguelm26

    lmiguelm26
    Miembro
    Miembro
    Muchas gracias maya , el error fue ejecutar mal los comandos .... te agradezco mucho

    RESUELTO

    2 participantes

    8no me Funciona el cast !  Empty Re: no me Funciona el cast ! Mar Nov 28, 2017 7:26 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    Tema resuelto



    no me Funciona el cast !  YNU5B25
    2 participantes
    http://www.tibiaface.com

    Contenido patrocinado


    2 participantes

    Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje (Página 1 de 1.)

    Permisos de este foro:
    No puedes responder a temas en este foro.

     

    BienvenidosTibiaFace es una comunidad de Open Tibia. Para participar debes estar registrado (click para Regístrate).