Jump to content
×
×
  • Create New...

How To C++


Recommended Posts

  • Former Staff

Hello guys I'm still newbie with c++ so i'm testing new thing
 [HOW-TO(C++)]Take Exp after duel

ok this HOW-TO will show you how to take or give(change)  exp or gold or other point from this list

 

enum EPointTypes
{
	POINT_NONE,                 // 0
	POINT_LEVEL,                // 1
	POINT_VOICE,                // 2
	POINT_EXP,                  // 3
	POINT_NEXT_EXP,             // 4
	POINT_HP,                   // 5
	POINT_MAX_HP,               // 6
	POINT_SP,                   // 7
	POINT_MAX_SP,               // 8  
	POINT_STAMINA,              // 9  ½؛إ×¹ج³ت
	POINT_MAX_STAMINA,          // 10 أض´ë ½؛إ×¹ج³ت

	POINT_GOLD,                 // 11
	POINT_ST,                   // 12 ±ظ·آ
	POINT_HT,                   // 13 أ¼·آ
	POINT_DX,                   // 14 ¹خأ¸¼؛
	POINT_IQ,                   // 15 ء¤½إ·آ
	POINT_DEF_GRADE,		// 16 ...
	POINT_ATT_SPEED,            // 17 °ّ°ف¼سµµ
	POINT_ATT_GRADE,		// 18 °ّ°ف·آ MAX
	POINT_MOV_SPEED,            // 19 ہجµ؟¼سµµ
	POINT_CLIENT_DEF_GRADE,	// 20 ¹و¾îµî±ق
	POINT_CASTING_SPEED,        // 21 ءض¹®¼سµµ (ؤً´ظ؟îإ¸ہس*100) / (100 + ہج°ھ) = أضء¾ ؤً´ظ؟î إ¸ہس
	POINT_MAGIC_ATT_GRADE,      // 22 ¸¶¹‎°ّ°ف·آ
	POINT_MAGIC_DEF_GRADE,      // 23 ¸¶¹‎¹و¾î·آ
	POINT_EMPIRE_POINT,         // 24 ء¦±¹ء،¼ِ
	POINT_LEVEL_STEP,           // 25 ار ·¹؛§؟،¼­ہا ´ـ°è.. (1 2 3 µة ¶§ ؛¸»َ, 4 µا¸é ·¹؛§ ¾÷)
	POINT_STAT,                 // 26 ´ة·آؤ، ؟أ¸± ¼ِ ہض´آ °³¼ِ
	POINT_SUB_SKILL,		// 27 ؛¸ء¶ ½؛إ³ ئ÷ہخئ®
	POINT_SKILL,		// 28 ¾×ئ¼؛ê ½؛إ³ ئ÷ہخئ®
	POINT_WEAPON_MIN,		// 29 ¹«±â أض¼ز µ¥¹جءِ
	POINT_WEAPON_MAX,		// 30 ¹«±â أض´ë µ¥¹جءِ
	POINT_PLAYTIME,             // 31 اأ·¹ہج½أ°£
	POINT_HP_REGEN,             // 32 HP ب¸؛¹·ü
	POINT_SP_REGEN,             // 33 SP ب¸؛¹·ü

	POINT_BOW_DISTANCE,         // 34 ب° »çء¤°إ¸® ءُ°،ؤ، (meter)

	POINT_HP_RECOVERY,          // 35 أ¼·آ ب¸؛¹ ءُ°،·®
	POINT_SP_RECOVERY,          // 36 ء¤½إ·آ ب¸؛¹ ءُ°،·®

	POINT_POISON_PCT,           // 37 µ¶ ب®·ü
	POINT_STUN_PCT,             // 38 ±âہ‎ ب®·ü
	POINT_SLOW_PCT,             // 39 ½½·خ؟ى ب®·ü
	POINT_CRITICAL_PCT,         // 40 إ©¸®ئ¼ؤأ ب®·ü
	POINT_PENETRATE_PCT,        // 41 °üإëإ¸°ف ب®·ü
	POINT_CURSE_PCT,            // 42 ہْءض ب®·ü

