Ejemplo n.º 1
0
func Clean(args ...string) (err error) {
	db, err := eqdb.Load()
	if err != nil {
		return
	}
	config, err := eqconfig.Load()
	if err != nil {
		return
	}

	ids, err := spawngroup.GetSpawnGroupIdsByNameWildcard(db, "a_rodent")
	if err != nil {
		err = fmt.Errorf("Error getting %s Ids: %s", focus, err.Error())
		return
	}
	if len(ids) < 1 {
		fmt.Println("No", focus, "were found to delete")
		return
	}

	//Exterminators
	extids, err := spawngroup.GetSpawnGroupIdsByNameWildcard(db, "exterminator_")
	if err != nil {
		err = fmt.Errorf("Error getting exterminator Ids: %s", err.Error())
		return
	}
	if len(extids) > 1 {
		for _, extid := range extids {
			ids = append(ids, extid)
		}
	}

	totalChanged, err := spawngroup.RemoveSpawnGroupAndEntryById(db, ids)
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}
	fmt.Println("Removed", totalChanged, " DB entries related to", focus, "in spawnentry and spawngroup successfully.")

	filePaths := []string{
		"felwithea/Exterminator_Valern.pl",
		"freeporteast/Exterminator_Larkey.lua",
		"freeporteast/Exterminator_Qalantir.lua",
		"freporte/Exterminator_Larkey.lua",
		"freportw/Exterminator_Qalantir.lua",
		"kaladimb/Exterminator_Vin.pl",
		"neriakb/Exterminator_Damasi.pl",
		"neriakc/Exterminator_Gilea.pl",
		"qeynos/Exterminator_Rasmon.lua",
		"qeynos2/Exterminator_Wintloag.lua",
		"rivervale/Exterminator_Sutten.lua",
	}

	delCount, err := quest.Remove(config, filePaths)
	if err != nil {
		fmt.Println(err.Error())
	}
	fmt.Println("Deleted", delCount, focus, "related quest files")
	return
}
Ejemplo n.º 2
0
func Clean(args ...string) (err error) {
	db, err := eqdb.Load()
	if err != nil {
		return
	}
	config, err := eqconfig.Load()
	if err != nil {
		return
	}
	ids, err := spawngroup.GetSpawnGroupIdsByNameWildcard(db, "nexus_scion")
	if err != nil {
		err = fmt.Errorf("Error getting %s Ids: %s", focus, err.Error())
		return
	}
	vids, err := spawngroup.GetSpawnGroupIdsByNameWildcard(db, "a_mystic_voice")
	for _, id := range vids {
		ids = append(ids, id)
	}

	totalChanged, err := spawngroup.RemoveSpawnGroupAndEntryById(db, ids)
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}
	fmt.Println("Removed", totalChanged, " DB entries related to", focus, "in spawnentry and spawngroup successfully.")

	filePaths := []string{
		"dreadlands/A_Mystic_Voice.lua",
		"gfaydark/A_Mystic_Voice.pl",
		"greatdivide/A_Mystic_Voice.pl",
		"northkarana/A_Mystic_Voice.lua",
		"tox/A_Mystic_Voice.pl",
		"toxxulia/A_Mystic_Voice.pl",
	}

	delCount, err := quest.Remove(config, filePaths)
	if err != nil {
		fmt.Println(err.Error())
	}
	fmt.Println("Deleted", delCount, focus, "related quest files")
	return
}
Ejemplo n.º 3
0
func Clean(args ...string) (err error) {
	db, err := eqdb.Load()
	if err != nil {
		return
	}

	//Remove Adventure Merchants
	ids, err := spawngroup.GetSpawnGroupIdsByNameWildcard(db, "the_fabled")
	if err != nil {
		err = fmt.Errorf("Error getting %s Ids: %s", focus, err.Error())
		return
	}

	totalChanged, err := spawngroup.RemoveSpawnGroupAndEntryById(db, ids)
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}
	fmt.Println("Removed", totalChanged, " DB entries related to", focus, "in spawnentry and spawngroup successfully.")

	return
}
Ejemplo n.º 4
0
func Clean(args ...string) (err error) {
	db, err := eqdb.Load()
	if err != nil {
		return
	}

	config, err := eqconfig.Load()
	if err != nil {
		return
	}
	ids, err := spawngroup.GetSpawnGroupIdsByNameWildcard(db, "priest_of_discord")
	if err != nil {
		err = fmt.Errorf("Error getting %s Ids: %s", focus, err.Error())
		return
	}
	if len(ids) < 1 {
		fmt.Println("No ", focus, "were found to delete")
		return
	}
	totalChanged, err := spawngroup.RemoveSpawnGroupAndEntryById(db, ids)
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}
	fmt.Println("Removed", totalChanged, " DB entries related to", focus, "in spawnentry and spawngroup successfully.")

	filePaths := []string{
		"global/Priest_of_Discord.lua",
		"kaladima/Priest_of_Discord.pl",
	}

	delCount, err := quest.Remove(config, filePaths)
	if err != nil {
		fmt.Println(err.Error())
	}
	fmt.Println("Deleted", delCount, focus, "related quest files")
	return
}
Ejemplo n.º 5
0
func Clean(args ...string) (err error) {
	db, err := eqdb.Load()
	if err != nil {
		return
	}
	config, err := eqconfig.Load()
	if err != nil {
		return
	}
	ids, err := spawngroup.GetSpawnGroupIdsByNameWildcard(db, focus)
	ids = append(ids, 3199)  //Add Romi to delete list
	ids = append(ids, 54932) //And priestess aelea
	if err != nil {
		err = fmt.Errorf("Error getting %s Ids: %s", focus, err.Error())
		return
	}
	if len(ids) < 1 {
		fmt.Println("No", focus, "were found to delete")
		return
	}
	totalChanged, err := spawngroup.RemoveSpawnGroupAndEntryById(db, ids)
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}
	fmt.Println("Removed", totalChanged, " DB entries related to", focus, "in spawnentry and spawngroup successfully.")

	filePaths := []string{
		"abysmal/Soulbinder_Jerlin.pl",
		"cabeast/Soulbinder_Shakar.pl",
		"commonlands/Soulbinder_Jubbl.pl",
		"crescent/Priestess_Aelea.pl",
		"ecommons/Soulbinder_Jubbl.pl",
		"everfrost/Soulbinder_Garnog.pl",
		"firiona/Soulbinder_Tardon.pl",
		"gfaydark/Soulbinder_Oakstout.pl",
		"guildlobby/High_Priest_of_Luclin.pl",
		"guildlobby/High_Priestess_of_Luclin.pl",
		"gukta/Soulbinder_Snog.pl",
		"gukta/Soulbinder_Zlippi.pl",
		"gunthak/Soulbinder_Karyin.pl",
		"iceclad/Soulbinder_Cubnitskin.pl",
		"kaladima/Soulbinder_Torvald.pl",
		"neriaka/Soulbinder_Nola_Z-Ret.pl",
		"neriaka/Soulbinder_Novalu.pl",
		"northkarana/Romi.pl",
		"northro/Soulbinder_Ragni.pl",
		"nro/Soulbinder_Ragni.pl",
		"oggok/Soulbinder_Trurg.pl",
		"overthere/Soulbinder_Kardin.pl",
		"paineel/Soulbinder_Tomas.pl",
		//"plugins/default-actions.pl", //There is a soulbinder flag here, ignoring though
		"plugins/soulbinders.pl",
		"poknowledge/Soulbinder_Jera.pl",
		"potranquility/Soulbinder_Derith.pl",
		"rathemtn/Soulbinder_Zlippi.pl",
		"shadowhaven/Soulbinder_Nansin.pl",
		"sharvahl/Soulbinder_Ghula.pl",
		"southro/Soulbinder_Silandra.pl",
		"sro/Soulbinder_Silandra.pl",
	}

	delCount, err := quest.Remove(config, filePaths)
	if err != nil {
		fmt.Println(err.Error())
	}
	fmt.Println("Deleted", delCount, focus, "related quest files")
	return
}