Lena80

Member
Heeeeelloooooo hows going?
As title says

I would like to display a list of players inside a party, just a small list gump


im fairly ok with gumpstudio, when i come to actual scripting i suck to be honest.

Can somebody give me a hand? or a example where i can work from there, thanks!!!!!
 
Mobile.cs has a "Party" property, with which you can obtain the party the player is linked to.
From there, you can extract the list of members using the "Members" property, it consists of a list of "PartyMemberInfo".
If you look at "PartyMemberInfo", it holds a "Mobile" property.
For extra, "Party" holds a "Leader" property, so you could put some extra effect around that player on the gump.

Little mockup (non compiling code):
Code:
if (from.Party == null)
    return; // user is not in a party.

for (PartyMemberInfo info in from.Party.Members)
{
    if (info.Mobile == from.Leader)
        DrawImage(crown image or something)

    if (info.Mobile == from)
        DrawImage(arrow or something)

    DrawText(info.Mobile.Name);
}

Now for the actual gump code, what i can suggest is: copy an actual low weight gump file, copy it, and make it as barebone as possible.
Once you are comfortable and able to open a blank gump with no actions, then you can start checking other scripts to see how you can position things, how to draw images, how to draw text, how to color text or images, how to put many layers of backgrounds, gump textures and items to use, etc.
If you want an easy example, take a look at "PetResurrectGump.cs".
To open the gump on demand, take a look at how commands are handled, ex: "WhoGump.cs", more specifically the function "Initialize".

At more advanced levels, you will be able to understand how to make a tab/pages system, how to handle responses in the gumps and how to handle text entries etc. For now you don't have to worry about that, since what you want seem to be only for display purposes.

Last word of advice, if you need precise artwork, try using UOFiddler to get the ids you need.

If you do make the script and encounter issues, feel free to post back with the issues you have and what you want it to do.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back