Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ Adding Commands to SWR
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1
2
| Posted by
| Greyson
(1 post) Bio
|
| Date
| Reply #15 on Mon 09 Jun 2003 11:34 AM (UTC) |
| Message
| Hey,
Yeah to make your lines display properly..
ch_printf(ch, "| %s |", string);
would become...
ch_printf(ch, "| %-20s |", string);
Now I'm pretty new at coding (March of this year) but I do know that the -x in between the % and the s forces it out 20 spaces. I think if you do a normal number inside, something like %20s it'll line up the word(s) to the left instead of the right hand side of the column. And negative numbers produce the opposite. But I've never used em as a positive so without testing I can't really be sure. Hope this helps somewhat...
Greyson
Legacy of the Sith
lots.wolfpaw.net 3000
http://www.swreality.org | | Top |
|
| Posted by
| Celestine
(29 posts) Bio
|
| Date
| Reply #16 on Wed 11 Jun 2003 11:56 PM (UTC) Amended on Thu 12 Jun 2003 01:58 AM (UTC) by Celestine
|
| Message
| The line formatting from Greyson worked for the Name, Gender, Age, and Align. However, it did not work for the history, which is a text buffer thing (I copied it from the code for description). Any suggestions for the formatting there?
Edit: Also, I want to remove the wanted for murder flag when someone is killed in a battle with the spaceships. Only the spaceships. Normal killing still has murder flag, any tips here? | | Top |
|
| Posted by
| Boborak
USA (228 posts) Bio
|
| Date
| Reply #17 on Thu 12 Jun 2003 01:34 PM (UTC) |
| Message
| Unfortunately, there is no handy dandy trick-of-the-trade to format the output of strings created by the editor. It relys on the user to format it the way they want it.
As for the wanted flag, a quick fix would be to search the destroy_ship function for refrences to raw_kill and change any refrence that looks like this:
raw_kill(ch, rch);
to this:
raw_kill(rch, rch);
This causes the function raw_kill to think the player killed themselves, and hence won't give anyone a 'wanted' flag.
This of course assumes you have stock SWR and haven't downloaded one of a variety of other compilations of SWR that may or may not have changed the destroy_ship functionality. | | Top |
|
| Posted by
| Celestine
(29 posts) Bio
|
| Date
| Reply #18 on Thu 12 Jun 2003 03:19 PM (UTC) Amended on Thu 12 Jun 2003 04:03 PM (UTC) by Celestine
|
| Message
| A little question not exactly related to the coding part. More like building. How do the new starsystems work? Is it easier to manually code the new "space" in, and if so, how would I go about doing this?
Edit: Once again, another question. On the who list, I want it to be something like:
[Name] [Title] [Clan if possible]
Right now, I'm having a hard time just understanding what's going on. Actually, I can't even put someone in a clan properly. I put someone into a clan I manually coded called "Phoenix," and they show up as the leader (which I set) for the clan when I type 'clan.' However, if I type 'who phoenix,' it says 0 players are online even though that character is in the clan file. I used setclan phoenix leader [player name] to put them in the clan. Am I doing something wrong here? | | Top |
|
| Posted by
| Boborak
USA (228 posts) Bio
|
| Date
| Reply #19 on Thu 12 Jun 2003 05:02 PM (UTC) |
| Message
| Only have a few moments so I'll make this quick.
First, it would be easier to create and set both clans and starsystems online, using the commands 'setclan' and 'setstarsystem' respectively. They're pretty easy to figure out, so I I won't go into detail.
Secondly, how did you go about setting the player in the clan? Simply setting the player as the leader won't cut it. You also have to make sure the player is set to the clan. Sounds redundant (which it is), but that's the way it works. do a 'mset (player) clan phoenix' and you should be good. If not, I'd point fingers at do_who. I personally snipped out the clan part of the code long ago :-\ | | Top |
|
| Posted by
| Celestine
(29 posts) Bio
|
| Date
| Reply #20 on Thu 12 Jun 2003 11:19 PM (UTC) |
| Message
| Thanks, the setclan worked, but I'm still not understanding some of the components of setstarsystem. Can someone explain the x/y to me a little bit?
Also, I want to remove a majority of the spells/skills. Is there any way to do this? I realized (the hard way), that simply deleting the spells from skills.dat doesn't work. | | Top |
|
| Posted by
| Meerclar
USA (733 posts) Bio
|
| Date
| Reply #21 on Sat 14 Jun 2003 06:13 PM (UTC) |
| Message
| | In addition to the skills.dat file entries you would need to remove the spells/skills from every class. Needless to say, this is an insanely time consuming ordeal. |
Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org | | Top |
|
| Posted by
| Boborak
USA (228 posts) Bio
|
| Date
| Reply #22 on Sat 14 Jun 2003 07:59 PM (UTC) |
| Message
| | You would also need to remove the appropriate lines from db.c that assigns the skills a GSN. I don't think the Smaug authors ever intended to make it easy to remove skills/spells. It may be best to just disable the skills instead of removing them. Setting the skills code to 'skill_null' and removing any affects it may have, would do the trick. | | Top |
|
| Posted by
| Celestine
(29 posts) Bio
|
| Date
| Reply #23 on Tue 17 Jun 2003 04:58 AM (UTC) Amended on Tue 17 Jun 2003 05:01 AM (UTC) by Celestine
|
| Message
| Yet another question regarding commands. For withdraw/deposit/donate, it says that I need to have a bank. I stripped down most of the areas which I deemed unnecessary (they weren't needed to compile properly). I was wondering how to make a bank? makebank doesn't seem to work...Any help?
EDIT: Nevermind, I found out that bank is nothing more than a roomflag. | | Top |
|
| Posted by
| Cory
(2 posts) Bio
|
| Date
| Reply #24 on Mon 22 Sep 2003 11:47 PM (UTC) |
| Message
| could somone email me instructions on how to build and program on lots.wolfpaw.net? it would be greatly appreciated
| | Top |
|
| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Date
| Reply #25 on Tue 23 Sep 2003 05:02 AM (UTC) |
| Message
| | Is this relevant to the subject "Adding Commands to SWR"? If not can you please start a new subject? Tacking questions onto the end of a different thread - in this case started in June 2003 - is just confusing. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
86,307 views.
This is page 2, subject is 2 pages long:
1
2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top