Jump to content

bWolfie

Members
  • Content Count

    848
  • Joined

  • Last visited

  • Days Won

    34

Posts posted by bWolfie


  1. You need to check 'sd' is not NULL first. so like

     if (sd != NULL && sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_HUNTER)
    

    If you have edited other source code, you will need to check it for all sorts of stuff isn't using null pointer. E.g. sc != NULL, tsd != NULL, etc.


  2. 1 hour ago, ThyroDree said:

    getting this error too,

     

    
    "look" is no element from "item_data"
    costumeitem.c: 347:16: error: "struct "item_data"" has no member named ""look""

    using dastgir costume plugin

    your plugin is outdated. go download updated version.


  3. No offence to the creator Smoke, as he did a great effort putting this all together, but there are outstanding issues which make it not possible to use in a production server.

    Being curious, just did some more testing with it, and the guild system (I believe that's what causes it) actually creates this issue where sometimes the sword cursor doesn't appear (need to refresh to get it to show, seems random chance it actually appears), meaning your players would need to have /ns activated all the time to play. 

    So please, any future posters - unless you know how to edit the plugin (and therefore source code) itself, don't download it.

    And nobody request support as nobody is going to help you.


  4. Update:

    - skill_get_requirement_post was missing a 'sd' check. 
    - Configuration for which skills become available is now set in an array.
    - Console will print a warning if the array is not configured correctly.

    // Configuration
    int extra_skill[] = {
    	// Add the skills/levels here
    	// Format: skill_id, skill_lv,
    	WZ_VERMILION, 10,
    	LK_PARRYING, 10
    };
    // End Configuration

     


  5. Hi all,

    For the longest time I've been creating custom script commands simply so I can read a value from struct map_session_data{}. For example, I wanted to return the value of sd->state.showzeny, so I created a simple buildin just for that purpose.It would go something like this:
     

    BUILDIN(read_showzeny)
    {
        struct map_session_data *sd =  script->rid2sd(st);
    
        if (sd != NULL)
            script_pushint(st, sd->state.showzeny);
        else
            script_pushint(st, -1);
    
        return true;
    }

    Seems not bad, right? But then it got me thinking. I'm creating all these script commands for one simple action. Surely there's a better way? That's when I stumbled across the getunitdata() command.

    Then it came to me - create a script command which can fetch this data for a player.

    The Goal

    Create a script command which can fetch the data which map_session_data provides. It would work similar to getunitdata():
    *getplayerdata(<account id>, <DataType>{,<Variable>})
    Maybe also setplayerdata()?

    Helped needed: The one thing is, not all the stuff in there is useful. Maybe it would be best to selectively choose what can be retrieved as data? I made a list for this stuff. Let me know what you think.

    Spoiler
    
    /**
     * Player Data Types
     */
    enum script_player_data_types {
    	PDT_STORAGEFLAG = 0,
    	PDT_SHOWDELAY,
    	PDT_SHOWEXP,
    	PDT_SHOWZENY,
    	PDT_NOASK,
    	PDT_TRADING,
    	PDT_DEAL_LOCKED,
    	PDT_SIZE,
    	PDT_NIGHT,
    	PDT_KILER,
    	PDT_KILLABLE,
    	PDT_NOKS,
    	PDT_AUTOLOOT,
    	PDT_NO_WEAPON_DAMAGE,
    	PDT_NO_MAGIC_DAMAGE,
    	PDT_NO_MISC_DAMAGE,
    	PDT_RESTART_FULL_RECOVER,
    	PDT_NO_CASTCANCEL,
    	PDT_NO_CASTCANCEL2,
    	PDT_NO_SIZEFIX,
    	PDT_NO_GEMSTONE,
    	PDT_INTRAVISION,
    	PDT_PERFECT_HIDING,
    	PDT_NO_KNOCKBACK,
    	PDT_BONUS_COMA,
    	PDT_HEAD_DIR,
    	PDT_NPC_TIMER_ID,
    	PDT_CHAT_ID,
    	PDT_IDLETIME,
    	PDT_FOLLOWTARGET,
    	PDT_EMOTIONLASTTIME,
    	PDT_INVINCIBLE_TIMER,
    	PDT_CANLOG_TICK,
    	PDT_CANUSEITEM_TICK,
    	PDT_CANUSECASHFOOD_TICK,
    	PDT_CANEQUIP_TICK,
    	PDT_CANTALK_TICK,
    	PDT_CANSKILL_TICK,
    	PDT_CANSENDMAIL_TICK,
    	PDT_KS_FLOODPROTECT_KICK,
    	PDT_DISGUISE,
    	PDT_POTION_SUCCESS_COUNTER,
    	PDT_MISSION_COUNT,
    	PDT_MISSION_MOBID,
    	PDT_DIE_COUNTER,
    	PDT_DEVOTION,
    	PDT_TRADE_PARTNER,
    	PDT_GUILDSPY,
    	PDT_PARTYSPY,
    	PDT_HATE_MOB,
    	PDT_PVP_TIMER,
    	PDT_PVP_POINT,
    	PDT_PVP_RANK,
    	PDT_PVP_LASTUSERS,
    	PDT_PVP_WON,
    	PDT_PVP_LOST,
    	PDT_EVENTCOUNT,
    	PDT_FAKENAME,
    	PDT_DUEL_GROUP,
    	PDT_DUEL_INVITE,
    	PDT_CASHPOINTS,
    	PDT_KAFRAPOINTS,
    	PDT_RENTAL_TIMER,
    	PDT_NPC_IDLE_TIMER,
    	PDT_NPC_IDLE_TICK,
    	PDT_FRIEND_REQ,
    	PDT_FONTCOLOR,
    	PDT_MAX
    };

     

     

×
×
  • Create New...

Important Information

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