Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Yandex, DotBot

Members: 0
Guests: 1
Stats
Files
Topics
Posts
Members
Newest Member
481
3,734
19,366
618
Micheal64X
Today's Birthdays
Vintar (28)
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » SKILL: Backstab
Forum Rules | Mark all | Recent Posts

SKILL: Backstab
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Oct 30, 2006, 4:53 am
Go to the top of the page
Go to the bottom of the page

ToadVile

GroupMembers
Posts47
JoinedApr 1, 2006

skills.c do_backstab

Find:

      ch_printf( ch, "%s is hurt and suspicious, you'll never get close enough.\n\r", victim->short_descr );


Change to:

      ch_printf( ch, "%s is hurt and suspicious, you'll never get close enough.\n\r", ( IS_NPC( victim ) ?
victim->short_descr : victim->name )  );


This would fix the problem where, when you attack a player, they don't have max health, it'd display their name correctly instead of saying

(null) is hurt and suspicious, you'll never get close enough.


It'll say now..

Torgth is hurt and suspicious, you'll never get close enough.


Works the same way for mobiles, except for mobiles it uses the short description.

Peace, have fun :P
       
Post is unread #2 Oct 30, 2006, 3:45 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Hmm, SmaugFUSS has that as a $N instead of %s, I wonder why Samson didn't do the same to AFK. *shrug*
       
Post is unread #3 Oct 30, 2006, 6:37 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

I didn't do the same as Smaug because our backstab was lifted almost directly out of Crystal Shard source code. A long dead mud we had the source to for awhile. AFKMud borrows many things from the old source, and backstab was one of them.
       
Post is unread #4 Oct 30, 2006, 7:48 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

That makes more sense than what I was expecting. :wink:
       
Post is unread #5 Oct 30, 2006, 10:54 pm
Go to the top of the page
Go to the bottom of the page

kiasyn
Magician
GroupMembers
Posts121
JoinedJun 30, 2006

ToadVile said:

Change to:
      ch_printf( ch, "%s is hurt and suspicious, you'll never get close enough.\n\r", ( IS_NPC( victim ) ?
victim->short_descr : victim->name )  );


would probably be better to use PERS.
       
Post is unread #6 Oct 31, 2006, 8:46 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Don't think it matters. PERS would apply in situations where you might not be able to see the target. If you can't see your backstabbing victim, it won't really make sense to give you back a PERS formatted message saying you'll never get close enough.
       
Post is unread #7 Oct 31, 2006, 9:19 pm
Go to the top of the page
Go to the bottom of the page

kiasyn
Magician
GroupMembers
Posts121
JoinedJun 30, 2006

*nod* it doesn't matter, just thinking ahead for stuff like additions to PERS to include last names etc. (stuff that isn't likely to happen)
       
Pages:<< prev 1 next >>