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.


Messages - stanach

Pages: 1 [2]
16
Dead Souls Support / Re: help with code
« on: July 17, 2010, 10:56:28 pm »
Got the answer to my own question finally.  :D
reward (who)
{
  tell_object(who, "You get 2 dollars from the trashcan for showing tidyness.\n");
  say(who->GetName() + " gets 2 dollars from the trashcan for showing tidyness.\n",who);
  who->AddCurrency("dollars",2);     
}
mixed CanGet(object ob) { return "The bucket does not budge.";}

void init(){
}
 
 
 changed this_player to GetName and it works fine :)
 

17
Dead Souls Support / help with code
« on: July 17, 2010, 09:38:42 pm »
Changing the Trash can a little, would like it to give 2 dollars when you put an item in it you want to discard. I got the trashcan giving the 2 dollars but when you see that person put somethign int he trashcan in place of name  you see a O recieved 2 dollars from the trashcan. here is the code, any help would be appreciated.
Code: [Select]
#include <lib.h>

inherit LIB_STORAGE;

void create() {
    ::create();
    SetKeyName("bin");
    SetId(({"bin","can","dustbin","trash","rubbish"}));
    SetAdjectives(({"metal","small","blue","recycling","trash","garbage","dust"}));
    SetShort("a recycling bin");
    SetLong("This is a blue trash can, marked with "+
            "the letters \"/dev/null\".");
    SetMass(274);
    SetBaseCost("dollars",50);
    SetMaxCarry(999999);
}

int tidy_up(){
    object *inv;
    inv = all_inventory(this_object());
    foreach(object thing in inv){
        if(thing) thing->eventMove(load_object("/domains/town/room/furnace"));
    }
    return 1;
}

int eventReceiveObject(object ob){
    write("You make a deposit into the the recycling bin.\n");
    call_out((: tidy_up :),1);
    call_out ("reward", 2, this_player());
    return 1;
}
reward (who)
{
  tell_object(who, "You get 2 dollars from the trashcan for showing tidyness.\n");
  say(who->this_player() + " gets 2 dollars from the trashcan for showing tidyness.\n",who);
  who->AddCurrency("dollars",2);     
}
mixed CanGet(object ob) { return "The bucket does not budge.";}

void init(){
}

18
Dead Souls Support / Re: noob question
« on: July 13, 2010, 09:10:19 pm »
Thanks cray for the quick response.

Still searching for what might be wrong with the Http part, the page displays somewhat with a 404 error.
any suggestions? i followed the guide and enabled everything that it said in the order it said to enable it.


19
Dead Souls Support / noob question
« on: July 13, 2010, 08:11:11 pm »
I am just doing a small room. Everytime i go to the room it says i can't breath.

here is the room code:
#include <lib.h>
#include "backbone.h"
inherit LIB_ROOM;

void create() {
      room::create();
      SetClimate("outdoors");
      SetAmbientLight(30);
      SetShort("Car Park");
      SetLong("Around you lie the ruined relics of a bygone era, namely\n"
                  "many hulks of cars. Your nose wrinkles up in distaste at\n "
                  "the squallid remains, as you wonder which is the nearest\n"
                  "exit from the car park. Looking east you see the car park\n"
                  "continues, so maybe the avenue to the west is a better idea.\n"
                  );
      SetItems( ([
                    ({"park", "car park"}) : "A car park",
                       "avenue" : "Hey, looks cool down there. Why not go see?",
                   ]) );
      SetExits( ([
                       "east" : ROOM + "7th_westpark",
                       "west" : ROOM + "avenue2" ]) );
}
any ideas what i am doing wrong?

Pages: 1 [2]