Welcome to the Builder Academy

Question Spy skill

More
26 Apr 2013 06:07 - 28 Apr 2013 18:15 #2006 by JTP
Spy skill was created by JTP
Im trying to make this spy for thives, but something has changed in tbamud code from the old circlemud3.1 bpl11 this was made for,
Anyone who could help me get this to work:
Code:
ACMD(do_spy) { int percent, prob, spy_type, return_room; char *spy_dirs[] = { "north", "east", "south", "west", "up", "down", "n" }; /* 101% is a complete failure */ percent = number(1, 101); prob = GET_SKILL(ch, SKILL_SPY); spy_type = search_block(argument + 1, spy_dirs, FALSE); if (spy_type to_room == NOWHERE) { send_to_char(ch, "Spy where?rn"; return; } else { if (!(GET_MOVE(ch) >= 5)) { send_to_char(ch, "You don't have enough movement points.rn"; } else { if (percent > prob) { send_to_char(ch, "You suck! You need more practice!!rn"; GET_MOVE(ch) = MAX(0, MIN(GET_MAX_MOVE(ch), GET_MOVE(ch) - 2)); } else { if (IS_SET(EXIT(ch, spy_type)->exit_info, EX_CLOSED) && EXIT(ch, spy_type)->keyword) { sprintf(buf, "The %s is closed.rn", fname(EXIT(ch, spy_type)->keyword)); send_to_char(buf, ch); GET_MOVE(ch) = MAX(0, MIN(GET_MAX_MOVE(ch), GET_MOVE(ch) - 2)); } else { GET_MOVE(ch) = MAX(0, MIN(GET_MAX_MOVE(ch), GET_MOVE(ch) - 5)); return_room = ch->in_room; char_from_room(ch); char_to_room(ch, world[return_room].dir_option[spy_type]->to_room); send_to_char(ch, "You spy into the next room and see: rnrn"; look_at_room(ch, 1); char_from_room(ch); char_to_room(ch, return_room); act("$n peeks into the next room.", TRUE, ch, 0, 0, TO_NOTVICT); } } } } }
.

can you tell me whats wrong ?
Last edit: 28 Apr 2013 18:15 by JTP.

Please Log in or Create an account to join the conversation.

More
26 Apr 2013 12:18 #2008 by rudeboyrave
Replied by rudeboyrave on topic Spy skill
Code:
send_to_char(ch, "Spy where?rn";

can you see the problem?

CyberASSAULT
www.cyberassault.org
cyberassault.org 11111
A post-apocalyptic, sci-fi MUD.

Please Log in or Create an account to join the conversation.

More
26 Apr 2013 13:49 #2010 by JTP
Replied by JTP on topic Spy skill
Somehow the \ got lost in thepaste, ofc it should be \r\n

But the code doesnt compile

Please Log in or Create an account to join the conversation.

More
26 Apr 2013 13:54 #2011 by thomas
Replied by thomas on topic Spy skill
Please post the errors you get when compiling, and note the line numbers that's giving the error in the code snippet in the first post.

Please Log in or Create an account to join the conversation.

More
26 Apr 2013 13:56 #2012 by thomas
Replied by thomas on topic Spy skill
oh, and please, please put [ code ] tags around your code when posting.

Please Log in or Create an account to join the conversation.

More
29 Apr 2013 20:48 #2024 by Papaya Pete
Replied by Papaya Pete on topic Spy skill
Decided to see if I could get this to work on a clean install. Besides what was already cited above, here is what I added into the code and the compiling error I got:
Code:
In Interpreter.c... { "socials" , "socials" , POS_DEAD , do_commands , 0, SCMD_SOCIALS }, { "split" , "split" , POS_SITTING , do_split , 1, 0 }, + { "spy" , "spy" , POS_STANDING, do_spy , 1, 0 }, // Added for Spy skill { "stand" , "st" , POS_RESTING , do_stand , 0, 0 }, { "stat" , "stat" , POS_DEAD , do_stat , LVL_IMMORT, 0 }, { "steal" , "ste" , POS_STANDING, do_steal , 0, 0 }, In Spells.h... #define SKILL_STEAL 139 /* Reserved Skill[] DO NOT CHANGE */ #define SKILL_TRACK 140 /* Reserved Skill[] DO NOT CHANGE */ + #define SKILL_SPY 141 In spell_parser.c... skillo(SKILL_TRACK, "track"); skillo(SKILL_WHIRLWIND, "whirlwind"); + skillo(SKILL_SPY, "spy"); In class.c... /* THIEVES */ spell_level(SKILL_SNEAK, CLASS_THIEF, 1); + spell_level(SKILL_SPY, CLASS_THIEF, 1); spell_level(SKILL_PICK_LOCK, CLASS_THIEF, 2); spell_level(SKILL_BACKSTAB, CLASS_THIEF, 3); spell_level(SKILL_STEAL, CLASS_THIEF, 4); And finally... the error that comes up: interpreter.c:304:44: error: ‘do_spy’ undeclared here (not in a function)

Anyways, hope this helps find the problem. It's probably something easy that's being overlooked. I'm trying to remember the one step I'm forgetting...

Please Log in or Create an account to join the conversation.

Time to create page: 0.276 seconds