Jump to content

Recommended Posts

Hi !. I've added to the server quest tombola. I don't know how to write a function that will unlock button to re-draw after the function returns "return".

when info or button begin
local losowo = number(1,2)
local str = " "
for i = 1,16 do
if i == 16 then
str = str..tombola.tablica(losowo, i, 1).."|"..tombola.tablica(losowo, i, 2)
else
str = str..tombola.tablica(losowo, i, 1).."|"..tombola.tablica(losowo, i, 2).."|"
end
end
cmdchat("OnPrepare"..str)
if pc.get_empty_inventory_count() < 3 then
syschat("Nie możesz losować, gdyż masz za mało miejsca w ekwipunku.")
return
end
if pc.count_item(200038) < 1 then
syschat("Nie posiadasz kuponu losu, nie możesz więc losować nagrody!")
cmdchat("reset_tombola_button")
return
end
cmdchat("get_input_start")
local czynnosc = input(cmdchat("get_input_value"))
cmdchat("get_input_end")
if czynnosc == "tombola|begin" then
pc.setqf("slot", number(1, 16))
cmdchat("OnRun "..number(2,3)*16+pc.getqf("slot").."|5")
elseif czynnosc == "tombola|end" then
syschat("Gratulacje! Otrzymałeś "..tombola.tablica(losowo, pc.getqf("slot")+1, 2).."x "..item_name(tombola.tablica(losowo, pc.getqf("slot")+1, 1)).." jako nagroda w Tomboli!")
pc.give_item2(tombola.tablica(losowo, pc.getqf("slot")+1, 1), tombola.tablica(losowo, pc.getqf("slot")+1, 2))
pc.remove_item(200038, 1)
end
end
end
end

game.py

 "reset_tombola_button"                : self.__ResetTombola,
 [..]
def    __ResetTombola(self):
  AND WHAT ?

 

Edited by AndrewSkc
Link to comment
https://metin2.dev/topic/7302-problem-tombola-quest/
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.