Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add god admin command #1924

Merged
merged 7 commits into from
Jun 9, 2019
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 45 additions & 4 deletions Source/ACE.Server/Command/Handlers/AdminCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1484,13 +1484,54 @@ public static void HandleFumble(Session session, params string[] parameters)
[CommandHandler("god", AccessLevel.Sentinel, CommandHandlerFlag.RequiresWorld, 0)]
public static void HandleGod(Session session, params string[] parameters)
{
// @god - Sets your own stats to the specified level.
// @god - Sets your own stats to a godly level.

// TODO: output
session.Player.TotalExperience = 191226310247;
session.Player.Level = 999;

session.Player.Session.Network.EnqueueSend(new GameMessagePrivateUpdatePropertyInt(session.Player, PropertyInt.Level, 999));
session.Player.Session.Network.EnqueueSend(new GameMessagePrivateUpdatePropertyInt64(session.Player, PropertyInt64.TotalExperience, 191226310247));

foreach (var s in session.Player.Skills)
{
session.Player.TrainSkill(s.Key, 0);
session.Player.SpecializeSkill(s.Key, 0);
var playerSkill = session.Player.Skills[s.Key];
playerSkill.Ranks = 226;
playerSkill.ExperienceSpent = 4100490438u;
playerSkill.InitLevel = 5000;
session.Player.Session.Network.EnqueueSend(new GameMessagePrivateUpdateSkill(session.Player, s.Key, playerSkill.AdvancementClass, playerSkill.Ranks, 5000u, playerSkill.ExperienceSpent));
}

foreach (var a in session.Player.Attributes)
{
var playerAttr = session.Player.Attributes[a.Key];
playerAttr.StartingValue = 9809u;
playerAttr.Ranks = 190u;
playerAttr.ExperienceSpent = 4019438644u;
session.Player.Session.Network.EnqueueSend(new GameMessagePrivateUpdateAttribute(session.Player, a.Key, playerAttr.Ranks, playerAttr.StartingValue, playerAttr.ExperienceSpent));
}

session.Player.SetMaxVitals();

foreach (var v in session.Player.Vitals)
{
var playerVital = session.Player.Vitals[v.Key];
playerVital.Ranks = 196u;
playerVital.ExperienceSpent = 4285430197u;
// my OCD will not let health/stam not be equal due to the endurance calc
playerVital.StartingValue = (v.Key == PropertyAttribute2nd.MaxHealth) ? 94803u : 89804u;
session.Player.Session.Network.EnqueueSend(new GameMessagePrivateUpdateVital(session.Player, v.Key, playerVital.Ranks, playerVital.StartingValue, playerVital.ExperienceSpent, playerVital.Current));
}

session.Player.SetMaxVitals();

session.Player.PlayParticleEffect(PlayScript.LevelUp, session.Player.Guid);
session.Player.PlayParticleEffect(PlayScript.BaelZharonSmite, session.Player.Guid);

// output: You are now a god!!!
ChatPacket.SendServerMessage(session, $"{session.Player.Name} is now a god!", ChatMessageType.WorldBroadcast);
LtRipley36706 marked this conversation as resolved.
Show resolved Hide resolved

ChatPacket.SendServerMessage(session, "You are now a god!!!", ChatMessageType.Broadcast);
session.Player.SaveCharacterToDatabase();
}

// magic god
Expand Down