Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
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
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
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
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, DotBot, Bing

Members: 0
Guests: 9
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » Weaponspells in afkmud
Forum Rules | Mark all | Recent Posts

Weaponspells in afkmud
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Mar 3, 2011, 6:01 am   Last edited Mar 3, 2011, 7:29 am by Sherm
Go to the top of the page
Go to the bottom of the page

Sherm
Fledgling
GroupMembers
Posts33
JoinedDec 20, 2010

So been trying to figure out how to add a weaponspell to an obj. I have tried oset sword affect weaponspell slow, then I get a message of Invalid spell: weaponspell slow, I tried the Sn number get the same thing, tried the slot number get the same result. Any clues as to what I am doing wrong.

Sherm
       
Post is unread #2 Mar 6, 2011, 3:56 am
Go to the top of the page
Go to the bottom of the page

6Dragons
Fledgling
GroupMembers
Posts48
JoinedNov 23, 2008

Sherminator,

afkmud is prob best to ask Samson. However, you can get an idea
from looking in the code for do_oset. It would not surprise me if
only certain affects can be used with weaponspell.

Vladaar
       
Post is unread #3 Mar 6, 2011, 10:30 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

In build.cpp around line 3434 find
      else if( loc == APPLY_WEAPONSPELL
               || loc == APPLY_WEARSPELL || loc == APPLY_REMOVESPELL || loc == APPLY_STRIPSN || loc == APPLY_RECURRINGSPELL || loc == APPLY_EAT_SPELL )
      {
         value = skill_lookup( arg3 );

         if( !IS_VALID_SN( value ) )
            ch->printf( "Invalid spell: %s", arg3.c_str(  ) );
         else
            found = true;
      }

change it to
      else if( loc == APPLY_WEAPONSPELL
               || loc == APPLY_WEARSPELL || loc == APPLY_REMOVESPELL || loc == APPLY_STRIPSN || loc == APPLY_RECURRINGSPELL || loc == APPLY_EAT_SPELL )
      {
         argument = one_argument( argument, arg3 );
         value = skill_lookup( arg3 );

         if( !IS_VALID_SN( value ) )
            ch->printf( "Invalid spell: %s", arg3.c_str(  ) );
         else
            found = true;
      }

It is just adding the argument = one_argument( argument, arg3 ); above the value = skill_lookup( arg3 ); That change seems to do the trick so you can set the weaponspells.
       
Post is unread #4 Mar 7, 2011, 8:20 am
Go to the top of the page
Go to the bottom of the page

Sherm
Fledgling
GroupMembers
Posts33
JoinedDec 20, 2010

Thanks Remcon.

I had tracked it down to that line of code.

Thanks for the information.
       
Post is unread #5 Mar 8, 2011, 5:26 am
Go to the top of the page
Go to the bottom of the page

Sherm
Fledgling
GroupMembers
Posts33
JoinedDec 20, 2010

Your fix worked great.


Thanks again.
       
Post is unread #6 Mar 15, 2011, 3:36 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Heh. Well that's a nifty little bug.
       
Pages:<< prev 1 next >>