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
Criminal to the thrower.
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
Criminal to the thrower.
When I create a item with a target_ground target; Like an trap of explotion, that works on=@step; How can I do CRIMINAL to the thrower of the potion to the ground when someone with +karma and non pk get the explosion?


Thanks!

[Image: 2hy9q0y.png]
09-27-2012 03:50 AM
Visit this user's website 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: Criminal to the thrower.
store the uid of the 'tosser' somehow, either by linking the explosion (if it's not already linked) and use 'damage' to trigger the default behaviour of the criminal system:
Code:
on=@step
src.damage <damage> 01 <link.uid> //assuming link if the uid of the 'tosser'

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

Marchadium :: http://www.marchadium.ca/ :: Join us!
09-27-2012 04:13 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: #3
RE: Criminal to the thrower.
(09-27-2012 04:13 AM)Skul Wrote:  store the uid of the 'tosser' somehow, either by linking the explosion (if it's not already linked) and use 'damage' to trigger the default behaviour of the criminal system:
Code:
on=@step
src.damage <damage> 01 <link.uid> //assuming link if the uid of the 'tosser'

I didn't get it Sad
This is a example of the script
Mbe should this help more

Code:
[ITEMDEF i_trampa_prueba] ....
ON=@DClick
if (<src.tag.trampasprueba> == 00)
TARGETG src.sysmessage @055 Donde quieres poner la trampa?
else
src.sysmessage @055 Ya pusiste este tipo de trampa
endif
RETURN 1

ON=@TargOn_Ground
IF !<SRC.CANSEELOS <SRC.TARGP>>
SRC.SYSMESSAGE El objetivo no esta a la vista.
ELSE
SERV.NEWITEM=i_trampa_prueba2
SERV.NEW.ATTR=attr_decay|attr_move_never
SERV.NEW.TIMER=10
[ITEMDEF i_trampa_prueba2]
...
on=@step if !(<src>==<tag.duenioprueba>)
src.sysmessage @0481 Explota la trampa
src.effect 3,i_fx_explode,70,15,0,0
src.damage <damage> 01 <link.tag.duenioprueba.uid>
REMOVE
endif

Thanks anyways!


Lazarus.

[Image: 2hy9q0y.png]
(This post was last modified: 09-28-2012 02:57 AM by Lazarus.)
09-28-2012 02:56 AM
Visit this user's website 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: #4
RE: Criminal to the thrower.
When using NEW as a reference, you do not need to prefix it with SERV... so change this:

Code:
SERV.NEW.ATTR=attr_decay|attr_move_never
SERV.NEW.TIMER=10

...to this:

Code:
NEW.ATTR=attr_decay|attr_move_never
NEW.TIMER=10

Now, to reference the thrower in i_trampa_prueba2 you need to set its LINK... so change this:

Code:
NEW.ATTR=attr_decay|attr_move_never
NEW.TIMER=10

...to this:

Code:
NEW.ATTR=attr_decay|attr_move_never
NEW.TIMER=10
NEW.LINK=<SRC>

Now in the i_trampa_prueba2 item, you need to use that LINK as the source of the damage, so change this:

Code:
src.damage <damage> 01 <link.tag.duenioprueba.uid>

...to this:

Code:
src.damage <damage> 01 <LINK>
09-28-2012 03:31 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: Criminal to the thrower.
(09-28-2012 03:31 AM)RanXerox Wrote:  sadsad


Hi! thanks! rly!

I have a problem here with the damage:

6:14:ERROR:(Trampas.scp,397)Can't resolve <damage>
in
src.damage <damage> 01 <LINK>

Any idea :|?


and this: <damage>
not works with the damage of the link. I'll try uid maybe.

[Image: 2hy9q0y.png]
(This post was last modified: 09-28-2012 05:22 AM by Lazarus.)
09-28-2012 05:17 AM
Visit this user's website 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: #6
RE: Criminal to the thrower.
You didn't include the full i_trampa_prueba2 ITEMDEF, so the only idea I have is that this object type doesn't have (or is incapable of having) a DAMAGE property...
(This post was last modified: 09-28-2012 05:23 AM by RanXerox.)
09-28-2012 05: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: Criminal to the thrower.
(09-28-2012 05:22 AM)RanXerox Wrote:  You didn't include the full i_trampa_prueba2 ITEMDEF, so the only idea I have is that this object type doesn't have (or is incapable of having) a DAMAGE property...

Code:
[ITEMDEF i_trampa_prueba2]
DEFNAME=i_tram_prueba2
ID=3795
NAME=Trampa Prueba
WEIGHT=30
skillmake=blacksmithing 90.0
RESOURCES=100 i_ingot_iron
CATEGORY=News
SUBSECTION=Savage Items
DESCRIPTION=Trampa Prueba 2

on=@step
if !(<src>==<tag.duenioprueba>)
src.sysmessage  @0481 Explota la trampa
src.effect 3,i_fx_explode,70,15,0,0
src.sfx 0054
src.damage 20 <LINK>

REMOVE
endif


Sorry for that, this is a script of a friend that is asking to me to post it in the forums and help ^_^

Thanks!

Oh i imss it

src.damage {1 5} 01 <LINK>

Shock

[Image: 2hy9q0y.png]
(This post was last modified: 09-28-2012 06:01 AM by Lazarus.)
09-28-2012 05:24 AM
Visit this user's website 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: Criminal to the thrower.
DAMAGE amount, type, source

so maybe try this example (which does 15 to 25 physical damage from LINK to SRC):

Code:
SRC.DAMAGE <R15,25> <DEF.dam_physical> <LINK>
09-28-2012 06:03 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: #9
RE: Criminal to the thrower.
Thanks RanXerox and Skul!

Big Grin

[Image: 2hy9q0y.png]
09-28-2012 08:29 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)