Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, Yahoo!

Members: 0
Guests: 7
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » Problems with Archery?
Forum Rules | Mark all | Recent Posts

Problems with Archery?
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Nov 26, 2006, 5:50 am
Go to the top of the page
Go to the bottom of the page

pstone

GroupMembers
Posts32
JoinedNov 26, 2006

In attempting to test out, play with, and use the archery part of AFKmud I have run into a problem.

Created a missleweapon, a projectile...matched their values..

|Name : Long Bow
|Short : a newly created Long Bow
|Long : Some god dropped a newly created Long Bow here.
|Area : Land of Eternity
|Vnum : 1003 |Type : missileweapon |Count : 001 |Gcount: 001
|Number : 01/01 |Weight: 0001/0001 |Wear_loc : -01 |Layers: 0
|Cost : 0 |Rent* : -2 |Rent : 0 |Timer : 0 |Ego : 0
|In room: 0 |In obj: (NONE) |Level : 1 |Limit: 9999
|On map : (NONE)
|Object Coords: -1 -1
|Wear flags : take missile
|Extra flags :
|Carried by : Pyter
|Prizeowner : (NONE)
|Seller : (NONE)
|Buyer : (NONE)
|Current bid : 0
|Scheduled donation date: (NONE)
|Index Values : 12 0 0 0 6 1 12 0 0 0 0
|Object Values: 12 2 6 0 6 1 12 0 0 0 0
|Objprogs : None

Additional Object information:
Value[0] - Base Condition: 12
Value[1] - Min. Damage: 2
Value[2] - Max Damage: 6
Average Hit: 4
Value[4] - Skill Required (6): Archery
Value[5] - Projectile Fired (1): Arrow
Projectile fired must match on the projectiles this weapon fires.
Value[6] - Current Condition: 12
Condition: [In Perfect Condition]
Value[7] - Available sockets: 0
Socket 1: None
Socket 2: None
Socket 3: None
The following 3 settings only apply to automatically generated weapons.
Value[8] - Weapon Type (0): Not Defined
Value[9] - Weapon Material (0): Not Defined
Value[10] - Weapon Quality (0): Not Defined



|Name : arrow
|Short : a newly created arrow
|Long : Some god dropped a newly created arrow here.
|Area : Land of Eternity
|Vnum : 1004 |Type : projectile |Count : 001 |Gcount: 001
|Number : 01/01 |Weight: 0001/0001 |Wear_loc : -01 |Layers: 0
|Cost : 0 |Rent* : -2 |Rent : 25000 |Timer : 0 |Ego : 25
|In room: 0 |In obj: (NONE) |Level : 1 |Limit: 9999
|On map : (NONE)
|Object Coords: -1 -1
|Wear flags : take
|Extra flags :
|Carried by : Pyter
|Prizeowner : (NONE)
|Seller : (NONE)
|Buyer : (NONE)
|Current bid : 0
|Scheduled donation date: (NONE)
|Index Values : 12 10 100 0 1 12 0 0 0 0 0
|Object Values: 12 10 1000 0 1 12 0 0 0 0 0
|Objprogs : None

Additional Object information:
Value[0] - Condition: 12
Value[1] - Min. Damage: 10
Value[2] - Max Damage: 1000
Value[3] - Damage Type (0): hit
Value[4] - Projectile Type (1): Arrow
Projectile type must match on the missileweapon which fires it.
Value[5] - Current Condition: 12
Condition: [In Perfect Condition]


I can wield the bow:

You wield a newly created Long Bow.


draw arrow
You aren't wearing a quiver where you can get to it!


So I created a quiver:


