Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 03/30/22 in Posts

  1. 1 point
    Ridley

    Deprecated Features

    Related commit: https://github.com/HerculesWS/Hercules/pull/2398 This command will return the currently active pet information of the invoking character. getpetinfo(<type>) petstat(<flag>) Types: PETINFO_ID - Pet Database ID, stored in `pet` table to distinguish from other pets. PETINFO_CLASS - Pet class ID. (Id field) PETINFO_NAME - Pet Name, return "null" if there's no active pet. PETINFO_INTIMACY - Pet Intimacy level. 1000 is full loyalty. PETINFO_HUNGRY - Pet hungry level. 100 is completely full. PETINFO_RENAME - Pet rename flag. 0 means this pet has not been named yet. PETINFO_GID - Pet Game ID PETINFO_EGGITEM - Pet EggItem PETINFO_FOODITEM - Pet FoodItem PETINFO_ACCESSORYITEM - Pet AccessoryItem PETINFO_ACCESSORYFLAG - return 1 if the pet currently equipping accessory, return 0 otherwise. PETINFO_EVO_EGGID - Pet Evolve EggID PETINFO_AUTOFEED - Pet AutoFeed flag.
  2. 1 point
    Ridley

    Deprecated Features

    Related commit: https://github.com/HerculesWS/Hercules/pull/2440 consolemes() debugmes() Format and Values: consolemes("<type>", "<format string>"{,<param>{, ...}}) List of available <type> are: CONSOLEMES_DEBUG = 0 CONSOLEMES_ERROR = 1 CONSOLEMES_WARNING = 2 CONSOLEMES_INFO = 3 CONSOLEMES_STATUS = 4 CONSOLEMES_NOTICE = 5 Example: Old: debugmes("Please check your special warp menu settings on the Warpra."); New: consolemes(CONSOLEMES_WARNING, "Please check your special warp menu settings on the Warpra."); consolemes(CONSOLEMES_DEBUG, "%s has clicked me!", strcharinfo(PC_NAME)); consolemes(CONSOLEMES_DEBUG, "\033[0;32mHello World"); // supports ANSI escape sequences
  3. 1 point
    Ridley

    Deprecated Features

    Related commit: https://github.com/HerculesWS/Hercules/pull/2566 and present in https://github.com/HerculesWS/Hercules/commits/stable getguildinfo() getguildname() getguildmaster() getguildmasterid() Script Conversion: find npc db -type f -exec sed -i -e "s/getguildname(/getguildinfo(GUILDINFO_NAME, /g" \ -e "s/getguildmaster(/getguildinfo(GUILDINFO_MASTER_NAME, /g" \ -e "s/getguildmasterid(/getguildinfo(GUILDINFO_MASTER_CID, /g" {} + Format and Values: *getguildinfo(<info type>{, <guild id>}) *getguildinfo(<info type>{, "<guild name>"}) Valid <info type> are: GUILDINFO_NAME - guild name GUILDINFO_ID - guild id GUILDINFO_LEVEL - current level GUILDINFO_EXP - current exp GUILDINFO_NEXT_EXP - exp required to reach the next level GUILDINFO_SKILL_POINTS - available skill points GUILDINFO_ONLINE - number of online members GUILDINFO_AV_LEVEL - average member level GUILDINFO_MAX_MEMBERS - guild capacity GUILDINFO_MASTER_NAME - name of the guild master GUILDINFO_MASTER_CID - char id of the guild master Example: 1Old: getguildmaster(getcharid(CHAR_ID_GUILD)) 1New: getguildinfo(GUILDINFO_MASTER_NAME, getcharid(CHAR_ID_GUILD)) 2Old: getguildname(getcharid(CHAR_ID_GUILD)) 2New: getguildinfo(GUILDINFO_NAME, getcharid(CHAR_ID_GUILD))
  4. 1 point
    AnnieRuru

    Deprecated Features

    Related commit: https://github.com/HerculesWS/Hercules/pull/2391 this is part of *setunitdata script command clean-up the UDT_MAPIDXY and UDT_WALKTOXY constant has been deprecated so this script command only dealing with 1 INTEGER value now it has been standardize, all (int) has been removed from the documentation Example 1 : setunitdata UDT_MAPIDXY (old) .@mobgid = monster("this", -1,-1, "--ja--", PORING, 1); setunitdata(.@mobgid, UDT_MAPIDXY, "guild_vs2", 50,50); now should be .@mobgid = monster("this", -1,-1, "--ja--", PORING, 1); unitwarp(.@mobgid, "guild_vs2", 50,50); Example 2 : getunitdata UDT_MAPIDXY (old) .@mobgid = monster("this", -1,-1, "--ja--", PORING, 1); getunitdata(.@mobgid, UDT_MAPIDXY, .@pos); dispbottom(sprintf("%d %d %d", .@pos[0], .@pos[1], .@pos[2])); // apparently we don't have *mapid2name script command ... doesn't matter anymore now should be .@mobgid = monster("this", -1,-1, "--ja--", PORING, 1); getmapxy(.@map$, .@x, .@y, UNITTYPE_MOB, .@mobgid); dispbottom(sprintf("%s %d %d", .@map$, .@x, .@y)); Example 3 : setunitdata UDT_WALKTOXY (old) .@mobgid = monster("this", -1,-1, "--ja--", PORING, 1); setunitdata(.@mobgid, UDT_WALKTOXY, 158,185); now should be .@mobgid = monster("this", -1,-1, "--ja--", PORING, 1); unitwalk(.@mobgid, 158, 185);
×
×
  • Create New...

Important Information

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