	POINT_ATTBONUS_HUMAN,       // 43 ہخ°£؟،°ش °­اش
	POINT_ATTBONUS_ANIMAL,      // 44 µ؟¹°؟،°ش µ¥¹جءِ % ءُ°،
	POINT_ATTBONUS_ORC,         // 45 ؟ُ±ح؟،°ش µ¥¹جءِ % ءُ°،
	POINT_ATTBONUS_MILGYO,      // 46 ¹ذ±³؟،°ش µ¥¹جءِ % ءُ°،
	POINT_ATTBONUS_UNDEAD,      // 47 ½أأ¼؟،°ش µ¥¹جءِ % ءُ°،
	POINT_ATTBONUS_DEVIL,       // 48 ¸¶±ح(¾ا¸¶)؟،°ش µ¥¹جءِ % ءُ°،
	POINT_ATTBONUS_INSECT,      // 49 ¹ْ·¹ء·
	POINT_ATTBONUS_FIRE,        // 50 ب­؟°ء·
	POINT_ATTBONUS_ICE,         // 51 ؛ù¼³ء·
	POINT_ATTBONUS_DESERT,      // 52 »ç¸·ء·
	POINT_ATTBONUS_MONSTER,     // 53 ¸ًµç ¸َ½؛إح؟،°ش °­اش
	POINT_ATTBONUS_WARRIOR,     // 54 ¹«»ç؟،°ش °­اش
	POINT_ATTBONUS_ASSASSIN,	// 55 ہع°´؟،°ش °­اش
	POINT_ATTBONUS_SURA,		// 56 ¼ِ¶َ؟،°ش °­اش
	POINT_ATTBONUS_SHAMAN,		// 57 ¹«´ç؟،°ش °­اش
	POINT_ATTBONUS_TREE,     	// 58 ³ھ¹«؟،°ش °­اش 20050729.myevan UNUSED5 

	POINT_RESIST_WARRIOR,		// 59 ¹«»ç؟،°ش ہْا×
	POINT_RESIST_ASSASSIN,		// 60 ہع°´؟،°ش ہْا×
	POINT_RESIST_SURA,			// 61 ¼ِ¶َ؟،°ش ہْا×
	POINT_RESIST_SHAMAN,		// 62 ¹«´ç؟،°ش ہْا×

	POINT_STEAL_HP,             // 63 »‎¸ي·آ بي¼ِ
	POINT_STEAL_SP,             // 64 ء¤½إ·آ بي¼ِ

	POINT_MANA_BURN_PCT,        // 65 ¸¶³ھ ¹ّ

	/// اااط½أ ؛¸³ت½؛ ///

	POINT_DAMAGE_SP_RECOVER,    // 66 °ّ°ف´çاز ½أ ء¤½إ·آ ب¸؛¹ ب®·ü

	POINT_BLOCK,                // 67 ؛ي·°ہ²
	POINT_DODGE,                // 68 ب¸ااہ²

	POINT_RESIST_SWORD,         // 69
	POINT_RESIST_TWOHAND,       // 70
	POINT_RESIST_DAGGER,        // 71
	POINT_RESIST_BELL,          // 72
	POINT_RESIST_FAN,           // 73
	POINT_RESIST_BOW,           // 74  ب­»ى   ہْا×   : ´ë¹جءِ °¨¼ز
	POINT_RESIST_FIRE,          // 75  ب­؟°   ہْا×   : ب­؟°°ّ°ف؟، ´ëار ´ë¹جءِ °¨¼ز
	POINT_RESIST_ELEC,          // 76  ہü±â   ہْا×   : ہü±â°ّ°ف؟، ´ëار ´ë¹جءِ °¨¼ز
	POINT_RESIST_MAGIC,         // 77  ¼ْ¹‎   ہْا×   : ¸ًµç¼ْ¹‎؟، ´ëار ´ë¹جءِ °¨¼ز
	POINT_RESIST_WIND,          // 78  ¹ظ¶÷   ہْا×   : ¹ظ¶÷°ّ°ف؟، ´ëار ´ë¹جءِ °¨¼ز

	POINT_REFLECT_MELEE,        // 79 °ّ°ف ¹ف»ç

	/// ئ¯¼ِ اااط½أ ///
	POINT_REFLECT_CURSE,		// 80 ہْءض ¹ف»ç
	POINT_POISON_REDUCE,		// 81 µ¶µ¥¹جءِ °¨¼ز

	/// ہû ¼ز¸ê½أ ///
	POINT_KILL_SP_RECOVER,		// 82 ہû ¼ز¸ê½أ MP ب¸؛¹
	POINT_EXP_DOUBLE_BONUS,		// 83
	POINT_GOLD_DOUBLE_BONUS,		// 84
	POINT_ITEM_DROP_BONUS,		// 85

	/// ب¸؛¹ °ü·أ ///
	POINT_POTION_BONUS,			// 86
	POINT_KILL_HP_RECOVERY,		// 87

	POINT_IMMUNE_STUN,			// 88
	POINT_IMMUNE_SLOW,			// 89
	POINT_IMMUNE_FALL,			// 90
	//////////////////

