4Dimensions Forum
May 18, 2012, 10:48:42 am *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: We're trying to improve the mud.  Please check out the following topic along with all of the Macro topics: http://4dimensions.org/forum/index.php/topic,760.0.html

 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: How Do I???  (Read 11246 times)
Kvetch
Administrator
Sr. Member
*****
Offline Offline

Posts: 491



View Profile Email
« 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!>
Logged
Kvetch
Administrator
Sr. Member
*****
Offline Offline

Posts: 491



View Profile Email
« 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
Logged
Mordecai
Administrator
Full Member
*****
Offline Offline

Posts: 107

Has delusions of adequacy


View Profile WWW Email
« 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%
Logged
Molly
Administrator
Hero Member
*****
Offline Offline

Posts: 554


View Profile
« 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.
Logged
Kvetch
Administrator
Sr. Member
*****
Offline Offline

Posts: 491



View Profile Email
« 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.
Logged
Fizban
Maniacal Scroder!
Administrator
Full Member
*****
Offline Offline

Posts: 182


Fizban, the Mangy Wizard

Fizban1216@hotmail.com Fizban1216
View Profile Email
« 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%
Logged
Molly
Administrator
Hero Member
*****
Offline Offline

Posts: 554


View Profile
« 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.
Logged
Mordecai
Administrator
Full Member
*****
Offline Offline

Posts: 107

Has delusions of adequacy


View Profile WWW Email
« Reply #7 on: November 19, 2008, 04:22:06 pm »

Pic
« Last Edit: November 19, 2008, 04:49:54 pm by Mordecai » Logged
Molly
Administrator
Hero Member
*****
Offline Offline

Posts: 554


View Profile
« Reply #8 on: November 21, 2008, 06:24:23 am »

Pic

Huh?
Logged
Mordecai
Administrator
Full Member
*****
Offline Offline

Posts: 107

Has delusions of adequacy


View Profile WWW Email
« Reply #9 on: November 21, 2008, 05:40:04 pm »

http://www.kvetch.com/
Logged
Molly
Administrator
Hero Member
*****
Offline Offline

Posts: 554


View Profile
« Reply #10 on: November 22, 2008, 07:43:08 am »

Funny, but it doesn't answer my question. Tongue
Logged
Kvetch
Administrator
Sr. Member
*****
Offline Offline

Posts: 491



View Profile Email
« 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
Logged
Molly
Administrator
Hero Member
*****
Offline Offline

Posts: 554


View Profile
« Reply #12 on: November 24, 2008, 09:27:32 am »

I understand that, Kvetch, but I had an actual question, not a complaint.
Logged
Fizban
Maniacal Scroder!
Administrator
Full Member
*****
Offline Offline

Posts: 182


Fizban, the Mangy Wizard

Fizban1216@hotmail.com Fizban1216
View Profile Email
« 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.
Logged
Molly
Administrator
Hero Member
*****
Offline Offline

Posts: 554


View Profile
« 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.
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!