[Problema] - Cum scot butoanele acestea din questul de teleportare?

Înainte de a posta o problemă, caută în acest forum și poate găsești rezolvare.
Închis
Avatar utilizator
Restart
Modelator 3D

Modelator 3D
Mesaje: 964
Membru din: 10 Oct 2013, 15:15
Server: ...
Regat: Jinno
Aprecieri: 0
Mulţumiri: 668  
Discord: Copiază ID
 Contact:
Medalii

*Problemă:Butoane in plus care sunt buggate sau nu sunt folosibile
*Tipologie server: Proprie
*Resursă folosită: Proprie
*ServerFiles utilizat: Propriu
*Syserr: No sysser!
Poză:
Imagine *Detalii suplimentare: As dori sa Scot butoanele acestea de Urmatorul si inapoi din quest,
deoarece questul este perfect functional si fara aceste butoane! Tin sa mentionez ca la Urmatoarele numai imi apar aceste butoane doar la prima pagina care sunt codurile care trebuie sterse?
EDIT: Daca e din sursa sa presupunem ce ar trebui modificat sau cum fac doar la acest quest sa nu apara :-s
Quest:

Cod: Selectaţi tot

quest warpring begin
   state start begin
      when 70007.use begin
         local x
         local y
         local t
         local e = pc.get_empire()
         say_title("Teleporter:")
         say("Încotro vrei sã mergi strãine?")
         local s = select("Map1", "Map2", "Valea Orcilor", "Deºert", "Sohan", "Tara de foc", "Urmãtoarele", "Închide")
         if s==7 then
            say_title("Teleporter:")
            say("Încotro vrei sã mergi strãine?")
            local p = select("Turnul Demonilor", "V1", "Pãdurea Fantomelor", "Pãdurea Roºie", "Tara Gigantilor", "Grota Exilului", "Închide")
            if p==1 then
               x="590400"
               y="110500"
            elseif p==2 then
               x="91900"
               y="525400"
            elseif p==3 then
               x="289000"
               y="5800"
            elseif p==4 then
               say_title("Teleporter")
               say("Încotro vrei sã mergi strãine?")
               t = select("Început", "Sfârºit", "Închide")
               if t==1 then
                  x="1119900"
                  y="70800"
               elseif t==2 then
                  x="1119200"
                  y="7000"
               end
            elseif p==5 then
               x="828100"
               y="763400"
            elseif p==6 then
               x="284200"
               y="809600"
            end
         elseif s==1 then
            say_title("Teleporter")
            say("Încotro vrei sã mergi strãine?")
            t = select("Regatul Roºu", "Regatul Galben", "Regatul Albastru","Închide")
            if t==1 then
               x="473900"
               y="954600"
            elseif t==2 then
               x="63200"
               y="166700"
            elseif t==3 then
               x="959600"
               y="269700"
            end
         elseif s==2 then
            say_title("Teleporter:")
            say("Încotro vrei sã mergi strãine?")
            t = select("Regatul Roºu", "Regatul Galben", "Regatul Albastru", "Închide")
            if t==1 then
               x="352300"
               y="882700"
            elseif t==2 then
               x="145700"
               y="239800"
            elseif t==3 then
               x="863800"
               y="246000"
            end
         elseif s==3 then
            say_title("Teleporter:")
            say("Încotro vrei sã mergi strãine?")
            t = select("Început", "Centru", "Arahani", "Închide")
            if t==1 then
               if e==1 then
                  x="402100"
                  y="673900"                  
               elseif e==2 then
                  x="270400"
                  y="739900"
               elseif e==3 then
                  x="321300"
                  y="808000"
               end
            elseif t==2 then
               x="332700"
               y="745600"
            elseif t==3 then
               x="282800"
               y="792800"
            end
         elseif s==4 then
            say_title("Teleporter:")
            say("Încotro vrei sã mergi strãine?")
            t = select("Inceput", "Sfârºit", "Închide")
            if t==1 then
               if e==1 then
                  x="217800"
                  y="627200"                  
               elseif e==2 then
                  x="221900"
                  y="502700"
               elseif e==3 then
                  x="344000"
                  y="502500"
               end
            elseif t==2 then
               x="296300"
               y="547500"
            end
         elseif s==5 then
            say_title("Teleporter")
            say("Încotro vrei sã mergi strãine?")
            t = select("Început", "Mijloc", "Închide")
            if t==1 then
               if e==1 then
                  x="434200"
                  y="290600"                  
               elseif e==2 then
                  x="375200"
                  y="174900"
               elseif e==3 then
                  x="491800"
                  y="173600"
               end
            elseif t==2 then
               x="436200"
               y="215300"
            end         
         elseif s==6 then
            say_title("Teleporter:")
            say("Încotro vrei sã mergi strãine?")
            t = select("Început", "Închide")
            if t==1 then
               if e==1 then
                  x="599400"
                  y="756300"                  
               elseif e==2 then
                  x="597800"
                  y="622200"
               elseif e==3 then
                  x="730700"
                  y="689800"
               end
            elseif t==2 then
               return
            end
         end         
         if s!=8 or p!= 7 then
            pc.warp(x, y)
         end
      end
   end
