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, Google, Yandex

Members: 0
Guests: 10
Stats
Files
Topics
Posts
Members
Newest Member
481
3,735
19,368
618
Micheal64X
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Coding » Mobs doing Mset
Forum Rules | Mark all | Recent Posts

Mobs doing Mset
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jul 31, 2008, 12:28 pm
Go to the top of the page
Go to the bottom of the page

Sanus Compleo
Magician
GroupMembers
Posts153
JoinedMar 25, 2008

Hi, me again. This time, I've got a problem with Mset, ya see I wanted to change the way characters were generated, from the usual, to a room based generation, where the room descriptions gave you the information you needed, you say a few things, and the programs set it all up. The first thing I noticed, is that 'mpmset' didn't cover races or classes, so I tried taking the mset version of races and classes code over to mpmset... that didn't work >.>. Next thing I did, was took away the

if( is_npc( ch ) )
   {
      send_to_char( "Mob's can't mset\r\n", ch );
      return;
   }


Well, now mobs can mset, but they can't mset PC's, and the problem is in the permissions. I know that I've got to find a workaround for the permissions, if the user is a mob (switch command has been removed from the code, so imms won't be able to mset past their permissions, and I'll figure something out to remove mset from orders) they can't mset players... which is exactly what I need them to do >.>

Any ideas?
       
Post is unread #2 Jul 31, 2008, 12:38 pm
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

I would fix mpmset to do what you want: why did adding the race/class changing code not work? I would be very cautious about removing the mset restrictions. If you forget a way for somebody to switch into a mob, like if you forget ordering pets to do things, you will have a major security problem. Better to work with the system than to hack around it.
       
Post is unread #3 Jul 31, 2008, 12:48 pm
Go to the top of the page
Go to the bottom of the page

Sanus Compleo
Magician
GroupMembers
Posts153
JoinedMar 25, 2008

Do you have any suggestions on how I could get mpmset to do what I want? (can't code)
       
Post is unread #4 Jul 31, 2008, 1:00 pm
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

Well, for starters, what went wrong when you tried to move the code from mset to mpmset?

Note that if you're uneasy about going into the code, then trying to make mset work for mobs but be secure would probably be about as easy as making mpmset work, if not harder, actually.
       
Post is unread #5 Jul 31, 2008, 2:37 pm
Go to the top of the page
Go to the bottom of the page

Sanus Compleo
Magician
GroupMembers
Posts153
JoinedMar 25, 2008

I directly copy pasted the mset to mpmset, but it said that several values were undeclared... I'll do the changes again, and make a build to show you the errors
       
Post is unread #6 Jul 31, 2008, 2:42 pm   Last edited Jul 31, 2008, 2:43 pm by Sanus Compleo
Go to the top of the page
Go to the bottom of the page

Sanus Compleo
Magician
GroupMembers
Posts153
JoinedMar 25, 2008

mpxset.c: In function `void do_mpmset(CHAR_DATA*, char*):
mpxset.c:178: error: `get_pc_class' undeclared (first use this function)
mpxset.c:178: error: (Each undeclared identifier is reported only once for each function it appears in.)
mpxset.c:186: error: `char_is_class' undeclared (first use this function)
mpxset.c:231: error: `update_level' undeclared (first use this function)
mpxset.c:248: error: `get_pc_race' undeclared (first use this function)
make[1]: *** [o/mpxset.o] Error 1
make: *** [all] Error 2


By the way, I'm using LOP... which is really quite nice, and it's got everything sorted better than the other sources I've been through.
       
Post is unread #7 Jul 31, 2008, 2:43 pm   Last edited Jul 31, 2008, 2:44 pm by David Haley
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

I would recommend reading a tutorial introduction to C, your problems are probably simple enough that you won't need much background knowledge to change the variable names or (more likely) just add the declarations. Another option would be to make a feature request to allow mpmset to change race/class. :wink:
       
Post is unread #8 Jul 31, 2008, 2:56 pm
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

LoP. This is where I step aside and let Remcon field questions, that's his baby.
       
Post is unread #9 Jul 31, 2008, 2:57 pm   Last edited Jul 31, 2008, 2:58 pm by Sanus Compleo
Go to the top of the page
Go to the bottom of the page

Sanus Compleo
Magician
GroupMembers
Posts153
JoinedMar 25, 2008

Actually I just copied some things from build.c
int something
void something
bool something
and it built... so now I'm going to test it out :D

And it works!

P.S. Lop is pretty damn great... by the way
       
Post is unread #10 Aug 1, 2008, 3:25 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,873
JoinedJul 26, 2005

Glad you got it working, I would stay clear of allowing mobs to do mset, and keep things they can modify in mpmset :)
       
Pages:<< prev 1 next >>