|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself. |

07-24-2007, 04:25 AM
|
Sarnak
|
|
Join Date: Jul 2007
Posts: 37
|
|
#summonitem - augments
I'm trying to remove item stacking, while allowing augments, so I've narrowed it down to:
Code:
void command_summonitem(Client *c, const Seperator *sep)
{
if (!sep->IsNumber(1))
c->Message(0, "Usage: #summonitem [item id] [charges], charges are optional");
else {
int32 itemid = atoi(sep->arg[1]);
if (database.GetItemStatus(itemid) > c->Admin())
c->Message(13, "Error: Insufficient status to summon this item.");
else if (sep->argnum==2 && sep->IsNumber(2)) {
c->SummonItem(itemid, atoi(sep->arg[2]) );
else {
c->SummonItem(itemid);
}
}
}
I was wondering if there was some kind of "is item an augment" thing (kinda like sep->IsNumber(2) but for augments)
Thanks,
Dillon
|

07-24-2007, 11:59 AM
|
Demi-God
|
|
Join Date: Jul 2006
Posts: 1,552
|
|
You don't want anything to stack? ~confused~
|

07-24-2007, 12:18 PM
|
Sarnak
|
|
Join Date: Jul 2007
Posts: 37
|
|
like #summonitem 11000 11000 11000 11000 11000 to get 5x the stats
|

07-24-2007, 01:01 PM
|
 |
Discordant
|
|
Join Date: Apr 2007
Location: Somewhere Safe
Posts: 453
|
|
Quick hide that post otherwise your players are going to be running around with high powered rifles and then you have to go through and find out which ones are, and people arent always honest.
|

07-24-2007, 03:30 PM
|
Sarnak
|
|
Join Date: Jul 2007
Posts: 37
|
|
heh, no stackers left on my server.
SELECT * FROM eqemu.inventory WHERE augslot1 > 0 OR augslot2 > or OR augslot3 > 0 OR augslot4 > 0 OR augslot5 > 0;
and then
UPDATE eqemu.inventory SET augslot1=0, augslot2=0, augslot3=0, augslot4=0, augslot5=0;
and that one will remove ALL stacked items and turn them to normal. =p
|

07-24-2007, 04:41 PM
|
 |
Discordant
|
|
Join Date: Apr 2007
Location: Somewhere Safe
Posts: 453
|
|
Ooo, I only say this in dire times, but I have to here.
...... Pwned.......
Cheers Strake. Is this on Krushers? I seen a post I think about item mods in Server Discussion. Now if you can just figure out what code allows this nifty little hack.
|

07-24-2007, 06:35 PM
|
Sarnak
|
|
Join Date: Jul 2007
Posts: 37
|
|
It's already in place, I'm trying to REMOVE it due to abuse.
|

07-24-2007, 07:39 PM
|
Administrator
|
|
Join Date: Sep 2006
Posts: 1,348
|
|
Hmm, I'm a bit confused so bare with me.
If you wanted to remove the ability to summon items with charges that were augments you could probably just change your code to(I haven't tested this btw =p)
Code:
void command_summonitem(Client *c, const Seperator *sep)
{
if (!sep->IsNumber(1))
c->Message(0, "Usage: #summonitem [item id] [charges], charges are optional");
else {
int32 itemid = atoi(sep->arg[1]);
if (database.GetItemStatus(itemid) > c->Admin())
c->Message(13, "Error: Insufficient status to summon this item.");
else if (sep->argnum==2 && sep->IsNumber(2)) {
const Item_Struct* itm = database.GetItem(itemid);
if(itm){
if(itm->AugType == 0){
c->SummonItem(itemid, atoi(sep->arg[2]) );
}
else
{
c->SummonItem(itemid);
}
}
else {
c->SummonItem(itemid);
}
}
}
Though again I'm a little confused as to what's trying to be accomplished, fixing some exploit I don't know about I guess.
|

07-25-2007, 01:16 AM
|
Sarnak
|
|
Join Date: Jul 2007
Posts: 37
|
|
I mean, if not augment then tell it no, if so augment allow. Some minor tweaking to that and it'll work. Thanks a ton man! I'm new to source editing and still trying to get the hang of it. Haven't found all of the options for everything, like AugType and such.
Thanks again!,
Dillon
|

07-27-2007, 03:45 AM
|
Sarnak
|
|
Join Date: Jul 2007
Posts: 37
|
|
Okay, before I compile it and break everything, does this look good to everyone else?
(Reminder: I'm trying to allow #summonitem with augments and items with charges while not allowing people to stack item stats. I figured, since 100 is the max number of charges, and 1001 is the lowest item number, there's no chance of item stacking)
Code:
void command_summonitem(Client *c, const Seperator *sep)
{
if (!sep->IsNumber(1))
c->Message(0, "Usage: #summonitem [item id] [charges], charges are optional");
else {
int32 itemid = atoi(sep->arg[1]);
if (database.GetItemStatus(itemid) > c->Admin())
c->Message(13, "Error: Insufficient status to summon this item.");
else if (sep->argnum==2 && sep->IsNumber(2)) {
const Item_Struct* itm = database.GetItem(itemid);
if(itm){
if(itm->AugType == 0 || atoi(sep->arg[2]) > 100){
c->SummonItem(itemid);
}
else
{
c->SummonItem(itemid, atoi(sep->arg[2]) );
}
}
else {
c->SummonItem(itemid);
}
}
}
-Dillon
|
 |
|
 |
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 08:59 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |