EOSERV Forum > EOSERV > When bag is equipped extra space code
Page: << 1 >>
When bag is equipped extra space code
Author Message
Post #197635 When bag is equipped extra space code

I got the idea from the eo main thread and decided to make it for people who want to add it to their servers.



Go to Spell.cpp and look for: " if (spell.id == 0) ", and after " return; "  add the following:

http://pastebin.com/NazycHKG


Now go to Locker.cpp and look for: if (character->map->GetSpec(x, y) == Map_Tile::BankVault      This occurs 3 times so you have to do this step 3 times for each line.

Change the lines to: if (character->map->GetSpec(x, y) == Map_Tile::BankVault || character->online)


Now go to eoserv_config.cpp and look for eoserv_config_default(config, "GhostArena"         , false);

After that add: 


eoserv_config_default(config, "BankSpell"          , 1);

eoserv_config_default(config, "BankSpellItem"      , 408);


Now go to your config folder and open misc.ini and add this after the last line:

http://pastebin.com/u8KmH7xf (change the ids if you want to )


Lastly, open your spell pub file and make your spell look like this (you can change the tp and sp stuff)


---
stay tuned.
8 years, 35 weeks ago
Post #197638 Re: When bag is equipped extra space code

I was actually thinking about coding this for myself. I think you and I have taken different approaches. I think it was pretty cool that you used a spell, I was just gonna have people double click on the bags to open them. Looking over your code, it appears that you are just opening the bank with the bag. So the bag is just a free access to a bank? I don't quite remember how lockers work in EO, but I thought that every locker opened the same bank. I was thinking about using the chests format so you could different bags hold different things. I'm not sure, I haven't really given it a gentleman's try. Anyways, Nice job! I always think it's cool when people give back to the community! 

---
Love you too.
8 years, 35 weeks ago
Post #197639 Re: When bag is equipped extra space code
newguy posted: (27th Aug 2015, 10:00 pm)

I was actually thinking about coding this for myself. I think you and I have taken different approaches. I think it was pretty cool that you used a spell, I was just gonna have people double click on the bags to open them. Looking over your code, it appears that you are just opening the bank with the bag. So the bag is just a free access to a bank? I don't quite remember how lockers work in EO, but I thought that every locker opened the same bank. I was thinking about using the chests format so you could different bags hold different things. I'm not sure, I haven't really given it a gentleman's try. Anyways, Nice job! I always think it's cool when people give back to the community! 


I was actually going to do that originally but I thought using a spell was a little cooler haha. I'm working on a party share function now. If someone is in your party they can view the locker too (actually gonna use chests now that you gave me that idea)
---
stay tuned.
8 years, 35 weeks ago
Post #197641 Re: When bag is equipped extra space code

So prob. a stupid question, maybe not. What happens if you unequip the bag? Everything just gets placed in your inventory? And what if it doesnt fit?


I'm assuming it will just produce an error saying to empty your locker first.

---
Former multi-server mapper.
8 years, 35 weeks ago
Post #197647 Re: When bag is equipped extra space code

I don't really like that you have to use a spell to do this. It seems like a spell should not be used for that type of function. One problem in particular I'm having with this, is it likely opens your main locker with all your items? 

I mean overall I love the idea and effort though. 

---
EO Resources/Guides: â—„ eobud.boards.net â–º
8 years, 35 weeks ago
Post #197649 Re: When bag is equipped extra space code
shayne posted: (28th Aug 2015, 01:12 am)

I don't really like that you have to use a spell to do this. It seems like a spell should not be used for that type of function. One problem in particular I'm having with this, is it likely opens your main locker with all your items? 

I mean overall I love the idea and effort though. 


Hi, I actually modified my code to just make it so if you double click the bag it opens up your locker. I made a new database entry so it is not the regular bank locker. (not in the code up there) I'll update the post now


Misca posted: (28th Aug 2015, 12:54 am)

So prob. a stupid question, maybe not. What happens if you unequip the bag? Everything just gets placed in your inventory? And what if it doesnt fit?


I'm assuming it will just produce an error saying to empty your locker first.

Nope. It saves everything in the database so it will stay in there as long as you need

---
stay tuned.
8 years, 35 weeks ago
Post #197651 Re: When bag is equipped extra space code
andrewbob1 posted: (28th Aug 2015, 01:22 am)

shayne posted: (28th Aug 2015, 01:12 am)

I don't really like that you have to use a spell to do this. It seems like a spell should not be used for that type of function. One problem in particular I'm having with this, is it likely opens your main locker with all your items? 

I mean overall I love the idea and effort though. 


Hi, I actually modified my code to just make it so if you double click the bag it opens up your locker. I made a new database entry so it is not the regular bank locker. (not in the code up there) I'll update the post now
Nice, this is exactly how I was expecting it to be done. This is a great idea to do it like this!
---
EO Resources/Guides: â—„ eobud.boards.net â–º
8 years, 35 weeks ago
Post #197663 Re: When bag is equipped extra space code

This is cool, if only passive skills where a thing this would be a perfect passive skill. 

---
http://www.ctronic.ga
http://www.tsu.co/Deltro
https://www.reverbnation.com/deltro9
8 years, 35 weeks ago
Post #197713 Re: When bag is equipped extra space code
newguy posted: (27th Aug 2015, 10:00 pm)

I was actually thinking about coding this for myself. I think you and I have taken different approaches. I think it was pretty cool that you used a spell, I was just gonna have people double click on the bags to open them. Looking over your code, it appears that you are just opening the bank with the bag. So the bag is just a free access to a bank? I don't quite remember how lockers work in EO, but I thought that every locker opened the same bank. I was thinking about using the chests format so you could different bags hold different things. I'm not sure, I haven't really given it a gentleman's try. Anyways, Nice job! I always think it's cool when people give back to the community! 


I've seen this done with pets, using the #pet locker command rather than with bags. A server a that was out a while ago, Adventurers Online, had the function and each pet opened a chest and you could use each pet to carry different stuff, and they'd stay there for as long as you'd need. I'm sure you can do the exact same with bags also.
---
"Nurd, you're like a fucking swiss army knife" - Necrosis
8 years, 35 weeks ago
Post #197721 Re: When bag is equipped extra space code

Nice, the flashy spell text is kind of annoying and why I'm not too keen on doing custom actions with spells (I think I considered it for opening up a board).

Be careful with this though: if (character->map->GetSpec(x, y) == Map_Tile::BankVault || character->online)

Obviously the intention is to let people use their lockers from anywhere, but that lets hackers do so without the restriction of having a bag or the spell. (Characters have to be online to get to that code anyway, so you may as well have written if (true), or removed the whole check.)

The 100% proper way to do something like that would probably be to set a flag on the character allowing locker access, like the NPC type variable, where the flag is cleared when you take off the bag, unlearn the spell, or walk.

Unfortunately these are the only two lines I planned on sticking in to the clone:

8 years, 35 weeks ago
Page: << 1 >>

EOSERV Forum > EOSERV > When bag is equipped extra space code