Jump to content

ergod

Inactive Member
  • Posts

    71
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by ergod

  1. 5 hours ago, VegaS™ said:

     

    im here GIF by Leroy Patterson

     

    The basic changes are:

    From:

    
    	def __SelectSkillGroup(self, index):
    		for btn in self.skillGroupButton:
    			btn.SetUp()
    		self.skillGroupButton[index].Down()
    
    		if self.__CanUseHorseSkill():
    			if 0 == index:
    				index = net.GetMainActorSkillGroup()-1
    			elif 1 == index:
    				index = self.PAGE_HORSE
    
    		self.curSelectedSkillGroup = index
    		self.__SetSkillSlotData(net.GetMainActorRace(), index+1, net.GetMainActorEmpire())

    To:

    
    	def __SelectSkillGroup(self, pageIndex, (PAGE_SKILL_1, PAGE_SKILL_2, PAGE_SKILL_HORSE) = range(3)):
    		for pageButton in self.skillGroupButton:
    			pageButton.SetUp()
    
    		self.skillGroupButton[pageIndex].Down()
    
    		if pageIndex in (PAGE_SKILL_1, PAGE_SKILL_2):
    			skillGroupIndex = net.GetMainActorSkillGroup()
    			if bool(skillGroupIndex):
    				(tmpCurSkillGroup, tmpSkillGroup) = (skillGroupIndex - 1, skillGroupIndex)
    			else:
    				(tmpCurSkillGroup, tmpSkillGroup) = (pageIndex, pageIndex + 1)
    
    			self.curSelectedSkillGroup = tmpCurSkillGroup
    			self.__SetSkillSlotData(net.GetMainActorRace(), tmpSkillGroup, net.GetMainActorEmpire())
    
    		elif pageIndex == PAGE_SKILL_HORSE and self.__CanUseHorseSkill():
    			self.curSelectedSkillGroup = self.PAGE_HORSE
    
    		self.RefreshSkill()

     

    After some minutes of debugging I rewrote this shit, there're more changes, when i'll have some free time (at Monday), i'll post the code.

    Without skill group +/- horse riding:

    With skill group +/- horse riding:

     

    Vegas our hero :D thank you!

  2. ezgif-1-c3f1f2a5611d.gif

     

    The bug is:

    When you have no selected skills (you used skill reset or you just haven't got picked up skills) you can see in uicharacter board at skillpage two buttons for example:

    I have warrior character so I can see two skill pages Body & Mental buttons. When you have a horse level 21 or above (that means you can use horse skills) you can see only one skill page and second page is for horse skills here you should see Body & Mental buttons not Body & Horse skill buttons. Here must be something edited in uicharacter.py to see only character skills buttons until player select a skill group.

    I will be glad if someone can fix it.

    Thanks for answers!

  3.  

    Zitat

    quest horse_levelup begin
        state training1 begin
            when letter begin
                q.set_counter(gameforge.horse_levelup._training_1_count, 5-pc.getqf("kill_count"))
            end
            when 492.kill begin
                pc.setqf("kill_count", pc.getqf("kill_count")+1)
                q.set_counter(gameforge.horse_levelup._training_1_count, 5-pc.getqf("kill_count"))
            end
            when enter begin
                pc.setqf("kill_count", 0)
            end
            when leave begin
                q.done()
            end
            when letter begin
                setskin(NOWINDOW)
                makequestbutton(gameforge.horse_levelup._10_makequestbutton)
                q.set_title(gameforge.horse_levelup._10_makequestbutton)
                q.start()
                if    not pc.is_mount() then
                    setstate(failure)
                end

            end
            when button begin
                say_title(gameforge.horse_levelup._10_makequestbutton)
                say(gameforge.horse_levelup._20_say)
                if    not pc.is_mount() then
                    setstate(failure)
                end

            end
            when info begin
                say_title(gameforge.horse_levelup._10_makequestbutton)
                say(gameforge.horse_levelup._20_say)
                if    not pc.is_mount() then
                    setstate(failure)
                end

            end
            when 492.kill with pc.getqf("kill_count") >= 5 begin
                setstate(report)
            end
            when unmount begin
                setstate(failure)
            end
        end
        state training2 begin
            when letter begin
                q.set_counter(gameforge.horse_levelup._training_2_count, 5-pc.getqf("kill_count"))
            end
            when 494.kill begin
                pc.setqf("kill_count", pc.getqf("kill_count")+1)
                q.set_counter(gameforge.horse_levelup._training_2_count, 5-pc.getqf("kill_count"))
            end
            when enter begin
                pc.setqf("kill_count", 0)
            end
            when leave begin
                q.done()
            end
            when letter begin
                setskin(NOWINDOW)
                makequestbutton(gameforge.horse_levelup._30_makequestbutton)
                q.set_title(gameforge.horse_levelup._30_makequestbutton)
                q.start()
            end
            when button begin
                say_title(gameforge.horse_levelup._30_makequestbutton)
                say(gameforge.horse_levelup._40_say)
            end
            when info begin
                say_title(gameforge.horse_levelup._30_makequestbutton)
                say(gameforge.horse_levelup._50_say)
            end
            when 494.kill with pc.getqf("kill_count") >= 5 begin
                setstate(report)
            end
            when unmount begin
                setstate(failure)
            end
        end
        state training3 begin
            when letter begin
                q.set_counter(gameforge.horse_levelup._training_3_count, 10-pc.getqf("kill_count"))
            end
            when 635.kill begin
                pc.setqf("kill_count", pc.getqf("kill_count")+1)
                q.set_counter(gameforge.horse_levelup._training_3_count, 10-pc.getqf("kill_count"))
            end
            when enter begin
                pc.setqf("kill_count", 0)
            end
            when leave begin
                q.done()
            end
            when letter begin
                setskin(NOWINDOW)
                makequestbutton(gameforge.horse_levelup._60_makequestbutton)
                q.set_title(gameforge.horse_levelup._60_makequestbutton)
                q.start()
                if    not pc.is_mount() then
                    setstate(failure)
                end
            end
            when button begin
                say_title(gameforge.horse_levelup._60_makequestbutton)
                say(gameforge.horse_levelup._70_say)
                if    not pc.is_mount() then
                    setstate(failure)
                end
            end
            when info begin
                say(gameforge.horse_levelup._80_say)
                if    not pc.is_mount() then
                    setstate(failure)
                end
            end
            when 635.kill with pc.getqf("kill_count") >= 10 begin
                setstate(report)
            end
            when unmount begin
                setstate(failure)
            end
        end
        state training4 begin
            when letter begin
                q.set_counter(gameforge.horse_levelup._training_4_count, 10-pc.getqf("kill_count"))
            end
            when 636.kill begin
                pc.setqf("kill_count", pc.getqf("kill_count")+1)
                q.set_counter(gameforge.horse_levelup._training_4_count, 10-pc.getqf("kill_count"))
            end
            when enter begin
                pc.setqf("kill_count", 0)
            end
            when leave begin
                q.done()
            end
            when letter begin
                setskin(NOWINDOW)
                makequestbutton(gameforge.horse_levelup._90_makequestbutton)
                q.set_title(gameforge.horse_levelup._90_makequestbutton)
                q.start()
                if    not pc.is_mount() then
                    setstate(failure)
                end
            end
            when button begin
                say_title(gameforge.horse_levelup._90_makequestbutton)
                say(gameforge.horse_levelup._100_say)
                if    not pc.is_mount() then
                    setstate(failure)
                end
            end
            when info begin
                say_title(gameforge.horse_levelup._90_makequestbutton)
                say(gameforge.horse_levelup._100_say)
                if    not pc.is_mount() then
                    setstate(failure)
                end
            end
            when 636.kill with pc.getqf("kill_count") >= 10 begin
                setstate(report)
            end
            when unmount begin
                setstate(failure)
            end
        end
        state training5 begin
            when letter begin
                q.set_counter(gameforge.horse_levelup._training_5_count, 10-pc.getqf("kill_count"))
            end
            when 706.kill begin
                pc.setqf("kill_count", pc.getqf("kill_count")+1)
                q.set_counter(gameforge.horse_levelup._training_5_count, 10-pc.getqf("kill_count"))
            end
            when enter begin
                pc.setqf("kill_count", 0)
            end
            when leave begin
                q.done()
            end
            when letter begin
                setskin(NOWINDOW)
                makequestbutton(gameforge.horse_levelup._110_makequestbutton)
                q.set_title(gameforge.horse_levelup._110_makequestbutton)
                q.start()
                if    not pc.is_mount() then
                    setstate(failure)
                end
            end
            when button begin
                say_title(gameforge.horse_levelup._110_makequestbutton)
                say(gameforge.horse_levelup._120_say)
                if    not pc.is_mount() then
                    setstate(failure)
                end
            end
            when info begin
                say_title(gameforge.horse_levelup._110_makequestbutton)
                say(gameforge.horse_levelup._120_say)
                if    not pc.is_mount() then
                    setstate(failure)
                end
            end
            when 706.kill with pc.getqf("kill_count") >= 10 begin
                setstate(report)
            end
            when unmount begin
                setstate(failure)
            end
        end
        state training6 begin
            when letter begin
                q.set_counter(gameforge.horse_levelup._training_6_count, 10-pc.getqf("kill_count"))
            end
            when 2034.kill begin
                pc.setqf("kill_count", pc.getqf("kill_count")+1)
                q.set_counter(gameforge.horse_levelup._training_6_count, 10-pc.getqf("kill_count"))
            end
            when enter begin
                pc.setqf("kill_count", 0)
            end
            when leave begin
                q.done()
            end
            when letter begin

                setskin(NOWINDOW)
                makequestbutton(gameforge.horse_levelup._130_makequestbutton)
                q.set_title(gameforge.horse_levelup._130_makequestbutton)
                q.start()
                if    not pc.is_mount() then
                    setstate(failure)
                end
            end
            when button begin
                say_title(gameforge.horse_levelup._130_makequestbutton)
                say(gameforge.horse_levelup._140_say)
                if    not pc.is_mount() then
                    setstate(failure)
                end
            end
            when info begin
                say_title(gameforge.horse_levelup._130_makequestbutton)
                say(gameforge.horse_levelup._140_say)
                if    not pc.is_mount() then
                    setstate(failure)
                end
            end
            when 2034.kill with pc.getqf("kill_count") >= 10 begin
                setstate(report)
            end
            when unmount begin
                setstate(failure)
            end
        end
        state training7 begin
            when letter begin
                q.set_counter(gameforge.horse_levelup._training_7_count, 20-pc.getqf("kill_count"))
            end
            when 2108.kill begin
                pc.setqf("kill_count", pc.getqf("kill_count")+1)
                q.set_counter(gameforge.horse_levelup._training_7_count, 20-pc.getqf("kill_count"))
            end
            when enter begin
                pc.setqf("kill_count", 0)
            end
            when leave begin
                q.done()
            end
            when letter begin
                setskin(NOWINDOW)
                makequestbutton(gameforge.horse_levelup._150_makequestbutton)
                q.set_title(gameforge.horse_levelup._150_makequestbutton)
                q.start()
                if    not pc.is_mount() then
                    setstate(failure)
                end
            end
            when button begin
                say_title(gameforge.horse_levelup._150_makequestbutton)
                say(gameforge.horse_levelup._160_say)
                if    not pc.is_mount() then
                    setstate(failure)
                end
            end
            when info begin
                say_title(gameforge.horse_levelup._150_makequestbutton)
                say(gameforge.horse_levelup._160_say)
                if    not pc.is_mount() then
                    setstate(failure)
                end
            end
            when 2108.kill with pc.getqf("kill_count") >= 20 begin
                setstate(report)
            end
            when unmount begin
                setstate(failure)
            end
        end
        state training8 begin
            when letter begin
                q.set_counter(gameforge.horse_levelup._training_8_count, 10-pc.getqf("kill_count"))
            end
            when 1107.kill begin
                pc.setqf("kill_count", pc.getqf("kill_count")+1)
                q.set_counter(gameforge.horse_levelup._training_8_count, 10-pc.getqf("kill_count"))
            end
            when enter begin
                pc.setqf("kill_count", 0)
            end
            when leave begin
                q.done()
            end
            when letter begin
                setskin(NOWINDOW)
                makequestbutton(gameforge.horse_levelup._170_makequestbutton)
                q.set_title(gameforge.horse_levelup._170_makequestbutton)
                q.start()
                if    not pc.is_mount() then
                    setstate(failure)
                end
            end
            when button begin
                say_title(gameforge.horse_levelup._180_sayTitle)
                say(gameforge.horse_levelup._190_say)
                if    not pc.is_mount() then
                    setstate(failure)
                end
            end
            when info begin
                say_title(gameforge.horse_levelup._180_sayTitle)
                say(gameforge.horse_levelup._200_say)
                if    not pc.is_mount() then
                    setstate(failure)
                end
            end
            when 1107.kill with pc.getqf("kill_count") >= 10 begin
                setstate(report)
            end
            when unmount begin
                setstate(failure)
            end
        end
        state training9 begin
            when letter begin
                q.set_counter(gameforge.horse_levelup._training_9_count, 20-pc.getqf("kill_count"))
            end
            when 2203.kill begin
                pc.setqf("kill_count", pc.getqf("kill_count")+1)
                q.set_counter(gameforge.horse_levelup._training_9_count, 20-pc.getqf("kill_count"))
            end
            when enter begin
                pc.setqf("kill_count", 0)
            end
            when leave begin
                q.done()
            end
            when letter begin
                setskin(NOWINDOW)
                makequestbutton(gameforge.horse_levelup._210_makequestbutton)
                q.set_title(gameforge.horse_levelup._210_makequestbutton)
                q.start()
                if    not pc.is_mount() then
                    setstate(failure)
                end
            end
            when button begin
                say_title(gameforge.horse_levelup._210_makequestbutton)
                say(gameforge.horse_levelup._220_say)
                if    not pc.is_mount() then
                    setstate(failure)
                end
            end
            when info begin
                say_title(gameforge.horse_levelup._210_makequestbutton)
                say(gameforge.horse_levelup._220_say)
                if    not pc.is_mount() then
                    setstate(failure)
                end
            end
            when 2203.kill with pc.getqf("kill_count") >= 20 begin
                setstate(report)
            end
            when unmount begin
                setstate(failure)
            end
        end
        state start begin
            when 20349.chat.gameforge.horse_levelup._230_npcChat with horse.get_grade()==2 begin
                if horse.get_level()==20 then
                    say_title(gameforge.horse_levelup._240_sayTitle)
                    say(gameforge.horse_levelup._250_say)
                elseif pc.countitem("50050")<1 then
                    say_title(gameforge.horse_levelup._240_sayTitle)
                    say(gameforge.horse_levelup._260_say)
                    setstate(need_item50050)
                elseif get_time()<pc.getqf("next_time") then
                    say_title(gameforge.horse_levelup._240_sayTitle)
                    say(gameforge.horse_levelup._270_say)
                elseif horse.get_stamina_pct()<=10 then
                    say_title(gameforge.horse_levelup._240_sayTitle)
                    say(gameforge.horse_levelup._280_say)
                elseif horse.get_health_pct()<=10 then
                    say_title(gameforge.horse_levelup._240_sayTitle)
                    say(gameforge.horse_levelup._290_say)
                elseif horse.is_riding()==0 then
                    say_title(gameforge.horse_levelup._240_sayTitle)
                    say(gameforge.horse_levelup._300_say)
                elseif (horse.get_level()>=11 and horse.get_level()<=19) then
                    say_title(gameforge.horse_levelup._240_sayTitle)
                    say(gameforge.horse_levelup._310_say)
                    if is_test_server() then
                        pc.setqf("next_time", get_time()+10)
                    else
                        pc.setqf("next_time", get_time()+60*60*1) --60Sec*60min*1Hour
                    end
                    if horse.get_level()==11 then
                        setstate(training1)
                    elseif horse.get_level()==12 then
                        setstate(training2)
                    elseif horse.get_level()==13 then
                        setstate(training3)
                    elseif horse.get_level()==14 then
                        setstate(training4)
                    elseif horse.get_level()==15 then
                        setstate(training5)
                    elseif horse.get_level()==16 then
                        setstate(training6)
                    elseif horse.get_level()==17 then
                        setstate(training7)
                    elseif horse.get_level()==18 then
                        setstate(training8)
                    elseif horse.get_level()==19 then
                        setstate(training9)
                    end
                end
            end
        end
        state need_item50050 begin
            when login or levelup or enter with pc.countitem("50050") >= 1 begin
                set_state(start)
            end
            when letter begin
                setskin(NOWINDOW)
                makequestbutton(gameforge.horse_levelup._320_makequestbutton)
                q.set_title(gameforge.horse_levelup._320_makequestbutton)
                q.start()
            end
            when button begin
                say_title(gameforge.horse_levelup._320_makequestbutton)
                say(gameforge.horse_levelup._330_say)
                setstate(start)
                q.done()
            end
            when info begin
                say_title(gameforge.horse_levelup._320_makequestbutton)
                say(gameforge.horse_levelup._330_say)
                setstate(start)
                q.done()
            end
        end
        state failure begin
            when login or levelup or enter or letter begin
                setskin(NOWINDOW)
                makequestbutton(gameforge.horse_levelup._340_makequestbutton)
                q.set_title(gameforge.horse_levelup._340_makequestbutton)
                q.start()
            end
            when button begin
                say_title(gameforge.horse_levelup._340_makequestbutton)
                say(gameforge.horse_levelup._350_say)
                setstate(start)
                q.done()
            end
            when info begin
                say_title(gameforge.horse_levelup._340_makequestbutton)
                say(gameforge.horse_levelup._350_say)
                setstate(start)
                q.done()
            end
        end
        state report begin
            when letter begin
                local v=find_npc_by_vnum(20349)
                if 0==v then
                else
                    target.vid("__TARGET__", v, "")
                end
            end
            when letter begin
                setskin(NOWINDOW)
                makequestbutton(gameforge.horse_levelup._360_makequestbutton)
                q.set_title(gameforge.horse_levelup._360_makequestbutton)
                q.start()
            end
            when button begin
                say_title(gameforge.horse_levelup._360_makequestbutton)
                say(gameforge.horse_levelup._370_say)
            end
            when info begin
                say_title(gameforge.horse_levelup._360_makequestbutton)
                say(gameforge.horse_levelup._370_say)
            end
            when __TARGET__.target.click begin
                target.delete("__TARGET__")
                say_title(gameforge.horse_levelup._240_sayTitle)
                say(gameforge.horse_levelup._380_say)
                setstate(reward)
                q.done()
            end
        end
        state reward begin
            when letter begin
                setskin(NOWINDOW)
                makequestbutton(gameforge.horse_levelup._390_makequestbutton)
                q.set_title(gameforge.horse_levelup._400_qSetTitle)
                q.start()
            end
            when button begin
                say_title(gameforge.horse_levelup._400_qSetTitle)
                if horse.get_level()<=10 then
                    say(gameforge.horse_levelup._410_say)
                elseif horse.get_level()>=20 then
                    say(gameforge.horse_levelup._420_say)
                elseif (horse.get_level()>=11 and horse.get_level()<=19) then
                    local s=number(1, 2)
                    if 1>=s then -- 50.00% (1/2)
                        say(gameforge.horse_levelup._430_say)
                        pc.setqf("next_time", 0)
                    elseif 2>=s then -- 50.00% (1/2)
                        say(gameforge.horse_levelup._440_say)
                        if pc.countitem("50050")>=1 then
                            char_log(0, "HORSE_ADVANCE", "BEGIN")
                            pc.removeitem("50050", 1)
                            char_log(0, "HORSE_ADVANCE", "DEC 50050 1")
                            horse.unride()
                            horse.advance()
                            horse.ride()
                            char_log(0, "HORSE_ADVANCE", "INC horse_advance 1")
                            char_log(0, "HORSE_ADVANCE", "END")
                            say(string.format(gameforge.horse_levelup._450_say, (horse.get_level())))
                            if horse.get_level()==20 then
                                say(gameforge.horse_levelup._460_say)
                                pc.setqf("next_time", 0)
                            else
                                say(gameforge.horse_levelup._470_say)
                            end
                        else
                            say(gameforge.horse_levelup._480_say)
                        end
                    end
                end
                setstate(start)
                q.done()
            end
        end
        state __COMPLETE__ begin
            when enter begin
                q.done()
            end
        end
    end
     

    When i click the quest to see  the result's of the levelup it doesn't open and following sysser comming

    Zitat

    OnInfo: QUEST no info script by state 1322349139 (quest horse_levelup)
     

    Someone here to help me?

  4. Hello dev,

    i have a big problem and i need your help please i dont know who is the problem but sometimes my core throw down and my all of my syserrs are clear!

    i did gdb my game.core after crash:

    item.h line 70 

            BYTE        GetType() const        { return m_pProto ? m_pProto->bType : 0;    }

    i dont unterstand who is the problem can someone help me?

    Thank you very much Dev!

     

    ps: Sorry for my english

  5. 29 minutes ago, Mind Rapist said:

    #UP

    Btw you should show us some functions dude it might be helpful :P

    Spoiler

    void CActorInstance::SetAcce(DWORD eAcce, float fSpecular)
    {
        m_eAcce = eAcce;
        CRaceData * pRaceData;
        const char * szBoneName;
        if (!GetAttachingBoneName(CRaceData::PART_ACCE, &szBoneName))
            return;

        if (!CRaceManager::Instance().GetRaceDataPointer(m_eRace, &pRaceData))
            return;
        

        CRaceData::SAcce* pkAcce = pRaceData->FindAcce(eAcce);
        if (pkAcce)
        {
            if (!pkAcce->m_stModelFileName.empty())
            {
                CGraphicThing * pkAcceThing = (CGraphicThing *)CResourceManager::Instance().GetResourcePointer(pkAcce->m_stModelFileName.c_str());
                RegisterModelThing(CRaceData::PART_ACCE, pkAcceThing);
                SetModelInstance(CRaceData::PART_ACCE, CRaceData::PART_ACCE, 0);
                AttachModelInstance(0, szBoneName, CRaceData::PART_ACCE);
            }

            const std::vector<CRaceData::SSkin>& c_rkVct_kSkin = pkAcce->m_kVct_kSkin;
            std::vector<CRaceData::SSkin>::const_iterator i;
            for (i = c_rkVct_kSkin.begin(); i != c_rkVct_kSkin.end(); ++i)
            {
                const CRaceData::SSkin& c_rkSkinItem = *i;
                CResource * pkRes = CResourceManager::Instance().GetResourcePointer(c_rkSkinItem.m_stDstFileName.c_str());
                if (pkRes)
                {
                    if (fSpecular > 0.0f)
                    {
                        SMaterialData kMaterialData;
                        kMaterialData.pImage = static_cast<CGraphicImage*>(pkRes);
                        kMaterialData.isSpecularEnable = TRUE;
                        kMaterialData.fSpecularPower = fSpecular;
                        kMaterialData.bSphereMapIndex = 0;
                         SetMaterialData(CRaceData::PART_ACCE, c_rkSkinItem.m_stSrcFileName.c_str(), kMaterialData);
                    }
                    else
                    {
                        SetMaterialImagePointer(CRaceData::PART_ACCE, c_rkSkinItem.m_stSrcFileName.c_str(), static_cast<CGraphicImage*>(pkRes));
                    }
                }
            }
        }
    }

    Binary/GameLib/ActorInstanceData.cpp

    The black lines are the problem but if i delete this i dont have more the scale...

    sorry for my bad english btw :D

  6. Hello guys I installed some sf and there was a pre-installed acce system. About that when I login for the first time in my character the acce part is not displayed in the character select screen but if I relog without closing completely the client everything is fine. If I close the client it does it again for the first login and then back to normal... I checked the acce_part record in the database and nothing is changing. Can someone give me a hand?

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