Jump to content

MOLOCKI

Inactive Member
  • Posts

    7
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by MOLOCKI

  1. Hi !

    I have a problem with ma Channelswitcher-Window. I call the open function at the moment with the key "F5" (this works) but when I press "F5" again it should be hide but it doesn't works,  just open is working. I tryed already a bit to change sth on the def close function but I was not succesful..

     

    GAME.py

    	if app.ENABLE_CHANNEL_SWITCHER:
    		def __ClickSwitchChannelButton(self):
    			self.switchChannelDialog = uiswitchchannel.SwitchChannelDialog()
    			if self.switchChannelDialog:
    				self.switchChannelDialog.Show()
    			else:
    				self.switchChannelDialog.Close()

     

    uiswitchchannel.py

    https://pastebin.com/DAkHbcVD

     

    thanks to everyone in advance !

  2. Hello !

    I'm a noob with no LUA expierence. I have a teaching quest, that User can collect her skill group without visit the npc.

    I want to add an bonus on all races excepted body warrior and weaponary sura.

     

    The Bonus is: affect.add_collect(99, 2, 60*60*24*365*60) -- Metins = 99

    I already tryed it with:

    if a == 1 then
    	affect.add_collect(99, 2, 60*60*24*365*60) -- Metins = 99
    end

    but I need something like

    if ((skill == 0 and a == 2) or (skill == 1) or (skill == 2 and a == 2) or (skill == 3)) then
    	affect.add_collect(99, 2, 60*60*24*365*60) -- Metins = 99
    end

     

    But that doesn't works because skill is an local variable so I can't call them in the last part.

    Idk  maybe it's a better way to make it with pc.get_skill_group and pc.get_job but I  don't know.. I'm too nooby :D
     

    Maybe someone can help me? would be very friendly ! thanks in advance

     

    here's the quest:

    quest directskills begin
    	state start begin
    		when login or levelup with pc.level >= 5 begin
    			if pc.get_skill_group() == 0 and pc.getqf("skills", 0) then
    				syschat("You have reached level 5, you can now choose your teaching. ")
    				syschat("Click on the quest on the left ")
    				set_state(run)
    			end
    		end
    	end
    	state run begin
    		when letter with pc.getqf("skills") == 0 begin
    			send_letter(gameforge[LC()][8077])
    		end
    		when button or info with pc.getqf("skills") == 0 begin
    			local all = {
    				[0] = {gameforge[LC()][8094], gameforge[LC()][8111]},
    				[1] = {gameforge[LC()][8116], gameforge[LC()][8124]},
    				[2] = {gameforge[LC()][8129], gameforge[LC()][8136]},
    				[3] = {gameforge[LC()][8141], gameforge[LC()][8148]},
    			}
    		--------------------------------------------		
    			local skill = {
    				[0]={
    					[1]={1, 2, 3, 4, 5},
    					[2]={16, 17, 18, 19, 20},
    				},
    				[1]={
    					[1]={31, 32, 33, 34, 35},
    					[2]={46, 47, 48, 49, 50},
    				},
    				[2]={
    					[1]={61, 62, 63, 64, 65, 66},
    					[2]={76, 77, 78, 79, 80, 81},
    				},
    				[3]={
    					[1]={91, 92, 93, 94, 95, 96},
    					[2]={106, 107, 108, 109, 110, 111}
    				},
    			}
    		---------------------------------------------
    			say_title(gameforge[LC()][8077])
    			local a = select(all[pc.get_job()][1], all[pc.get_job()][2], gameforge[LC()][11735])
    			if a == 1 or a == 2 then
    				pc.set_skill_group(tonumber(a))
    				pc.clear_skill()
    				clear_letter()
    				for i = 1, table.getn(skill[pc.get_job()][pc.get_skill_group()]) do
    					pc.set_skill_level (skill[pc.get_job()][pc.get_skill_group()], 40)
    				end
    				pc.setqf("skills", 1)
    			elseif a == 3 then
    				return
    			end
    		end
    	end
    end 

     

×
×
  • 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.