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
Walls on Dungeon Entrances.
Author Message
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #1
Walls on Dungeon Entrances.
Hi!

There's a way to block the access to the dungeon when the wall it's blocked?
Because when you cast a wall of stone inside the dungeon door, the others can get in but can't go back Shock

Tongue Thanks and sry for my english ^_^


Lazarus.

[Image: 2hy9q0y.png]
12-03-2012 11:55 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
ChaveS
Journeyman
*

Posts: 69
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2012
Reputation: 0



Post: #2
RE: Walls on Dungeon Entrances.
Put a item which removes the wall when you cast above it(disable wall of dungeon tiles)
Code:
[ITEMDEF i_remove_field]
ID=0495
name=No Fields

on=@create
attr=090

ON=@SPELLEFFECT
IF (<ARGN>==24) || (<ARGN>==47) || (<ARGN>==50) || (<ARGN>==28)
SERV.NEWITEM i_removefield
NEW.P <p>
NEW.TAG.WALL <UID>
NEW.TIMER 0
RETURN 1
endif

[ITEMDEF i_removefield]
ID=i_gold
NAME=Tira field
LAYER=layer_special
WEIGHT=00

ON=@CREATE
ATTR=attr_newbie|attr_invis

ON=@TIMER
TIMER=1
TRY UID.<TAG.WALL>.REMOVEFIELD
REMOVE
RETURN 1

[FUNCTION REMOVEFIELD]
FORITEMS 4
IF (<TYPE> == T_SPELL )
REMOVE
ENDIF
ENDFOR

or you can test it:

Code:
[typedef t_dungeon_tile]
on=@step
if <destine_blocktest>
src.sysmessage @,,1 The other side is blocked
return 1
endif

[function destine_blocktest] //to test where it is
if !<args>
serv.newitem i_gold
new.attr 090
new.p <morep>
new.destine_blocktest 1
else
timerf,0 remove
FORITEMS 0
IF (<baseid> == i_wall_of_stone_8 )
return 1
ENDIF
ENDFOR
endif

then
.add i_floor_marble
.xattr 090 (make it invis)
.xmorep xxxx,yyyy,z (the exactly place the dungeon tile send you)
.xtype t_dungeon_tile
12-04-2012 03:13 AM
Find all posts by this user Like Post Quote this message in a reply
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #3
RE: Walls on Dungeon Entrances.
Thanks! I just tryied the first and change the FORITEMS 4 to 0 for the exact position ^_^

again, thanks Smile

There's a way to block the entrance when there's a wall?

[Image: 2hy9q0y.png]
(This post was last modified: 12-04-2012 10:36 AM by Lazarus.)
12-04-2012 09:24 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
ChaveS
Journeyman
*

Posts: 69
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2012
Reputation: 0



Post: #4
RE: Walls on Dungeon Entrances.
try it:


[typedef t_dungeon_tile]
on=@step
if <destine_blocktest>
src.sysmessage @,,1 The other side is blocked
src.go <morep>
return 1
endif

[function destine_blocktest] //to test where it is
if !<args>
serv.newitem i_gold
new.attr 090
new.p <morep>
new.destine_blocktest 1
else
timerf,0 remove
FORITEMS 0
IF (<baseid> == i_wall_of_stone_8 )
return 1
ENDIF
ENDFOR
endif
12-04-2012 11:39 AM
Find all posts by this user Like Post Quote this message in a reply
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #5
RE: Walls on Dungeon Entrances.
(12-04-2012 11:39 AM)ChaveS Wrote:  try it:


[typedef t_dungeon_tile]
on=@step
if <destine_blocktest>
src.sysmessage @,,1 The other side is blocked
src.go <morep>
return 1
endif

[function destine_blocktest] //to test where it is
if !<args>
serv.newitem i_gold
new.attr 090
new.p <morep>
new.destine_blocktest 1
else
timerf,0 remove
FORITEMS 0
IF (<baseid> == i_wall_of_stone_8 )
return 1
ENDIF
ENDFOR
endif

Not working. Everytime [with a wall of stone or without] the IF on the function gets in first and never else.
The function never get's the 1 on new.destine_blocktest 1
If I use return 1 works the return 1 Shock but... the morep don't get's save or something else that not let me works fine.

