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
	}

	//Mobs
	ids := []int64{
		111050, //Gellrazz Scalerunner
		25429,  //a dark spirit of nektulos
		59438,  //coldwind blackfoot
		48343,  //immug lashtail
		13138,  //frog invasion
		6251,
	}
	//#checkpoint_ten

	spawngroup.RemoveSpawnGroupAndEntryById(db, ids)

	//Items
	ids = loadIds()
	totalChanged, err := item.RemoveAllInstancesOfItems(db, ids)
	if err != nil {
		return
	}
	fmt.Println("Removed", totalChanged, " DB entries related to", focus, "in all player-accessible item locations.")

	filePaths := []string{
	//"befallen/Wraps_McGee.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
	}

	totalChanged := int64(0)

	fmt.Println("Looking for augment item ids...")
	rows, err := db.Query("SELECT id FROM items WHERE augtype > 0")
	if err != nil {
		return
	}

	ids := []int64{}

	//iterate results
	for rows.Next() {
		id := int64(0)
		err = rows.Scan(&id)
		if err != nil {
			return
		}
		ids = append(ids, id)
	}
	fmt.Println("Found", len(ids), " augments, deleting their entries...")
	moreChanged, err := item.RemoveAllInstancesOfItems(db, ids)
	if err != nil {
		return
	}
	totalChanged += moreChanged

	fmt.Println("Updated", totalChanged, " DB entries related to", focus)

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

	//Mobs
	ids := []int64{
		19151, //Laryn lycanthrope
		202373,
		202384, //wicked winnie
		202385, //a wizeened hermit
		20255,
		20255, //booberella
		20256,
		20256,
		20257,
		20257,
		20258,
		20258,
		20259,
		20259, //Eve_Hallows
		20260, //Jack Lanturn
		20261,
		20261,
		20262,
		20262,
		20263, //tricksy_treetor
		20264,
		20264,
		20265,
		20265,
		20266,
		20266,
		20267,
		20267,
		20268,
		20268,
		20269,
		20269, //an_imp
		20270,
		20270,
		20271,
		20271,
		20272,
		20272, //a_zombie
		20273,
		20273,
		20274,
		20274,
		20275,  //Mippie Digs
		20279,  //Old man draykey
		20281,  //Syxa
		20285,  //Crazy Charlie
		20288,  //lurgh
		20289,  //a_jack_o_lantern
		25436,  //grom shives
		38178,  //marta stalwart
		394263, //aragol gloomflow
		48350,
		48352,
		48353,
		48354,
		63099,
		98641,
		98643,
		98989, //lurgh
	}
	//#checkpoint_ten

	spawngroup.RemoveSpawnGroupAndEntryById(db, ids)

	//Items
	ids = []int64{
		84084, //Gummie Kobolds
		84088, //rock candy

		84091, //sand
		84092, //chunk of coal
		84093, //pocket lint
		84094, //Draykey's Codex
		84095, //Trick or treat bag

	}
	totalChanged, err := item.RemoveAllInstancesOfItems(db, ids)
	if err != nil {
		return
	}
	fmt.Println("Removed", totalChanged, " DB entries related to", focus, "in all player-accessible item locations.")

	filePaths := []string{
		"befallen/Wraps_McGee.lua",
		"commonlands/Sergeant_Ragus.pl",
		"crescent/#Aragol_Gloomflow.pl",
		"ecommons/Sergeant_Ragus.pl",
		"fieldofbone/Immug_Lashtail.pl",
		"iceclad/Nilham_the_Chef.pl",
		"kithicor/Old_Man_Draykey.pl",
		"mistmoore/Nate.pl",
		"quests/nektulos/Grom_Shives.pl",
		"quests/netherbian/Poil_Lolp.pl",
		"poknowledge/Grand_Librarian_Maelin.pl",
		"qey2hh1/Scary_Miller.lua",
		"rivervale/Laryen_Lycanthrope.pl",
		"tox/Fuzz_Selppa.pl",
		"toxxulia/Fuzz_Selppa.pl",
		"unrest/Crabby_the_Rotten.pl",
		"nektulos/#checkpoint_ten.pl", //trick or treat stop
		"unrest/Halloween_Trigger.pl", //trick or treat stop
		"unrest/Casper.pl",
		"unrest/Candy_Man.pl",
		"unrest/Evil_Brain_Eater.pl",
		"unrest/Eviler_Brain_Eater.pl",
		"unrest/Evilerer_Brain_Eater.pl",
		"unrest/Imp-ossible.pl",
		"unrest/Jack_o_Lantern.pl",
		"unrest/Not_So_Evil_Brain_Eater.pl",
		"unrest/Super_Ghoul_of_Unlimited_Power.pl",
		"unrest/Werewolf_of_DOOOOOOOM.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.º 4
0
func Clean(args ...string) (err error) {
	db, err := eqdb.Load()
	if err != nil {
		return
	}

	//SpawnGroups
	ids := []int64{
		6746, //tallik in ec
		6747, //palik in ec
		728,  //rushka in ec
		716,  //olin in ec
		717,  //wilno in ec
		718,  //almon in ec
		/*//Neriakc
		//cleric
		3162, //svlia in Neriakc
		3163, //Isshia
		3164, //trik
		3160, //lyniv
		3159, //myrish
		3165, //sol
		//wizard
		3142, //jusar
		3141, //misar
		5791, //drisi
		5792, //ash
		//SK
		3152,
		//Necro
		3154,
		//Neriakb
		//wiz
		3127, //riv
		3122, //tal
		3130,
		3129,
		3121,
		3124,
		3125,
		3132,
		3131,
		3133,
		3128,
		3119,
		3123,
		//rivervale
		7706, //ilscent
		5674, //bumpy
		//staria
		5686, //fralith
		5676, //torth
		//akanon
		48152,
		48151,
		48150,
		48158,
		7159,
		7160,
		7154,
		48136,

		//gfay
		1523,
		1522,
		//grobb
		5581,
		3480,
		5582,
		5558,
		5591,
		5615,
		5628,*/
	}

	fmt.Println("Getting all spell selling NPCs...")

	mids, err := spawngroup.GetSpawnGroupIdsByLastNameWildcard(db, "Bard Songs")
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}
	for _, id := range mids {
		ids = append(ids, id)
	}

	mids, err = spawngroup.GetSpawnGroupIdsByLastNameWildcard(db, "General Spells")
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}
	for _, id := range mids {
		ids = append(ids, id)
	}

	mids, err = spawngroup.GetSpawnGroupIdsByLastNameWildcard(db, "Berserker Tomes")
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}
	for _, id := range mids {
		ids = append(ids, id)
	}

	mids, err = spawngroup.GetSpawnGroupIdsByLastNameWildcard(db, "Cleric Spells")
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}
	for _, id := range mids {
		ids = append(ids, id)
	}

	mids, err = spawngroup.GetSpawnGroupIdsByLastNameWildcard(db, "Druid Spells")
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}
	for _, id := range mids {
		ids = append(ids, id)
	}

	mids, err = spawngroup.GetSpawnGroupIdsByLastNameWildcard(db, "Enchanter Spells")
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}
	for _, id := range mids {
		ids = append(ids, id)
	}

	mids, err = spawngroup.GetSpawnGroupIdsByLastNameWildcard(db, "Magician Spells")
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}
	for _, id := range mids {
		ids = append(ids, id)
	}

	mids, err = spawngroup.GetSpawnGroupIdsByLastNameWildcard(db, "Monk Tomes")
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}
	for _, id := range mids {
		ids = append(ids, id)
	}

	mids, err = spawngroup.GetSpawnGroupIdsByLastNameWildcard(db, "Necromancer Spells")
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}
	for _, id := range mids {
		ids = append(ids, id)
	}

	mids, err = spawngroup.GetSpawnGroupIdsByLastNameWildcard(db, "Paladin Spells")
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}
	for _, id := range mids {
		ids = append(ids, id)
	}

	mids, err = spawngroup.GetSpawnGroupIdsByLastNameWildcard(db, "Ranger Spells")
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}
	for _, id := range mids {
		ids = append(ids, id)
	}

	mids, err = spawngroup.GetSpawnGroupIdsByLastNameWildcard(db, "Rogue Tomes")
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}
	for _, id := range mids {
		ids = append(ids, id)
	}

	mids, err = spawngroup.GetSpawnGroupIdsByLastNameWildcard(db, "Shadowknight Spells")
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}
	for _, id := range mids {
		ids = append(ids, id)
	}

	mids, err = spawngroup.GetSpawnGroupIdsByLastNameWildcard(db, "Shaman Spells")
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}
	for _, id := range mids {
		ids = append(ids, id)
	}

	mids, err = spawngroup.GetSpawnGroupIdsByLastNameWildcard(db, "Warrior Tomes")
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}
	for _, id := range mids {
		ids = append(ids, id)
	}

	mids, err = spawngroup.GetSpawnGroupIdsByLastNameWildcard(db, "Wizard Spells")
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}
	for _, id := range mids {
		ids = append(ids, id)
	}

	fmt.Println("Got", len(ids), "Npcs")

	fmt.Println("Removing spell NPC spawn points, there's a lot, may take a while")

	totalChanged, err := spawngroup.RemoveSpawnGroupAndEntryById(db, ids)
	if err != nil {
		err = fmt.Errorf("Error removing", focus, "entries: %s", err.Error())
		return
	}

	//Find all item IDS
	fmt.Println("Now getting all spell item entries, there's a lot here too, expect a while")
	rows, err := db.Query("SELECT id FROM items WHERE scrolleffect > 0")
	if err != nil {
		return
	}

	//iterate results
	for rows.Next() {
		id := int64(0)
		err = rows.Scan(&id)
		if err != nil {
			return
		}
		ids = append(ids, id)
	}
	fmt.Println("Found", len(ids), " spells, deleting them...")
	moreChanged, err := item.RemoveAllInstancesOfItems(db, ids)
	if err != nil {
		return
	}
	totalChanged += moreChanged
	fmt.Println("Removed", totalChanged, " DB entries related to", focus, "in all player-accessible item locations.")
	return
}