Player Killing - immortals only?
Posted by Reshad
on Tue 25 Jan 2005 02:11 PM
— 45 posts, 148,386 views.
Is pking only possible to Immortals?
How can I make it so that other players also can PK?
Stock Smaug has it so only deadlies can PK. Set the deadly flag on players, so they can PK.
So, each new player that signs up, I must edit his account and add the deadly flag?
Well no, the stock area in Smaug lets you choose what you want to be. So you could make a prog to handle that.
Can you please post a few steps to change that? And does it require compiling?
No it doesn't require compiling. Basically, all you need to do is make a prog with this string in it:
This is the stock prog to make someone deadly:
> speech_prog p shadowy path~
if level($n) == 1
mpforce 0.$n config -nice
mpforce 0.$n config -flee
mppkset $n yes
mpechoat $n You are now a Deadly Character... you will be listed under
mpechoat $n 'who deadly' once you reach level 5 and 18 years of age.
mpechoat $n You will now be transferred to your chosen path...
mpechoaround $n $n choses the path of shadows, disappearing into the darkness.
mptransfer 0.$n 107
mpat 107 mpforce 0.$n look
mpat 107 mpforce 0.$n config +autoloot
mpat 107 mpforce 0.$n config +autogold
else
mpechoat $n You have already chosen your path...
mptransfer $n 21001
endif
Thanks, but where do I place that? Sorry, but I dont have any experience with C++...
This isn't C++ or anything, it's Smaug OLC. Just building. You can put it in a mob obj or room prog. For example, see HELP MPEDIT in Smaug.
So, I must make a object, and place in the ''Action desc'' that, and then put it in a room?
No, the action desc has nothing to do with it. It's all Smaug mob/obj/room programs. If you don't know how to do Smaug progs, you'll have to learn. Related commands are mpedit, mpstat, rpedit, rpstat, opedit, opstat.
Huh... Oh, well, I'll pay someone to create it, lol :P
I think I understand it...
Though, I tried it out, didn't work...
I did this:
I opened Area Editor,
Click on the room
pressed Ctrl+A (add new thing)
then it comes up with a pop-up
I chosed Program
Did the program type: fight_prog
And arguments: 100
And typed this in MUD commands:
mppkset $n yes
Are those the right steps? If not, tell me please
Well, that'll make somebody deadly if they ever start a fight. But you don't quite want that. You want them to be deadly when they attack a player. And furthermore, I'm not sure if non-deadlies can attack deadlies to begin with although I could be wrong.
I guess what to do depends on what exactly you're trying to do. :)
Well, I want that pking is possibile in the entire game...
Then you'll want to have people mppkset to yes as soon as they enter. I think there's a program at the very beginning that moves people to the academy and all that; you'll want to add the mppkset there.
So, I add the program with this:
mppkset $n yes
in the starting area, when you die and when you start?
Mine is 10300, so I add it there?
Yes, but I'm not sure which trigger you want to use. It's been a while and I don't remember it off the top of my head. You'll want to look at the existing programs and find the one that runs when the player starts up.
Ah, oke, but:
mppkset $n yes
is right?
It's right but you need to contextualize it, but it into a trigger. It's right if it's in the right trigger, but useless if put into the wrong trigger.
The easiest way to do this with a trigger is to put either a hidden mob in your starting room and use an exall (exits, all) prog or in the next room(s) with enter progs. You should probably also be aware that such a blanket pk status can cause large amounts of "griefing" and drive casual players away.
Edit do_kill, take out the check on whether or not the person is deadly. Take out deadly/non-deadly checks.
That's basically what I did.
Well what I did was take out the check on non-deadly/deadly and put a check on how long the person has been playing, I give them 24 hours of safety.
But if you dont know C/C++ I would avoid it.
Oke, I have tried it, doesn't work...
I put mppkset $n yes in a prog in 10300 and I still can't pk...
Did you make sure the prog was used on the player who is trying to PK? What does it say when you try to PK?
Also Frobozz, Reshad is running WinSmaug so he cannot compile.
Oh my sincere apologies, I thought that winsmaug ran similar to smaug smaug in that you still had .c files or .cpp files to edit..
My bad, sorry Reshad!
Quote:
Also Frobozz, Reshad is running WinSmaug so he cannot compile.
Eh?? I compiled WinSmaug just fine... in fact I compiled the very version Reshad is using! :)
Yes but in his previous topics, it seemed he did not have the tools to compile, in which you made a deal.
Oh. The way you wrote your sentence I thought you were referring to some kind of inherent property of WinSmaug... my bad. :)
Well!
If he can compile I would suggest the hardcode change, if he can't compile I would suggest an mpprogram in a newbie school or in the starting room as has been suggested.
Whatever I do it doesn't work... Well, I'll look at it again in a few days...
If it doesn't work, I am going to pay Ksylian. Hope he is willing to do it ;)
What type of prog are you using for this?
a fight program
Why did you put it into a fight program? Did you find the program that is run when new players enter the game for the first time? or leave the academy?
Ok, here's a quickie rundown on the most useful mprog types
fight - only works when the mob is fighting
enter - works when someone enters the room from a certain direction
entall - works from any entrance
exit - when someone leaves in a certain direction
exall - exit for any direction
act - works when a certain action is performed
speech - works on trigger phrase
Now, I'll admit a certain lack of knowledge regarding room progs but I can't imagine them having the same versatility of mprogs so I wouldn't use em in most cases anyway.
That said, if youve put the prog to turn everyone killers on a hidden mob as a fight program, it's never going to work. You need to use either enter or exit progs to get the job done or put the fight pog on *every* mob in your academy that is meant to be killed and pray the players don't skip them entirely like theyre so very fond of doing given half a chance.
I made a program in the starting room, this is the program:
exa_prog
And putted this in it:
mppkset $n yes
When I login with 2 accounts and I try to PK one of my chars it says: The gods have not allowed pking in this area...
Any other solutions?
The area is set with the nopkill flag. Toggle it off:
aset <area filename> flags nopkill
That should solve the problem.
I still think the easiest solution to this would be to get rid of the attacker flag, edit do_kill and do_murder to take out the ifchecks for pk, and poof! You have a pk mud.
You actually should change is_safe, because you can start fights without starting them with kill/murder by using spells...
Thanks alot for your trying to help me. I already started building, but I have a question, if I start building in the mean-while, and then later on, someone creates it for me so that you can PK? For money, then must I rebuild everything?
No, you will not have to build everything again.
Are you sure? Perhaps I do not understand the question. If you are building an area and someone changes is_safe, you don't need to start the area over.
Oke, thanks :)
*Starts counting money and looks at Ksilyan*
I was looking through the nanny functions in comm.c because Id like to do this same thing - have everyone be pkillers from the get go. Found this:
/*
* Added by Narn. Start new characters with autoexit and autgold
* already turned on. Very few people don't use those.
*/
xSET_BIT( ch->act, PLR_AUTOGOLD );
xSET_BIT( ch->act, PLR_AUTOEXIT );
/*
Couldnt I just set the pkiller flag right here? What would be the proper way to write that?
It'd be something like xSET_BIT(ch->act, pkflag), whatever the pkflag is. PLR_PK? (don't remember)
Wasn't it the deadly flag?
Went with
xSET_BIT( ch->act, PCFLAG_DEADLY );
it compiled fine so I thought that was it but then I made a new char and it didnt start as deadly and still had to manually set it that way with my admin. Ill keep looking and keep ya posted.