Problema MD uri

Totalitatea subiectelor care nu respectă regulamentul impus in sectiunea "Probleme şi Întrebări" vor fi stocate aici.
Avatar utilizator
lenovohp@!
Nivel 1

Nivel 1
Mesaje: 76
Membru din: 24 Mar 2021, 12:37
Server: Severin2
Regat: Jinno
Aprecieri: 0
Mulţumiri: 0
Discord: Copiază ID
Medalii

Salut am un bug la md uri ... deschid md urile dar nu se baga in cont :(( o rezolvare cv?

sau macar sa maresc timpul la voucher md sau sa l fac permanent

Multumesc tuturor pentru cei care m au ajutat la questuri !
Avatar utilizator
Ionuţ
Web Master

Web Master
Mesaje: 1001
Membru din: 02 Sep 2013, 14:41
Server: Metin2CMS
Regat: Jinno
Aprecieri: 88  
Mulţumiri: 471  
Discord: Copiază ID
 Contact:
Medalii

Verifică questul, de cele mai multe ori coloana de coins nu e aceeași cu cea folosită pe site/shop.
Proiectele mele

Imagine
Afișează semnătura
Avatar utilizator
lenovohp@!
Nivel 1

Nivel 1
Mesaje: 76
Membru din: 24 Mar 2021, 12:37
Server: Severin2
Regat: Jinno
Aprecieri: 0
Mulţumiri: 0
Discord: Copiază ID
Medalii

quest vouchers begin
state start begin
when 80014.use begin
say_title("Voucher Dragon Coins")
say("You got 100 Dragon Coins")
say("Have fun.")
give_md(100)
item.remove()
end

when 80015.use begin
say_title("Voucher Dragon Coins")
say("You got 500 Dragon Coins")
say("Have fun.")
give_md(500)
item.remove()
end

when 80017.use begin
say_title("Voucher Dragon Coins")
say("You got 50 Dragon Coins")
say("Have fun.")
give_md(50)
item.remove()
end

when 80016.use begin
say_title("Voucher Dragon Coins")
say("You got 1000 Dragon Coins")
say("Have fun.")
give_md(1000)
item.remove()
end
end
end


cam asta ar fi questul
Avatar utilizator
Avis
Miss Just4Metin

Miss Just4Metin
Mesaje: 463
Membru din: 08 Sep 2014, 12:41
Server: nu am
Regat: Chunjo
Aprecieri: 35  
Mulţumiri: 1099  
Medalii

In primul rând, ai un model de respectat.
În al doilea rând, las-o mai ușor cu spam-ul.
Pentru orice chichiță pe care o întâmpini postezi imediat.
Încearcă să cauți mai întâi dacă problemele pe care le ai au mai fost postate.
Avatar utilizator
lenovohp@!
Nivel 1

Nivel 1
Mesaje: 76
Membru din: 24 Mar 2021, 12:37
Server: Severin2
Regat: Jinno
Aprecieri: 0
Mulţumiri: 0
Discord: Copiază ID
Medalii

Imi cer mii de scuze pentru spam dar nu prea ma pricep si + ca am cautat si nu am gasit nimic ...


Edit : Nu o sa mai fac spam promit ...
la cat timp pot posta cate o problema ?
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

lenovohp@! scrie: ↑26 Mar 2021, 22:33
quest vouchers begin
state start begin
when 80014.use begin
say_title("Voucher Dragon Coins")
say("You got 100 Dragon Coins")
say("Have fun.")
give_md(100)
item.remove()
end

when 80015.use begin
say_title("Voucher Dragon Coins")
say("You got 500 Dragon Coins")
say("Have fun.")
give_md(500)
item.remove()
end

when 80017.use begin
say_title("Voucher Dragon Coins")
say("You got 50 Dragon Coins")
say("Have fun.")
give_md(50)
item.remove()
end

when 80016.use begin
say_title("Voucher Dragon Coins")
say("You got 1000 Dragon Coins")
say("Have fun.")
give_md(1000)
item.remove()
end
end
end

cam asta ar fi questul
Verifica daca functia give_md este prezenta in questlib.lua.
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
Ceres
Nou Venit

Nou Venit
Mesaje: 36
Membru din: 25 Mar 2021, 00:45
Server: Zeya2
Regat: Chunjo
Aprecieri: 29  
Mulţumiri: 3  
Discord: Copiază ID
Medalii

Incearca quest-ul asta
(modifici codurile acelea 80002 , 80003 cu , codurile tale
(Plus ca ai un model de respectat)

quest vouchers begin
state start begin
function get_vouchers_info(itemVnum)
vouchers_info = {
[80002] = { 1, 1 }, -- 1 JD
[80003] = { 5, 0 }, -- 5 MD
[80004] = { 10, 0 }, -- 10 MD
[80005] = { 15, 0 }, -- 15 MD
[80006] = { 20, 0 }, -- 20 MD
[80007] = { 50, 0 }, -- 50 MD
-- VNUM ---- COUNT -- TYPE (0 = MD, 1 >= JD)--
}

itemVnum = tonumber(itemVnum)

return vouchers_info[itemVnum]
end
function isQuestAvailable(isitem)
if not pc.can_warp() then syschat("Trebuie sã aºtepti 10 secunde pentru a continua.") return false; end
if isitem then if (pc.count_item(item.get_vnum()) == 0) then syschat("Nu ai acest item.") return false; end end
if pc.get_empty_inventory_count() <= 25 then syschat("Ai inventarul plin. Aruncã ceva din el.") return false; end

return true;
end
function give_md(z)
mysql_direct_query("UPDATE account.account SET coins = coins + ".. z .." WHERE id = ".. pc.get_account_id() ..";")
end
function give_jd(x)
mysql_direct_query("UPDATE account.account SET jcoins = jcoins + ".. x .." WHERE id = ".. pc.get_account_id() ..";")
end

when 80002.use or
80003.use or
80004.use or
80005.use or
80006.use or
80007.use begin
local vouchers_info = vouchers.get_vouchers_info(item.vnum)

if null != vouchers_info then

local szCount = vouchers_info[1]
local szType = vouchers_info[2]

if (not pc.can_warp()) then syschat("Aºteaptã 10 secunde de la închiderea negoþului.") return; end

if (vouchers.isQuestAvailable(true)) then
if szType < 1 then
syschat("Contul tãu a fost încãrcat cu |cFF16c020".. szCount .." MD|r.")
vouchers.give_md(szCount)
pc.remove_item(item.get_vnum(), 1);
elseif szType >= 1 then
syschat("Contul tãu a fost încãrcat cu |cFF16c020".. szCount .." JD|r.")
vouchers.give_jd(szCount)
pc.remove_item(item.get_vnum(), 1);
end
end
end
end
end
end
Afișează semnătura
Avatar utilizator
lenovohp@!
Nivel 1

Nivel 1
Mesaje: 76
Membru din: 24 Mar 2021, 12:37
Server: Severin2
Regat: Jinno
Aprecieri: 0
Mulţumiri: 0
Discord: Copiază ID
Medalii

Ceres scrie: ↑26 Mar 2021, 23:37 Incearca quest-ul asta
(modifici codurile acelea 80002 , 80003 cu , codurile tale
(Plus ca ai un model de respectat)

quest vouchers begin
state start begin
function get_vouchers_info(itemVnum)
vouchers_info = {
[80002] = { 1, 1 }, -- 1 JD
[80003] = { 5, 0 }, -- 5 MD
[80004] = { 10, 0 }, -- 10 MD
[80005] = { 15, 0 }, -- 15 MD
[80006] = { 20, 0 }, -- 20 MD
[80007] = { 50, 0 }, -- 50 MD
-- VNUM ---- COUNT -- TYPE (0 = MD, 1 >= JD)--
}

itemVnum = tonumber(itemVnum)

return vouchers_info[itemVnum]
end
function isQuestAvailable(isitem)
if not pc.can_warp() then syschat("Trebuie sã aºtepti 10 secunde pentru a continua.") return false; end
if isitem then if (pc.count_item(item.get_vnum()) == 0) then syschat("Nu ai acest item.") return false; end end
if pc.get_empty_inventory_count() <= 25 then syschat("Ai inventarul plin. Aruncã ceva din el.") return false; end

return true;
end
function give_md(z)
mysql_direct_query("UPDATE account.account SET coins = coins + ".. z .." WHERE id = ".. pc.get_account_id() ..";")
end
function give_jd(x)
mysql_direct_query("UPDATE account.account SET jcoins = jcoins + ".. x .." WHERE id = ".. pc.get_account_id() ..";")
end

when 80002.use or
80003.use or
80004.use or
80005.use or
80006.use or
80007.use begin
local vouchers_info = vouchers.get_vouchers_info(item.vnum)

if null != vouchers_info then

local szCount = vouchers_info[1]
local szType = vouchers_info[2]

if (not pc.can_warp()) then syschat("Aºteaptã 10 secunde de la închiderea negoþului.") return; end

if (vouchers.isQuestAvailable(true)) then
if szType < 1 then
syschat("Contul tãu a fost încãrcat cu |cFF16c020".. szCount .." MD|r.")
vouchers.give_md(szCount)
pc.remove_item(item.get_vnum(), 1);
elseif szType >= 1 then
syschat("Contul tãu a fost încãrcat cu |cFF16c020".. szCount .." JD|r.")
vouchers.give_jd(szCount)
pc.remove_item(item.get_vnum(), 1);
end
end
end
end
end
end

acolo la vnum 80003 trebuie sa pun codul voucherului md ?


edit : gata acum am vazut .... o sa incerc si revin cu un raspuns
Avatar utilizator
Ceres
Nou Venit

Nou Venit
Mesaje: 36
Membru din: 25 Mar 2021, 00:45
Server: Zeya2
Regat: Chunjo
Aprecieri: 29  
Mulţumiri: 3  
Discord: Copiază ID
Medalii

Da acolo unde vezi
Modifici cu , codurile tale cele cu 80002 etc..
[80002] = { 1, 1 }, -- 1 JD
[80003] = { 5, 0 }, -- 5 MD
[80004] = { 10, 0 }, -- 10 MD
[80005] = { 15, 0 }, -- 15 MD
[80006] = { 20, 0 }, -- 20 MD
[80007] = { 50, 0 }, -- 50 MD

when 80002.use or
80003.use or
80004.use or
80005.use or
80006.use or
80007.use begin sa pui si aici aceleasi coduri ca mai sus
Ultima oară modificat 26 Mar 2021, 23:53 de către Ceres, modificat 1 dată în total.
Afișează semnătura
Avatar utilizator
lenovohp@!
Nivel 1

Nivel 1
Mesaje: 76
Membru din: 24 Mar 2021, 12:37
Server: Severin2
Regat: Jinno
Aprecieri: 0
Mulţumiri: 0
Discord: Copiază ID
Medalii

L am editat putin, sa mi spui daca ar fii ok asa cum e acum


quest vouchers begin
state start begin
function get_vouchers_info(itemVnum)
vouchers_info = {
[80014] = { 10, 0 }, -- 100 MD
[80015] = { 15, 0 }, -- 500 MD
[80016] = { 20, 0 }, -- 1000 MD
[80017] = { 50, 0 }, -- 50 MD
-- VNUM ---- COUNT -- TYPE (0 = MD, 1 >= JD)--
}

itemVnum = tonumber(itemVnum)

return vouchers_info[itemVnum]
end
function isQuestAvailable(isitem)
if not pc.can_warp() then syschat("Trebuie sã aºtepti 10 secunde pentru a continua.") return false; end
if isitem then if (pc.count_item(item.get_vnum()) == 0) then syschat("Nu ai acest item.") return false; end end
if pc.get_empty_inventory_count() <= 25 then syschat("Ai inventarul plin. Aruncã ceva din el.") return false; end

return true;
end
function give_md(z)
mysql_direct_query("UPDATE account.account SET coins = coins + ".. z .." WHERE id = ".. pc.get_account_id() ..";")
end
function give_jd(x)
mysql_direct_query("UPDATE account.account SET jcoins = jcoins + ".. x .." WHERE id = ".. pc.get_account_id() ..";")
end

when 80014.use or
80014.use or
80015.use or
80016.use or
80017.use begin
local vouchers_info = vouchers.get_vouchers_info(item.vnum)

if null != vouchers_info then

local szCount = vouchers_info[1]
local szType = vouchers_info[2]

if (not pc.can_warp()) then syschat("Aºteaptã 10 secunde de la închiderea negoþului.") return; end

if (vouchers.isQuestAvailable(true)) then
if szType < 1 then
syschat("Contul tãu a fost încãrcat cu |cFF16c020".. szCount .." MD|r.")
vouchers.give_md(szCount)
pc.remove_item(item.get_vnum(), 1);
elseif szType >= 1 then
syschat("Contul tãu a fost încãrcat cu |cFF16c020".. szCount .." JD|r.")
vouchers.give_jd(szCount)
pc.remove_item(item.get_vnum(), 1);
end
end
end
end
end
end
Închis

Înapoi la “Arhivă Probleme şi Întrebări”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 40 vizitatori