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

Post Reply
Troak
Posts: 27
Joined: Thu Jan 31, 2013 12:57 am

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

Post by Troak » Wed Aug 07, 2013 7:53 pm

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.

gedads
Developer
Posts: 171
Joined: Fri Jan 04, 2013 7:48 pm

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

Post by gedads » Thu Aug 08, 2013 3:50 am

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.

User avatar
demolish
Developer
Posts: 262
Joined: Thu Jul 26, 2012 7:12 am

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

Post by demolish » Thu Aug 08, 2013 5:49 am

It's more of a command used to make mobs spam skills and abuse players :p
<Giblet[NewBrain]> kj with this first step would be fine on my shit
Click here for a guide on scripting missions.

Troak
Posts: 27
Joined: Thu Jan 31, 2013 12:57 am

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

Post by Troak » Thu Aug 08, 2013 10:33 am

Wait there's an old mobskill command? I must have missed that one. But yeah this command was really made more for fun...

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

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

Post by kjLotus » Thu Aug 08, 2013 10:56 am

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

Post Reply