So, i have a question, why is there that else?

else
timerf,0 remove
FORITEMS 0
IF (<baseid> == i_wall_of_stone_8 )
return 1
ENDIF
ENDFOR

Thanks for all the help ^_^ really Tongue

Lazarus.

[Image: 2hy9q0y.png]
12-04-2012 05:17 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
ChaveS
Journeyman
*

Posts: 69
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2012
Reputation: 0



Post: #6
RE: Walls on Dungeon Entrances.
it is removing the gold used to check if there is a wall on that place
and checking if there is a wall on that place


my bad, try
Code:
[typedef t_dungeon_tile]
on=@step
if <destine_blocktest>
src.sysmessage @,,1 The other side is blocked
move <dtag.moveback>
return 1
endif

[function destine_blocktest2] //to test where it is
if !<args>
serv.newitem i_gold
new.attr 090
new.p <morep>
new.destine_blocktest2
return <new.destine_blocktest2>

[function destine_blocktest2]
timerf,0 remove
FORITEMS 0
IF (<baseid> == i_wall_of_stone_8 )
return 1
ENDIF
ENDFOR
endif

Then set
.xtag.moveback 2,0 (move 2 tiles right)
.xtag.moveback -2,0 (move left)
.xtag.moveback 0,2 (move top)
.xtag.moveback 0,2 (move bot)

and .xmorep XXXX,YYYY where XXXX,YYYY is the place where this dungeon tile is sending to...

You can use tilef to make this function better:
http://forum.spherecommunity.net/Thread-...-of-a-item

somthing like
IF (<serv.itemdef.<baseid>.tilef> & tilef_impassable) || ... tilef_wall || etc
return 1
ENDIF
(This post was last modified: 12-05-2012 03:46 AM by ChaveS.)
12-05-2012 03:22 AM
Find all posts by this user Like Post Quote this message in a reply
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #7
RE: Walls on Dungeon Entrances.
(12-05-2012 03:22 AM)ChaveS Wrote:  adsad


Nope, not working but there's something bad I guess
The first function it's called like the second one. And no one of that has changed. And there's a endif on the sky Tongue I had tryied with "changes" but don't works too.
The scripts is this:

[typedef t_dungeon_tile]
on=@step
if <destine_blocktest>
src.sysmessage @,,1 The other side is blocked
move <dtag.moveback>
return 1
endif

[function destine_blocktest] //to test where it is
if !<args>
serv.newitem i_gold
new.attr 090
new.p <morep>
new.destine_blocktest2
return <new.destine_blocktest2>
endif

[function destine_blocktest2]
timerf,0 remove
FORITEMS 0
IF (<baseid> == i_wall_of_stone_8 )
return 1
ENDIF
ENDFOR
// here was a endif


Shock

[Image: 2hy9q0y.png]
(This post was last modified: 12-05-2012 03:49 AM by Lazarus.)
12-05-2012 03:48 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #8
RE: Walls on Dungeon Entrances.
You do realise that movement in and out of the dungeon is controlled by teleports right?
It is as simple as writing a function to override/replace the existing teleports to add arguments to them so they behave as you wish...

[Image: 2nis46r.jpg]
12-05-2012 04:04 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #9
RE: Walls on Dungeon Entrances.
(12-05-2012 04:04 AM)Mordaunt Wrote:  You do realise that movement in and out of the dungeon is controlled by teleports right?
It is as simple as writing a function to override/replace the existing teleports to add arguments to them so they behave as you wish...

I don't know were are the existing teleports and! I don't know that argument's if there it's blocked the entrance with a wall ^_^ becuse that I m here asking for it Sad

This is a solution, but your solution it's better, but, I don't know how to do Sad haha

Lazarus.

[Image: 2hy9q0y.png]
(This post was last modified: 12-05-2012 08:59 AM by Lazarus.)
12-05-2012 08:54 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #10
RE: Walls on Dungeon Entrances.
They exist in sphere_map_points0.scp under [teleports]
I'd just override them with my own teleport

Code:
ON=@Step
If <whatever>
  return 1
else
  src.move <coords>
endif

[Image: 2nis46r.jpg]
12-05-2012 09:26 AM
Visit this user's website 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)