end
Afișează semnătura
Avatar utilizator
Restart
Modelator 3D

Modelator 3D
Mesaje: 964
Membru din: 10 Oct 2013, 15:15
Server: ...
Regat: Jinno
Aprecieri: 0
Mulţumiri: 668  
Discord: Copiază ID
 Contact:
Medalii

Up!

[ Postat de pe Android ] Imagine
Afișează semnătura
Avatar utilizator
Restart
Modelator 3D

Modelator 3D
Mesaje: 964
Membru din: 10 Oct 2013, 15:15
Server: ...
Regat: Jinno
Aprecieri: 0
Mulţumiri: 668  
Discord: Copiază ID
 Contact:
Medalii

UP! Nimeni?
Afișează semnătura
Avatar utilizator
joshua123
Utilizator interzis !

Utilizator interzis !
Mesaje: 43
Membru din: 22 Noi 2016, 16:38
Server: Tekken
Regat: Jinno
Aprecieri: 16  
Mulţumiri: 2  
Medalii

Uita-te bine-n quest ca le ai, sterge-le bine de acolo
Avatar utilizator
antoce
Nivel 1

Nivel 1
Mesaje: 108
Membru din: 24 Noi 2018, 19:53
Regat: Jinno
Aprecieri: 2  
Mulţumiri: 3  
Medalii

ai instalat questul ala din nou ? sau modifica din object 70007
Avatar utilizator
Restart
Modelator 3D

Modelator 3D
Mesaje: 964
Membru din: 10 Oct 2013, 15:15
Server: ...
Regat: Jinno
Aprecieri: 0
Mulţumiri: 668  
Discord: Copiază ID
 Contact:
Medalii

joshua123 scrie:Uita-te bine-n quest ca le ai, sterge-le bine de acolo
Cum se denumesc?
Afișează semnătura
Avatar utilizator
[RaffaeL]
Software Developer

Software Developer
Mesaje: 3223
Membru din: 19 Mar 2016, 12:58
Server: ...
Aprecieri: 15  
Mulţumiri: 2502  
  Rezolvări prob.: 2
Discord: Copiază ID
 Contact:
Medalii

Butoanele acelea nu au nici o treaba cu questul in sine, ci se adauga automat, atunci cand una din tablele "select" are mai mult sau egal cu 8 elemente.
Daca vrei sa le scoti, ai mai multe optiuni: uiquest.py(next/prev buttons), sau adaugi functia asta in questlib.lua :

Cod: Selectaţi tot

function select2(tab,...)
    arg.n = nil
    if type(tab) ~= "table" and type(tab) == 'number' then
        table.insert(arg,1,tab)
        tab = arg
    elseif type(tab) ~= "table" and type(tab) == 'string' then
        table.insert(arg,1,tab)
        table.insert(arg,1,8)
        tab = arg
    elseif type(tab) == "table" and type(tab[1]) == 'string' then
        table.insert(tab,1,8)
    end
    local max = tab[1]; table.remove(tab,1)
    local tablen,outputstr,outputcount,nextc,incit = table.getn(tab),"",0,0,0
    table.foreach(tab,
        function(i,l)
            outputcount = outputcount + 1
            if outputcount == 1 then
                outputstr=outputstr..'sel = select("'..l..'"'
            elseif outputcount == max and tablen > outputcount+incit  then
                if tablen ~= outputcount+incit+1 then
                    outputstr=outputstr..',"'..l..'","Pagina urmatoare") + '..incit..' '
                    if nextc > 0 then
                        outputstr = outputstr..'end '
                    end
                    outputstr=outputstr..'; if sel == '..(incit+max+1)..' then ' 
                    nextc, outputcount, incit= nextc+1,0,incit+max
                else
                    outputstr=outputstr..',"'..l..'"'
                end
            else
                outputstr=outputstr..',"'..l..'"'
            end
        end
    )
    outputstr = outputstr..') + '..incit
    if nextc > 0 then
        outputstr = outputstr..' end'
    end
    outputstr= outputstr.. '; return sel'
    print(outputstr)
    local sel = assert(loadstring(outputstr))()
    tablen,outputstr,outputcount,nextc,incit = nil,nil,nil,nil,nil
    return sel
