Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
typedefs and ghosts @dclick
Author Message
Reflex
Journeyman
*

Posts: 130
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Apr 2012
Reputation: 1



Post: #1
typedefs and ghosts @dclick
I'm trying to work on a script for ghosts to res via an ankh or healer through a dialog. I've gotten the dialog done and tried attaching it simply to an ankh to test but ghosts get "hand passes through this object" What properties am I missing for a ghost to be able to dclick the item ?

[ITEMDEF i_ankh_res]
id=02
on=@dclick
src.dialog d_res_gump

^the quick version^

Also how do you go about creating a unique typedef for example I would want to create the following so I can just set the type to any future items I want to call the dialog ?

[typedef t_res_dialog]
on=@dclick
src.dialog d_res_gump
04-16-2012 05:33 PM
Find all posts by this user Like Post Quote this message in a reply
admin phoenix
Master
**

Posts: 354
Likes Given: 1
Likes Received: 23 in 13 posts
Joined: Mar 2012
Reputation: 3



Post: #2
RE: typedefs and ghosts @dclick
try this one
ON=@STEP
if <timer> < 0
src.dialog xxxxxx
timer=10
endif
04-16-2012 05:58 PM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

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



Post: #3
RE: typedefs and ghosts @dclick
i think you should override the typedef t_shrine

[typedef t_shrine]
src.dialog d_res_gump
return 1

then you put the typedef t_shrine in your item Big Grin
04-16-2012 06:41 PM
Find all posts by this user Like Post Quote this message in a reply
admin phoenix
Master
**

Posts: 354
Likes Given: 1
Likes Received: 23 in 13 posts
Joined: Mar 2012
Reputation: 3



Post: #4
RE: typedefs and ghosts @dclick
and how will it be activated?
you have no trigger inside your typedef Wink
04-16-2012 07:39 PM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

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



Post: #5
RE: typedefs and ghosts @dclick
ops , with ON=@Dclick Big Grin
04-16-2012 07:39 PM
Find all posts by this user Like Post Quote this message in a reply
Reflex
Journeyman
*

Posts: 130
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Apr 2012
Reputation: 1



Post: #6
RE: typedefs and ghosts @dclick
where are the typedefs currently held? I couldn't find anything more than the following:

spheredefs.scp
[TYPEDEFS]
t_normal 0
t_container 1 // any unlocked container or corpse. ccontainer based
t_container_locked 2
t_door 3 // 3 = door can be opened

OR

sphere_types.scp
[TYPEDEF t_water]
TERRAIN = 0a8 0ab
TERRAIN = 0136 0137

So I assume by default the types are "hardcoded" in until modified ? I dont want to modify the default t_shrine in-case I actually need the default t_shrine seeing how it has more functions than just resurrect.
04-17-2012 01:25 AM
Find all posts by this user Like Post Quote this message in a reply
Shaklaban
Master
**

Posts: 378
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 8

DOT

Post: #7
RE: typedefs and ghosts @dclick
then just give a tag or check the item baseid id on=@dclick for example:
Code:
[typedef t_shrine]
on=@dclick
if (<tag0.shrine_override>)
    dialog d_blabla
    return 1
endif
(This post was last modified: 04-17-2012 02:48 AM by Shaklaban.)
04-17-2012 02:48 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

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



Post: #8
RE: typedefs and ghosts @dclick
all the typedefs are found in spheredefs.scp

t_shrine 38 // = can res you
04-17-2012 02:49 AM
Find all posts by this user Like Post Quote this message in a reply
Reflex
Journeyman
*

Posts: 130
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Apr 2012
Reputation: 1



Post: #9
RE: typedefs and ghosts @dclick
(04-17-2012 02:48 AM)Shaklaban Wrote:  then just give a tag or check the item baseid id on=@dclick for example:
Code:
[typedef t_shrine]
on=@dclick
if (<tag0.shrine_override>)
    dialog d_blabla
    return 1
endif

Can you please explain if (<tag0.shrine_override>) i think i understand what it does but not sure how it works ?
04-17-2012 01:20 PM
Find all posts by this user Like Post Quote this message in a reply
Reflex
Journeyman
*

Posts: 130
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Apr 2012
Reputation: 1



Post: #10
RE: typedefs and ghosts @dclick
Ok I cant figure this out at all here is what I'm trying to do... Create a Dialog that is compatible for NPC's and Ankh's that allows someone to res as long as they are within line of sight and dead via the dialog.. also have there be a timer so people cant instantly ress.. say 10 seconds or whatever.. If anyone replies please if you can take time to explain the script and how it works..

Item

Code:
[ITEMDEF 02]
DEFNAME=i_ankh
RESOURCES=100 i_rock_plain
CATEGORY=Decoration - Miscellaneous
SUBSECTION=Statues
DESCRIPTION=Ankh (w) 1/2
DUPELIST=03,04,05

Modifying sphere_override_shrine.scp

[TYPEDEF T_SHRINE]
on=@dclick
statements and or handle it all through the dialog
use this dialog

[DIALOG d_RESURRECT_CONFIRM]
280,190
SRC.CLOSEALLDIALOGS
PAGE 0
gumppictiled 65 33 320 44 201
gumppic 22 33 206
gumppic 380 33 207
gumppictiled 22 77 44 280 202
gumppictiled 380 77 44 280 203
gumppictiled 65 355 320 44 233
gumppic 380 355 205
gumppic 22 355 204
gumppictiled 66 77 320 300 200

xmfhtmlgump 180 60 70 25 1015222 0 0


IF (<UID.<CTAG0.RESSER>.NPC> == brain_healer)
xmfhtmlgump 75 100 290 150 1011025 1 1
ELSE
xmfhtmlgump 75 100 290 150 1011026 1 1
ENDIF

button 90 285 4005 4006 1 0 1
xmfhtmlgump 125 288 70 25 1011011 0 0

button 230 285 4005 4006 1 0 0
xmfhtmlgump 265 288 70 25 1011012 0 0

[DIALOG d_RESURRECT_CONFIRM BUTTON]
ON=1
IF (!(<CANSEELOS <CTAG0.RESSER>>))
MESSAGE @,,2 502390
ELIF (<UID.<CTAG0.RESSER>.FLAGS>&statf_dead)
MESSAGE @,,2 501040
ELSE
REF1=<REGION.UID>
    IF (<REF1.BASEID> == i_champion_spawn)
    LOCAL.OLDP=<P>
    P=1,1
    SPELLEFFECT s_resurrection,1000,<CTAG0.RESSER>
    P=<LOCAL.OLDP>
    UPDATEX
    ELSE
    SPELLEFFECT s_resurrection,1000,<CTAG0.RESSER>
    ENDIF
ENDIF
CTAG.RESSER

ON=0
TRYSRC <CTAG0.RESSER> SRC.MESSAGE @,,2 503256
CTAG.RESSER
(This post was last modified: 04-17-2012 03:25 PM by Reflex.)
04-17-2012 03:23 PM
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)