	POINT_PARTY_ATTACKER_BONUS,		// 91
	POINT_PARTY_TANKER_BONUS,		// 92

	POINT_ATT_BONUS,			// 93
	POINT_DEF_BONUS,			// 94

	POINT_ATT_GRADE_BONUS,		// 95
	POINT_DEF_GRADE_BONUS,		// 96
	POINT_MAGIC_ATT_GRADE_BONUS,	// 97
	POINT_MAGIC_DEF_GRADE_BONUS,	// 98

	POINT_RESIST_NORMAL_DAMAGE,		// 99

	POINT_HIT_HP_RECOVERY,		// 100
	POINT_HIT_SP_RECOVERY, 		// 101
	POINT_MANASHIELD,			// 102 بو½إ¼ِب£ ½؛إ³؟، ہاار ¸¶³ھ½¯µه ب؟°ْ ء¤µµ

	POINT_PARTY_BUFFER_BONUS,		// 103
	POINT_PARTY_SKILL_MASTER_BONUS,	// 104

	POINT_HP_RECOVER_CONTINUE,		// 105
	POINT_SP_RECOVER_CONTINUE,		// 106

	POINT_STEAL_GOLD,			// 107 
	POINT_POLYMORPH,			// 108 ؛¯½إار ¸َ½؛إح ¹ّب£
	POINT_MOUNT,			// 109 إ¸°يہض´آ ¸َ½؛إح ¹ّب£

	POINT_PARTY_HASTE_BONUS,		// 110
	POINT_PARTY_DEFENDER_BONUS,		// 111
	POINT_STAT_RESET_COUNT,		// 112 ااہا ´ـ¾à »ç؟ëہ» إëار ½؛إف ¸®¼آ ئ÷ہخئ® (1´ç 1ئ÷ہخئ® ¸®¼آ°،´ة)

	POINT_HORSE_SKILL,			// 113

	POINT_MALL_ATTBONUS,		// 114 °ّ°ف·آ +x%
	POINT_MALL_DEFBONUS,		// 115 ¹و¾î·آ +x%
	POINT_MALL_EXPBONUS,		// 116 °واèؤ، +x%
	POINT_MALL_ITEMBONUS,		// 117 ¾ئہجإغ µه·سہ² x/10¹è
	POINT_MALL_GOLDBONUS,		// 118 µ· µه·سہ² x/10¹è

	POINT_MAX_HP_PCT,			// 119 أض´ë»‎¸ي·آ +x%
	POINT_MAX_SP_PCT,			// 120 أض´ëء¤½إ·آ +x%

	POINT_SKILL_DAMAGE_BONUS,		// 121 ½؛إ³ µ¥¹جءِ *(100+x)%
	POINT_NORMAL_HIT_DAMAGE_BONUS,	// 122 ئٍإ¸ µ¥¹جءِ *(100+x)%

	// DEFEND_BONUS_ATTRIBUTES
	POINT_SKILL_DEFEND_BONUS,		// 123 ½؛إ³ ¹و¾î µ¥¹جءِ
	POINT_NORMAL_HIT_DEFEND_BONUS,	// 124 ئٍإ¸ ¹و¾î µ¥¹جءِ
	// END_OF_DEFEND_BONUS_ATTRIBUTES

	// PC_BANG_ITEM_ADD 
	POINT_PC_BANG_EXP_BONUS,		// 125 PC¹و ہü؟ë °واèؤ، ؛¸³ت½؛
	POINT_PC_BANG_DROP_BONUS,		// 126 PC¹و ہü؟ë µه·س·ü ؛¸³ت½؛
	// END_PC_BANG_ITEM_ADD
	POINT_RAMADAN_CANDY_BONUS_EXP,			// ¶َ¸¶´ـ »çإء °واèؤ، ءُ°،؟ë

	POINT_ENERGY = 128,					// 128 ±â·آ

	// ±â·آ ui ؟ë.
	// ¼­¹ِ؟،¼­ ¾²ءِ ¾ت±â¸¸, إ¬¶َہج¾ًئ®؟،¼­ ±â·آہا ³، ½أ°£ہ» POINT·خ °ü¸®اد±â ¶§¹®؟، ہج·¸°ش ار´ظ.
	// ¾ئ ؛خ²ô·´´ظ
	POINT_ENERGY_END_TIME = 129,					// 129 ±â·آ ء¾·ل ½أ°£

	POINT_COSTUME_ATTR_BONUS = 130,
	POINT_MAGIC_ATT_BONUS_PER = 131,
	POINT_MELEE_MAGIC_ATT_BONUS_PER = 132,

