Author Topic: Script death?  (Read 10011 times)

0 Members and 1 Guest are viewing this topic.

Offline Asmodeus

  • Riddler
  • Full Member
  • ***
  • Posts: 141
    • View Profile
Script death?
« on: August 19, 2010, 05:33:29 pm »
Another question... do we have a way in script to cause a player to die?  Its probably in the website or in the 4D advanced scripting stuff, but I cant find it.  In a room command script of mine...

I tried 'eval death %actor.hitp% + 1', and %damage% %actor% %death%, but that just caused them to be stunned until an imm restores/fixes them.

so then...

I tried 'eval death %actor.hitp% + 100', and %damage% %actor% %death% , and that caused them to die, but then when they showed up in the room they get sent to after death, it kept showing the message 'Lie Still, you're dead!! :-(' and stayed like that until an imm fixed them.

So finally I tried adding the %actor.pos(resting)% to the end of the 2nd option above, but although it set actor to resting and technically worked, it sent out a syslog error that says '[ Room 30774 :: Unknown world cmd: 'Resting' ]'

So yeah, it would be sooo much simpler if there a way to just %kill% %actor%, or whatever

Offline Fizban

  • Maniacal Scroder!
  • Administrator
  • Full Member
  • *****
  • Posts: 183
  • Fizban, the Mangy Wizard
    • MSN Messenger - Fizban1216@hotmail.com
    • AOL Instant Messenger - Fizban1216
    • View Profile
    • Email
Re: Script death?
« Reply #1 on: August 20, 2010, 08:17:28 am »
So finally I tried adding the %actor.pos(resting)% to the end of the 2nd option above, but although it set actor to resting and technically worked, it sent out a syslog error that says '[ Room 30774 :: Unknown world cmd: 'Resting' ]'

%actor.anything%

should never be its own line.

nop %actor.pos(resting)%

is the proper syntax

There's no actual dg-command for what you're looking to do at the moment, one could probably added, but wouldn't be able to be %kill% because mkill is actually a command already for making mobs attack something as part of a script.

Offline Asmodeus

  • Riddler
  • Full Member
  • ***
  • Posts: 141
    • View Profile
Re: Script death?
« Reply #2 on: August 20, 2010, 10:24:35 am »
nop... i knew that

*facepalm*


It'd be cool to have a death script, whatever the command may be... i just said %kill% to make my point, but knew it probably wouldn't work... maybe %pkill% or %murder% or something?  Anyway, in the mean time, ill just do it this other way.



--yay, 100 posts--

Offline Diandra

  • Administrator
  • Full Member
  • *****
  • Posts: 143
    • View Profile
    • Email
Re: Script death?
« Reply #3 on: August 20, 2010, 12:38:55 pm »
Try adding 1000 instead of 100 - at least that seems to do the trick on the bp.

eval death %actor.hitp% + 1000
%damage% %actor% %death%

Also (but it seems in your case it's a roomtrigger so you can't use it for this script), with mobtriggers you can just use mslay:

mslay %actor.name%

Hope this helps.  :)

Offline Diandra

  • Administrator
  • Full Member
  • *****
  • Posts: 143
    • View Profile
    • Email
Re: Script death?
« Reply #4 on: August 20, 2010, 12:41:27 pm »
Ugh, I stand corrected, I also get the 'Lie still; you are DEAD!!! :-( ' for the damage thing...

Hm... surely there's a way...


Unless... wasn't there in the past some script that slowly cured people in the healing temple? Maybe it's that script that's missing to revive people in the healing temple. Or is my memory playing tricks with me?



Okay last edit this time ;-)

Here's another way to do it, in the roomtrigger you created: load a wizinvis mob - have the wizinvis mob mslay the actor - purge the wizinvis mob.
« Last Edit: August 20, 2010, 01:01:43 pm by Diandra »

Offline Asmodeus

  • Riddler
  • Full Member
  • ***
  • Posts: 141
    • View Profile
Re: Script death?
« Reply #5 on: August 20, 2010, 01:20:41 pm »
this solves everything Diandra...

...
      eval death (%actor.hitp% + 100)
      %damage% %actor% %death%
      nop %actor.pos(resting)%
...


Thanks for all the ideas though!  I had considered the invis mob, but i didnt want to make an invis mob :p

Offline Diandra

  • Administrator
  • Full Member
  • *****
  • Posts: 143
    • View Profile
    • Email
Re: Script death?
« Reply #6 on: August 20, 2010, 01:29:47 pm »
Sweet, now to add this in every room in Recall. *coughs*

Thanks for the solution, it's less work than mine ;-)

Offline Prometheus

  • the bang your head against the wall coder.
  • Administrator
  • Sr. Member
  • *****
  • Posts: 365
    • View Profile
Re: Script death?
« Reply #7 on: August 21, 2010, 12:05:18 am »
Rofl I did suggested something similar but teleport idlers to Twitches :)

Prometheus