Author Topic: How Do I???  (Read 39316 times)

0 Members and 2 Guests are viewing this topic.

Offline Kvetch

  • Administrator
  • Hero Member
  • *****
  • Posts: 729
    • View Profile
    • Email
How Do I???
« on: October 28, 2008, 10:30:55 pm »
I thought I'd just create this topic for people like me that are trying to figure out how to do one small thing and have no clue... so.. yeah, like me.  <FIZZY!!! WHY WON'T IT WORK!>

Offline Kvetch

  • Administrator
  • Hero Member
  • *****
  • Posts: 729
    • View Profile
    • Email
Re: How Do I???
« Reply #1 on: October 28, 2008, 10:33:02 pm »
Ok, I started this for a reason...

How do I... get a mob to cast spells?  I understand that he needs mana, but how do I in effect GIVE him mana?  And, why in gods name do I have to anyway?  Shouldn't they come with mana just like players do?  It's not like I'm asking him to destroy the world or anything (though knowing the way I script, that may happen anyway).

Kvetchy

Offline Mordecai

  • Administrator
  • Full Member
  • *****
  • Posts: 107
  • Has delusions of adequacy
    • View Profile
    • Multiplayer Online Game Anyone?
    • Email
Re: How Do I???
« Reply #2 on: October 29, 2008, 02:01:18 am »
dg_cast 'spellname' <target>

dg_cast 'acid arrow' %actor%

dg_cast 'acid arrow' %self.fighting%

Offline Molly

  • Administrator
  • Hero Member
  • *****
  • Posts: 691
    • View Profile
Re: How Do I???
« Reply #3 on: October 30, 2008, 04:07:08 am »
From what I've seen dg_cast doesn't work at all, and returns a syserr when you try to use it in a script.
Probably a code issue.

Offline Kvetch

  • Administrator
  • Hero Member
  • *****
  • Posts: 729
    • View Profile
    • Email
Re: How Do I???
« Reply #4 on: October 30, 2008, 06:16:26 pm »
worked in build port.  *blinks innocently*  Poor, poor Cati felt the wrath of that spell.

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: How Do I???
« Reply #5 on: November 01, 2008, 11:22:37 am »
From what I've seen dg_cast doesn't work at all, and returns a syserr when you try to use it in a script.
Probably a code issue.

I suspect it'd because I've seen numerous times it used as:

dg_cast %actor% 'fireball'
instead of the correct syntax of

dg_cast 'fireball' %actor%

Offline Molly

  • Administrator
  • Hero Member
  • *****
  • Posts: 691
    • View Profile
Re: How Do I???
« Reply #6 on: November 11, 2008, 04:25:16 am »
One of the scripts I frequently see erroring has the line
dg_cast 'heal' %self%

So should it be self instead of %self%?
Or maybe just dg_cast 'heal', since that should land the spell on self by default?

In my opinion, all three options ought to work.

Offline Mordecai

  • Administrator
  • Full Member
  • *****
  • Posts: 107
  • Has delusions of adequacy
    • View Profile
    • Multiplayer Online Game Anyone?
    • Email
Re: How Do I???
« Reply #7 on: November 19, 2008, 04:22:06 pm »
Pic
« Last Edit: November 19, 2008, 04:49:54 pm by Mordecai »

Offline Molly

  • Administrator
  • Hero Member
  • *****
  • Posts: 691
    • View Profile
Re: How Do I???
« Reply #8 on: November 21, 2008, 06:24:23 am »

Offline Mordecai

  • Administrator
  • Full Member
  • *****
  • Posts: 107
  • Has delusions of adequacy
    • View Profile
    • Multiplayer Online Game Anyone?
    • Email

Offline Molly

  • Administrator
  • Hero Member
  • *****
  • Posts: 691
    • View Profile
Re: How Do I???
« Reply #10 on: November 22, 2008, 07:43:08 am »
Funny, but it doesn't answer my question. :P

Offline Kvetch

  • Administrator
  • Hero Member
  • *****
  • Posts: 729
    • View Profile
    • Email
Re: How Do I???
« Reply #11 on: November 22, 2008, 08:14:08 pm »
Perhaps the definition of Kvetch would help out:

Kvetch
to complain habitually : gripe

So basically that site is people complaining about whatever they want to.

Kvetchy

Offline Molly

  • Administrator
  • Hero Member
  • *****
  • Posts: 691
    • View Profile
Re: How Do I???
« Reply #12 on: November 24, 2008, 09:27:32 am »
I understand that, Kvetch, but I had an actual question, not a complaint.

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: How Do I???
« Reply #13 on: November 25, 2008, 01:50:49 pm »
I understand that, Kvetch, but I had an actual question, not a complaint.

Yes, it should most likely be self.

Offline Molly

  • Administrator
  • Hero Member
  • *****
  • Posts: 691
    • View Profile
Re: How Do I???
« Reply #14 on: November 29, 2008, 05:49:42 am »
Yes, it should most likely be self.

Umm, no.

I tried both, and both give almost identical errors,
either:
[ Trigger: enrico receive ring, VNum 7528. dg_cast: target not found (dg_cast 'heal' %self%) ]
or
[ Trigger: enrico receive ring, VNum 7528. dg_cast: target not found (dg_cast 'heal' self) ]

Also it seems all spells using DG_cast work very erratically, and mostly not at all.
I am not so sure about DG_affect either.

I recently tried to forcibly put a player to sleep for a few minutes with a script, trying both DG_cast, DG_affect and delay. Neither worked. In the end we had to set up the script with a variable to get it work the intended way.

Plus that context still is bugged.

Is there really no one who could fix those issues? They affect a large number of  quest scripts.
As it is two players cannot work on the same quest, and as far as I know context always worked fine in the past.