Jump to content
×
×
  • Create New...
  • 0

[Problem] Tombola Quest


AndrewSkc

Question

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
  • Answers 0
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


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.