-
Featured Topics
-
Latest Commits
-
Topics
-
Posts
-
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
-
By Louis T Steinhil · Posted
Hello, is there a way for me to bring along the title and UDT GROUP of npc to duplicate npc? Original NPC Duplicate NPC -
By Louis T Steinhil · Posted
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); -
By Louis T Steinhil · Posted
Sorry wasn't aware that $@mobid[] was not available in herc. Returned value is an array with the game ID of the spawned monster(s) depending on the amount spawned. Array is stored in $@mobid[]. -
I am not sure what exactly is wrong, but as far as I can tell, this code doesn't make much sense... I have only skimmed through the initial part, but: $@mobid is an empty array, and is being copied into .@GID (Thus, .@GID would be an array too?), but then .@GID is passed to getunitdata, which doesn't expect an array... and getunitdata result is not used at all.. So I am really not sure what it is trying to do
-
-
Download Statistics