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
➜ Gambler Mod
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Warsong
(11 posts) Bio
|
Date
| Thu 24 Apr 2003 03:18 AM (UTC) |
Message
| Anyone have a working gambler mod for smaug? I have added the changes that are required but I am still missing something somewhere. The code compiles ok with no errors, but its still not quite right. I need to assign spec_gambler to the mob that is to be the gambler but that choice is not available. I pretty sure the problem lies in special.c so with that inj mind heres some code snips that I added:
DECLARE_SPEC_FUN( spec_gambler );
if ( !str_cmp( name, "spec_gambler" ) ) return spec_gambler;
if ( special == spec_gambler ) return "spec_gambler";
bool spec_gambler( CHAR_DATA *ch)
{
if (!IS_NPC(ch))
return FALSE;
else
return TRUE;
}
All the above code was added to the appropriate places in the special.c file as near as I can tell. Any help or direction would be greatly appreciated. | Top |
|
Posted by
| Boborak
USA (228 posts) Bio
|
Date
| Reply #1 on Thu 24 Apr 2003 03:46 AM (UTC) |
Message
| By "but that choice is not available.." what do you mean?
If you have this:
if ( !str_cmp( name, "spec_gambler" ) ) return spec_gambler;
..In the appropriate spot, when you do 'mset gamblermob spec spec_gambler' the mud should have no problems setting the specfun for a mob. | Top |
|
Posted by
| Warsong
(11 posts) Bio
|
Date
| Reply #2 on Thu 24 Apr 2003 04:02 AM (UTC) |
Message
| I use Areaedit for all my building right now. I have created a new mob called gambler and under the name tab towards the bottom there is a drop down menu for special fuctions. That is where the spec_gambler special function should appear right? Or is a Areaedit thing? My Areaedit is not registered so maybe that is the problem...
I tried to assign the spec_gambler using mset gambler spec spec_gambler and it said "no one like that in all the realms". I guess I need to go back to my code and look closer... | Top |
|
Posted by
| Boborak
USA (228 posts) Bio
|
Date
| Reply #3 on Thu 24 Apr 2003 05:29 AM (UTC) |
Message
| Never used Areaedit so I don't know about that. But if it said 'no one like that in all the realms' it means it couldn't find your mob. Is 'gambler' the name of your mob? | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #4 on Thu 24 Apr 2003 07:57 AM (UTC) |
Message
| There is a section in the configuration file for those functions:
#SPECIAL
(none)
Spec_breath_any
Spec_breath_acid
Spec_breath_fire
Spec_breath_frost
Spec_breath_gas
Spec_breath_lightning
Spec_cast_adept
Spec_cast_cleric
Spec_cast_mage
Spec_cast_undead
Spec_executioner
Spec_fido
Spec_guard
Spec_janitor
Spec_mayor
Spec_poison
Spec_thief
End
You could add it to there. However the configuration file is not read for unregistered copies. You say you use the Area Editor for all your building. Perhaps it is time to register it? :) |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Warsong
(11 posts) Bio
|
Date
| Reply #5 on Fri 25 Apr 2003 01:33 AM (UTC) |
Message
| Registering areaedit would be nice, but it won't solve my problem. :) | Top |
|
Posted by
| Warsong
(11 posts) Bio
|
Date
| Reply #6 on Sat 26 Apr 2003 06:51 AM (UTC) |
Message
| For the record all that needed to be done was add:
M 21005 spec_gambler
to the #SPECIALS section of the area file with the mob in it. | Top |
|
Posted by
| Boborak
USA (228 posts) Bio
|
Date
| Reply #7 on Sat 26 Apr 2003 07:28 AM (UTC) |
Message
| Well, yea. That's doing the same thing as 'mset blah blah', but manually ;-) | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #8 on Sat 26 Apr 2003 08:00 AM (UTC) |
Message
|
Quote:
I have created a new mob called gambler and under the name tab towards the bottom there is a drop down menu for special fuctions. That is where the spec_gambler special function should appear right?
My earlier suggestion might not have fixed all your problems, however it would have fixed that one. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Warsong
(11 posts) Bio
|
Date
| Reply #9 on Sat 26 Apr 2003 03:24 PM (UTC) |
Message
| Don't get me wrong guys your tips pointed me in the right direction. :) Areaedit is by far the best editor I've seen and it is good to know how to use the mud shell for building. Specially since I have not even looked at the smaug codebase in a very long time. Thanks for your help. | 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.
24,400 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top