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
Summon in houses.
Author Message
Lethal
Apprentice
*

Posts: 11
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 0

Inception

Post: #1
Summon in houses.
Hi!

I have the following problem: my idea is that summoning char would not be posible inside houses. A temporary solution:

Code:
[regiontype r_house_system]
on=@enter
if!(<src.isplayer>)                                        
if (<src.flags>&statf_conjured)
src.kill
return 1
endif
endif

that works fine but not in all regions, (for example in Northern Minoc, where the mines are located) is that you apply the restriction that should only work inside the houses, but in some places the restriction affects the whole region and not only the interior of the houses. The strange thing is that the flags of these regions are identical to the others where this problem does not occur. Any idea?

Sorry for my bad english Tongue

[Image: thump_8006584razor.jpg]
06-30-2014 08:31 AM
Find all posts by this user Like Post Quote this message in a reply
Skul
Master
**

Posts: 413
Likes Given: 0
Likes Received: 19 in 15 posts
Joined: Jun 2012
Reputation: 9



Post: #2
RE: Summon in houses.
You need to check if the region is a multi, try this:
Code:
[regiontype r_house_system]
on=@enter
if (<uid.<src.region.uid>.type>==t_multi) || (<uid.<src.region.uid>.type>==t_multi_custom) //is a multi?
  if!(<src.isplayer>)                                        
    if (<src.flags>&statf_conjured)
      src.kill
      return 1
    endif
  endif
endif

"I ask a question to the answer I already know."

Marchadium :: http://www.marchadium.ca/ :: Join us!
06-30-2014 01:32 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Lethal
Apprentice
*

Posts: 11
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 0

Inception

Post: #3
RE: Summon in houses.
It works fine, thx!

[Image: thump_8006584razor.jpg]
07-01-2014 02:30 AM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #4
RE: Summon in houses.
try using this
Code:
[FUNCTION CheckSummonHouse]
IF (<SERV.MAP(<ARGS>).REGION.TYPE> != 0)
  SYSMESSAGE You cant summon creatures inside houses.
  return 1
ENDIF
return 0

just add this function somewhere and use this @Start check on all summon spells:
Code:
[SPELL xxx]
...

ON=@Start
return <CheckSummonHouse <TARGP>>

PS:I dont tested this code but maybe it works
07-01-2014 02:42 AM
Find all posts by this user Like Post Quote this message in a reply
Lethal
Apprentice
*

Posts: 11
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 0

Inception

Post: #5
RE: Summon in houses.
@Skul

It works perfectly but only in the region of Minoc Tongue, where i had the problem before.

@Coruja

Thx!, error occurs:

Code:
16:01:ERROR:(SistemaCasas.scp,102)Can't resolve <SERV.MAP(1400>

try but it works in any region of the map, inside or outside the houses.

Code:
[FUNCTION CheckSummonHouse]
if (<serv.map(<src.targp.x>,<src.targp.y>,<src.targp.z>,<src.targp.m>).type>!= 0)
  SYSMESSAGE You cant summon creatures inside houses.
  return 1
ENDIF
return 0

[Image: thump_8006584razor.jpg]
07-02-2014 05:38 AM
Find all posts by this user Like Post Quote this message in a reply
Skul
Master
**

Posts: 413
Likes Given: 0
Likes Received: 19 in 15 posts
Joined: Jun 2012
Reputation: 9



Post: #6
RE: Summon in houses.
Try catching the summon on spellselect:
Code:
on=@spellselect
if (<dargn3>==3)
  if (<uid.<targp.region.uid>.type>==t_multi) || (<uid.<targp.region.uid>.type>==t_multi_custom)
    sysmessage You can not summon a creature here.
    action=-1
    return 1
  endif
endif

"I ask a question to the answer I already know."

Marchadium :: http://www.marchadium.ca/ :: Join us!
07-02-2014 07:03 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Lethal
Apprentice
*

Posts: 11
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2012
Reputation: 0

Inception

Post: #7
RE: Summon in houses.
Works! thx Skull & Coruja!

[Image: thump_8006584razor.jpg]
07-07-2014 03:07 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)