Log in

View Full Version : disabling journeyman mercs


vkrr
03-26-2013, 02:10 PM
Hey, I am trying to disable journeyman mercs.

This is my fake sql / what I intend to do


select * from merc_npc_types where proficiency=2 (or name like '%journeyman%')
out of that subset compare merc_npc_types.merc_npc_type_id to merc_templates.merc_template_id
if they match set merc_templates.clientversion=1024


my SQL scripting ability is miserable. I know this isn't right but I can't quite get it.


update merc_templates set clientversion=1204 where


merc_npc_types.merc_type.id
from
merc_npc_types
left outer join
merc_templates
on
merc_npc_types.merc_type.id = merc_templates.merc_template_id
where
merc_npc_types.proficiency=2







or I could do this but it still doesnt set it in the merc_template section


update merc_types set clientversion=1024 where proficiency_id=2;

bad_captain
03-27-2013, 01:56 AM
This should work.


UPDATE merc_templates SET clientversion = 1024
WHERE merc_npc_type_id IN
(SELECT merc_npc_type_id FROM merc_npc_types WHERE proficiency_id = 2)

sorvani
03-27-2013, 08:18 PM
As mercs are finished up, I think it would be great to have a rule implemented to give a max merc available or something similar

bad_captain
03-28-2013, 12:17 PM
Seems reasonable.

sorvani
03-28-2013, 08:07 PM
Seems reasonable.

Obviously not live like, but would be an awesome tool for custom servers to be able to unlock mercs or limit them in various ways.

In fact a single rule would probably be enough as we already will have to implement a method of granting them only from quest reward. So a rule to change the default mercs from available to quest reward would handle it.

Or something like that.

bad_captain
03-28-2013, 10:53 PM
Yeah, they are set up to allow for quest enabling (live-like), it's just not coded yet ( it's available in the database). But a rule to allow or disallow wouldn't be bad.