|Name : quiver
|Short : a newly created quiver
|Long : Some god dropped a newly created quiver here.
|Area : Land of Eternity
|Vnum : 1005 |Type : quiver |Count : 001 |Gcount: 001
|Number : 01/01 |Weight: 0001/0001 |Wear_loc : -01 |Layers: 0
|Cost : 0 |Rent* : -2 |Rent : 0 |Timer : 0 |Ego : 0
|In room: 0 |In obj: (NONE) |Level : 124 |Limit: 9999
|On map : (NONE)
|Object Coords: -1 -1
|Wear flags : back
|Extra flags :
|Carried by : Pyter
|Prizeowner : (NONE)
|Seller : (NONE)
|Buyer : (NONE)
|Current bid : 0
|Scheduled donation date: (NONE)
|Index Values : 10 0 0 0 0 0 0 0 0 0 0
|Object Values: 10 0 0 0 0 0 0 0 0 0 0
|Objprogs : None


put arrow quiver
You put a newly created arrow in a newly created quiver.

draw arrow
You draw a newly created arrow from a newly created quiver.
You can't wear, wield, or hold that.

So thinking that I need to give it a different flag..I made it
Wear flags : take wield hold

Put the arrow back in the quiver and draw...and BOOM! mud goes CRASH


I have tried a few different things...but was following the help missiles file on the mud.

When the missile flag is set on the bow, it wields into the missile wielded slot, is it then trying to load the arrow in the same place?

If I remove the missile flag from the bow, it wields into the wielded slot, but then I get this message when I try to draw the arrow.


You are not wielding a missile weapon!

HELP MISSILE: says,
Example: To use a bow and arrow, one must have a bow missile wielded and
have an arrow in inventory.

When I wield the bow in the missile wielded slot, and simply try to fire mud crashes also.

Help would be much appreciated.

thanks.
       
Post is unread #2 Nov 26, 2006, 6:01 am
Go to the top of the page
Go to the bottom of the page

pstone

GroupMembers
Posts32
JoinedNov 26, 2006

Maybe I should add:


|Name : arrow
|Short : a newly created arrow
|Long : Some god dropped a newly created arrow here.
|Area : Land of Eternity
|Vnum : 1004 |Type : projectile |Count : 001 |Gcount: 001
|Number : 01/01 |Weight: 0001/0001 |Wear_loc : -01 |Layers: 0
|Cost : 0 |Rent* : -2 |Rent : 25000 |Timer : 0 |Ego : 25
|In room: 0 |In obj: (NONE) |Level : 1 |Limit: 9999
|On map : (NONE)
|Object Coords: -1 -1
|Wear flags : take hold


Simply trying to HOLD ARROW results in a CRASH as well.

Thanks.
       
Post is unread #3 Nov 26, 2006, 11:34 am
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

For the crashes you're getting, could you post a backtrace from gdb?
       
Post is unread #4 Nov 26, 2006, 12:00 pm
Go to the top of the page
Go to the bottom of the page

pstone

GroupMembers
Posts32
JoinedNov 26, 2006

Ah, I sure wish I could do that....however the skill to do such elude me.

How difficult?...
Running it from cygwin....so I do the nohup ./startup &

and then I can hit gdb and am totally lost after that..

If not to hard, help would be much appreciated.
       
Post is unread #5 Nov 26, 2006, 12:01 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

       
Post is unread #6 Nov 26, 2006, 12:03 pm
Go to the top of the page
Go to the bottom of the page

pstone

GroupMembers
Posts32
JoinedNov 26, 2006

Actually....

Reading symbols from /c/pete/afkmud177/afkmud/src/afkmud.exe...done.
(gdb)

Yes, I admit I am a total novice.
       
Post is unread #7 Nov 26, 2006, 12:08 pm
Go to the top of the page
Go to the bottom of the page

pstone

GroupMembers
Posts32
JoinedNov 26, 2006

(gdb) 12[main] afkmud 616_cygtls::handle_exceptions: error while dumping stat (probably corrupted stack)

Anyway...I am sure I am a long way off from what you are looking for, but I will read that link and see what I can come up with.

Thanks.

Pstone
       
Post is unread #8 Nov 27, 2006, 7:41 am
Go to the top of the page
Go to the bottom of the page

ToadVile

GroupMembers
Posts47
JoinedApr 1, 2006

Well, i did exactly what you did, it worked fine. Only one thing i did different, that you forgot to do :P