	// أك°، ¼س¼؛ ہْا×
	POINT_RESIST_ICE = 133,          //   ³أ±â ہْا×   : ¾َہ½°ّ°ف؟، ´ëار ´ë¹جءِ °¨¼ز
	POINT_RESIST_EARTH = 134,        //   ´ëءِ ہْا×   : ¾َہ½°ّ°ف؟، ´ëار ´ë¹جءِ °¨¼ز
	POINT_RESIST_DARK = 135,         //   ¾îµز ہْا×   : ¾َہ½°ّ°ف؟، ´ëار ´ë¹جءِ °¨¼ز

	POINT_RESIST_CRITICAL = 136,		// إ©¸®ئ¼ؤأ ہْا×	: »َ´ëہا إ©¸®ئ¼ؤأ ب®·üہ» °¨¼ز
	POINT_RESIST_PENETRATE = 137,		// °üإëإ¸°ف ہْا×	: »َ´ëہا °üإëإ¸°ف ب®·üہ» °¨¼ز

	POINT_ATTBONUS_WOLFMAN,
	POINT_RESIST_WOLFMAN,
	POINT_RESIST_CLAW,

 

also it'll show you how to create fly (EXP or hp .... etc) from this list

    FLY_NONE,
    FLY_EXP,
    FLY_HP_MEDIUM,
    FLY_HP_BIG,
    FLY_SP_SMALL,
    FLY_SP_MEDIUM,
    FLY_SP_BIG,
    FLY_FIREWORK1,
    FLY_FIREWORK2,
    FLY_FIREWORK3,
    FLY_FIREWORK4,
    FLY_FIREWORK5,
    FLY_FIREWORK6,
    FLY_FIREWORK_CHRISTMAS,
    FLY_CHAIN_LIGHTNING,
    FLY_HP_SMALL,
    FLY_SKILL_MUYEONG,

 

PS : I didn't try all of the points types so i don't know if all of them works like this guide

PS: the fireworks flys doesn't go to the target --- when you try it you'll know what i mean

 

ok it's sooooooo easy HOW-TO

 

just go to char_battle.cpp

search for this or go to line "1304" (not sure about the line number)

sys_log(1, "DEAD_BY_PC: %s %p KILLER %s %p", GetName(), this, pkKiller->GetName(), get_pointer(pkKiller));

before it add those lines

#1 first the fly line

first of all the "CreateFly" function is connected to "TPacketGCCreateFly" packet when this function is called the game send the packet with the "type" of the fly and the "Victim"

so as a beginning write

CreateFly(

now we need a type i'll put EXP  :)

and we need the victim .... the victim will be "pkKiller"

so the line will be like this

CreateFly(FLY_EXP, pkKiller);

ok now this is the fly

 

#2 (Change Points)

The base form of the Point change is like this

PointChange(POINT_TYPE, value); 

so in this guide i'll write it like this

PointChange(POINT_EXP, -5000);

but this will only change the points of the player (which is now killed by the other player "pkKiller"

so it will take 5k exp point from the loser

now to give 5k exp to the killer write it like this

pkKiller->PointChange(POINT_EXP, 5000);

and DONE :)

 

now you can also change the killer hp and mp to the max (because he is the winner of course )

 

i got this idea from metin2us ... we used  do it like this --> (after the duel is over the winner says how much hp he still got and the loser must pay the amount of the hp)

 

sorry for bad english

    Best Regards

      FlyGun :P

  • Love 4
Link to comment
Share on other sites

  • Former Staff

[How-TO(c++)] Change other player level with "/set" command

 

open cmd_gm.cpp (we wont change any other file)

 

search for

{ "align",		NUMBER	},	//8

[ENTER] (new line) add this line

{ "level",        NUMBER    },    //9

search for

case 8: // alignment

after "break;" add those lines

		case 9: //Level
			{
				int bLevel ;
				str_to_number(bLevel, arg3);
				//skills & status
				tch->ResetPoint(MINMAX(1, bLevel, PLAYER_MAX_LEVEL_CONST));
				tch->ClearSkill();
				tch->ClearSubSkill();
				//Level & exp
				tch->PointChange(POINT_LEVEL, bLevel - ch->GetLevel());
				tch->SetExp(0);
				//HP & SP
				tch->SetRandomHP((bLevel - 1) * number(JobInitialPoints[ch->GetJob()].hp_per_lv_begin, JobInitialPoints[ch->GetJob()].hp_per_lv_end));
				tch->SetRandomSP((bLevel - 1) * number(JobInitialPoints[ch->GetJob()].sp_per_lv_begin, JobInitialPoints[ch->GetJob()].sp_per_lv_end));

			}
			break;

    Best Regards

      FlyGun :P

  • Love 5
Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


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.