Jump to content
  • Featured Topics

  • Latest Commits

  • Topics

  • Posts

    • Hello, I really wanted to add a command to my server, basically the player could use @joinguild <idguild> and he would join the guild without needing an invitation I did something similar to this but it doesn't work.   script.ccp /*==========================================  * @joinguild <guild_id>   *------------------------------------------*/ ACMD_FUNC(joinguild) {     std::shared_ptr<MapGuild> g; // Usar std::shared_ptr<MapGuild>     int guild_id;     nullpo_retr(-1, sd);     if (!message || !*message || sscanf(message, "%d", &guild_id) != 1) {         clif_displaymessage(fd, "Error. (usage: @joinguild <guild_id>).");         return -1;     }     // Procurar pela guilda usando o ID     g = guild_search(guild_id); // Usar a função correta para procurar pela guilda     if (!g) { // Verificar se a guilda foi encontrada         clif_displaymessage(fd, "Guild not found.");         return -1;     }     // Verificar se o jogador já está em uma guilda     if (sd->status.guild_id > 0) {         clif_displaymessage(fd, "You are already in a guild.");         return -1;     }     // Adicionar o jogador à guilda usando o sistema de convite     sd->guild_invite = guild_id;     sd->guild_invite_account = sd->status.account_id; // Definindo o account_id do próprio jogador     if (guild_reply_invite(sd, guild_id, 1) == 1) { // Verificar se a função foi bem-sucedida         clif_displaymessage(fd, "You have successfully joined the guild.");         return 0; // Sucesso     } else {         clif_displaymessage(fd, "Failed to join the guild.");         return -1; // Falha     } }
    • Thanks for the awesome map! map looks great if shadow is disabled or /lightmap. everything looks clear.   But if shadow is enabled the red light is too harsh. can't even use stylist cuz too red.  is there a way to fix this? or maybe disable reddish light when shadow is enabled    
    • Is that from rA? does areamonster there sets this variable? this does not happen in herc: https://github.com/HerculesWS/Hercules/blob/stable/doc/script_commands.txt#L695   Ah, the answer went up and I didn't saw it 😅 Glad you got it working
    • Hello, is there a way for me to bring along the title and UDT GROUP of npc to duplicate npc? Original NPC Duplicate NPC
    • I think I got it now. Thanks!   freeloop(true); // Summon mobs and store their IDs for (.@i = 0; .@i < .@amount; .@i++) { .@mobGID = areamonster(.@map$, .@x1, .@y1, .@x2, .@y2, .@mob_name$, .@mob_id, 1, .@label$); .@MAXHP = getunitdata(.@mobGID, UDT_MAXHP); .@HP = getunitdata(.@mobGID, UDT_HP); setunitdata(.@mobGID, UDT_MAXHP, .@MAXHP + ((.@MAXHP * .@bonus_hp_rate) / 100)); setunitdata(.@mobGID, UDT_HP, .@HP + ((.@HP * .@bonus_hp_rate) / 100)); .@ATKMIN = getunitdata(.@mobGID, UDT_ATKMIN); .@ATKMAX = getunitdata(.@mobGID, UDT_ATKMAX); setunitdata(.@mobGID, UDT_ATKMIN, .@ATKMIN + ((.@ATKMIN * .@bonus_dmg_rate) / 100)); setunitdata(.@mobGID, UDT_ATKMAX, .@ATKMAX + ((.@ATKMAX * .@bonus_dmg_rate) / 100)); .@DAMAGETAKEN = getunitdata(.@mobGID, UDT_DAMAGE_TAKEN_RATE); setunitdata(.@mobGID, UDT_DAMAGE_TAKEN_RATE, .@DAMAGETAKEN + ((.@DAMAGETAKEN * .@bonus_damagetaken) / 100)); .@DEF = getunitdata(.@mobGID, UDT_DEF); setunitdata(.@mobGID, UDT_DEF, .@DEF + ((.@DEF * .@bonus_def) / 100)); .@MDEF = getunitdata(.@mobGID, UDT_MDEF); setunitdata(.@mobGID, UDT_MDEF, .@MDEF + ((.@MDEF * .@bonus_mdef) / 100)); .@HIT = getunitdata(.@mobGID, UDT_HIT); setunitdata(.@mobGID, UDT_HIT, .@HIT + ((.@HIT * .@bonus_hit) / 100)); .@FLEE = getunitdata(.@mobGID, UDT_FLEE); setunitdata(.@mobGID, UDT_FLEE, .@FLEE + ((.@FLEE * .@bonus_flee) / 100)); } freeloop(false);  
  • Download Statistics

    • Files
      457
    • Comments
      154
    • Reviews
      240

    Latest File
    By Hyroshima

    53    0

×
×
  • Create New...

Important Information

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