Login
User Name:

Password:



Register
Forgot your password?
LOP 1.39r1
Author: Remcon
Submitted by: Remcon
Yaeger areas
Author: Yaeger
Submitted by: Cyberthrope
The City of Anon
Author: Yaeger
Submitted by: Cyberthrope
The Walls of Anon - Smaug
Author: Yaeger
Submitted by: Cyberthrope
LOP 1.39
Author: Remcon
Submitted by: Remcon
CommonCrawl, Yahoo!, Bing, Yandex, Baiduspider

Members: 0
Guests: 3
Stats
Files
Topics
Posts
Members
Newest Member
375
3,323
16,512
561
Aurin
Affiliates
Smaug Building Institute Arthmoor
» SmaugMuds.org » Codebases » SmaugFUSS » Relogin and Show Damage
Forum Rules | Mark all | Recent Posts

Relogin and Show Damage
< Newer Topic :: Older Topic > :D!

Pages:<< prev 1 next >>
Post is unread #1 Dec 16, 2007, 8:58 am
Go to the bottom of the page Go to the top of the page
Raine
Magician
GroupMembers
Posts121
JoinedDec 11, 2007

Well, I'm back with more newbish question that I have no idea how to go about on =[... First off I come from a mud where you can type "relog" and it makes you save and quit, and brings you back to the login page. Any Idea how to go about that? I know it has to be some type of loop, but I don't know where to put it much more I have no idea how to code it...

Secondly SMAUGFUSS doesn't come with a showable damage I don't know hwo to explain it well so here is an example

Puff's slash **** SMITES **** you!

Is what i get

Puff's slash **** SMITES **** you! (xxx)

Where "x" = damage

Is what I want

Now I think that would be a bit simplier because all you have to do is add a variable at the end of something I would think.

Another question I have which may relate to "relogin" is how to limit player login, such as only 1 character may be on at any given time (per ip), but also allow immortals to log there mortal and immortal. Any help would be nice :)! I'll be home for a bit before work =p.

Raine
       
Post is unread #2 Dec 16, 2007, 10:29 am
Go to the bottom of the page Go to the top of the page
Remcon
Wizard
GroupLoP Team
Posts1,325
JoinedJul 26, 2005

Why not just go ahead and handle all of the login stuff at once (done it years ago on some long since deleted base). could go with like relog <character name> <password> and just handle all of it at once simple enough. If you just want to go with what you were talking about its as simple as doing something like quit does without dropping the descriptor and instead sending it back to the login screen. If I get time might make up a snippet for it sometime (if someone else doesn't get to it before I do).

As for showing the damage it's simple enough. You just modify the new_dam_message in fight.c to show the amount of damage. It isn't to hard so you could mess around with it a bit or look at a different base that has it to see how it is handled for ideas. .........................
Remcon
Lands of Pabulum
       
Post is unread #3 Dec 16, 2007, 11:48 am
Go to the bottom of the page Go to the top of the page


Kayle
Nibelungen
GroupAdministrators
Posts1,040
JoinedMar 21, 2006
WWW

Alright, in regards to the damage showing in messages, It's really easy. All you have to do is add a variable to each of the strings in new_dam_message() and then add the corresponding value for the variable, and example:

      snprintf( buf1, 256, "$n %s $N%c &w[%d]&D", vp, punct, dam );
      snprintf( buf2, 256, "You %s $N%c &w[%d]&D", vs, punct, dam );
      snprintf( buf3, 256, "$n %s you%c &O[%d]&D", vp, punct, dam );


that's just one way to do it, you could set it up so that it actually says "So-and-so hits you for 100 damage!" But, I figured I'd throw you an example on how to do it. As for the relog, I'll leave that one to Remcon, because I have a feeling I'll just way over complicate it. :P .........................
Owner/Coder -- Malevolent Whispers -- Development Phase - Not accepting players
Coder -- Star Wars: The Sith Wars -- Open Alpha - Players Welcome - Full System Re-writes Imminent.

I3 Contact: Kayle@SithWars
       
Post is unread #4 Dec 16, 2007, 12:18 pm
Go to the bottom of the page Go to the top of the page
Remcon
Wizard
GroupLoP Team
Posts1,325
JoinedJul 26, 2005

Lol, well kayle you just pointed him to exactly how i had done the show damage in my codebase so I doubt you will over complicate it any more then I will :P .........................
Remcon
Lands of Pabulum
       
Post is unread #5 Dec 16, 2007, 1:17 pm
Go to the bottom of the page Go to the top of the page


Kayle
Nibelungen
GroupAdministrators
Posts1,040
JoinedMar 21, 2006
WWW

I meant for the relog stuff not the damage messages :P You can't really over complicate that. :P .........................
Owner/Coder -- Malevolent Whispers -- Development Phase - Not accepting players
Coder -- Star Wars: The Sith Wars -- Open Alpha - Players Welcome - Full System Re-writes Imminent.

I3 Contact: Kayle@SithWars
       
Post is unread #6 Dec 16, 2007, 1:37 pm
Go to the bottom of the page Go to the top of the page
Remcon
Wizard
GroupLoP Team
Posts1,325
JoinedJul 26, 2005

Yea, I was also talking about it when I said that I doubt you will over complicate it more then me lol. .........................
Remcon
Lands of Pabulum
       
Post is unread #7 Dec 16, 2007, 2:05 pm
Go to the bottom of the page Go to the top of the page


Kayle
Nibelungen
GroupAdministrators
Posts1,040
JoinedMar 21, 2006
WWW

Oh. :P .........................
Owner/Coder -- Malevolent Whispers -- Development Phase - Not accepting players
Coder -- Star Wars: The Sith Wars -- Open Alpha - Players Welcome - Full System Re-writes Imminent.

I3 Contact: Kayle@SithWars
       
Post is unread #8 Feb 8, 2010, 6:05 pm
Go to the bottom of the page Go to the top of the page
Raine
Magician
GroupMembers
Posts121
JoinedDec 11, 2007

Alright :p time to drag up my old topic because I've come across new predicaments.

So initially the damage does show on attacks
Einar misses Puff. (0)
Puff scratches you. [412]


But I then run into this problem,
Puff's blast of gas decimates Einar!
Puff's blast of gas jolts you!
Your suspiric grasp brushes Puff.
Puff's slash brushes you.
Puff's slash brushes you.


What I'm looking for is where I can see the damage on all skills and even on attacks that are longer than [Enemy, type of hit, person hit] (eg Puff scratches you. [412]) I'm going to mess around with it but any shoves in the right direction would be nice =].

