[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Gambler Mod
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Gambler Mod

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Warsong   (11 posts)  [Biography] 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.
[Go to top] top

Posted by Boborak   USA  (228 posts)  [Biography] 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.
[Go to top] top

Posted by Warsong   (11 posts)  [Biography] 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...
[Go to top] top

Posted by Boborak   USA  (228 posts)  [Biography] 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?
[Go to top] top

Posted by Nick Gammon   Australia  (21,607 posts)  [Biography] 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
[Go to top] top

Posted by Warsong   (11 posts)  [Biography] 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. :)
[Go to top] top

Posted by Warsong   (11 posts)  [Biography] 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.
[Go to top] top

Posted by Boborak   USA  (228 posts)  [Biography] 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 ;-)
[Go to top] top

Posted by Nick Gammon   Australia  (21,607 posts)  [Biography] 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
[Go to top] top

Posted by Warsong   (11 posts)  [Biography] 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.
[Go to top] 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.


6,640 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]