Jump to content

csnv

Members
  • Content Count

    35
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by csnv


  1. I have never done anything like that, but I would say it needs both.

    Lua files required to put the skill in the correct position in the skill tree.

    Hardcoded to make plagiarized skills flagged as permanent instead, if that's what you want of course.


  2. csnv webtoken


    NOTE: THIS PLUGIN IS NO LONGER NECESSARY! API SERVER ALREADY MERGED


    Plugin required for generating webtokens for third party applications to serve the required web services for newer clients (2019-06+).

     

    Quote

    This plugin only aims to provide a bare minimun solution for 2019-06+ clients. For a more functional, feature rich, better security and better performance solution, help funding the real deal here https://board.herc.ws/topic/20151-http-support-in-hercules-funding/

     

    Third party applications than can make use of webtokens generated by this plugin:

    https://github.com/csnv/Mindu [Tested]

    https://github.com/secretdataz/athena-web-service [Untested]

     

    Please report any issue in the github page
    https://github.com/csnv/webtoken

     

    Instructions:

    - Import login_webtoken_fields.sql into your SQL database.

    - Apply webtoken.diff to your Hercules server codebase. Alternatively, you may apply this PR: https://github.com/HerculesWS/Hercules/pull/3183

    - Place csnv_webtoken.c in your src/plugins directory and compile.

     

    Now your hercules emulator generates the required webtoken. Pick a webserver application that can make use of it.


     


  3. Plugin for generating webtokens for third party applications to serve the required web services for newer clients (2019-06+).

     

    Quote

    This project only aims to provide a bare minimun solution for 2019-06+ clients. For a more functional, feature rich, better security and better performance solution, help funding the real deal here https://board.herc.ws/topic/20151-http-support-in-hercules-funding/

     

    Third party applications than can make use of webtokens generated by this plugin:

    https://github.com/csnv/Mindu <- Plugin was tested under this webserver

    https://github.com/secretdataz/athena-web-service

     

    Please report any issue in the github page
    https://github.com/csnv/webtoken

     

    Instructions:

    - Import login_webtoken_fields.sql into your SQL database.

    - Apply webtoken.diff to your Hercules server codebase. Alternatively, you may apply this PR: https://github.com/HerculesWS/Hercules/pull/3183

    - Place csnv_webtoken.c in your src/plugins directory and compile.

    Now your hercules emulator generates the required webtoken. Pick a webserver application that can make use of it.


    Plugin download:

     


  4. You are placing it in the wrong place. For SC statuses checks it goes under status_check_skilluse (status.c), right here https://github.com/HerculesWS/Hercules/blob/master/src/map/status.c#L1796

    Turn this:

    if(tsc && tsc->count) {		/* attacks in invincible are capped to 1 damage and handled in batte.c; allow spell break and eske for sealed shrine GDB when in INVINCIBLE state. */		if( tsc->data[SC_INVINCIBLE] && !tsc->data[SC_INVINCIBLEOFF] && skill_id && !(skill_id&(SA_SPELLBREAKER|SL_SKE)) )			return 0;		if(!skill_id && tsc->data[SC_TRICKDEAD])			return 0;		if((skill_id == WZ_STORMGUST || skill_id == WZ_FROSTNOVA || skill_id == NJ_HYOUSYOURAKU)			&& tsc->data[SC_FREEZE])			return 0;		if(skill_id == PR_LEXAETERNA && (tsc->data[SC_FREEZE] || (tsc->data[SC_STONE] && tsc->opt1 == OPT1_STONE)))			return 0;		if( ( tsc->data[SC_STEALTHFIELD] || tsc->data[SC_CAMOUFLAGE] ) && !(st->mode&(MD_BOSS|MD_DETECTOR)) && flag == 4 )			return 0;	}

    To this:

    if(tsc && tsc->count) {		/* attacks in invincible are capped to 1 damage and handled in batte.c; allow spell break and eske for sealed shrine GDB when in INVINCIBLE state. */		if( tsc->data[SC_INVINCIBLE] && !tsc->data[SC_INVINCIBLEOFF] && skill_id && !(skill_id&(SA_SPELLBREAKER|SL_SKE)) )			return 0;		if(!skill_id && tsc->data[SC_TRICKDEAD])			return 0;		if((skill_id == WZ_STORMGUST || skill_id == WZ_FROSTNOVA || skill_id == NJ_HYOUSYOURAKU)			&& tsc->data[SC_FREEZE])			return 0;		if(skill_id == PR_LEXAETERNA && (tsc->data[SC_FREEZE] || (tsc->data[SC_STONE] && tsc->opt1 == OPT1_STONE)))			return 0;		if( ( tsc->data[SC_STEALTHFIELD] || tsc->data[SC_CAMOUFLAGE] ) && !(st->mode&(MD_BOSS|MD_DETECTOR)) && flag == 4 )			return 0;		if (skill_id == NG_JUTSU_FUNERAL && !(tsc->data[SC_STONE])) 			return 0;	}

  5. You are checking the source's status. it should be like this:

    if(skill_id == NG_JUTSU_FUNERAL) { // Gravitation and Pressure do damage without removing the effect			if(tsc && tsc->data[SC_STONE]){					damage <<= 1; // If used against a player in White Imprison, the skill deals double damage.			}else{				d->dmg_lv = ATK_BLOCK;				return 0;			}		}

    However, as the comment says, you're actually doubling damage if you keep it like this. So, for it doing exactly what you want it to do, it should be like this:

    if(skill_id == NG_JUTSU_FUNERAL && !(tsc && tsc->data[SC_STONE])) {	// Deal damage only when the target is under stone curse status	d->dmg_lv = ATK_BLOCK;	return 0;}

  6. Rivalry and competition improve projects. This is specially true in open source projects, where one project can benefit from the other and viceversa.

     

    Just look how things were when there was "only" eathena (taking into account the community size difference), or where rAthena was alone in the path.


  7. For Blade Stop

    battle.c:5756

    if( tsc && tsc->data[SC_BLADESTOP_WAIT] && !is_boss(src) && (src->type == BL_PC || tsd == NULL || distance_bl(src, target) <= (tsd->status.weapon == W_FIST ? 1 : 2)) )

    change it to:

    if( tsc && tsc->data[SC_BLADESTOP_WAIT] && !is_boss(src) && flag&BF_SHORT && (src->type == BL_PC || tsd == NULL || distance_bl(src, target) <= (tsd->status.weapon == W_FIST ? 1 : 2)) )

     

     

    The same with Shrink:

    battle.c:2746

    if(sc->data[SC_CR_SHRINK] && rnd()%100<5*sce->val1)

    change to:

    if(sc->data[SC_CR_SHRINK] && flag&BF_SHORT && rnd()%100<5*sce->val1)

  8. Try this on src/map/packets.h

     

    Look for:

    //2013-06-05Ragexe (Shakto)#if PACKETVER >= 20130605	packet(0x0369,7,clif->pActionRequest,2,6);	packet(0x083C,10,clif->pUseSkillToId,2,4,6);	packet(0x0437,5,clif->pWalkToXY,2);	packet(0x035F,6,clif->pTickSend,2);	packet(0x0202,5,clif->pChangeDir,2,4);	packet(0x07E4,6,clif->pTakeItem,2);	packet(0x0362,6,clif->pDropItem,2,4);	packet(0x07EC,8,clif->pMoveToKafra,2,4);	packet(0x0364,8,clif->pMoveFromKafra,2,4);	packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8);	packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10);	packet(0x096A,6,clif->pGetCharNameRequest,2);	packet(0x0368,6,clif->pSolveCharName,2);	packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10);	packet(0x0835,2,clif->pSearchStoreInfoNextPage,0);	packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15);	packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12);	packet(0x0360,6,clif->pReqClickBuyingStore,2);	packet(0x0817,2,clif->pReqCloseBuyingStore,0);	packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);#ifdef PACKETVER_RE	packet(0x0365,41,clif->pPartyRecruitRegisterReq,2,4);#else // not PACKETVER_RE	packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4);#endif // PACKETVER_RE	// packet(0x0363,8); // CZ_JOIN_BATTLE_FIELD	packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8);	packet(0x022D,19,clif->pWantToConnection,2,6,10,14,18);	packet(0x0802,26,clif->pPartyInvite2,2);	// packet(0x0436,4); // CZ_GANGSI_RANK	packet(0x023B,26,clif->pFriendsListAdd,2);	packet(0x0361,5,clif->pHomMenu,2,4);	packet(0x0883,36,clif->pStoragePassword,0);#endif

    Add this:

    	packet(0x097C,4,clif->pRanklist);

    Before the last "#endif", like this:

    //2013-06-05Ragexe (Shakto)#if PACKETVER >= 20130605	packet(0x0369,7,clif->pActionRequest,2,6);	packet(0x083C,10,clif->pUseSkillToId,2,4,6);	packet(0x0437,5,clif->pWalkToXY,2);	packet(0x035F,6,clif->pTickSend,2);	packet(0x0202,5,clif->pChangeDir,2,4);	packet(0x07E4,6,clif->pTakeItem,2);	packet(0x0362,6,clif->pDropItem,2,4);	packet(0x07EC,8,clif->pMoveToKafra,2,4);	packet(0x0364,8,clif->pMoveFromKafra,2,4);	packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8);	packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10);	packet(0x096A,6,clif->pGetCharNameRequest,2);	packet(0x0368,6,clif->pSolveCharName,2);	packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10);	packet(0x0835,2,clif->pSearchStoreInfoNextPage,0);	packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15);	packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12);	packet(0x0360,6,clif->pReqClickBuyingStore,2);	packet(0x0817,2,clif->pReqCloseBuyingStore,0);	packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89);#ifdef PACKETVER_RE	packet(0x0365,41,clif->pPartyRecruitRegisterReq,2,4);#else // not PACKETVER_RE	packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4);#endif // PACKETVER_RE	// packet(0x0363,8); // CZ_JOIN_BATTLE_FIELD	packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8);	packet(0x022D,19,clif->pWantToConnection,2,6,10,14,18);	packet(0x0802,26,clif->pPartyInvite2,2);	// packet(0x0436,4); // CZ_GANGSI_RANK	packet(0x023B,26,clif->pFriendsListAdd,2);	packet(0x0361,5,clif->pHomMenu,2,4);	packet(0x0883,36,clif->pStoragePassword,0);	packet(0x097C,4,clif->pRanklist);#endif

    And then, recompile. If it works please notify it so we add the fix upstream :)


  9. Try this (remember that Hercules uses interfaces and script.c is a bit different)

    BUILDIN(partyinvite){	int party_id,i = 0;	struct map_session_data *sd = script_rid2sd(st ); 	struct party_data *p; 	party_id=script_getnum(st,2); 	p = party->search(party_id); 	if (p ) //Search leader		for(i = 0; i < MAX_PARTY && !p->party.member->leader; i++); 	if (!p || i == MAX_PARTY)		return 0; //leader not found	if(!sd)		return 0; //no players in the script	sd->party_joining = 1;	sd->party_invite = party_id;	sd->party_invite_account = p->party.member[i].account_id; 	if( party->member_added(party_id,sd->status.account_id,sd->status.char_id,0) )		script_pushint(st,1);	else		script_pushint(st,-1);	return true;}

  10. I guess I'll give you a more precise suggestion. Read and follow "The C Programming Language - 2nd edition" book, along with the exercises your C knowledge should be enough to be able to understand what the emulator does and how. Then, you can fix bugs or develop your own code, but above all you'll need time to understand the emulator code.


  11.  

    The only way you can handle bots is 

    1.- Enable packet encryption

    2.- Disable proccess attachment into the client (Right now, most common way of botting is by attaching the bot to the client, so it runs through the client, which rendered method 1 useless)

     

    P.D.: Pretty delayed reply, but looks like none mentioned point two before :P

    Regrading #2, I thought OpenKore developed a client that doesn't even hook into the game client? Just sends and receives packets on it's own.

    The thing is OpenKore should not, by default, use the encrypted packets your client uses unless you attach the openkore client to your custom client.


  12.  

    I just attached that to the @stats command. I was looking for a way to grab the name of the ID, like enum to string, but not sure of the way to do that in the code.

     

     

    You can't, unless you hardcode the string for each enum.


  13. This is a bit of a hack, but if you just want to "have inmunity to everything with 400 luk", just put type this:

    if (st->luk >= 400)    sc_def = 10000;

     

    If you want to have gradually resistance until 400 luk:

    sc_def = st->luk * 25;

     

    If you want gradually resistance until 400 luk BUT want it to complement the resistance gained from other stats (Vit, Int...)

    sc_def += ((10000 - sc_def) * (st->luk * 25)) / 10000;

     

     

    Where to put this? Here: https://github.com/HerculesWS/Hercules/blob/master/src/map/status.c#L6583

     

    And then, recompile.

     

    Note: This might affect the duration of some statuses.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.