Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - sorin

Pages: [1]
Dead Souls Support / New Verb
« on: February 15, 2014, 04:05:21 am »
Ok, after reading the tutorial about creating new verbs, and looking a bit in the backstab and attack verbs, I came to this little, a beggining of a verb, but I couldn't progress because: If I put no pharsing rule, can_uppercut() and do_uppercut(), it works just fine, if I do it with liv, I get the message, you can't uppercut that

Code: [Select]
#include <lib.h>
#include <position.h>
#include "damage_types.h"

inherit LIB_VERB;

static void create() {
    SetErrorMessage("Uppercut whom?");
    SetHelp("Syntax: uppercut <LIVING>\n\n"
            "With a clenched fist, a warrior is able to deliver a powerful upwards blow that will cause his foe severe pain. The added benefit to this technique is that if the warrior is holding a weapon in his hand, the added weight of the weapon will aid in delivering an even more powerful blow.");

mixed can_uppercut_liv(object ob) {
if (this_player()->GetClass() != "fighter") {
return "Fighter only, sorry!";
return this_player()->CanManipulate();

int uppercut_damage();

mixed do_uppercut_liv(object ob) {
this_player()->eventPrint("Baam! You hit the fucker in the chin! Kidding, just testing shit Anyhow, you woulda done "+uppercut_damage()+" damage points! Good job!");
return 1;

int uppercut_damage() {
int damage_done = this_player()->GetStatLevel("strength");
damage_done += this_player()->GetSkillLevel("melee attack");
damage_done += random(20)-10;
return damage_done;

Dead Souls Support / Blocking an exit
« on: February 12, 2014, 11:59:50 am »
Hi guys,
After days and days of reading and trying to understand the commands, I'm still stuck.

I want that two guards to block the exit, so only fighters (members of the fighter class) can pass. I came up with this piece of code, which seems to not be working.

int block_player(object ob){
if (ob->GetClass() != "fighter")
ob->SetGuard("up", "The guards blocks your way!");                 

              void init(){
call_out((: block_player, this_player() :), 0);

It still blocks everyone no matter what class. Where I'm wrong?

Pages: [1]