Jump to content

Tomahawk

Members
  • Posts

    27
  • Joined

  • Last visited

Posts posted by Tomahawk

  1. I'm trying to add a secondary cooldown for a certain map.

    Here's the code:

    skill.hpp
    int32 raidcd[MAX_SKILL_LEVEL];
    int skill_get_raidcd(uint16 skill_id, uint16 skill_lv);
    
    
    skill.cpp
    int skill_get_raidcd(uint16 skill_id, uint16 skill_lv)             { skill_get_lv(skill_id, skill_lv, skill_db.find(skill_id)->raidcd); }
    
    pc.cpp
    int cooldown = skill_get_cooldown(skill_id, skill_lv);
    if (map_getmapflag(sd->bl.m, MF_SMAP) && skill_get_raidcd(skill_id, skill_lv)) cooldown = skill_get_raidcd(skill_id, skill_lv);

    no errors but its not applying the cd i put on skill db Raidcd: xxxxx

    its like its not recognizing the skill_get_raidcd(skill_id, skill_lv).

    I need some help please, thank you!

     

     

    SOLVED.

    Forgot to phase it into yaml. Thanks to Stolao for helping me!

  2. Hello, is there a way to call searchstore_query after calling searchstore_open in 'searchstores'' script commands? I'm trying to add it.

    searchstore_query(struct map_session_data* sd, unsigned char type, unsigned int min_price, unsigned int max_price, const struct PACKET_CZ_SEARCH_STORE_INFO_item* itemlist, unsigned int item_count, const struct PACKET_CZ_SEARCH_STORE_INFO_item* cardlist, unsigned int card_count)

    Im kinda lost here, where does the server transforms the text to the "itemlist", is it here or in clif.cpp? also, does it only accept packet and not texts? is there a way to call this function with "script_getstr" for the item name?

  3. 		getmapxy @map$,@x,@y,0;
    			if ( @map$ == $pvp$[$pvp] ) goto PvP;
    			if ( @map$ == $pvp$[$pvpx] ) goto PvP;
    			if ( @map$ == $pvp$[$pvpw] ) goto PvP;
    			if ( @map$ == $pvp$[$pvpy] ) goto PvP2;//Sem ygg
    			if ( @map$ == $gvg$[$gvg] ) goto GvG;
    			if ( @map$ == $gvg$[$gvgx] ) goto GvG;
    			if ( @map$ == $gvg$[$gvgw] ) goto GvG;
    			if ( @map$ == $gvg$[$gvgy] ) goto GvG2;//Sem ygg
    			if ( @map$ == $pvp$[$playes] ) goto playes;

    to this

    .@map$ = strcharinfo(3);
    			if ( @map$ == $pvp$[0] ) goto PvP;
    			if ( @map$ == $gvg$[0] ) goto GvG;

     

  4. Is it possible to change area_size based on mapflag? I'm trying to change clif.cpp with no luck

     

    		if(mapdata->flag[MF_NEWAREA]) {
    		map_foreachinallarea(clif_send_sub, bl->m, bl->x-20, bl->y-20, bl->x+20, bl->y+20,
    		BL_PC, buf, len, bl, type);}
    		else {
    		map_foreachinallarea(clif_send_sub, bl->m, bl->x-AREA_SIZE, bl->y-AREA_SIZE, bl->x+AREA_SIZE, bl->y+AREA_SIZE,
    		BL_PC, buf, len, bl, type);}
    		break;

    Map server crashes on start. Thank you for reading.

  5. Hello,

    I'm trying to add ShowScale to other skills like WZ_HEAVENDRIVE but it doesn't work. No errors it simply doesn't show the "red dots" that NPC_SKILLS like NPC_EARTHQUAKES does.

    Flags:
          IsAutoShadowSpell: true
          TargetHidden: true
          ShowScale: true

    Is it hard coded on client? or am I missing something? Thanks!

  6. 12 hours ago, Haruka Mayumi said:

    you used sd without checking if there's session data. also using sd on the loop is a no.. you should use the tsd.

    here's a last insight.

    
    	struct s_dmglog {
    		int id; //char id
    		unsigned int dmg;
    		unsigned int flag : 2; //0: Normal. 1: Homunc exp. 2: Pet exp
    	} dmglog[DAMAGELOG_SIZE];

     

    Thank you very much! it was the sd without checking, it is solved!

  7. 12 hours ago, Haruka Mayumi said:
    
    for(i = 0, count = 0, mvp_damage = 0; i < DAMAGELOG_SIZE && md->dmglog[i].id; i++) {
    		struct map_session_data* tsd = NULL;
    		if (md->dmglog[i].flag == MDLF_SELF) {
    			//Self damage counts as exp tap
    			count++;
    			continue;
    		}
    		tsd = map_charid2sd(md->dmglog[i].id);
    		if (tsd == NULL)
    			continue; // skip empty entries
    		if (tsd->bl.m != m)
    			continue; // skip players not on this map
    		count++; //Only logged into same map chars are counted for the total.
    		if (pc_isdead(tsd))
    			continue; // skip dead players
    		if (md->dmglog[i].flag == MDLF_HOMUN && !hom_is_active(tsd->hd))
    			continue; // skip homunc's share if inactive
    		if (md->dmglog[i].flag == MDLF_PET && (!tsd->status.pet_id || !tsd->pd))
    			continue; // skip pet's share if inactive
    
    		if(md->dmglog[i].dmg > mvp_damage) {
    			third_sd = second_sd;
    			second_sd = mvp_sd;
    			mvp_sd = tsd;
    			mvp_damage = md->dmglog[i].dmg;
    		}
    
    		tmpsd[i] = tsd; // record as valid damage-log entry
    
    		switch( md->dmglog[i].flag ) {
    			case MDLF_NORMAL: dmgbltypes|= BL_PC;  break;
    			case MDLF_HOMUN:  dmgbltypes|= BL_HOM; break;
    			case MDLF_PET:    dmgbltypes|= BL_PET; break;
    		}
    	}

    i'll give you a little insight on where you will edit ?
    it's somewhere here.

    How do you save the damage as a player variable? I tried using :

     

    pc_setglobalreg(sd, add_str("variable"), mvp_damage);
    
    Or
    
    pc_setaccountreg(sd, add_str("variable"), mvp_damage);


    But the map_server crashes.

  8. setarray .mvplist[0],1832,1511,1647,1785,1630,1039,1874,2068,1272,1719,1046,1389,1112,1115,1418,1871,1252,1768,1885,1649,1651,1492,1734,1251,1779,1688,1646,1373,1147,1059,1150,1087,1190,1038,1157,1159,1623,1650,1583,1312,1751,1685,1648,1658;
    .@mobid = .mvplist[rand(0,getarraysize(.mvplist))];
    monster "map_x",0,0,strmobinfo(2,.@mobid),.@mobid,1,"mvpspawn::OnMVPDead";

    sometimes gives this error:

    error.png.deef07b74e0ab5f6fa306fc85b02529b.png

     

    Can anyone help me? I'm just not getting what i'm doing wrong.

  9. Quote

    Does it really matter the year of the data.grf, apart from the new maps resources?

    Not that I know of.

    Quote

     I need to use BrowEdit for just a few tweaks in a map or two

    Great then an older one shouln't give you any problems, good luck ?

  10. You gotta hex the client to include sky background on custom maps.

    Open the client on a hex editor and change one of the original sky maps to yours.

    Ex:

    Search for airplane01.rsw and change it to:

    custommap1.rsw (the custom name must have the same lenght as the original).

    • Like 1
×
×
  • Create New...