[Problema Vouchere MD]

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

Nivel 1
Mesaje: 102
Membru din: 02 Oct 2019, 19:18
Server: king2.ro
Regat: Jinno
Aprecieri: 50  
Mulţumiri: 0
Medalii

Problemă:Tocmai ce am implementat pe server voucherele MD, iar cand cumpar din item shop un voucher si intru in joc, dupa ce deschis itemshopul, dupa o secunda dispare (doar cu voucherele se intampla).
Tipologie server(PvM / PvP):
*Resursă folosită: *Link exclusiv J4M*
*ServerFiles utilizat:Nirvana
*Syserr:-
Poză:-
*Detalii suplimentare:-
Avatar utilizator
Kidro
Membru Club

Membru Club
Mesaje: 2487
Membru din: 29 Aug 2019, 16:49
Aprecieri: 331  
Mulţumiri: 5190  
Discord: Copiază ID
Medalii

Pune-i timp din itemshop si din itemproto.

Uite si un quest:
quest vouchers begin
state start begin
function get_vouchers_info(itemVnum)
vouchers_info = {
[80011] = { 1, 0 }, -- 1 MD
[80012] = { 5, 0 }, -- 5 MD
[80013] = { 25, 0 }, -- 25 MD
[80017] = { 50, 0 }, -- 50 MD
[80014] = { 100, 0 }, -- 100 MD
[80015] = { 500, 0 }, -- 500 MD
[80016] = { 1000, 0 }, -- 1000 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 sa astepti 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. Arunca ceva din el.") return false; end

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

when 80017.use or
80014.use or
80015.use or
80016.use or
80013.use or
80012.use or
80011.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("Asteapta 10 secunde de la inchiderea negotului.") return; end

if (vouchers.isQuestAvailable(true)) then
if szType < 1 then
syschat("Contul tau a fost incarcat cu |cFF16c020".. szCount .." MD|r.")
vouchers.give_md(szCount)
pc.remove_item(item.get_vnum(), 1);
elseif szType >= 1 then
syschat("Contul tau a fost incarcat cu |cFF16c020".. szCount .." JD|r.")
vouchers.give_jd(szCount)
pc.remove_item(item.get_vnum(), 1);
end
end
end
end
end
end
Avatar utilizator
theshen
Nivel 1

Nivel 1
Mesaje: 102
Membru din: 02 Oct 2019, 19:18
Server: king2.ro
Regat: Jinno
Aprecieri: 50  
Mulţumiri: 0
Medalii

KidroKRONOS2 scrie: ↑06 Oct 2019, 19:05 Pune-i timp din itemshop si din itemproto.

Uite si un quest:
quest vouchers begin
state start begin
function get_vouchers_info(itemVnum)
vouchers_info = {
[80011] = { 1, 0 }, -- 1 MD
[80012] = { 5, 0 }, -- 5 MD
[80013] = { 25, 0 }, -- 25 MD
[80017] = { 50, 0 }, -- 50 MD
[80014] = { 100, 0 }, -- 100 MD
[80015] = { 500, 0 }, -- 500 MD
[80016] = { 1000, 0 }, -- 1000 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 sa astepti 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. Arunca ceva din el.") return false; end

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

when 80017.use or
80014.use or
80015.use or
80016.use or
80013.use or
80012.use or
80011.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("Asteapta 10 secunde de la inchiderea negotului.") return; end

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

am dat din ambele parti tot dispare, (dispare doar din fereastra item shop) in rest in inventar, nu dispare
Avatar utilizator
Kidro
Membru Club

Membru Club
Mesaje: 2487
Membru din: 29 Aug 2019, 16:49
Aprecieri: 331  
Mulţumiri: 5190  
Discord: Copiază ID
Medalii

theshen scrie: ↑06 Oct 2019, 19:20
KidroKRONOS2 scrie: ↑06 Oct 2019, 19:05 Pune-i timp din itemshop si din itemproto.

Uite si un quest:
quest vouchers begin
state start begin
function get_vouchers_info(itemVnum)
vouchers_info = {
[80011] = { 1, 0 }, -- 1 MD
[80012] = { 5, 0 }, -- 5 MD
[80013] = { 25, 0 }, -- 25 MD
[80017] = { 50, 0 }, -- 50 MD
[80014] = { 100, 0 }, -- 100 MD
[80015] = { 500, 0 }, -- 500 MD
[80016] = { 1000, 0 }, -- 1000 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 sa astepti 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. Arunca ceva din el.") return false; end

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

when 80017.use or
80014.use or
80015.use or
80016.use or
80013.use or
80012.use or
80011.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("Asteapta 10 secunde de la inchiderea negotului.") return; end

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

am dat din ambele parti tot dispare, (dispare doar din fereastra item shop) in rest in inventar, nu dispare
Banuiesc ca ai itemshop CMS.
Cand adaugi un item adauga-l cu timp 0 daca nu baga tu un timp acolo si vezi daca se sterge.
Avatar utilizator
theshen
Nivel 1

Nivel 1
Mesaje: 102
Membru din: 02 Oct 2019, 19:18
Server: king2.ro
Regat: Jinno
Aprecieri: 50  
Mulţumiri: 0
Medalii

KidroKRONOS2 scrie: ↑06 Oct 2019, 19:22
theshen scrie: ↑06 Oct 2019, 19:20
KidroKRONOS2 scrie: ↑06 Oct 2019, 19:05 Pune-i timp din itemshop si din itemproto.

Uite si un quest:
quest vouchers begin
state start begin
function get_vouchers_info(itemVnum)
vouchers_info = {
[80011] = { 1, 0 }, -- 1 MD
[80012] = { 5, 0 }, -- 5 MD
[80013] = { 25, 0 }, -- 25 MD
[80017] = { 50, 0 }, -- 50 MD
[80014] = { 100, 0 }, -- 100 MD
[80015] = { 500, 0 }, -- 500 MD
[80016] = { 1000, 0 }, -- 1000 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 sa astepti 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. Arunca ceva din el.") return false; end

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

when 80017.use or
80014.use or
80015.use or
80016.use or
80013.use or
80012.use or
80011.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("Asteapta 10 secunde de la inchiderea negotului.") return; end

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

am dat din ambele parti tot dispare, (dispare doar din fereastra item shop) in rest in inventar, nu dispare
Banuiesc ca ai itemshop CMS.
Cand adaugi un item adauga-l cu timp 0 daca nu baga tu un timp acolo si vezi daca se sterge.
tot se sterge am dat timp "1000000" in ishop si tot asa face, dar la alte iteme nu face asa, doar la vouchere
Avatar utilizator
Kidro
Membru Club

Membru Club
Mesaje: 2487
Membru din: 29 Aug 2019, 16:49
Aprecieri: 331  
Mulţumiri: 5190  
Discord: Copiază ID
Medalii

80014 ±łČŻ±Ç ITEM_QUEST 0 1 ANTI_SELL | ANTI_DROP LOG NONE NONE 0 0 0 0 0 LIMIT_NONE 0 LIMIT_NONE 0 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 0 0 0 0 0 0 0 0 0

Fa asa la tine in item proto.
Avatar utilizator
theshen
Nivel 1

Nivel 1
Mesaje: 102
Membru din: 02 Oct 2019, 19:18
Server: king2.ro
Regat: Jinno
Aprecieri: 50  
Mulţumiri: 0
Medalii

KidroKRONOS2 scrie: ↑06 Oct 2019, 19:28 80014 ±łČŻ±Ç ITEM_QUEST 0 1 ANTI_SELL | ANTI_DROP LOG NONE NONE 0 0 0 0 0 LIMIT_NONE 0 LIMIT_NONE 0 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 0 0 0 0 0 0 0 0 0

Fa asa la tine in item proto.
nu functioneaza
Avatar utilizator
Ley
Nivel 9

Nivel 9
Mesaje: 1934
Membru din: 09 Feb 2017, 22:30
Server: Colossus2
Regat: Jinno
Aprecieri: 221  
Mulţumiri: 1338  
Medalii

Subiect inactiv.
Imagine
Afișează semnătura
Închis
Răspunsuri
8
Vizualizări
735
Răspunsuri
2
Vizualizări
332
Răspunsuri
2
Vizualizări
190
Răspunsuri
10
Vizualizări
1576

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

  • Informaţie
  • Cine este conectat

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