Thanks again!
       
Post is unread #9 Feb 8, 2010, 6:26 pm
Go to the bottom of the page Go to the top of the page
Andril
Magician
GroupMembers
Posts130
JoinedJun 9, 2009

Looks like you edited the unarmed attack messages only and missed the ones for spells and weapons. Look for all the stuff in new_dam_message that relates to the dt variable. It appears there are three places in total in there, including the unarmed messages, that need to be edited.
       
Post is unread #10 Feb 8, 2010, 6:33 pm
Go to the bottom of the page Go to the top of the page
Remcon
Wizard
GroupLoP Team
Posts1,325
JoinedJul 26, 2005

Well it varies and depends on what is handling it. If it is one of those where its hard coded and the damage and messages are handled in the skill function itself then you have to add the changes in it. There is a spell_smaug one somewhere that handles the aggressive spell messages also that you probably need to update. Been ages since I messed with all that stuff though lol. Hope it gives you at least a hint of where to check things though.

Wow this was an old thread lol and it had already been awhile before the original question since I had messed with it. .........................
Remcon
Lands of Pabulum
       
Post is unread #11 Feb 8, 2010, 6:44 pm
Go to the bottom of the page Go to the top of the page


Keberus
Conjurer
GroupFUSS Project Team
Posts341
JoinedJun 4, 2005
WWW AIM MSN

I know it's a tad late, but better late than never. For the relog stuff, I suggest checking out the pfreload snippet available here, it closes out a pfile and reloads it to a descriptor without clearing out the descriptor data, which is what you want. I use a lot of the similar code for my logoff command, but I actually have logoff so people can go back to the account menu which has a few options available to them.

Later,
KeB .........................
Co-Owner/ Coder
Star Wars: Infinite Galaxy
www.t-n-k-games.com
       
Post is unread #12 Feb 8, 2010, 7:04 pm
Go to the bottom of the page Go to the top of the page
Andril
Magician
GroupMembers
Posts130
JoinedJun 9, 2009

Took a quick look through magic.c and skills.c and all the stuff I can find that deals with damaging another character, at some point, calls the damage() function in fight.c which in turn calls new_dam_message(). True, there might be something hidden away somewhere that doesn't go through damage() though. *shrug*
       
Post is unread #13 Feb 9, 2010, 3:56 am
Go to the bottom of the page Go to the top of the page
Raine
Magician
GroupMembers
Posts121
JoinedDec 11, 2007

Thanks for your help guys, I managed to get all the damage now functional =]. Seems that I did miss the weapons and skills for for the dam variable.

Now onto working with the relog function!
       
Pages:<< prev 1 next >>

 
Contact Us