Intrebare (Quest - Shop)

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

Nivel 3
Mesaje: 476
Membru din: 16 Iul 2015, 21:31
Server: Doar testez
Regat: Chunjo
Aprecieri: 94  
Mulţumiri: 44  
 Contact:
Medalii

Salutare, ma puteti ajuta va rog cu urmatoarele intrebari?
1. Cum pot elimina in siguranta un quest, care este pe un npc? (Aici este vorba despre listele cu categorii de produse la "Negustoarea de diverse" ?
2. Cum pot adauga, liste cu categorii noi de produse pe un npc (ex. "Negustoarea de diverse")?
[ex. sa zicem ca vreau 5 magazine diferite, unul sa contina licori, unul pietre, unul bijuterii, unul un text care sa aiba centrat sus un obiect (perla rosie), si actiunea de iesire (ceva informativ).] ... a si cum pun pret de cumparare/vanzare pe fiecare articol?
*daca mi-ati zice pas cu pas, ar fi mai bine, sunt inca incepator. Multumesc!
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

Pentru a elimina "in siguranta" un quest, pe langa faptul ca trebuie sa stergi acel quest,
trebuie sa ai in vedere urmatoarele:
questul respectiv poate fi activ fie pe item, fie pe npc, fie la login,
prin urmare, trebuie sa cauti in /usr/game(sau home/game, dupa caz)/share/locale/ro(en, de, it, tr, dupa caz)quest/object
aici cauti folderele "state", "notarget", si dupa caz folderul cu codul item-ului/npc-ului, si stergi de acolo tot ce este legat,
sau face referire la questul in cauza.

Pentru a adauga multishop la un npc,creezi un fisier(cu ce nume doresti), dar cu extensia .quest sau .lua, in care pui:

Cod: Selectaţi tot

quest deschide_magazin begin 
	state start begin

		when 20001.chat."Cumpãrã finisaje"  begin 
			npc.open_shop( xx )   
			setskin(NOWINDOW) 
		end

		when 9003.chat."Licori"  begin 
			npc.open_shop( xx )   
			setskin(NOWINDOW) 
		end

		when 9006.chat."Magazin de nuntã "  begin 
			npc.open_shop( xx )   
			setskin(NOWINDOW) 
		end 
		
		when 9003.chat."ItemShop"  begin 
			npc.open_shop( xx )   
			setskin(NOWINDOW) 
		end 
Acele "xx", dintre paranteze, reprezinta codul shop-ului in navicat.
tot din navicat setezi pretul si cantitatea de iteme in fiecare shop.
Daca nu stii cum se face, poate te ajuta acest tutorial:
https://www.youtube.com/watch?v=BZylMRD3FAU
Pentru acest mesaj, [RaffaeL] for the post:
t4zu
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
t4zu
Nivel 3

Nivel 3
Mesaje: 476
Membru din: 16 Iul 2015, 21:31
Server: Doar testez
Regat: Chunjo
Aprecieri: 94  
Mulţumiri: 44  
 Contact:
Medalii

...
Salut, multumesc pentru ajutor.
Daca te rog ma poti ajuta sa modific questul de jos si sa adaug o rubrica noua, sub celelalte, de tip informativ, cu un singur buton "Iesire", care sa aiba un titlu "Info joc", iar mai jos sa aiba centrata imaginea unui obiect (asa cum apare ea si in inventar), iar sub aceasta 3 randuri de scris.

Cod: Selectaţi tot

quest MagazinulGeneral begin 
    state start begin 
        when 9003.chat."Potiuni:" begin 
			say_title("Potiuni:") 
            say("") 
            say("Doriti sa deschideti magazinul?") 
            local s = select("Da", "Nu") 
            if s == 1 then 
                npc.open_shop(3) 
            else 
                return 
            end 
        end
		when 9003.chat."Obiecte diverse:" begin 
			say_title("Obiecte diverse:") 
            say("") 
            say("Doriti sa deschideti magazinul?")
            local s = select("Da", "Nu") 
            if s == 1 then 
                npc.open_shop(88) 
            else 
                return 
            end 
        end
		when 9003.chat."Minerale:" begin 
			say_title("Minerale:") 
            say("") 
            say("Doriti sa deschideti magazinul?")
            local s = select("Da", "Nu") 
            if s == 1 then 
                npc.open_shop(90) 
            else 
                return 
            end 
        end
		when 9003.chat."UPP1" begin 
			say_title("UPP1") 
            say("") 
            say("Doriti sa deschideti magazinul?")
            local s = select("Da", "Nu") 
            if s == 1 then 
                npc.open_shop(91) 
            else 
                return 
            end 
        end
		when 9003.chat."UPP3" begin 
            say_title("UPP3") 
            say("") 
            say("Doriti sa deschideti magazinul?")
            local r = select("Da", "Nu")
            if r == 1 then 
                npc.open_shop(92)
            else 
                return 
            end 
        end 
    end 
end
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

Poftim

Cod: Selectaţi tot

quest MagazinulGeneral begin 
state start begin 
when 9003.chat."Potiuni:" begin 
say_title("Potiuni:") 
say("") 
say("Doriti sa deschideti magazinul?") 
local s = select("Da", "Nu") 
if s == 1 then 
npc.open_shop(3) 
else 
return 
end 
end
when 9003.chat."Obiecte diverse:" begin 
say_title("Obiecte diverse:") 
say("") 
say("Doriti sa deschideti magazinul?")
local s = select("Da", "Nu") 
if s == 1 then 
npc.open_shop(88) 
else 
return 
end 
end
when 9003.chat."Minerale:" begin 
say_title("Minerale:") 
say("") 
say("Doriti sa deschideti magazinul?")
local s = select("Da", "Nu") 
if s == 1 then 
npc.open_shop(90) 
else 
return 
end 
end
when 9003.chat."UPP1" begin 
say_title("UPP1") 
say("") 
say("Doriti sa deschideti magazinul?")
local s = select("Da", "Nu") 
if s == 1 then 
npc.open_shop(91) 
else 
return 
end 
end
when 9003.chat."UPP3" begin 
say_title("UPP3") 
say("") 
say("Doriti sa deschideti magazinul?")
local r = select("Da", "Nu")
if r == 2 then
return
end
if r == 1 then 
npc.open_shop(92)
end
end
when 9003.chat."Info" begin
say_title("Info Joc")
say_item_vnum("AICI COD ITEM") 
say("text")
say("text")
say("text")
end 
end 
end 
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
t4zu
Nivel 3

Nivel 3
Mesaje: 476
Membru din: 16 Iul 2015, 21:31
Server: Doar testez
Regat: Chunjo
Aprecieri: 94  
Mulţumiri: 44  
 Contact:
Medalii

Mutant scrie:Poftim

Cod: Selectaţi tot

quest MagazinulGeneral begin 
state start begin 
when 9003.chat."Potiuni:" begin 
say_title("Potiuni:") 
say("") 
say("Doriti sa deschideti magazinul?") 
local s = select("Da", "Nu") 
if s == 1 then 
npc.open_shop(3) 
else 
return 
end 
end
when 9003.chat."Obiecte diverse:" begin 
say_title("Obiecte diverse:") 
say("") 
say("Doriti sa deschideti magazinul?")
local s = select("Da", "Nu") 
if s == 1 then 
npc.open_shop(88) 
else 
return 
end 
end
when 9003.chat."Minerale:" begin 
say_title("Minerale:") 
say("") 
say("Doriti sa deschideti magazinul?")
local s = select("Da", "Nu") 
if s == 1 then 
npc.open_shop(90) 
else 
return 
end 
end
when 9003.chat."UPP1" begin 
say_title("UPP1") 
say("") 
say("Doriti sa deschideti magazinul?")
local s = select("Da", "Nu") 
if s == 1 then 
npc.open_shop(91) 
else 
return 
end 
end
when 9003.chat."UPP3" begin 
say_title("UPP3") 
say("") 
say("Doriti sa deschideti magazinul?")
local r = select("Da", "Nu")
if r == 2 then
return
end
if r == 1 then 
npc.open_shop(92)
end
end
when 9003.chat."Info" begin
say_title("Info Joc")
say_item_vnum("AICI COD ITEM") 
say("text")
say("text")
say("text")
end 
end 
end 
Este bun asa? (cum este mai jos)

Cod: Selectaţi tot

quest MagazinulGeneral begin 
    state start begin 
        when 9003.chat."Potiuni:   /Potions:" begin 
			say_title("Potiuni:   /Potions:") 
            say("") 
            say("[Ro] Doriti sa deschideti magazinul?") 
			say("[En] Do you want to open the store?")
            local s = select("Da", "Nu") 
            if s == 1 then 
                npc.open_shop(3) 
            else 
                return 
            end 
        end
		when 9003.chat."Obiecte diverse:   /Various objects:" begin 
			say_title("Obiecte diverse:   /Various objects:") 
            say("") 
            say("[Ro] Doriti sa deschideti magazinul?")
			say("[En] Do you want to open the store?")
            local s = select("Da", "Nu") 
            if s == 1 then 
                npc.open_shop(88) 
            else 
                return 
            end 
        end
		when 9003.chat."Minerale:    /Minerals:" begin 
			say_title("Minerale:    /Minerals:") 
            say("") 
            say("[Ro] Doriti sa deschideti magazinul?")
			say("[En] Do you want to open the store?")
            local s = select("Da", "Nu") 
            if s == 1 then 
                npc.open_shop(90) 
            else 
                return 
            end 
        end
		when 9003.chat."Evolutie categoria   V - IV" begin 
			say_title("Evolutie categoria   V - IV") 
            say("") 
            say("[Ro] Doriti sa deschideti magazinul?")
			say("[En] Do you want to open the store?")
            local s = select("Da", "Nu") 
            if s == 1 then 
                npc.open_shop(91) 
            else 
                return 
            end 
        end
		when 9003.chat."Evolutie categoria   III" begin 
            say_title("Evolutie categoria   III") 
            say("") 
            say("[Ro] Doriti sa deschideti magazinul?")
			say("[En] Do you want to open the store?")
            local r = select("Da", "Nu")
            if r == 1 then 
                npc.open_shop(92)
            else 
                return 
            end 
        end
		when 9003.chat."Evolutie categoria   II - I" begin
			say_title("Evolutie categoria   II - I")
			say_item_vnum("165000")
			say("")
			say("[Ro] Evolutie categoria II si I")
			say("  Obiectele pentru imbunatatire, din categoria II, se pot")
			say("dobandi: prin infrangerea anumitor sefi sau prin Credit.")
			say("  Obiectele pentru imbunatatire, din categoria I, se pot")
			say("dobandi: prin donatie, prin Credit sau la evenimente.")
			say("")
			say("")
			say("[En] Evolution category II and I")
			say("  You must to kill bosses to get evolution, category II")
			say("or you need Credit to buying it.")
			say("   If you want to buy evolution, category I, You have to")
			say("donate or you need Credit to buying it.")
			say("")
		end
	end
end 
Avatar utilizator
t4zu
Nivel 3

Nivel 3
Mesaje: 476
Membru din: 16 Iul 2015, 21:31
Server: Doar testez
Regat: Chunjo
Aprecieri: 94  
Mulţumiri: 44  
 Contact:
Medalii

T/C ... Multumesc.
Avatar utilizator
Vincent Griffith
Ţepar / Untrusted User

Ţepar / Untrusted User
Mesaje: 1807
Membru din: 09 Mai 2016, 17:45
Aprecieri: 194  
Mulţumiri: 1331  
Medalii

Subiect rezolvat, inchis la cererea autorului!
Închis
Răspunsuri
3
Vizualizări
304
Răspunsuri
1
Vizualizări
144
Răspunsuri
3
Vizualizări
179
Răspunsuri
3
Vizualizări
141

Înapoi la “Probleme rezolvate”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Semrush [Bot] și 7 vizitatori