Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 06/16/18 in Posts

  1. 1 point
    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.
  2. 1 point
    bWolfie

    [Event] Wheel of fortune

    just remove cases of disablenpc
  3. 1 point
    Winterfox

    Agit Denfed Ranking

    I worked out a solution for the bugged agit_main_se.txt it can be found here: https://pastebin.com/kkuQfuwY
×
×
  • Create New...

Important Information

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