character methods

Moderator: MacroQuest Developers

echoism
a ghoul
a ghoul
Posts: 131
Joined: Tue Oct 19, 2004 9:59 am

character methods

Post by echoism » Thu Mar 23, 2006 7:17 pm

This will add methods for sit, stand, and dismount to character.
ie.
Me:Stand
Me:Sit
Me:Dismount

in ISXEQDataTypes.cpp

Code: Select all

@@ -179,9 +179,28 @@
                return pSpawnType->GetMethod(Temp,Method,argc,argv);
        }
        // TODO
[color=red]-//     switch((CharacterMethods)pMethod->ID)
-//     {
-//     }
+       char TempCMD[20];
+       switch((CharacterMethods)pMethod->ID)
+       {
+       case Stand:
+               {
+                       sprintf(TempCMD,"/stand");
+                       EzCommand(TempCMD);
+                       return true;
+               }
+       case Sit:
+               {
+                       sprintf(TempCMD,"/sit");
+                       EzCommand(TempCMD);
+                       return true;
+               }
+       case Dismount:
+               {
+                       sprintf(TempCMD,"/dismount");
+                       EzCommand(TempCMD);
+                       return true;
+               }
+       }[/color]
        return false;
 #undef pPtr
 }
And in MQ2DataTypes.h:

Code: Select all

@@ -813,6 +813,9 @@
        };
        static enum CharacterMethods
        {
[color=red]+               Stand=1,
+               Sit=2,
+               Dismount=3,[/color]
        };
        MQ2CharacterType():MQ2Type("character")
        {
@@ -945,6 +948,10 @@
                TypeMember(CombatAbilityReady);
                TypeMember(Running);
                TypeMember(GroupSize);
[color=red]+
+               TypeMethod(Stand);
+               TypeMethod(Sit);
+               TypeMethod(Dismount);[/color]
        }

        ~MQ2CharacterType()

xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: character methods

Post by xyilla » Thu Jul 10, 2025 4:40 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: character methods

Post by xyilla » Thu Jul 10, 2025 4:41 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: character methods

Post by xyilla » Thu Jul 10, 2025 4:42 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: character methods

Post by xyilla » Thu Jul 10, 2025 4:43 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: character methods

Post by xyilla » Thu Jul 10, 2025 4:44 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: character methods

Post by xyilla » Thu Jul 10, 2025 5:21 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: character methods

Post by xyilla » Thu Jul 10, 2025 5:23 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: character methods

Post by xyilla » Thu Jul 10, 2025 5:24 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: character methods

Post by xyilla » Thu Jul 10, 2025 6:01 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: character methods

Post by xyilla » Thu Jul 10, 2025 6:02 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: character methods

Post by xyilla » Thu Jul 10, 2025 6:03 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: character methods

Post by xyilla » Thu Jul 10, 2025 6:04 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: character methods

Post by xyilla » Thu Jul 10, 2025 6:05 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: character methods

Post by xyilla » Thu Jul 10, 2025 6:07 pm