The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Casting without spellbook
Author Message
Gil Amarth
Journeyman
*

Posts: 189
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: May 2012
Reputation: 0



Post: #1
Casting without spellbook
I´m trying to allow some spells to mages that they can memorize and cast without a spellbook.

My problem is when I try to use: .cast s_magic_arrow
I receive a message that I don´t have a spellbook, there is some way to skip this requisite?
Some command that allow me launch spells without any checks?
(This post was last modified: 03-16-2013 03:11 AM by Gil Amarth.)
03-16-2013 03:11 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: Casting without spellbook
@select or @spellselect
return 6 Allows the spell to be cast without checking mana, spellbook, and reagent(s).
03-16-2013 03:24 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #3
RE: Casting without spellbook
One solution is to write your own function, and in that function you can use SPELLEFFECT to cause the result... of course this bypasses all the tests entirely, as well as the spell gain.
03-16-2013 03:42 AM
Find all posts by this user Like Post Quote this message in a reply
Gil Amarth
Journeyman
*

Posts: 189
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: May 2012
Reputation: 0



Post: #4
RE: Casting without spellbook
(03-16-2013 03:24 AM)darksun84 Wrote:  @select or @spellselect
return 6 Allows the spell to be cast without checking mana, spellbook, and reagent(s).

Good idea, I have tried that. Unfortunately later there is another hardcoded spellbook check at @SPELLSUCCESS, and there is no way to bypass it.

I would write my own function, but how can I try to start the casting process?
TRIGGER @SPELLCAST don´t do anything, and TRIGGER @SPELLEFFECT is only useful for a few manually scripted spells, not a dozen. Sad
03-16-2013 05:01 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #5
RE: Casting without spellbook
reagents are disabled by default, you have to enable them in the sphere.ini

// Magic requires reagents
ReagentsRequired=0
03-16-2013 06:11 AM
Find all posts by this user Like Post Quote this message in a reply
Gil Amarth
Journeyman
*

Posts: 189
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: May 2012
Reputation: 0



Post: #6
RE: Casting without spellbook
Yes, yes, I deleted the post because I noticed it. Tongue
03-16-2013 06:13 AM
Find all posts by this user Like Post Quote this message in a reply
Gil Amarth
Journeyman
*

Posts: 189
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: May 2012
Reputation: 0



Post: #7
RE: Casting without spellbook
Finally I found a solution with a invisible spellbook.

I set morez=800, and I add spells to it with "addspell 801", with my customs spells (801 or above).
Internally the server thinks the player has a spellbook with the correct spells, so i can use .cast normally.

Maybe we could start a contest of the most bizarre script created, some workarounds are pretty rare. Big Grin
(This post was last modified: 03-16-2013 07:32 AM by Gil Amarth.)
03-16-2013 07:17 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #8
RE: Casting without spellbook
Ahhh now that you meantion it I do remember trying something similar... I was trying to make it so a player could use both Magery and Necromancy spellicons without pickup+drop or dclicking the necessary spellbook whenever they wanted to switch to another casting skill.
03-16-2013 11:50 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)