NatedogEZ
05-11-2013, 03:58 AM
There is already a GetCarriedMoney ... which takes all your money and puts it into Copper. In perl that only about 2.14~million plat total before you get Negative numbers!!!
This will allow to check how much platinum is in a players CURRENT inventory up to 2.14~billion plat!
This doesn't replace anything at all... just added around those lines listed in my source.
Can easily do a Buff bot that checks platinum and just
$client->TakeMoneyFromPP
Or other various money related scripts... since people mostly deal with Platinum on custom servers anyways!
// client.cpp // 2306//
uint64 Client::GetCarriedPlatinum() {
return (
(static_cast<uint64>(m_pp.platinum) ));
}
// client.h // 618 //
uint64 GetCarriedPlatinum();
// perl_client.cpp // 5420//
XS(XS_Client_GetCarriedPlatinum); /* prototype to pass -Wmissing-prototypes */
XS(XS_Client_GetCarriedPlatinum)
{
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Client::GetCarriedPlatinum(THIS)");
{
Client * THIS;
int RETVAL;
dXSTARG;
if (sv_derived_from(ST(0), "Client")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(Client *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type Client");
if(THIS == NULL)
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
RETVAL = THIS->GetCarriedPlatinum();
XSprePUSH; PUSHi((IV)RETVAL);
}
XSRETURN(1);
}
// perl_client.cpp // 5897//
newXSproto(strcpy(buf, "GetCarriedPlatinum"), XS_Client_GetCarriedPlatinum, file, "$");
This will allow to check how much platinum is in a players CURRENT inventory up to 2.14~billion plat!
This doesn't replace anything at all... just added around those lines listed in my source.
Can easily do a Buff bot that checks platinum and just
$client->TakeMoneyFromPP
Or other various money related scripts... since people mostly deal with Platinum on custom servers anyways!
// client.cpp // 2306//
uint64 Client::GetCarriedPlatinum() {
return (
(static_cast<uint64>(m_pp.platinum) ));
}
// client.h // 618 //
uint64 GetCarriedPlatinum();
// perl_client.cpp // 5420//
XS(XS_Client_GetCarriedPlatinum); /* prototype to pass -Wmissing-prototypes */
XS(XS_Client_GetCarriedPlatinum)
{
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Client::GetCarriedPlatinum(THIS)");
{
Client * THIS;
int RETVAL;
dXSTARG;
if (sv_derived_from(ST(0), "Client")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));
THIS = INT2PTR(Client *,tmp);
}
else
Perl_croak(aTHX_ "THIS is not of type Client");
if(THIS == NULL)
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
RETVAL = THIS->GetCarriedPlatinum();
XSprePUSH; PUSHi((IV)RETVAL);
}
XSRETURN(1);
}
// perl_client.cpp // 5897//
newXSproto(strcpy(buf, "GetCarriedPlatinum"), XS_Client_GetCarriedPlatinum, file, "$");