Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Getting stars to consume.

Status
Not open for further replies.
Junior Spellweaver
Joined
Apr 15, 2007
Messages
154
Reaction score
0
There is 1 problem with this method(it only takes the stars when you attack but if you use a skill it will not, still working on that)

Go into Mobs.cpp,

Under all the #include tags add
Code:
#include "Inventory.h"

Search
Code:
int pos=getInt(packet+14);

Beneath put
Code:
int amount = getInt(packet+2);

And search
Code:
damageMobS

Ok scroll down until you see this
Code:
itemid = player->inv->getItem(i)->id;

and beneath it put
Code:
Inventory::takeItem(player, itemid, amount);


And for you lazy people who don't wanna do this,

deal with it >.< :kisss:,

TerraMS Chris
 
Newbie Spellweaver
Joined
Mar 21, 2007
Messages
6
Reaction score
0
Re: [Release] Getting stars to consume.

Good job. works perfectly thanks
 
Junior Spellweaver
Joined
Oct 10, 2007
Messages
101
Reaction score
0
Re: [Release] Getting stars to consume.

will this leave stars at 0 ? or take away the whole star? :eek:
 
Master Summoner
Joined
Apr 2, 2008
Messages
538
Reaction score
0
Re: [Release] Getting stars to consume.

Good job ^^
 
Newbie Spellweaver
Joined
Aug 16, 2007
Messages
91
Reaction score
0
Re: [Release] Getting stars to consume.

Oh there's another problem. You can't recharge stars anywhere rofl :/
 
Newbie Spellweaver
Joined
Apr 6, 2008
Messages
55
Reaction score
0
Re: [Release] Getting stars to consume.

There's a problem.

Even if you have 800 Ilbis, if you use lucky7, every single ilbi will dissapear.

Anyway to fix this?
 
Junior Spellweaver
Joined
Mar 2, 2008
Messages
159
Reaction score
0
Re: [Release] Getting stars to consume.

Thanks so much man.
 
Experienced Elementalist
Joined
Apr 2, 2007
Messages
260
Reaction score
1
Re: [Release] Getting stars to consume.

Not bad, but it could use improving.
 
Junior Spellweaver
Joined
Apr 8, 2008
Messages
146
Reaction score
0
Re: [Release] Getting stars to consume.

just change job to bowman use holy arrow then back to nightlord and your stars look like arrowsand u dont use any stars :p
 
Experienced Elementalist
Joined
Apr 13, 2008
Messages
211
Reaction score
0
Re: [Release] Getting stars to consume.

lol nice
but recharging is avl? o_O
 
Experienced Elementalist
Joined
Apr 13, 2008
Messages
211
Reaction score
0
Re: [Release] Getting stars to consume.

just change job to bowman use holy arrow then back to nightlord and your stars look like arrowsand u dont use any stars :p
lol
 
Newbie Spellweaver
Joined
Apr 5, 2008
Messages
22
Reaction score
0
Re: [Release] Getting stars to consume.

I just made whole bunch of nl's mad by doing this (should have read the comments first). Anyway I guess it's an "OK" release. Thanks.
 
Newbie Spellweaver
Joined
Apr 15, 2008
Messages
70
Reaction score
3
Re: [Release] Getting stars to consume.

yes, it consumes, only with skills, and also, I mean, hmm I think in your code, it takes a whole stack of "item", not 1 or 2, or 4 of the ilbis. I will try to figure out how to fix it :v.

Oh, oh yea!! I think hmm... this might be the way arrows get consumed, because when you run out of stars, it doesn't take the item, but for arrows, when you run out, the whole stack will be taken.
 
Junior Spellweaver
Joined
Apr 15, 2007
Messages
154
Reaction score
0
Re: [Release] Getting stars to consume.

yes, it consumes, only with skills, and also, I mean, hmm I think in your code, it takes a whole stack of "item", not 1 or 2, or 4 of the ilbis. I will try to figure out how to fix it :v.

lol i said it does not work with skills o-o
 
Newbie Spellweaver
Joined
Feb 19, 2008
Messages
33
Reaction score
0
Re: [Release] Getting stars to consume.

i'll try to get the packet for recharging ;)
 
Newbie Spellweaver
Joined
Apr 15, 2008
Messages
70
Reaction score
3
Re: [Release] Getting stars to consume.

Oh... oops, I mean, for me, it doesn't consume with regular attack either... sorry >_<
Well, do you think it might be more than 1 packet?
 
Experienced Elementalist
Joined
Apr 5, 2008
Messages
287
Reaction score
1
Re: [Release] Getting stars to consume.

but whats the point ... if you cant rechar them :S
 
Experienced Elementalist
Joined
Apr 5, 2008
Messages
287
Reaction score
1
Re: [Release] Getting stars to consume.

i add this

Code:
void Mobs::damageMobS(Player* player, unsigned char* packet, int size){
	int itemid=0;
	int pos=getInt(packet+14);
	int amount = getInt(packet+2);
	for(int i=0; i<player->inv->getItemNum(); i++){
		if(player->inv->getItem(i)->pos == pos && player->inv->getItem(i)->inv == 2){
			itemid = player->inv->getItem(i)->id;
			if (itemid > 1){
			Inventory::takeItem(player, itemid, amount);
			}
			else if (itemid < 10){
				printf("You are running out of stars", 5);
			}
			else if(itemid == 0){ 
				printf("You dont have more stars", 5);
			}
			break;
		}
	}

for kepping 1 star

or

Code:
if (itemid > 1){
			Inventory::takeItem(player, itemid, amount);
			}
			else if (itemid < 10){
				printf("You are running out of stars", 5);
			}
			else if(itemid == 0){ 
				printf("You dont have more stars", 5);
			}
			break;
		}
	}


if you want to use all


:p

suggestion :p

credits to the guy who made this post
:D
 
Status
Not open for further replies.
Back
Top