When you do the arrow, make it so you can hold it.. That might be a problem, also make sure the Projectile fired matches the projectiles this weapon fires.

That could be another cause. Which, if it is. there should be a safety protection in stuff like that :R

Peace out.
       
Post is unread #9 Nov 27, 2006, 7:59 am   Last edited Nov 25, 2007, 5:36 pm by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

       
Post is unread #10 Nov 27, 2006, 11:04 am
Go to the top of the page
Go to the bottom of the page

pstone

GroupMembers
Posts32
JoinedNov 26, 2006

First, thanks again for all the help...slow in the learning I suppose at first is normal.

I did make the arrow take hold...and still crashes on me...

So I changed that bit of code Samson, and that stops the mud from crashing out right when I hold the arrow. Getting somewhere.

Course now I can hold the arrow, missile wielded the bow, and I get this.

scan
A rich man : immediately to the west

fire w rich
You can't do that!

but just:
fire w

You fire a newly created arrow west.
Your newly created arrow falls harmlessly to the ground to the west.


I do sometimes actually hit him, just can't seem to specify a target.

I did look in archery.c to see where that message might be comming from, but only found it in

if( !CAN_PKILL( vch ) || !CAN_PKILL( ch ) )
      {
         send_to_char( "You can't do that!\n\r", ch );
         return rNONE;


but again if I just fire dir, with no target...it fires


thanks again...

       
Post is unread #11 Nov 27, 2006, 4:39 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Are you sure the man can be attacked?
       
Post is unread #12 Nov 27, 2006, 4:46 pm
Go to the top of the page
Go to the bottom of the page

pstone

GroupMembers
Posts32
JoinedNov 26, 2006

I suppose I deserve that kind of question given my clueless status. But yes, he can be hit.

fire w rich
You can't do that!

fire w
You fire An Arrow west.
Your Arrow falls harmlessly to the ground to the west.

fire w
You fire An Arrow west.
Your pierce *** ANNIHILATES *** A rich man!
You receive 0 experience points.

As you can see, I can fire blindly west, and it will hit him sometimes, but won't accept the <target> without giving me the You can't do that!

       
Post is unread #13 Nov 27, 2006, 5:13 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

I have the archery snippet installed on my MUD and it works fine.
fire s mob

You fire a dark, flaming arrow south.
You DESTROY a test mob! You do 936 points of damage.
       
Post is unread #14 Nov 27, 2006, 6:27 pm
Go to the top of the page
Go to the bottom of the page

pstone

GroupMembers
Posts32
JoinedNov 26, 2006

Yeah, I got it to work but only by commenting out.

   /*if( vch )
   {
      if( !CAN_PKILL( vch ) || !CAN_PKILL( ch ) )
      {
         send_to_char( "You can't do that!\n\r", ch );
         return rNONE;
      }
      if( vch && is_safe( ch, vch ) )
         return rNONE;
   }*/


Now clearly it is still beyond me why commenting this out makes it work...but when I do

fire e rich
You fire An Arrow east.
Your pierce *** ANNIHILATES *** A rich man!
You receive 0 experience points.

thanks for the help again.
       
Post is unread #15 Nov 27, 2006, 6:29 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Perhaps one or both of you are not PK?
       
Post is unread #16 Nov 27, 2006, 6:30 pm
Go to the top of the page
Go to the bottom of the page

pstone

GroupMembers
Posts32
JoinedNov 26, 2006

Is it because the mob is not flagged CAN_PKILL?
does that even make sense?

:redface:
       
Post is unread #17 Nov 27, 2006, 6:30 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

It makes me wonder if that line should check to make sure both are players...
       
Post is unread #18 Nov 27, 2006, 6:30 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

It prolly is because of that, and no, not really.
       
Post is unread #19 Nov 27, 2006, 6:36 pm
Go to the top of the page
Go to the bottom of the page

pstone

GroupMembers
Posts32
JoinedNov 26, 2006

amazing part for me is I am happy I got this far.
       
Pages:<< prev 1 next >>