Jump to content

Syreldar

Premium
  • Posts

    1292
  • Joined

  • Last visited

  • Days Won

    38
  • Feedback

    100%

Community Answers

  1. Syreldar's post in Changing hero's medal bonuses was marked as the answer   
    special_item_group.txt
    Group 스폐셜 { Vnum 10050 -- type special -- 1 71148 100000 1 --Ring of Will Power 2 71149 100001 1 --Ring of Deadly Power 3 71158 100002 1 --Hero's Medal 4 71135 100003 1 --Crescent Moon Ring 5 71136 100004 1 --Mighty Lolly 6 71143 100005 1 --Ring of Joy 7 71145 100006 1 --Amulet of Eternal Love 8 71188 100007 1 --Magic Lolly 9 71199 100008 1 --Chocolate Amulet 10 71202 100009 1 --Nazar Amulet 11 72054 100010 1 --Amulet of the Guardians 12 76030 100011 1 --Power Lolly 13 76047 100011 1 --Power Lolly (3D) 14 72062 100012 1 --Experience Ring +200 15 72062 100012 1 --Experience Ring +200 16 72703 100015 1 --Tiger Bone Earring 17 72709 100015 1 --Tiger Bone Earring 18 72704 100016 1 --Dragon Bone Earring 19 72710 100016 1 --Dragon Bone Earring 20 72705 100017 1 --Tiger Bone Bracelet 21 72711 100017 1 --Tiger Bone Bracelet 22 72706 100018 1 --Dragon Bone Bracelet 23 72712 100018 1 --Dragon Bone Bracelet } ->    3    71158    100002    1 --Hero's Medal
    Group    속성3 {     Vnum    100002 --     type    ATTR --     1    66    50 --     2    64    30 --     3    7    20 --     4    9    20 --     5    69    10 --     6    70    10 --     effect    d:\ymirwork\effect\etc\buff\buff_symbol1.mse -- }  
  2. Syreldar's post in Bio quests wihout waiting was marked as the answer   
    Contact me on discord.
  3. Syreldar's post in drop from all mobs was marked as the answer   
    when kill with not npc.is_pc() and math.random(100) < X begin game.drop_item_with_ownership(vnum, quantity); end -- when  
  4. Syreldar's post in quest - npc.is_gm / npc.get_gm_level was marked as the answer   
    ..?
    when kill with npc.is_pc() and pc.is_gm() and pc.get_map_index() == 182 begin local my_vid = pc.get_vid(); pc.select(npc.get_vid()); -- notice("You've been killed by a GM. You'll be warped to your village.") warp_to_village(); -- pc.select(my_vid); end -- when  
  5. Syreldar's post in Back to the Dungeon System 7, 8, 9th Floor Problem was marked as the answer   
    This is not a quest issue.
    There's a conflict of coordinates between DevilTower and Valley of Seungryong. This bug also exists in official servers, but it's irrelevant cause they don't have a Rejoin system within the DevilTower dungeon, thus never accessing that set of coordinates globally.
    The conflict for the DevilTower becomes relevant at 7th, 8th and 9th floor cause they're placed in the utmost right section of the map, which, as you can see from the screenshot below, is partly inside the Valley's map sector.

     
    The server simply doesn't know where to place you., because that global set of coordinates belongs to two different maps.
    To fix the issue, you gotta move either the DevilTower or the Valley in different coordinates in the plane, be careful to choose a free and valid set of coordinates.
  6. Syreldar's post in How to make GM not being able to attack players while using /inv ? was marked as the answer   
    1. Clientside:
    Srcs/Client/InstanceBase.cpp
    bool CInstanceBase::IsAttackableInstance(CInstanceBase& rkInstVictim) { // else if (IsPC()) { if (rkInstVictim.IsStone()) return true; if (rkInstVictim.IsPC()) { // ADD This here: if (IsAffect(AFFECT_INVISIBILITY)) return false; // //  
    2. Serverside:
    Srcs/game/src/pvp.cpp:
    bool CPVPManager::CanAttack(LPCHARACTER pkChr, LPCHARACTER pkVictim) { // if (pkChr == pkVictim) // ³»°¡ ³¯ Ä¥¶ó°í ÇÏ³× -_- return false; if (pkVictim->IsNPC() && pkChr->IsNPC() && !pkChr->IsGuardNPC()) return false; // Add this here: if (pkChr->IsAffectFlag(AFF_INVISIBILITY) && pkVictim->IsPC()) return false; // //
  7. Syreldar's post in Lightning Claw & Flame Spirit --> To not attack invisible players was marked as the answer   
    Why would you care how is in official, if that's what he wants regardless?
    char_skill.cpp, search:
    // 2. Shoot! if (f.GetVictim()) { ch->CreateFly(FLY_SKILL_MUYEONG, f.GetVictim()); ch->ComputeSkill(SKILL_MUYEONG, f.GetVictim()); } Turn into:
    // 2. Shoot! LPCHARACTER victim = f.GetVictim(); if (victim && !victim->IsAffectFlag(AFF_EUNHYUNG) && !victim->IsAffectFlag(AFF_INVISIBILITY) && !victim->IsAffectFlag(AFF_REVIVE_INVISIBLE))) { ch->CreateFly(FLY_SKILL_MUYEONG, victim); ch->ComputeSkill(SKILL_MUYEONG, victim); }  
  8. Syreldar's post in [ pc.setqf ] from input ? was marked as the answer   
    quest test begin state start begin when 10581.chat."Block Player" with pc.is_gm() begin say_event_title(string.format("%s:[ENTER]", mob_name(10581))) say("Type the name of the player whom you want to") say("lock out of accessing this map.[ENTER]") local player_name = input(); -- yield say_event_title(string.format("%s:[ENTER]", mob_name(10581))) local player_vid = find_pc_by_name(player_name); if (player_vid == 0) then return say_reward(string.format("The player `%s` is offline or in another core.", player_name)); end -- if local old_vid = pc.select(player_vid, player_vid); pc.setf("map_control", "cannot_enter", 1); pc.select(old_vid, old_vid); say("Operation complete.[ENTER]") end -- when end -- state end -- quest  
    The quest is limited due to the fact that if the player is offline or in a separate core you won't be able to reach out to him to assign the flag.
    This can be solved via query, i'll give you a rough example of the code using @ martysama0134's mysql_direct_query function, you can find it here paired with other useful functions: https://www.elitepvpers.com/forum/metin2-pserver-guides-strategies/3327940-release-mysql_direct_query-get_table_postfix-mysql_escape_string-written-c-lua.html
    Keep in mind that this code works but you'll still have to properly escape the string on the input in order to avoid possible sqli.
    local results, ret = mysql_direct_query(string.format("SELECT `id` FROM `player`.`player` WHERE `name` = '%s' LIMIT 1;", player_name)); if (results > 0) then mysql_direct_query(string.format("INSERT INTO `player`.`quest`(`dwPID`, `szName`, `szState`, `lValue`) VALUES (%d, 'map_control', 'cannot_enter', 1) ON DUPLICATE KEY UPDATE `lValue` = 1;", ret[1].id)) else say_reward(string.format("The player `%s` was not found.[ENTER]", player_name)) end -- if/else
  9. Syreldar's post in Picking up close item with mouse click and with full inventory result in ChatPacket spam was marked as the answer   
    Source/Client/UserInterface/PythonPlayerInput.cpp:
    In: 
    void CPythonPlayer::__OnPressItem(CInstanceBase & rkInstMain, DWORD dwPickedItemID) search for:
    rkInstMain.NEW_Stop(); add above:
    NEW_SetMouseSmartState(MBS_CLICK, false);  
    By the way, You should really start marking your topics where you got an answer as solved, and also start giving at least reactions to them, you know, it would be the bare minimum since you've been here asking things and help for years.
  10. Syreldar's post in add variable to command in lua was marked as the answer   
    name = tonumber(input()) Your input only accepts numerical values and you didn't make any input validation.
    If "name" is supposed to be the name of a player this will never work because of that. It should be:
    name = input() and then add some validation to check if the name exist and the player is online, if necessary.
     
    quest private_voice_chat begin state start begin when 40003.use begin local item_vnum = item.get_vnum(); say_event_title(string.format("%s:[ENTER]", item_vnum)) say_light_blue("Type the receiver's name:[ENTER]") local name = tonumber(input()); say_event_title(string.format("%s:[ENTER]", item_vnum)) if (not name) then return say_reward("Insert a name, please.[ENTER]"); end -- if say_light_blue("Choose the channel:[ENTER]") local voice_channels_list = {}; local voice_channels_num = 2; -- Add as many as you want. for i = 1, voice_channels_num do table.insert(voice_channels_list, string.format("Voice n.%d", i)); end -- for table.insert(voice_channels_list, "Abort"); local voice_selection = select_table(voice_channels_list); if (voice_selection == table.getn(voice_channels_list)) then return; -- Abort end -- if command(string.format("voice_chat %s %d", name, voice_selection)); end -- when end -- state end -- quest  
  11. Syreldar's post in unequip costume when change sex was marked as the answer   
    quest item_change_sex begin state start begin when 71048.use begin say_title(translate().change_empire._50_sayTitle) if (pc.get_level() < 50) then return say_reward(translate().item_change_sex._10_sayReward); elseif (pc.get_wear(19) ~= nil) then return say_reward("You have to unequip your body costume first."); elseif (pc.is_engaged()) then return say_reward(translate().item_change_sex._30_sayReward) elseif (pc.is_married()) then return say_reward(translate().item_change_sex._30_sayReward) elseif (pc.is_polymorphed()) then return say_reward(translate().item_change_sex._60_sayReward) end -- if/elseif say(translate().item_change_sex._130_say) wait() say_title(translate().item_change_sex._120_sayTitle) say(translate().item_change_sex._140_say) if (select(translate().locale.guild.yes, translate().locale.guild.no) == 1) then say_title(translate().item_change_sex._120_sayTitle) say(translate().item_change_sex._150_say) say_reward(translate().change_empire._230_sayReward) pc.remove_item(71048, 1); pc.change_sex(); pc.polymorph(20032); -- So you don't need to relog. end -- if end -- when end -- state end -- quest  
  12. Syreldar's post in Delay in the appearance of monsters on the map was marked as the answer   
    I told you to check the accumulation inside the run.msa and walk.msa files, not to send me motlist.txt.
    Secondly, why is your lion mount using the pony folder? he's taking speed values from the pony's accumulation.. That's horribly wrong.
     
    The correct folder to use is
    lion  
    The correct accumulation value for share/data/monster/lion/run.msa is:
    Accumulation             0.00    -589.63    0.00  
    The correct accumulation value for share/data/monster/lion/walk.msa is:
    Accumulation 0.00 -278.46 0.00  
  13. Syreldar's post in Arrow NPC Effect Bug was marked as the answer   
    when login begin local v = find_npc_by_vnum(NPC_VNUM) if v != 0 then target.vid("theowahdan", v, "Theowahdan") end end As expected, you're setting a target but you're not clearing it. You have 2 options:
     
    1. Add target.remove("theowahdan") under "when NPC_VNUM.chat."What is a Sash?" begin", and the target arrow will disappear the next time you click on that option in-game.
    2. Remove that whole snippet.
     
    After you did one of these 2, recompile the quest and write in game "/reload q" or restart cores.
  14. Syreldar's post in regen.txt weird bug was marked as the answer   
    You're not giving random coordinate spaces to them, you cannot use 0 and 0 as randx and randy, min. 1 for both.
     

  15. Syreldar's post in Question regarding "When enter" was marked as the answer   

     
    enter triggers upon entering that state. The only thing it currently does is setting the count to 0 upon entering the state.
  16. Syreldar's post in How functions accessible in lua quests was marked as the answer   
    It seems to me you didn't understand my answer well.
     
    1. Inside your sources, there are many files in which the functions are defined. The pc.xxx functions are defined inside questlua_pc.cpp. 

     

     

     
    2. All the useable functions are listed inside quest_functions, if you add new ones, they have to be also added there, because that file also works as an automatic "includer" for global functions; which are those defined inside the sources and/or external lua files such as questlib.lua.
     
    When a quest uses a determined function, the compiler looks for it inside that file. If it's not found then an error will pop up and your quest will not compile. (unless it's defined in the quest itself)
     
  17. Syreldar's post in Problem targe_hp was marked as the answer   
    Fix your indentation in def CloseTargetBoardIfDifferent.
    You should learn some basics before copypasting things from the internet.
  18. Syreldar's post in Quest text bug was marked as the answer   
    Hi LordZiege,
     
    the problem is that you're issuing a normal send_letter inside a quest window. This is not possible under normal circumstances since it sets your quest skin to NOWINDOW, and so the window fails to create and render.
     
    Solutions:
    1. Issue the send_letter after the quest dialog is over:
    say_title(gameforge[get_lang()].welcome_quest.letter) say(gameforge[get_lang()].welcome_quest.text) say_reward(gameforge[get_lang()].welcome_quest.text2) pc.setqf("kill_wilddog", 0) wait() -- Creates a second questtext instance which will be empty since no further "say" is used, and so it will trigger after you press "OK" send_letter(gameforge[get_lang()].welcome_quest.letter3) set_state(kill) 2. Use this function instead:
    send_letter = function(title) makequestbutton(title); --setskin(NOWINDOW); By commenting out this function the problem gets fixed. q.set_title(title); q.start(); end -- function -- ..Or create a new one like this: send_letter_new = function(title) makequestbutton(title); q.set_title(title); q.start(); end -- function  
  19. Syreldar's post in [BUGS-FIX = PAY] Many errors / Bug on my server was marked as the answer   
    SYSERR: Apr 11 01:13:09 :: SpawnMob: SpawnMob: no mob data for vnum 9004 A map is trying to spawn non-existent monsters. Find the culprit regen and remove said monsters.
  20. Syreldar's post in Problem with LUA Quest was marked as the answer   
    Np, btw you don't have to write thank you messages, giving likes is enough.
    Use the upvote button to make my answer the most visible so people know what the problem was and contact a mod to close the topic.
  21. Syreldar's post in Sash unequip problem was marked as the answer   
    take this part:
    dwAcce += 85000; ClearAcceEffect(); Change into:
    __ClearAcceEffect(); if (dwAcce == 0) { m_GraphicThingInstance.AttachAcce(false, 0); return; } dwAcce += 85000;  
  22. Syreldar's post in when .take with item.get_vnum() --- shortcut lua function ? was marked as the answer   
    It's good practice to use understandable variable names.
    quest QUESTNAME begin state start begin function CanTakeItem(vnum) local accepted_items = {14500, 12000, 18000}; return table_is_in(accepted_items, vnum); end -- function when NPCVNUM.take with QUESTNAME.CanTakeItem(item.get_vnum()) begin -- end -- when end -- state end -- quest table_is_in is a function which already exists in every questlib.lua.

    This is the hidden content, please Sign In or Sign Up Yours does the same thing, but custom-made functions are meant to be readable.
  23. Syreldar's post in Question about mob_drop_item was marked as the answer   
    Types:

     
    MobDropItem Calculation:

    iRandRange and iDeltaPercent definition:

     
  24. Syreldar's post in Duplicated name Quest VIP was marked as the answer   
    quest vip begin state start begin function IsAlreadyVIPName(name) return string.find(name, "[VIP]") ~= nil; end -- function when 40003.use begin say_title("Inel [VIP]:[ENTER]") say("Vrei sa ai VIP in fata numelui?[ENTER]") if (select("Da!", "Nu") == 1) then local id = pc.get_player_id(); local name = mysql_query(string.format("SELECT name FROM player.player WHERE id = %d;", id))[1][1]; say_title("Inel [VIP]:[ENTER]") if (vip.IsAlreadyVIPName(name)) then return say_reward("You are already VIP, you can't change your name.[ENTER]"); end -- if pc.remove_item(item.get_vnum(), 1); mysql_query(string.format("UPDATE player.player SET name = '[VIP]%s' WHERE id = %d;", name, id)); say("Votre demande à été envoyé au serveur. Votre") say("changera dès que le serveur aura retourné l'information!") end -- if end -- when end -- state end -- quest  
  25. Syreldar's post in problem in System scale -Acce was marked as the answer   
    #ifdef ENABLE_SASH_SYSTEM void CInstanceBase::SetSash(DWORD dwSash) { if (!IsPC()) return; if (IsPoly()) return; dwSash += 85000; ClearSashEffect(); float fSpecular = 65.0f; ... } #endif substitute with
    #ifdef ENABLE_SASH_SYSTEM void CInstanceBase::SetSash(DWORD dwSash) { if (!IsPC()) return; if (IsPoly()) return; ClearSashEffect(); if (dwSash == 0) { m_GraphicThingInstance.AttachSash(false, 0); return; } dwSash += 85000; float fSpecular = 65.0f; ... } #endif  
×
×
  • 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.