Jump to content

TMP4

Contributor
  • Posts

    1112
  • Joined

  • Last visited

  • Days Won

    20
  • Feedback

    100%

Posts posted by TMP4

  1. Because maybe it caused by external thing.

     

    So now look for the newest backup when the sash is working and make a list with the modifications what the next backup contains where it not working. If it's systems you can try disable them in the locale_inc.h / service.h. Otherwise you need keep reverse the changes. Hopefully you do backups often so it will be just a little work.

    • Love 1
  2. That's why people creating backups and stores a few months back. You could know what did you modify when it happened.

    I guess you don't have any, am i right? Well, man learns from his own fault.

     

    It is not possible to help you just by writing a comment, we have to investigate by having access to your file, TeamViewer, Anydesk, but I will not be the one to do this, do not pm me.

  3.     int _set_regen_in_map( lua_State * L )
        {
            int iMapIndex = static_cast<int>(lua_tonumber(L, 1));
            std::string szFilename(lua_tostring(L, 2));
    
            LPSECTREE_MAP pkMap = SECTREE_MANAGER::instance().GetMap(iMapIndex);
    
            if (pkMap != NULL)
            {
                regen_load( szFilename.c_str(), iMapIndex, pkMap->m_setting.iBaseX ,pkMap->m_setting.iBaseY );
            }
    
            return 0;
        }
    	{	"set_regen_in_map",					_set_regen_in_map					},

    I made it back in the time so i pasted for you. Endymion right, regen_load function is what needed. Add it to questlua_global.cpp

    Keep in mind you can't cancel it lol. If you make a clear regen function, it will clear the map's basic regen too.

    If you want to cancel it would be better to use that map as a dungeon.

  4. It is correct even with sql or txt.

     

    So a guess: Do you have 15249 once in item_proto or do you have duplicate line?

    If you don't have a duplicate, can you check to change bonus in another item? 

     

    --------------------------


    According to your private message

    Spoiler

     

    You can change avg damage in item_addon.cpp

    
    	int iSkillBonus = MINMAX(-30, (int) (gauss_random(0, 5) + 0.5f), 30);
    	int iNormalHitBonus = 0;
    	if (abs(iSkillBonus) <= 20)
    		iNormalHitBonus = -2 * iSkillBonus + abs(number(-8, 8) + number(-8, 8)) + number(1, 4);
    	else
    		iNormalHitBonus = -2 * iSkillBonus + number(1, 5);

    As you see it uses some kind of formula to calculate.

    If you want to raise the number i would only extend it with

    
    iNormalHitBonus += 10;

    So for example if a player would have 30% avg, it will add 10 to it and he will get 40%.

    But you can play with that formula if you don't want to do this way.

     

    PS: I usually don't answer private messages.

     

     

  5. Can you provide the code?

     

    Otherwise it is not possible, if you copy-paste a regen.txt and only changing coords then it will work and you miss something.

    Maybe stone, boss npc.txt have that 3031 and you had this syserr for a long time just only now noticing it? 

     

     

    • Good 1
  6. I think there's not.

    You can use something like this like every python hack do for mob scanning:

            import player
            import chat 
            mobVIDList=[]
            for i in xrange(1, 100000):
                dys = player.GetCharacterDistance(i)
                if dys > 0 and dys < 7500:
                    if chr.INSTANCE_TYPE_ENEMY == chr.GetInstanceType(i):
                        chat.AppendChat(chat.CHAT_TYPE_INFO, "There is a nearby mob: %d" % i)
                        mobVIDList.append(i)

    Be aware that it can freeze the client for 1 sec. 

    Afaik a VID cannot be higher then 100000 that's why i set that. Maybe it can lowered.

     

    Edit: Tested it and it's not freezing the client.

    133912Screenshot-1.png

    • Love 1
  7. You're on a wrong forum :D Go to gameforge's romianian forum and report your bug there. Here we only can fix the .quest file.

     

    Edit: I checked the quest, drop/sell/stash the item and kill tiger for another one and the quest will continue.

     

    To server owners who want to fix the quest just add this if to "when enter or login begin"'s bottom at state hunting:

                if new_quest_lv22_neededAmountDrop1 == pc.count_item(new_quest_lv22_drop1) and  new_quest_lv22_neededAmountDrop2 == pc.count_item(new_quest_lv22_drop2) then
                    -- collected everything
                    notice_multiline(gameforge.new_quest_lv22._061_notice, notice)
                    q.done()
                    set_state(back_to_baekgo)
                end

    With this if the player reloging with the bugged situation it will contine and don't have to drop the item and kill tiger for another one.

    • Lmao 1
  8. 20031

    This is santa as i remember, and it is intended to disappear.

    (Originally it appears and disappers in Sohan but Gameforge never used this event)

     

    Open xmas_event.h from game source and look for this:

    MOB_SANTA_VNUM = 20031, //Ȑ٠
    

    And edit the vnum to something else what you don't use.

    You can remove the whole santa system if you like to.

    • Love 2
  9. If you just clear g_privateShopAdvertisementBoardDict in def Clear(): that's not solve the problem 100%, the problem can still happens if the player not warping/reloging, e.g. staying on the same map. That's why most people solve it in OnUpdate with self.Hide & DeleteADBoard if it's not player or npc (offline shop).

     

    Btw i know all of this just "masking" the problem, GF solved it in another way because they're not using def Clear() or OnUpdate() but they no longer have this bug.

    (Also it was not a problem until r2089M, i think r34083 introduced it)

    • Love 1
  10. That bug is not actually caused by offline shop originally, just every offline shop uses the normal shop mechanism that already bugged.

    It was presented in gayforge's servers too until ~2017 btw :D

    The problem: Monsters can get the same vid what used a player/npc already with shop.

     

    To fix for normal shops: uiprivateshopbuilder.py

     

    search:

        def OnUpdate(self):
            if not self.vid:
                return
           
            if systemSetting.IsShowSalesText():

    modify:

    	def OnUpdate(self):
    		if not self.vid:
    			return
    			
    		if chr.GetInstanceType(self.vid) not in [chr.INSTANCE_TYPE_PLAYER,chr.INSTANCE_TYPE_NPC]:
    			self.Hide()
    			DeleteADBoard(self.vid)
    
    		if systemSetting.IsShowSalesText():

    For offline shop you have to do the same thing, maybe the DeleteADBoard can be different named but that's all. For Ken's shop it is not different.

     

    ----------------------------

     

    Adding a new currency to offline shop is not something like can be done with "just pass me a tutorial" :D

    We do not even know what version are u using, i know 4 different offline shop and some other what not public.

    This won system have tutorial for Great's offline shop, maybe you can use it as a template if you're using Great's.

     

    • Love 1
  11. Because your y coordinate is too low? :D

     

    uiscript/costumewindow.py

                                            {"index":COSTUME_START_INDEX+0, "x":61, "y":45, "width":32, "height":64},
                                            {"index":COSTUME_START_INDEX+1, "x":61, "y": 8, "width":32, "height":32},
                                            {"index":COSTUME_START_INDEX+2, "x":13, "y":15, "width":32, "height":96}, #Look for height 96, that will be your costume_weapon and change y coordinate
                                            {"index":COSTUME_START_INDEX+4, "x":62, "y":125, "width":32, "height":32},
                                            {"index":COSTUME_START_INDEX+3, "x":13, "y":125, "width":32, "height":32},

     

    For me costume_weapon is the 3rd line because i installed it first. (body&hair is 1-2, those are default systems in 40k)

    It can be vary on yours but look for height 96 and that'll be it and adjust your y coordinate.

    • Love 1
  12. Quote

        state training_frame_purple_step5 begin
            when letter begin
                target.pos("__TARGET__", 490, 560, 62, "")
            end
            when letter begin
                setskin(NOWINDOW)
                makequestbutton(gameforge.pony_levelup._130_makequestbutton)
                q.set_title(gameforge.pony_levelup._130_makequestbutton)
                q.start()
            end
            when button or info begin
                say_title(gameforge.pony_levelup._130_makequestbutton)
                say(gameforge.pony_levelup._140_sayReward)
            end
            when 22000.use or 22010.use begin
                setstate(failure)
            end
            when __TARGET__.target.arrive begin
                target.delete("__TARGET__")

                say_title(gameforge.pony_levelup._130_makequestbutton)
                            say_reward(gameforge.pony_levelup._150_sayReward)
                            setstate(report)
            end
            when unmount begin
                setstate(failure)
            end
        end

     

    I marked with red what you're looking for.

    (local_x, local_y, mapindex when you set the target's location)

     

    If you don't want to make a target (like treasure hunting or something) then you can use these quest function:

    pc.get_local_x()
    pc.get_local_y()
    pc.get_map_index()

    I just wrote an example quest for hidden treasure hunting:

    quest lost_treasure begin
    	state start begin
    		when login with pc.get_map_index() == 255 and pc.getqf("treasure") == 0 begin
    			loop_timer("hidden_treasure", 3)
    			chat("Search the hidden spot!")
    		end
    		when hidden_treasure.timer with pc.getqf("treasure") == 0 begin
    			if pc.get_local_x() >= 100 and if pc.get_local_x() <= 150 and pc.get_local_y() >= 50 and pc.get_local_y() <= 100 then
    				chat("You found the area!")
    				pc.change_gold(1000000)
    				pc.setqf("treasure",1)
    				cleartimer("hidden_treasure")
    			end
    		end
    	end
    end

    So if the user go to the rectangle (x: 100,150; y: 50, 100) he'll get gold only once.

    It uses loop_timer (3sec) but i suppose it is one time or event quest so it'll be good.

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