Page 1 of 1

Custom GM command @mobskill for...testing purposes...

Posted: Wed Aug 07, 2013 7:53 pm
by Troak
This command allows you to force a mob to use a mob skill of your choosing. Only works on mobs that are engaged with someone (apparently works if mob is dead as well and causes it to go through death code again).

Add this line to your commands.conf:

Code: Select all

commands_ini[#] = { ["name"] = "mobskill",       ["path"] = "scripts/commands", ["permission"] = "1", ["parameters"] = "iii" }; 
Replace # with the next number after your latest command. Change permission to whatever permission number you'd like of course.
Make mobskill.lua in scripts/commands/ with the following code:

Code: Select all

-----------------------------------
--	[Command name]: mobskill
--	[Author      ]: Troak
--	[Description ]: Forces mob to use mobskill (with option to adjust mob damage)
-----------------------------------

-----------------------------------
-- Action
-----------------------------------

function onTrigger(player,mobid,mobskillid,dmg)
	
	if(mobid ~= nil and mobskillid ~= nil) then
		local mob = GetMobByID(mobid);
		if(mob ~= nil) then
			if(dmg ~= nil) then
				mob:setDamage(dmg);
				mob:useMobAbility(mobskillid);
			else
				mob:useMobAbility(mobskillid);
			end
		end
	end
		
end;
Format of command is as follows: @mobskill mobid mobskillid dmg
For example: @mobskill 17408018 696 (will cause Fafnir to Spike Flail)
The mobskillid is taken from mob_skill.sql
The dmg parameter is optional. When used, it set's the mob's main weapon damage to the number you specify. Leave it blank if you don't wish to use it. The damage change carries over beyond just the skill usage.
The command is scripted so that your server shouldn't crash if you accidentally leave out parameters.

Re: Custom GM command @mobskill for...testing purposes...

Posted: Thu Aug 08, 2013 3:50 am
by gedads
I think old mobskill command is more effective for finding skills and should not be replaced with that one, maybe naming it mobskill2 is better:
if you want to fight a type of mob, which usually is not alone in a zone except for nms, it's easier to find one in general than one in particular then get its mobid. the same work in reverse, in mobspawnpoint, you don't have zone number so you still have to go to the right area, get the pos and the ID etc which cost more more time to do than just go (if you know a bit ffxi) in an area take a mob and spam @mobskill 11 skillanim.

Re: Custom GM command @mobskill for...testing purposes...

Posted: Thu Aug 08, 2013 5:49 am
by demolish
It's more of a command used to make mobs spam skills and abuse players :p

Re: Custom GM command @mobskill for...testing purposes...

Posted: Thu Aug 08, 2013 10:33 am
by Troak
Wait there's an old mobskill command? I must have missed that one. But yeah this command was really made more for fun...

Re: Custom GM command @mobskill for...testing purposes...

Posted: Thu Aug 08, 2013 10:56 am
by kjLotus
Troak wrote:Wait there's an old mobskill command? I must have missed that one. But yeah this command was really made more for fun...
it didn't do damage or anything like that, just forced your battle target to use a specific mobskill id and animation id, mostly used for finding animations