Results 1 to 10 of 10
  1. #1
    rtHSE%he5hyeh's Avatar
    Join Date
    Nov 2013
    Gender
    male
    Posts
    58
    Reputation
    10
    Thanks
    3

    [FSOD] Command that gives a class set when used

    I'm wondering how to add a command where you type /(insertclassnamehere) and it gives you a specific set of items for that class.
    So lets say I did /wizard and then it would give me a horror staff a t4 spell an illusionist robe and para hp
    The reason I want to know how to add this because I saw it on another server and I want ppl on my serv to have some gear to start off with.

  2. #2
    Demon's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Location
    Lost
    Posts
    1,095
    Reputation
    86
    Thanks
    316
    My Mood
    Angelic
    Quote Originally Posted by BloonProdigyRotmg View Post
    I'm wondering how to add a command where you type /(insertclassnamehere) and it gives you a specific set of items for that class.
    So lets say I did /wizard and then it would give me a horror staff a t4 spell an illusionist robe and para hp
    The reason I want to know how to add this because I saw it on another server and I want ppl on my serv to have some gear to start off with.
    i believe theirs already a tutorial on this

    maybe it was for SD, but it shouldn't be difficult to translate it to FSOD
    Nice

  3. #3
    rtHSE%he5hyeh's Avatar
    Join Date
    Nov 2013
    Gender
    male
    Posts
    58
    Reputation
    10
    Thanks
    3
    Tutorial name?

  4. #4
    Demon's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Location
    Lost
    Posts
    1,095
    Reputation
    86
    Thanks
    316
    My Mood
    Angelic
    Quote Originally Posted by BloonProdigyRotmg View Post
    Tutorial name?
    idk find it ;p, its somewhere in the tutorial section


    https://www.mpgh.net/forum/showthread.php?t=1030551
    Last edited by Demon; 02-03-2017 at 03:24 AM.
    Nice

  5. #5
    rtHSE%he5hyeh's Avatar
    Join Date
    Nov 2013
    Gender
    male
    Posts
    58
    Reputation
    10
    Thanks
    3
    how exactly would i translate the code? i'm not familiar with seraphs domain :P

  6. #6
    Demon's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Location
    Lost
    Posts
    1,095
    Reputation
    86
    Thanks
    316
    My Mood
    Angelic
    Quote Originally Posted by BloonProdigyRotmg View Post
    how exactly would i translate the code? i'm not familiar with seraphs domain :P
    You don't have to be similar really, just look at examples from other codes for starters

     

    internal class SetCommand : Command
    {
    public SetCommand() :
    base("set", permLevel: 1)
    {
    }

    protected override bool Process(Player player, RealmTime time, string[] args)
    {
    string item = args[0];

    #region Class'
    switch (args[0].ToLower())
    {
    case "rogue":
    player.Inventory[4] = player.Manager.GameData.Items[0xc0a]; // Cronus
    player.Inventory[5] = player.Manager.GameData.Items[0xb27]; // Ghostly
    player.Inventory[6] = player.Manager.GameData.Items[0xaf9]; // Hydra
    player.Inventory[7] = player.Manager.GameData.Items[0xacd]; // Exa HP
    player.UpdateCount++;
    player.SendInfo("Successfully obtained Rogue class' gear");
    return true;
    default:
    player.SendError("No class found...");
    player.SendInfo("Classes: Rogue, Archer, Wizard, Priest, Warrior, Knight, Paladin, Assassin, Necromancer, Huntress, Mystic, Trickster, Sorcerer, Ninja");
    player.SendInfo("Success");
    break;
    }
    #endregion
    return false;
    }
    }


    here
    Last edited by Demon; 02-04-2017 at 05:07 AM.
    Nice

  7. #7
    rtHSE%he5hyeh's Avatar
    Join Date
    Nov 2013
    Gender
    male
    Posts
    58
    Reputation
    10
    Thanks
    3
    Which file do I add that to? I tried pasting it in different files but it just gives me errors in visual studio

  8. #8
    MikeRaarupBirk's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    1,583
    Reputation
    38
    Thanks
    3,775
    My Mood
    Stressed
    Quote Originally Posted by BloonProdigyRotmg View Post
    Which file do I add that to? I tried pasting it in different files but it just gives me errors in visual studio
    Code:
    internal class GearCommand : Command
        {
            public GearCommand()
                : base("set", Ranks.Mod)
            {
            }
            protected override bool Process(Player player, RealmTime time, string[] args)
            {
                string item = args[0].ToLower();
    
                switch (item)
                {
                    case "rogue":
                        player.Inventory[0] = player.Manager.GameData.Items[0xc0a]; // Cronus
                        player.Inventory[1] = player.Manager.GameData.Items[0xb27]; // Ghostly
                        player.Inventory[2] = player.Manager.GameData.Items[0xaf9]; // Hydra
                        player.Inventory[3] = player.Manager.GameData.Items[0xacd]; // Exa HP
                        player.Inventory[4] = player.Manager.GameData.Items[0xaff]; // Foul
                        player.Inventory[5] = player.Manager.GameData.Items[0xa5a]; // Planewalker
                        player.UpdateCount++;
                        player.SendInfo("Successfully obtained Rogue class' gear");
                        break;
                    case "archer":
                        player.Inventory[0] = player.Manager.GameData.Items[0xc10]; // Cbow
                        player.Inventory[1] = player.Manager.GameData.Items[0xb28]; // Elvish
                        player.Inventory[2] = player.Manager.GameData.Items[0xaf9]; // Hydra
                        player.Inventory[3] = player.Manager.GameData.Items[0xacd]; // Exa HP
                        player.Inventory[4] = player.Manager.GameData.Items[0xc02]; // Dbow
                        player.Inventory[5] = player.Manager.GameData.Items[0xc07]; // Qot
                        player.UpdateCount++;
                        player.SendInfo("Successfully obtained Archer class' gear");
                        break;
                    case "wizard":
                        player.Inventory[0] = player.Manager.GameData.Items[0xb08]; // Cwhole
                        player.Inventory[1] = player.Manager.GameData.Items[0xb24]; // Ele-deta
                        player.Inventory[2] = player.Manager.GameData.Items[0xb05]; // GSorc
                        player.Inventory[3] = player.Manager.GameData.Items[0xacd]; // Exa HP
                        player.UpdateCount++;
                        player.SendInfo("Successfully obtained Wizard class' gear");
                        break;
                    case "priest":
                        player.Inventory[0] = player.Manager.GameData.Items[0xaf6]; // Recomp
                        player.Inventory[1] = player.Manager.GameData.Items[0xb25]; // HolyG
                        player.Inventory[2] = player.Manager.GameData.Items[0xb05]; // Gsorc
                        player.Inventory[3] = player.Manager.GameData.Items[0xacd]; // Exa HP
                        player.Inventory[4] = player.Manager.GameData.Items[0xb3f]; // Cwand
                        player.Inventory[5] = player.Manager.GameData.Items[0xc1e]; // Prot
                        player.UpdateCount++;
                        player.SendInfo("Successfully obtained Priest class' gear");
                        break;
                    case "warrior":
                        player.Inventory[0] = player.Manager.GameData.Items[0xb0b]; // Acclaim
                        player.Inventory[1] = player.Manager.GameData.Items[0xb29]; // Ggen
                        player.Inventory[2] = player.Manager.GameData.Items[0xafc]; // Accrop
                        player.Inventory[3] = player.Manager.GameData.Items[0xacd]; // Exa HP
                        player.Inventory[4] = player.Manager.GameData.Items[0xc01]; // Dblade
                        player.Inventory[5] = player.Manager.GameData.Items[0xc08]; // Jugg
                        player.UpdateCount++;
                        player.SendInfo("Successfully obtained Warrior class' gear");
                        break;
                    case "knight":
                        player.Inventory[0] = player.Manager.GameData.Items[0xb0b]; // Acclaim
                        player.Inventory[1] = player.Manager.GameData.Items[0xb22]; // Colo
                        player.Inventory[2] = player.Manager.GameData.Items[0xafc]; // Accrop
                        player.Inventory[3] = player.Manager.GameData.Items[0xacd]; // Exa HP
                        player.Inventory[4] = player.Manager.GameData.Items[0xc01]; // Dblade
                        player.Inventory[5] = player.Manager.GameData.Items[0xc0f]; // Ogmur
                        player.UpdateCount++;
                        player.SendInfo("Successfully obtained Knight class' gear");
                        break;
                    case "paladin":
                        player.Inventory[0] = player.Manager.GameData.Items[0xb0b]; // Acclaim
                        player.Inventory[1] = player.Manager.GameData.Items[0xb26]; // Gcookie
                        player.Inventory[2] = player.Manager.GameData.Items[0xafc]; // Accrop
                        player.Inventory[3] = player.Manager.GameData.Items[0xacd]; // Exa HP
                        player.Inventory[4] = player.Manager.GameData.Items[0xc01]; // Dblade
                        player.Inventory[5] = player.Manager.GameData.Items[0xc06]; // Oreo
                        player.UpdateCount++;
                        player.SendInfo("Successfully obtained Paladin class' gear");
                        break;
                    case "assassin":
                        player.Inventory[0] = player.Manager.GameData.Items[0xc0a]; // Cronus
                        player.Inventory[1] = player.Manager.GameData.Items[0xb2a]; // Bane
                        player.Inventory[2] = player.Manager.GameData.Items[0xaf9]; // Hydra
                        player.Inventory[3] = player.Manager.GameData.Items[0xacd]; // Exa HP
                        player.Inventory[4] = player.Manager.GameData.Items[0xaff]; // Foul
                        player.UpdateCount++;
                        player.SendInfo("Successfully obtained Assassin class' gear");
                        break;
                    case "necromancer":
                        player.Inventory[0] = player.Manager.GameData.Items[0xb08]; // Cwhole
                        player.Inventory[1] = player.Manager.GameData.Items[0xb2b]; // BSucker
                        player.Inventory[2] = player.Manager.GameData.Items[0xb05]; // GSorc
                        player.Inventory[3] = player.Manager.GameData.Items[0xacd]; // Exa HP
                        player.Inventory[5] = player.Manager.GameData.Items[0xc0e]; // Torment
                        player.UpdateCount++;
                        player.SendInfo("Successfully obtained Necromancer class' gear");
                        break;
                    case "huntress":
                        player.Inventory[0] = player.Manager.GameData.Items[0xc10]; // Cbow
                        player.Inventory[1] = player.Manager.GameData.Items[0xb2c]; // GCatcher
                        player.Inventory[2] = player.Manager.GameData.Items[0xaf9]; // Hydra
                        player.Inventory[3] = player.Manager.GameData.Items[0xacd]; // Exa HP
                        player.Inventory[4] = player.Manager.GameData.Items[0xc02]; // Dbow
                        player.Inventory[5] = player.Manager.GameData.Items[0xc1c]; // Ctrap
                        player.UpdateCount++;
                        player.SendInfo("Successfully obtained Huntress class' gear");
                        break;
                    case "mystic":
                        player.Inventory[0] = player.Manager.GameData.Items[0xb08]; // Cwhole
                        player.Inventory[1] = player.Manager.GameData.Items[0xb2d]; // Pfetter
                        player.Inventory[2] = player.Manager.GameData.Items[0xb05]; // GSorc
                        player.Inventory[3] = player.Manager.GameData.Items[0xacd]; // Exa HP
                        player.Inventory[5] = player.Manager.GameData.Items[0xc0b]; // Conflict
                        player.UpdateCount++;
                        player.SendInfo("Successfully obtained mystic gear");
                        break;
                    case "trickster":
                        player.Inventory[0] = player.Manager.GameData.Items[0xc0a]; // Cronus
                        player.Inventory[1] = player.Manager.GameData.Items[0xb23]; // App Prism
                        player.Inventory[2] = player.Manager.GameData.Items[0xaf9]; // Hydra
                        player.Inventory[3] = player.Manager.GameData.Items[0xacd]; // Exa HP
                        player.Inventory[4] = player.Manager.GameData.Items[0xaff]; // Foul
                        player.Inventory[5] = player.Manager.GameData.Items[0xc0d]; // Dancing Swords
                        player.UpdateCount++;
                        player.SendInfo("Successfully obtained Trickster class' gear");
                        break;
                    case "sorcerer":
                        player.Inventory[0] = player.Manager.GameData.Items[0xaf6]; // Recomp
                        player.Inventory[1] = player.Manager.GameData.Items[0xb33]; // Storms
                        player.Inventory[2] = player.Manager.GameData.Items[0xb05]; // Gsorc
                        player.Inventory[3] = player.Manager.GameData.Items[0xacd]; // Exa HP
                        player.Inventory[4] = player.Manager.GameData.Items[0xc33]; // Condu
                        player.Inventory[5] = player.Manager.GameData.Items[0xc30]; // Fulmi
                        player.UpdateCount++;
                        player.SendInfo("Successfully obtained Sorcerer class' gear");
                        break;
                    case "ninja":
                        player.Inventory[0] = player.Manager.GameData.Items[0xc50]; // Masamune
                        player.Inventory[1] = player.Manager.GameData.Items[0xc59]; // Dcircle
                        player.Inventory[2] = player.Manager.GameData.Items[0xaf9]; // Hydra
                        player.Inventory[3] = player.Manager.GameData.Items[0xacd]; // Exa HP
                        player.Inventory[4] = player.Manager.GameData.Items[0xc52]; // Ray
                        player.Inventory[5] = player.Manager.GameData.Items[0xc5a]; // Midnight
                        player.UpdateCount++;
                        player.SendInfo("Successfully obtained Ninja class' gear");
                        break;
                    default:
                        player.SendError("Usage: /set <ClassName>");
                        player.SendInfo("Classes: Rogue, Archer, Wizard, Priest, Warrior, Knight, Paladin, Assassin, Necromancer, Huntress, Mystic, Trickster, Sorcerer, Ninja");
                        break;
                }
                return true;
            }
        }

  9. #9
    rtHSE%he5hyeh's Avatar
    Join Date
    Nov 2013
    Gender
    male
    Posts
    58
    Reputation
    10
    Thanks
    3
    My friend fixed the code for me, now it works. There is one problem though. I changed the codes so that when I do "/set class" it puts the items in slots 1-4 of your inventory, but if there are already items in those 4 slots it will overwrite them with the /set items. Is there any way to fix that?

  10. #10
    MikeRaarupBirk's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    1,583
    Reputation
    38
    Thanks
    3,775
    My Mood
    Stressed
    Quote Originally Posted by BloonProdigyRotmg View Post
    My friend fixed the code for me, now it works. There is one problem though. I changed the codes so that when I do "/set class" it puts the items in slots 1-4 of your inventory, but if there are already items in those 4 slots it will overwrite them with the /set items. Is there any way to fix that?
    paste this above the switch statement:

    Code:
                if (player.Inventory[0] != null || player.Inventory[1] != null || player.Inventory[2] != null || player.Inventory[3] != null)
                {
                    player.SendHelp("Not enough space");
                    return false;
                }

Similar Threads

  1. [Solved] Is There a command to give you a set? (Fabino)
    By bobisbae in forum Realm of the Mad God Private Servers Help
    Replies: 1
    Last Post: 12-31-2016, 05:30 PM
  2. Class Set Giver Command [Seraphs Dominion]
    By Lxys in forum Realm of the Mad God Private Servers Tutorials/Source Code
    Replies: 10
    Last Post: 09-12-2016, 09:30 AM
  3. [Help Request] Give command that gives sb items
    By badboyallan in forum Realm of the Mad God Help & Requests
    Replies: 2
    Last Post: 09-10-2016, 02:45 PM
  4. [Solved] [FSOD] Error when using a command to spawn an item.
    By Illusion in forum Realm of the Mad God Private Servers Help
    Replies: 8
    Last Post: 07-29-2016, 06:02 AM
  5. [Solved] Can some1 give me a command that gives you 999 ballista spears??
    By majinvegeta5612 in forum Vindictus Help
    Replies: 2
    Last Post: 12-21-2011, 05:35 AM