VegaS
-
Posts
363 -
Joined
-
Last visited
-
Days Won
40 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by VegaS
-
-
#requestremovereplyshit
-
I have not read what you wrote but I read the title, but if you will not help this idea can give others. xD
Some protection may be next:
if false == pc.can_warp() then syschat("<Info> Wait 10 seconds before taking this quest!") return end
Make checks can_warp function such as:
- - Private shop window && npc
- - Your store window
- - Window deposit
- - Window refinery
If they were open 10 seconds behind them you will not be able to run quest.
As much praise, can fraud merchant window and bug at SS and other prizes etc.if pc.getqf("value_qf") > 0 then syschat("<Info> You have already done this!") return end
And another check return in case your quest is finished to be unable to use because there are many quests that can operate in server and reopen.
if pc.countitem(itemVnum) < 1 then syschat("<Info> You do not have this item!") return end
If you can not find any item in your inventory will have a function return, this is for quests with rewards if you receive items collected x x item.
if pc.count_item(item.get_vnum()) >= 1 then syschat(string.format("<Info> Succes arg %d)", itemVnum)) pc.give_item2(itemVnum, value) item.remove() end
A check correct to initiate an item and get a reward of item.
local szForbidden = {110, 111, 112, 113} if table_is_in(szForbidden, pc.get_map_index()) then syschat("<Info> You can not do that in these maps!") return end
Running some quests in certain maps to be banned because some quests is mandatory that.
If you want to protect it much easier to check if you can do in a dungeon or on a map that is in game99.
if table_is_in(szForbidden, pc.get_map_index()) or pc.in_dungeon() or pc.get_channel_id() == 99 then
[...................................................]
There are plenty of checks made for proper security for all quests, if you ever need anything please give me a pm.
-
On 30.06.2016 at 2:29 PM, bumxd said:
in which file it do?
cuz have bug with it plush.. can use 2x time it plushs..after teleport
- char_affect.cpp
- char_item.cpp
- length.h
- affect.h
- input_login.cpp
-
FunctionGetFileMD5 - Now the information is retrieved correctly
-
#It was fixed GetEventFlag, now is working to set enable or disable.
-
Move all players from that kingdom to red ?
Here:
UPDATE `player_index` SET `empire`='1' WHERE empire = 2;
-
Waiting for your idea, give reply.
-
#include "questmanager.h" quest::CQuestManager::instance().SetEventFlag("security_login", GetAccountTable().id);
- 1
-
10 hours ago, Thorer said:
Its impossible.
Fcking shit, everything is possible with the source game.
- 1
-
3 hours ago, Marggraf said:
explain the term: rank
want source or quest code?
You can make that only in source
In quest you can make only if have -- xx set to LL , have ++ xx set to LL or save via qf actual align bla bla bla bla.
Small example is here:
But i not recommended to make that, is a mega-extra-epic shit mode.
@Dalyn Do not give money for crappy things that are done in 2 minutes.
- 1
-
I saw this guy looking hasta .. it provides money for shit, so I wanted to paint a small tutorial sucks these functions.
[File: Src/game/src/service.h]
#define ENABLE_PROTECT_ALIGNMENT #ifdef ENABLE_PROTECT_ALIGNMENT #define IS_MAPINDEX_PROTECT_ALIGN(map) (200==(map)||201==(map)||(202)==(map)) #endif
[File: Src/game/src/char_battle.cpp]
//1.) Search:
if (g_iUseLocale && pkKiller->GetParty()) { FPartyAlignmentCompute f(-20000, pkKiller->GetX(), pkKiller->GetY()); pkKiller->GetParty()->ForEachOnlineMember(f); if (f.m_iCount == 0) pkKiller->UpdateAlignment(-20000);
//2.) Delete and replaced with this:
if (g_iUseLocale && pkKiller->GetParty()) { #ifdef ENABLE_PROTECT_ALIGNMENT if (IS_MAPINDEX_PROTECT_ALIGN(GetMapIndex())) { return; } #endif FPartyAlignmentCompute f(-20000, pkKiller->GetX(), pkKiller->GetY()); pkKiller->GetParty()->ForEachOnlineMember(f); if (f.m_iCount == 0) pkKiller->UpdateAlignment(-20000);
[File: Src/game/src/char.cpp]
//1.) Search:
UpdateAlignment(5 * (dwPlayedTime / 60000));
//2.) Delete and replaced with this:
#ifdef ENABLE_PROTECT_ALIGNMENT if (IS_MAPINDEX_PROTECT_ALIGN(GetMapIndex())) { return; } #endif UpdateAlignment(5 * (dwPlayedTime / 60000));
PS: I have not tested this, I just wrote. But in principle it should work.
------------------- EDIT:
Fcking shit or you can make that easy:
[File: Src/game/src/char_battle.cpp]
void CHARACTER::UpdateAlignment(int iAmount) { #ifdef ENABLE_PROTECT_ALIGNMENT if (IS_MAPINDEX_PROTECT_ALIGN(GetMapIndex())) { return; } #endif bool bShow = false; if (m_iAlignment == m_iRealAlignment) bShow = true; int i = m_iAlignment / 10; m_iRealAlignment = MINMAX(-200000, m_iRealAlignment + iAmount, 200000); if (bShow) { m_iAlignment = m_iRealAlignment; if (i != m_iAlignment / 10) UpdatePacket(); } }
- 1
- 1
- 5
-
A guy from another country was crying a forum for a server that I was given the prize for the final winner of this complaint?
- Did you use a skill during the event was punctuated ox and as you enter the bug event.Many people use skills during the event to no longer make them the ability cheer1 / cheer2 when they win because that question be entered by a bug in the event, or went with bug armor, etc. relog
This lock not only help run a fair event, but also help to decrease the lag because many people use the skill's, buff etc in the event.
You can enable/disable this protect for no use skill in map with:
/e enable_block_skill_oxevent 1
/e enable_block_skill_oxevent 0
(0) - Disable protect
(1) - Enable protect
[File: Src/game/src/char_skill.cpp]
//1.) Search:
if (false == CanUseSkill(dwVnum)) return false;
//2.) Add bellow:
#ifdef ENABLE_BLOCK_SKILL_OXEVENT #include "questmanager.h" DWORD dwFlagBlockSkill = quest::CQuestManager::instance().GetEventFlag("enable_block_skill_oxevent"); if (dwFlagBlockSkill > 0 && GetMapIndex() == 113) { if (quest::CQuestManager::instance().GetEventFlag("oxevent_status") != 0) { ChatPacket(CHAT_TYPE_NOTICE, "[OXEVENT] You can not use skills during the event ox !"); return false; } } #endif
[File: Src/game/common/service.h]
#define ENABLE_BLOCK_SKILL_OXEVENT
- 8
-
57 minutes ago, MrLibya said:
wtf ahah , just stop it u killing the python
Is not from him this *code* :))
Is from this guy shit, fcking shit sell -->> https://metin2dev.org/board/index.php?/topic/7935-selluntratable-items-shown-searching-items-in-shops/
- 1
-
Open function with that in your quest:a
affect.command007()
[File: Src/Server/game/questlua_affect.cpp]
#ifdef ENABLE_NEW_QA_TEST { "command007", affect_command007 }, #endif
#ifdef ENABLE_NEW_QA_TEST int affect_command007(lua_State * L) { LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); lua_pushnumber(L, ch->TryAffect()); return 1; } #endif
[File: Src/Server/game/char.h]
#ifdef ENABLE_NEW_QA_TEST void TryAffect(); #endif
[File: Src/Server/game/char.cpp]
#ifdef ENABLE_NEW_QA_TEST void CHARACTER::TryAffect() { if (!FindAffect(BIOLOG_AFFECT_1)) { AddAffect(BIOLOG_AFFECT_1, POINT_MAX_HP, BONUS_VALUE_BIO_1, 0, TIME_AFFECT_BIO_1, 0, true); ChatPacket(CHAT_TYPE_NOTICE, "[AFFECT_BIO_1] was added %u hp!", BONUS_VALUE_BIO_1); } } #endif
[File: Src/Server/game/affect.h]
#ifdef ENABLE_NEW_QA_TEST BIOLOG_AFFECT_1, #endif
[File: Src/Server/common/length.h.h]
#ifdef ENABLE_NEW_QA_TEST enum ETypeBiologBonus { TIME_AFFECT_BIO_1 = 60*60*24*365, BONUS_VALUE_BIO_1 = 30000, // Value hp }; #endif
I am not tested,only write but it should work 100%.
-
On 03.07.2016 at 6:10 PM, alberto2010 said:
Do this:
root/constInfo.py Put this:
root/uiGameButton.py Search this:
Replace with:
import constInfo if constInfo.DISABLE_SKILL_BUTTON == 1: skillPlusButton.Hide() else: if self.__IsSkillStat(): skillPlusButton.Show() else: skillPlusButton.Hide()
You copied my message from another forum..ohh gg xD
There is much better:
import constInfo if (constInfo.TableSkillButton(1)) == "Enable": if player.GetStatus(player.LEVEL) < (constInfo.TableSkillButton(2)) and self.__IsSkillStat(): skillPlusButton.Show() else: skillPlusButton.Hide() elif (constInfo.TableSkillButton(1)) == "Disable": if self.__IsSkillStat(): skillPlusButton.Show() else: skillPlusButton.Hide()
def TableSkillButton(o): i = { 1 : "Enable", # Enable for active function , Disable for dezactivate. 2 : 100} # The maximum level to which button will be displayed if i.has_key(o): return i[o]
- 1
- 4
-
Why not make like that:
//1.) Search:
### Hair Preview Image ### if self.__IsHair(itemVnum): self.__AppendHairIcon(itemVnum) ### Description ### self.AppendDescription(itemDesc, 26) self.AppendDescription(itemSummary, 26, self.CONDITION_COLOR)
//2.) Add bellow:
if itemVnum in (71135, 71136): table_item = { 71135 : ["Max HP. +1000", "Against monsters +10%"], 71136 : ["Max HP. +500", "Against monsters +5%"]} #99999 : ["desc index 0", "desc index 1", "desc index 2", "desc index 3", "desc index 4"], #[...........................]} self.AppendSpace(5) for i in xrange(len(table_item[itemVnum])): self.AppendTextLine(table_item[itemVnum][i], self.SPECIAL_POSITIVE_COLOR)
- 2
-
root/uiAffectshower.py
AFFECT_DATA_DICT[chr.NEW_AFFECT_POTION_PINK] = ("Potion Pink", "d:/ymir work/ui/affect/pink.sub")
[File: src/Client/UserInterface/InstanceBase.h]
NEW_AFFECT_POTION_PINK = 999,
[File: src/Client/UserInterface/PythonCharacterModule.cpp]
PyModule_AddIntConstant(poModule, "NEW_AFFECT_POTION_PINK", CInstanceBase::NEW_AFFECT_POTION_PINK);
[File: src/Server/game/src/affect.h]
NEW_AFFECT_POTION_PINK = 999,
[File: src/Server/game/src/char_affect.cpp] // When you die you will not lose effect
#define IS_NO_CLEAR_ON_DEATH_AFFECT(type) ((type) == AFFECT_BLOCK_CHAT || (type) == NEW_AFFECT_POTION_PINK || ((type) >= 500 && (type) < 600))
[File: src/Server/game/src/char_item.cpp]
case 50825: if (!FindAffect(NEW_AFFECT_POTION_PINK)) { AddAffect(NEW_AFFECT_POTION_PINK, 0, 0, AFF_NONE, 5*60, 0, true, false); } else { ChatPacket(CHAT_TYPE_INFO, "You already have this potion active!"); } break;
Function char_item is just a small example of the call, you must include in char_item.cpp function something like:
Look this:
AddAffect(affect_type, apply_type, apply_value, 0, apply_duration, 0, false); item->SetCount(item->GetCount() - 1);
And delete and make like that:
if (item->GetVnum() == 50824) { AddAffect(NEW_AFFECT_POTION_PINK, 0, 0, AFF_NONE, apply_duration, 0, true, false); AddAffect(affect_type, apply_type, apply_value, 0, apply_duration, 0, false); item->SetCount(item->GetCount() - 1); } else if (item->GetVnum() == 50825) { AddAffect(NEW_AFFECT_POTION_DICK, 0, 0, AFF_NONE, apply_duration, 0, true, false); AddAffect(affect_type, apply_type, apply_value, 0, apply_duration, 0, false); item->SetCount(item->GetCount() - 1); } else if (item->GetVnum() == 50826) { AddAffect(NEW_AFFECT_POTION_PUSSY, 0, 0, AFF_NONE, apply_duration, 0, true, false); AddAffect(affect_type, apply_type, apply_value, 0, apply_duration, 0, false); item->SetCount(item->GetCount() - 1); }
I gave mostly 90% of what you do, now please use your brain. Good luck.
- 1
-
-
10 minutes ago, finaltorment said:
he mean that shop and safebox part is missed.
He means, like official
-
Hello world, a guy gave me an idea about this system that I saw in another game some time ago so I decided to encode.
New features of this system are:
- - You can add items from inventory slots by some flags are not allowed any items than just flags set specifically for it.
- - You can use the F5 / F6 / F7 / F8 on your keyboard && 5/6/7/8
- - Items are saved in a special table in the database as well as their former quickslots the taskbar, but are now separated.
- - When you start the game you will have access to only one slot in this system to Unlock your other slots will have to go through various levels such as:
Level [1] - Slot [1] (Unblock) - Start server Level [45] - Slot [2] (Unblock) Level [55] - Slot [3] (Unblock) Level [65] - Slot [4] (Unblock) Level [75] - Slot [5] (Unblock) Level [85] - Slot [6] (Unblock) Level [95] - Slot [7] (Unblock) Level [105] - Slot [8] (Unblock)
On the 105 you have all slots unlocked and you can of course use all the slots.
Slots will automatically unlock when you do the required level for each slot, no need for any activation from a player.I need some idea of you to make this system more beautiful and greater potential on players because many players probably wanted other new buttons to play at the same time because they did not just come f1 / f2 / f3 / f4 etc they put red potion, cloak courage, skill etc is now much easier with this system.
I know you will tell you that already exists QuickPage Down / Up with 4 slot on the taskbar, but they are not used and are very hard to use in the game at the same time because you have to press ALT + page number, eat a lot time, so with this system you key new new storage slots and also unlocked depending on the level s.a.m.d
Waiting for your ideas to develop more this system.
Perhaps it will be released free of charge to all servers.
Sorry for my english, here is a old preview.
https://metin2.download/picture/A1Lo2aQgIuwRtuDT6C1MH7aUs4Bgceva/.gif
- 6
-
InstanceBaseEffect.cpp
-
Recommended, is a guy who has valuable brain like a ninja
- 1
-
Python:
player.GetStatus(player.MAX_HP)
Source -> src/UserInterface/PythonPlayerModule.cpp (can find all modules from him)
PyObject* poModule = Py_InitModule("player", s_methods);
PyModule_AddIntConstant(poModule, "MAX_HP", POINT_MAX_HP);
- 1
-
Use 5% of your brain for make this.
case 71027: int szTimeVegas = ch->GetQuestFlag("mall.wait_time"); if (szTimeVegas) { if (get_global_time() < szTimeVegas + 10) { ChatPacket(CHAT_TYPE_INFO, "You can not do that so fast, wait 10 second!"); return; } } if (!FindAffect(MALL_INDEX_1)) { AddAffect(MALL_INDEX_1, POINT_MAX_HP_PCT, NEW_MALL_VALUE, 0, NEW_MALL_TIME, 0, true); ChatPacket(CHAT_TYPE_INFO, "Points of life were increased with 20% + for xx time."); item->SetCount(item->GetCount()-1); } else { ChatPacket(CHAT_TYPE_INFO, "This item has been used already!"); return; } break;
ch->SetQuestFlag("mall.wait_time", get_global_time());
MALL_INDEX_1,
enum ETypeMallBonus { NEW_MALL_VALUE = 20, NEW_MALL_TIME = 0*0*0, };
#define IS_NO_CLEAR_ON_DEATH_AFFECT(type) ((type) == AFFECT_BLOCK_CHAT || (type) == MALL_INDEX_1 || ((type) >= 500 && (type) < 600))
Hide time function with this code
in Community Support - Questions & Answers
Posted
You need to add before checking with questwindow, not after jesus.