-
Posts
94 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by revengertmt
-
-
On 3/22/2021 at 6:56 AM, Syreldar said:
On modern clients, Heal, just like the other buffs, works as a PARTY-based skill.
Despite that there are many sources that still do not support the PARTY-flag, and/or there are many skill_protos without PARTY flag assigned to the respective skills.
This is the result of such "conflict".
1. If you want the skill to act like a normal buff skill (so it won't heal every member of the party when in party, but always only your target)
in locale/skilldesc.txt:
Replace "STANDING_SKILL" with "STANDING_SKILL|CAN_USE_FOR_ME|NEED_TARGET|ONLY_FOR_ALLIANCE"
exactly as @Macromango did, but you DO NOT HAVE to empty out the setFlag in the skill_proto, because that contains REMOVE_BAD_AFFECT, and it's needed to remove debuffs on your target, not just heal it, so just remove PARTY there, if you have it.
2. If you want the skill to act like a party buff skill (so when in party it will heal all your party members and when you're not in party it will act as a normal buff skill, like official basically)
in src/skill.h:
Make sure you have the SKILL_FLAG_PARTY definition.
if you don't, you need to implement the PARTY skill system correctly.
If you do, your sources have the system implemented by default, you can proceed.
in player.skill_proto table:
Click 'Design table' and make sure the setFlag enum contains "PARTY", keep in mind that if, for example, your SKILL_FLAG_PARTY is the 28th value of the ESkillFlags enum, PARTY inside the skill_proto's setFlag enum must also be the 28th value, they need to be the very same.
This is how mine looks like for comparison:
'ATTACK','USE_MELEE_DAMAGE','COMPUTE_ATTGRADE','SELFONLY','USE_MAGIC_DAMAGE','USE_HP_AS_COST','COMPUTE_MAGIC_DAMAGE','SPLASH','GIVE_PENALTY','USE_ARROW_DAMAGE','PENETRATE','IGNORE_TARGET_RATING','ATTACK_SLOW','ATTACK_STUN','HP_ABSORB','SP_ABSORB','ATTACK_FIRE_CONT','REMOVE_BAD_AFFECT','REMOVE_GOOD_AFFECT','CRUSH','ATTACK_POISON','TOGGLE','DISABLE_BY_POINT_UP','CRUSH_LONG','WIND','ELEC','FIRE','ATTACK_BLEEDING','PARTY','KNOCKBACK'
Make sure the setFlag column value for the skill 109 is "REMOVE_BAD_AFFECT, PARTY"
Then /reload and it's done.
work on all shammy skills? like 94, 95, 96, 109, 110, 111???
-
tnx...but i preffer to repair/adapt that file
sorry 4 my bad english
-
Someone can tell me how to implement this in martysama source?
#include <vector> #include <array> #include "../../common/length.h" #include "item_manager.h" using namespace std; enum { MAX_ATTR = ITEM_MANAGER::MAX_NORM_ATTR_NUM + ITEM_MANAGER::MAX_RARE_ATTR_NUM, COMMON_ITEMS = JOB_MAX_NUM, }; struct GiveBasicWeapon { DWORD dwVnum, count; bool equip; array<auto, ITEM_SOCKET_MAX_NUM> sockets; array<auto, MAX_ATTR> attr_types; array<auto, MAX_ATTR> attr_vals; }; vector<GiveBasicWeapon> Give_Items[JOB_MAX_NUM]; auto PrepareItems() { Give_Items[COMMON_ITEMS] { {11200, 1}, {27989, 1}, {50053, 1}, {40002, 1}, {27003, 200}, {27006, 200}, {70038, 1}, {13009, 1, true, {}, {APPLY_CON, APPLY_BLOCK, APPLY_REFLECT_MELEE, APPLY_IMMUNE_STUN, APPLY_STR}, {12, 15, 10, 1, 12}}, {14009, 1, true, {}, {APPLY_MAX_HP, APPLY_MAX_SP, APPLY_PENETRATE_PCT, APPLY_STEAL_HP, APPLY_MANA_BURN_PCT}, {2000, 80, 10, 10, 10}}, {15009, 1, true, {}, {APPLY_MAX_HP, APPLY_MAX_SP, APPLY_MOV_SPEED, APPLY_ATT_SPEED, APPLY_CRITICAL_PCT}, {2000, 80, 8, 8, 10}}, {16009, 1, true, {}, {APPLY_MAX_HP, APPLY_HP_REGEN, APPLY_CRITICAL_PCT, APPLY_PENETRATE_PCT, APPLY_STEAL_HP}, {2000, 30, 10, 10, 10}}, {17009, 1, true, {}, {APPLY_MOV_SPEED, APPLY_ATTBONUS_ANIMAL, APPLY_POISON_REDUCE, APPLY_ATTBONUS_DEVIL, APPLY_ATTBONUS_UNDEAD}, {20, 20, 5, 20, 20}}, {39036, 1, true}, {76037, 1, true} } Give_Items[JOB_WARRIOR] { {11209, 1, true, {28442, 0, 0}, {APPLY_MAX_HP, APPLY_CAST_SPEED, APPLY_STEAL_HP, APPLY_REFLECT_MELEE, APPLY_ATT_GRADE_BONUS}, {2000, 20, 10, 10, 50}}, {19, 1, true, {28430, 0, 0}, {APPLY_STR, APPLY_CRITICAL_PCT, APPLY_PENETRATE_PCT, APPLY_ATTBONUS_ANIMAL, APPLY_STUN_PCT}, {12, 10, 10, 20, 8}}, {12209, 1, true, {}, {APPLY_ATT_SPEED, APPLY_HP_REGEN, APPLY_ATTBONUS_ANIMAL, APPLY_DODGE, APPLY_STEAL_HP}, {8, 30, 20, 15, 10}}, } Give_Items[JOB_ASSASSIN] { {11409, 1, true, {28442, 0, 0}, {APPLY_MAX_HP, APPLY_CAST_SPEED, APPLY_STEAL_HP, APPLY_REFLECT_MELEE, APPLY_ATT_GRADE_BONUS}, {2000, 20, 10, 10, 50}}, {1009, 1, true, {28430, 0, 0}, {APPLY_STR, APPLY_CRITICAL_PCT, APPLY_PENETRATE_PCT, APPLY_ATTBONUS_ANIMAL, APPLY_STUN_PCT}, {12, 10, 10, 20, 8}}, {12349, 1, true, {}, {APPLY_ATT_SPEED, APPLY_HP_REGEN, APPLY_ATTBONUS_ANIMAL, APPLY_DODGE, APPLY_STEAL_HP}, {8, 30, 20, 15, 10}}, } Give_Items[JOB_SURA] { {11609, 1, true, {28442, 0, 0}, {APPLY_MAX_HP, APPLY_CAST_SPEED, APPLY_STEAL_HP, APPLY_REFLECT_MELEE, APPLY_ATT_GRADE_BONUS}, {2000, 20, 10, 10, 50}}, {19, 1, true, {28430, 0, 0}, {APPLY_STR, APPLY_CRITICAL_PCT, APPLY_PENETRATE_PCT, APPLY_ATTBONUS_ANIMAL, APPLY_STUN_PCT}, {12, 10, 10, 20, 8}}, {12489, 1, true, {}, {APPLY_ATT_SPEED, APPLY_HP_REGEN, APPLY_ATTBONUS_ANIMAL, APPLY_DODGE, APPLY_STEAL_HP}, {8, 30, 20, 15, 10}}, } Give_Items[JOB_SHAMAN] { {11809, 1, true, {28442, 0, 0}, {APPLY_MAX_HP, APPLY_CAST_SPEED, APPLY_STEAL_HP, APPLY_REFLECT_MELEE, APPLY_ATT_GRADE_BONUS}, {2000, 20, 10, 10, 50}}, {5009, 1, true, {28430, 0, 0}, {APPLY_STR, APPLY_CRITICAL_PCT, APPLY_PENETRATE_PCT, APPLY_ATTBONUS_ANIMAL, APPLY_STUN_PCT}, {12, 10, 10, 20, 8}}, {12629, 1, true, {}, {APPLY_ATT_SPEED, APPLY_HP_REGEN, APPLY_ATTBONUS_ANIMAL, APPLY_DODGE, APPLY_STEAL_HP}, {8, 30, 20, 15, 10}}, } #ifdef ENABLE_WOLFMAN_CHARACTER Give_Items[JOB_WOLFMAN] { {21009, 1, true, {28442, 0, 0}, {APPLY_MAX_HP, APPLY_CAST_SPEED, APPLY_STEAL_HP, APPLY_REFLECT_MELEE, APPLY_ATT_GRADE_BONUS}, {2000, 20, 10, 10, 50}}, {6009, 1, true, {28430, 0, 0}, {APPLY_STR, APPLY_CRITICAL_PCT, APPLY_PENETRATE_PCT, APPLY_ATTBONUS_ANIMAL, APPLY_STUN_PCT}, {12, 10, 10, 20, 8}}, {21509, 1, true, {}, {APPLY_ATT_SPEED, APPLY_HP_REGEN, APPLY_ATTBONUS_ANIMAL, APPLY_DODGE, APPLY_STEAL_HP}, {8, 30, 20, 15, 10}}, } #endif } void GiveBasicWeapon(LPCHARACTER ch) { PrepareItems(); auto GetHorse = [&ch]() { ch->SetHorseLevel(21); ch->StartRiding(); }; auto MakeFNotice = [](LPCHARACTER ch) { array<auto, JOB_MAX_NUM> JobNames {"Warrior", "Assassin", "Sura", "Shaman", "Lycan"}; array<auto, EMPIRE_MAX_NUM> EmpireNames {"전제국","신수국","천조국","진노국"}; array<auto, 256> buf; snprintf(buf,sizeof(buf), "New player %s, job: %s, empire: %s", ch->GetName(), JobNames[ch->GetJob()], LC_TEXT(EmpireNames[ch->GetEmpire()])); SendNotice(buf); }; for (auto subdata : {ch->GetJob(), COMMON_ITEMS}) { for (auto data : Give_Items[subdata]) { auto item = ch->AutoGiveItem(data.dwVnum, data.count); if (item) { for (auto i = 0; i < MAX_ATTR; i++) item->SetForceAttribute(i, data.attr_types[i], data.attr_vals[i]); for (auto c = 0; c < ITEM_SOCKET_MAX_NUM; c++) item->SetSocket(c, data.sockets[c]); if (data.equip) ch->EquipItem(item); } } } MakeFNotice(ch); GetHorse(); }
i have try solo but......this is the error
compiling char.cpp compiling event.cpp compiling event_queue.cpp compiling exchange.cpp compiling file_loader.cpp compiling fishing.cpp compiling gm.cpp In file included from char.cpp:61: GiveBasicWeapon.h:15:2: error: non-static data member declared with placeholder 'auto' 15 | array<auto, ITEM_SOCKET_MAX_NUM> sockets; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GiveBasicWeapon.h:16:2: error: non-static data member declared with placeholder 'auto' 16 | array<auto, MAX_ATTR> attr_types; | ^~~~~~~~~~~~~~~~~~~~~ GiveBasicWeapon.h:17:2: error: non-static data member declared with placeholder 'auto' 17 | array<auto, MAX_ATTR> attr_vals; | ^~~~~~~~~~~~~~~~~~~~~ GiveBasicWeapon.h: In function 'auto PrepareItems()': GiveBasicWeapon.h:23:26: error: expected ';' before '{' token 23 | Give_Items[COMMON_ITEMS] { | ^~ | ; GiveBasicWeapon.h:23:25: warning: statement has no effect [-Wunused-value] 23 | Give_Items[COMMON_ITEMS] { | ~~~~~~~~~~~~~~~~~~~~~~~^ In file included from char.cpp:61: GiveBasicWeapon.h:39:25: error: expected ';' before '{' token 39 | Give_Items[JOB_WARRIOR] { | ^~ | ; GiveBasicWeapon.h:39:24: warning: statement has no effect [-Wunused-value] 39 | Give_Items[JOB_WARRIOR] { | ~~~~~~~~~~~~~~~~~~~~~~^ GiveBasicWeapon.h:44:26: error: expected ';' before '{' token 44 | Give_Items[JOB_ASSASSIN] { | ^~ | ; GiveBasicWeapon.h:44:25: warning: statement has no effect [-Wunused-value] 44 | Give_Items[JOB_ASSASSIN] { | ~~~~~~~~~~~~~~~~~~~~~~~^ GiveBasicWeapon.h:49:22: error: expected ';' before '{' token 49 | Give_Items[JOB_SURA] { | ^~ | ; GiveBasicWeapon.h:49:21: warning: statement has no effect [-Wunused-value] 49 | Give_Items[JOB_SURA] { | ~~~~~~~~~~~~~~~~~~~^ GiveBasicWeapon.h:54:24: error: expected ';' before '{' token 54 | Give_Items[JOB_SHAMAN] { | ^~ | ; GiveBasicWeapon.h:54:23: warning: statement has no effect [-Wunused-value] 54 | Give_Items[JOB_SHAMAN] { | ~~~~~~~~~~~~~~~~~~~~~^ GiveBasicWeapon.h: In lambda function: GiveBasicWeapon.h:77:86: error: direct-list-initialization of 'auto' requires exactly one element [-fpermissive] 77 | array<auto, JOB_MAX_NUM> JobNames {"Warrior", "Assassin", "Sura", "Shaman", "Lycan"}; | ^ GiveBasicWeapon.h:77:86: note: for deduction to 'std::initializer_list', use copy-list-initialization (i.e. add '=' before the '{') GiveBasicWeapon.h:77:86: error: unable to deduce 'std::array<std::initializer_list<auto>, 4>' from '{"Warrior", "Assassin", "Sura", "Shaman", "Lycan"}' GiveBasicWeapon.h:77:86: note: couldn't deduce template parameter 'auto' GiveBasicWeapon.h:78:91: error: direct-list-initialization of 'auto' requires exactly one element [-fpermissive] 78 | array<auto, EMPIRE_MAX_NUM> EmpireNames {"전제국","신수국","천조국","진노국"}; | ^ GiveBasicWeapon.h:78:91: note: for deduction to 'std::initializer_list', use copy-list-initialization (i.e. add '=' before the '{') GiveBasicWeapon.h:78:91: error: unable to deduce 'std::array<std::initializer_list<auto>, 4>' from '{"\37777777754\37777777640\37777777604\37777777754\37777777640\37777777634\37777777752\37777777665\37777777655", "\37777777754\37777777613\37777777640\37777777754\37777777610\37777777630\37777777752\37777777665\37777777655", "\37777777754\37777777662\37777777634\37777777754\37777777641\37777777660\37777777752\37777777665\37777777655", "\37777777754\37777777647\37777777604\37777777753\37777777605\37777777670\37777777752\37777777665\37777777655"}' GiveBasicWeapon.h:78:91: note: couldn't deduce template parameter 'auto' GiveBasicWeapon.h:79:3: error: declaration of 'std::array<auto, 256> buf' has no initializer 79 | array<auto, 256> buf; | ^~~~~~~~~~~~~~~~ GiveBasicWeapon.h: In function 'void GiveBasicWeapon(LPCHARACTER)': GiveBasicWeapon.h:83:49: error: unable to deduce 'std::initializer_list<auto>&&' from '{ch->CHARACTER::GetJob(), COMMON_ITEMS}' 83 | for (auto subdata : {ch->GetJob(), COMMON_ITEMS}) { | ^ GiveBasicWeapon.h:83:49: note: deduced conflicting types for parameter 'auto' ('unsigned char' and '<unnamed enum>') compiling guild.cpp compiling guild_manager.cpp compiling guild_war.cpp gmake: *** [Makefile:184: .obj/char.o] Error 1 gmake: *** Waiting for unfinished jobs....
-
On 2/24/2021 at 7:49 PM, Sebypunct said:
can you upload .py files?
- 2
- 1
- 2
- 1
-
-
-
?????:( reupload?
-
go in navicat on player database in skill_proto tables
search skill what you want to increase the range, and select him example: ( skill 94 Belssing of dragon)
and roll to right at collum dwTargetRange then increase the range of skill
I will back with some photo
//up
- 1
-
On 3/26/2019 at 1:50 AM, VegaS™ said:
Using std::ifstream, very easy.
DWORD dwItemVnum; float fProb; std::ifstream myfile(c_pszFileName, std::ifstream::in); while (myfile >> dwItemVnum >> fProb) { [...........] }
// LOCALE_SERVICE const int FILE_NAME_LEN = 256; char szCommonDropItemFileName[FILE_NAME_LEN]; char szETCDropItemFileName[FILE_NAME_LEN]; char szMOBDropItemFileName[FILE_NAME_LEN]; char szDropItemGroupFileName[FILE_NAME_LEN]; char szSpecialItemGroupFileName[FILE_NAME_LEN]; char szMapIndexFileName[FILE_NAME_LEN]; char szItemVnumMaskTableFileName[FILE_NAME_LEN]; char szDragonSoulTableFileName[FILE_NAME_LEN]; snprintf(szCommonDropItemFileName, sizeof(szCommonDropItemFileName), "%s/common_drop_item.txt", LocaleService_GetBasePath().c_str()); snprintf(szETCDropItemFileName, sizeof(szETCDropItemFileName), "%s/etc_drop_item.txt", LocaleService_GetBasePath().c_str()); snprintf(szMOBDropItemFileName, sizeof(szMOBDropItemFileName), "%s/mob_drop_item.txt", LocaleService_GetBasePath().c_str()); snprintf(szSpecialItemGroupFileName, sizeof(szSpecialItemGroupFileName), "%s/special_item_group.txt", LocaleService_GetBasePath().c_str()); snprintf(szDropItemGroupFileName, sizeof(szDropItemGroupFileName), "%s/drop_item_group.txt", LocaleService_GetBasePath().c_str()); snprintf(szMapIndexFileName, sizeof(szMapIndexFileName), "%s/index", LocaleService_GetMapPath().c_str()); snprintf(szItemVnumMaskTableFileName, sizeof(szItemVnumMaskTableFileName), "%s/ori_to_new_table.txt", LocaleService_GetBasePath().c_str()); snprintf(szDragonSoulTableFileName, sizeof(szDragonSoulTableFileName), "%s/dragon_soul_table.txt", LocaleService_GetBasePath().c_str());
?????
-
-
have a little bug....
-
-
How i can combine this 2 sys????
switch (item->GetVnum()) { case 80003: case 80004: case 80005: case 80006: case 80007: { static const int sGold[5] = { 50000, ///< 80003 100000, ///< 80004 500000, ///< 80005 1000000, ///< 80006 2000000 ///< 80007 }; if (IsOpenSafebox() || GetExchange() || GetMyShop() || IsCubeOpen()) { ChatPacket(CHAT_TYPE_INFO, "Nu poti folosi lingouri in timp ce negociezi."); return false; } const int amount = sGold[item->GetVnum() - 80003]; if ((GOLD_MAX - amount) <= GetGold()) { ChatPacket(CHAT_TYPE_INFO, "Nu poti detine mai mult de 2kkk Yang."); return false; } item->SetCount(item->GetCount() - 1); PointChange(POINT_GOLD, amount, true); } break; default: break; }
-
1 hour ago, riku11 said:
I thought I understood that you already had the method
ChangeGold in your codeIf you don't hold it, replace it with what is used in your code to give/remove yang
I have edited!
bool CHARACTER::ChangeGoldBars(DWORD dwVnum) { long long dlCount = 0; for(int i = 0; i < GOLD_BARS_NUM; i++) { if(GoldBarsItems[i] == dwVnum) { dlCount = GoldBarsValue[i]; break; } } if(dlCount ==0) return false; SQLMsg* pMsg = DBManager::instance().DirectQuery("UPDATE player.player SET gold = gold + '%lld' WHERE id = '%d'", dlCount,GetPlayerID()); bool bSucc = (pMsg->uiSQLErrno == 0); delete(pMsg); if (!bSucc) { sys_err("[GOLD] Nu poate fi predat!(a aparut o eroare)"); } else { LogManager::instance().GoldBarsLog(GetAID(), GetPlayerID(), dwVnum, dlCount); ChatPacket(CHAT_TYPE_INFO,"<SYSTEM> You received [%d] Yang",dlCount); } return bSucc; }
-
6 minutes ago, riku11 said:
You did not put ChangeGold in char.h i think..
-
wtf?
char.cpp:7545: error: 'ChangeGold' was not declared in this scope
-
about the same problem ....
I want to save myself in the log table when using one of: vnum, written above -
bro you are amazing!:X tnx
can you help me improve this???
char.cpp
void CHARACTER::ChangeGold(long gold) { DBManager::instance().SendMoneyLog(MONEY_LOG_QUEST, GetPlayerID(), gold); PointChange(POINT_GOLD, gold, true); }
char.h
void ChangeGold(long gold = 0);
char_item.cpp
switch (item->GetVnum()) { case 80003: // 50kk case 80004: // 100kk case 80005: // 250kk case 80006: // 500kk??? case 80007: // 1kkk??? int idx[5]; idx[0] = 50000000; idx[1] = 100000000; idx[2] = 250000000; idx[3] = 500000000; idx[4] = 1000000000; int idax; if (item->GetVnum() == 80003) idax = 0; if (item->GetVnum() == 80004) idax = 1; if (item->GetVnum() == 80005) idax = 2; if (item->GetVnum() == 80006) idax = 3; if (item->GetVnum() == 80007) idax = 4; long val; val = idx[idax]; ChangeGold(val); item->SetCount(item->GetCount() - 1); return 1; break; default: break; }
I have yang type long long
-
For starters hello!
I'd like to be able to hide the Shop Search Iconand 2 I have a problem with vouchers ... that is, I want to save myself in the log table from navicat
the code looks like this:
char.cppbool CHARACTER::SetCoins(long coins) { SQLMsg *msg; msg = DBManager::instance().DirectQuery("UPDATE account.account SET coins = coins + '%ld' WHERE id = '%d'", coins, GetAID()); if (msg->uiSQLErrno != 0) { sys_err("[MD] Nu pot fi predate!(a aparut o eroare)"); return false; } return true; }
char_item.cpp
switch (item->GetVnum()) { //Vnums case 80014: // 100 DR/Coins case 80015: // 500 DR/Coins case 80016: // 1000 DR/Coins case 80017: // 50 DR/Coins int idx[4]; idx[0] = 100; idx[1] = 500; idx[2] = 1000; idx[3] = 50; int idax; if (item->GetVnum() == 80014) idax = 0; if (item->GetVnum() == 80015) idax = 1; if (item->GetVnum() == 80016) idax = 2; if (item->GetVnum() == 80017) idax = 3; long val; val = idx[idax]; if (SetCoins(val)) { ChatPacket(CHAT_TYPE_INFO, "Ai Primit %ld Monede Dragon.", val); // {0} item->SetCount(item->GetCount() - 1); } else { ChatPacket(CHAT_TYPE_INFO, "A aparut o eroare. Contactati administratorul."); } return 1; break; default: break; }
my table
log tables
voucher_logTarget Server Type : MYSQL Target Server Version : 50533 File Encoding : 65001 Date: 2018-02-10 16:01:15 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for voucher_log -- ---------------------------- DROP TABLE IF EXISTS `voucher_log`; CREATE TABLE `voucher_log` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `account_id` int(10) unsigned NOT NULL, `item_vnum` int(11) NOT NULL, `coins` int(10) unsigned NOT NULL, `data` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of voucher_log -- ----------------------------
Sorry for my bad English
-
-
-
don't work.....
case 50300: { if (IsPolymorphed()) { return false; } int dwVnum = 0; if (item->GetVnum() == 50300) { dwVnum = item->GetSocket(0); } else { dwVnum = item->GetValue(0); } if (0 == dwVnum) { item->SetCount(item->GetCount() - 1); return false; } SetSkillLevel(dwVnum, GetSkillLevel(dwVnum)+1); }
don't work!!!
-
-
Dragon Effect
in Effects
Posted
how i can put this effect when DragonSoul is active?