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, Bing

Members: 0
Guests: 11
Stats
Files
Topics
Posts
Members
Newest Member
481
3,740
19,388
628
PabloL3189
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Smaug Snippets » archery.c
Forum Rules | Mark all | Recent Posts

archery.c
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Dec 6, 2003, 12:30 am   Last edited Nov 24, 2007, 3:06 pm by Samson
Go to the top of the page
Go to the bottom of the page

ithildin

GroupMembers
Posts9
JoinedDec 5, 2003

i imported the archery.c into smaug 1.4a. i came up with some errors.

archery.c(491) : error C2065: 'PROJ_STONE' : undeclared identifier
archery.c(661) : error C2065: 'gsn_archery' : undeclared identifier
archery.c(662) : error C2065: 'gsn_blowguns' : undeclared identifier
archery.c(663) : error C2065: 'gsn_slings' : undeclared identifier
archery.c(1191) : error C2065: 'PROJ_BOLT' : undeclared identifier
archery.c(1191) : error C2051: case expression not constant
archery.c(1192) : error C2065: 'PROJ_ARROW' : undeclared identifier
archery.c(1192) : error C2051: case expression not constant
archery.c(1193) : error C2065: 'PROJ_DART' : undeclared identifier
archery.c(1193) : error C2051: case expression not constant
archery.c(1194) : error C2051: case expression not constant
Error executing cl.exe.


how would i go about declaring those things?

thanks for help
       
Post is unread #2 Dec 6, 2003, 1:05 am   Last edited Nov 24, 2007, 3:07 pm by Samson
Go to the top of the page
Go to the bottom of the page

ithildin

GroupMembers
Posts9
JoinedDec 5, 2003

what i did was int PROJ_STONE etc and those worked. now all i have is

archery.c(1191) : error C2051: case expression not constant
archery.c(1192) : error C2051: case expression not constant
archery.c(1193) : error C2051: case expression not constant
archery.c(1194) : error C2051: case expression not constant


if( bow->value[5] != arrow->value[4] )
    {
	char *msg = "You have nothing to fire...\r\n";

      switch( bow->value[5] )
      {
        case PROJ_BOLT:  msg = "You have no bolts...\r\n";	break;
        case PROJ_ARROW: msg = "You have no arrows...\r\n";	break;
        case PROJ_DART:  msg = "You have no darts...\r\n";	break;
        case PROJ_STONE: msg = "You have no slingstones...\r\n";	break;
      }
	send_to_char( msg, ch );
	return;
    }


and that's the code part.

any suggestions?
       
Post is unread #3 Dec 6, 2003, 7:35 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

You failed to install the prerequisite code - weapon profficiency patch. That code is required before the archery.c file will work.
       
Post is unread #4 Dec 7, 2003, 9:39 pm
Go to the top of the page
Go to the bottom of the page

ithildin

GroupMembers
Posts9
JoinedDec 5, 2003

ok, i installed the weapon proficiency code. and i made sure everything compiled cleanly. now though. when i fire an arrow, it hits the player, but doesn't lodge or anything. the arrow just disappears. any help?

thanks so much for responding Samson

i made sure i did this on the archery help file


5. Open skills.c

Find all of the following functions and comment them out:

do_fire, ranged_attack, ranged_got_target, scan_for_victim, find_projectile, and mob_fire

Replacements for these functions are in archery.c

6. Open fight.c

Find projectile_hit and comment it out.

A replacement for this function is in archery.c


any ideas?
       
Post is unread #5 Dec 7, 2003, 10:00 pm
Go to the top of the page
Go to the bottom of the page

ithildin

GroupMembers
Posts9
JoinedDec 5, 2003

i'm also getting this when firing:

Log: [*****] BUG: Dam_message: bad dt 1014 from Ithildin in 200.

don't know what that's about.
       
Post is unread #6 Dec 8, 2003, 3:23 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Lodging is semi-random as I recall. I'd have to go digging again, but I seem to recall it does work. There was a bugfix awhile back that I thought was added.

As for the DT message, you will most likely need to verify that it has a valid damage type on it. Keep in mind, you've altered the use of some of the object values so you may have issues with weapon and projectile items.
       
Post is unread #7 Dec 8, 2003, 9:36 pm
Go to the top of the page
Go to the bottom of the page

ithildin

GroupMembers
Posts9
JoinedDec 5, 2003

is there a way to make it lodge every time? or at least alot more. i shot around 100 arrows and it never lodged once. i want to lower the damage done when dislodged, but i want it to lodge a bigger percentage. anything i should look for to raise this %? is my code not working properly?


also, it's says to put the new help weapontypes in help.are . this shows that the weapontype is now v4 instead of v3 the original itemvalue, would that have something to do with my bug dt messages?
       
Post is unread #8 Apr 9, 2004, 12:26 am
Go to the top of the page
Go to the bottom of the page

ithildin

GroupMembers
Posts9
JoinedDec 5, 2003

ok, i was running that on stock windows smaug1.4a. i switched to smaugfuss with cygwin. i installed both codes, weapons and archery. i still shot about 300 arrows and it didn't lodge once. i followed everything and first time i compiled no errors. i'm not sure what's goin on here.
       
Pages:<< prev 1 next >>