end
In quest folosesti:
function select2(tab,...)
unde tab=numarul de intrari pe pagina, iar acele...sunt elementele adaugate in "select".
Exemplu:
function select2(5,"Restart1", "Restart2", "Restart3", "Restart4", "Restart5", "Restart6", "Restart7", "Restart8")
Va pune automat 5 intrari pe prima pagina, butonul "Pagina urmatoare", si diferenta pe urmatoarea pagina.

Bafta.
Imagine
Imagine
https://www.youtube.com/watch?v=GhYkCIETEto
Do everything, if you know what you're doing, else... Imagine
Ma gasesti si aici: Discord https://discord.gg/5J5GnyZVSR
Afișează semnătura
Avatar utilizator
Restart
Modelator 3D

Modelator 3D
Mesaje: 964
Membru din: 10 Oct 2013, 15:15
Server: ...
Regat: Jinno
Aprecieri: 0
Mulţumiri: 668  
Discord: Copiază ID
 Contact:
Medalii

[RaffaeL] scrie:Butoanele acelea nu au nici o treaba cu questul in sine, ci se adauga automat, atunci cand una din tablele "select" are mai mult sau egal cu 8 elemente.
Daca vrei sa le scoti, ai mai multe optiuni: uiquest.py(next/prev buttons), sau adaugi functia asta in questlib.lua :

Cod: Selectaţi tot

function select2(tab,...)
    arg.n = nil
    if type(tab) ~= "table" and type(tab) == 'number' then
        table.insert(arg,1,tab)
        tab = arg
    elseif type(tab) ~= "table" and type(tab) == 'string' then
        table.insert(arg,1,tab)
        table.insert(arg,1,8)
        tab = arg
    elseif type(tab) == "table" and type(tab[1]) == 'string' then
        table.insert(tab,1,8)
    end
    local max = tab[1]; table.remove(tab,1)
    local tablen,outputstr,outputcount,nextc,incit = table.getn(tab),"",0,0,0
    table.foreach(tab,
        function(i,l)
            outputcount = outputcount + 1
            if outputcount == 1 then
                outputstr=outputstr..'sel = select("'..l..'"'
            elseif outputcount == max and tablen > outputcount+incit  then
                if tablen ~= outputcount+incit+1 then
                    outputstr=outputstr..',"'..l..'","Pagina urmatoare") + '..incit..' '
                    if nextc > 0 then
                        outputstr = outputstr..'end '
                    end
                    outputstr=outputstr..'; if sel == '..(incit+max+1)..' then ' 
                    nextc, outputcount, incit= nextc+1,0,incit+max
                else
                    outputstr=outputstr..',"'..l..'"'
                end
            else
                outputstr=outputstr..',"'..l..'"'
            end
        end
    )
    outputstr = outputstr..') + '..incit
    if nextc > 0 then
        outputstr = outputstr..' end'
    end
    outputstr= outputstr.. '; return sel'
    print(outputstr)
    local sel = assert(loadstring(outputstr))()
    tablen,outputstr,outputcount,nextc,incit = nil,nil,nil,nil,nil
    return sel
end
In quest folosesti:
function select2(tab,...)
unde tab=numarul de intrari pe pagina, iar acele...sunt elementele adaugate in "select".
Exemplu:
function select2(5,"Restart1", "Restart2", "Restart3", "Restart4", "Restart5", "Restart6", "Restart7", "Restart8")
Va pune automat 5 intrari pe prima pagina, butonul "Pagina urmatoare", si diferenta pe urmatoarea pagina.

Bafta.
Mersi am inteles, dar functia ta in questlib.lua nu functioneaza iar in uiquest toate codurile is pe none... Imagine iar la faza cu select2 te inseli nu am asa ceva doar select diferenta e ca am locale p si locale s: Imagine Dar am obsv ceva cu hide show o sa ma joc sa vad... o sa incerc si revin!

EDIT: Am rezolvat! ;)
Afișează semnătura
Avatar utilizator
Moț
Ţepar / Untrusted User

Ţepar / Untrusted User
Mesaje: 2825
Membru din: 03 Apr 2017, 15:00
Aprecieri: 216  
Mulţumiri: 3040  
Discord: Copiază ID
Medalii

Problema rezolvata.
Imagine
Afișează semnătura
Închis
Răspunsuri
10
Vizualizări
755
Răspunsuri
1
Vizualizări
361
Răspunsuri
5
Vizualizări
504

Înapoi la “Probleme rezolvate”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Google [Bot] și 31 vizitatori