Problems with the PlayMovingEffect spell Meteor Swarm :(

Bug reports and feature requests. New features can only be added to the current development version. Bug-fixes may be back-ported.

Current release: 099 / Current development: 100
Post Reply
Mutley
New User
Posts: 29
Joined: Tue Sep 03, 2013 8:26 am
Location: BRAZIL

Problems with the PlayMovingEffect spell Meteor Swarm :(

Post by Mutley »

Hello everyone,

In ... Distro99 \ pkg \ systems \ spells \ config \ spells.cfg
The Meteor Swarm spell indicates that your GFX = "0x3C30" as we can see in the code below:

Code: Select all

Spell 55
{
	SpellId		55
	Name		Meteor Swarm
 
	Script		:magicBooks:book/castSpell
	SpellScript	:spells:spellScripts/circle7/meteorSwarm

	Difficulty	80
	ManaCost	40
	Delay		2000
 
	PowerWords	Kal Des Flam Ylem
        PWColor         56
	Circle		7
 
	Target		notarget_area
	Noto	        harmful

	SFX             0x161
	GFXType	        1
	GFX             0x3C30
        GFXColor        0

        TileGraphic     0x20b6
        ScrollObjType   0x1F63

	RegCost		BloodMoss	1
	RegCost		MandrakeRoot	1
	RegCost		SpiderSilk	1
	RegCost		SulphurousAsh	1
}
In ... Distro99 \ pkg \ systems \ spells \ spell Scripts \ meteor Swarm.src
Asks the same GRAPHIC_FIRE "0x3C30" in lines 39 and 49

See the part of the script:

Code: Select all

        var i;
        for( i:=delay; i>0; i-=1 )
                var fire_x := center.x + RandomInt(15) - 7,
                    fire_y := center.y + RandomInt(15) - 7;
                
                var item := CreateItemAtLocation( fire_x, fire_y, mobile.z, 0xeed, 1, mobile.realm );
                item.graphic := 1;
                
                SPELL_PlaySpellSFX( info.spell_id, mobile );
                PlayMovingEffectXYZ( item.x, item.y, item.z+80, item.x, item.y, item.z, 0x36d4, 0x18, 0x3C30, 0, item.realm );
                DestroyItem( item );
                
                if( GetObjProperty( mobile, MAGE ) >= 4 )
                         var fire_x2 := center.x + RandomInt(15) - 7,
                             fire_y2 := center.y + RandomInt(15) - 7;
                             
                         var item2 := CreateItemAtLocation( fire_x2, fire_y2, mobile.z, 0xeed, 1, mobile.realm );
                         item2.graphic := 1;
                         
                         PlayMovingEffectXYZ( item2.x, item2.y, item2.z+80, item2.x, item2.y, item2.z, 0x3C30, 0x18, 0x10, 0, item2.realm );
                         DestroyItem( item2 );
                endif
                
                SendMeteorSwamDamage( mobile, circle, center );
                SleepMS( 200 );
        endfor
But in the Distro 99 \ scripts \ include \ client.inc
File does not exist the GRAPHIC_FIRE "0x3C30" asking the script.
see:

Code: Select all

enum GRAPHIC_FIRE
	GFX_SMALL_FIREBALL	:= 0x36E4,
	GFX_LARGE_FIREBALL	:= 0x36D4,
	GFX_WAVY_FIREBALL	:= 0x36F4,
	GFX_EXPLOSION_BALL	:= 0x36FE,
	GFX_FIRE_COLUMN		:= 0x3709,
	GFX_EXPLODE_1		:= 0x36CB,
	GFX_EXPLODE_2		:= 0x36BD,
	GFX_EXPLODE_3		:= 0x36B0
endenum
When performing the magic the graph shows nothing, of course.
Does anyone have the answer? Thank you ;)
User avatar
CWO
POL Expert
Posts: 1159
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Re: Problems with the PlayMovingEffect spell Meteor Swarm :(

Post by CWO »

This is not due to client.inc. The script isn't calling GRAPHIC_FIRE at all, it's just using 0x3C30 directly which is fine. If it was a missing declaration in client.inc, the script would have never compiled due to an undeclared variable.

Are the sound effects playing correctly? If the PlayMovingEffectXYZ is what's not working, try setting them to a variable and sending it to yourself via SendSysMessage to see if there's an error.

Here's what to try:

Code: Select all

var tempvar := PlayMovingEffectXYZ( item.x, item.y, item.z+80, item.x, item.y, item.z, 0x36d4, 0x18, 0x3C30, 0, item.realm );
SendSysMessage(mobile, CStr(tempvar));
If it sends "1" on the SysMessage, then we know the script action is succeeding. Otherwise, it should tell you what the error is.
User avatar
CWO
POL Expert
Posts: 1159
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Re: Problems with the PlayMovingEffect spell Meteor Swarm :(

Post by CWO »

Wait... I just looked up the documentation... This is very likely erroring...

The 0x3C30 is in the "loop" parameter which should only be from 0-255.

0x36d4 is the correct effect and it's in the correct spot.

Try changing 0x3C30 on both lines to 0 and see what happens.

Code: Select all

PlayMovingEffectXYZ( item.x, item.y, item.z+80, item.x, item.y, item.z, 0x36d4, 0x18, 0, 0, item.realm );
Mutley
New User
Posts: 29
Joined: Tue Sep 03, 2013 8:26 am
Location: BRAZIL

Re: Problems with the PlayMovingEffect spell Meteor Swarm :(

Post by Mutley »

Thank CWO, I had noticed that the right would be "0x36d4" and replaces the GFX
But using " 0x18," the effect is very fast, got a slower and more beautiful effect using " 0," and put the fire bubbles on the floor using " 1," instead of the last " 0,"

Code: Select all

PlayMovingEffectXYZ( item.x, item.y, item.z+80, item.x, item.y, item.z, 0x36d4, 0, 0, 1, item.realm );
Now it's perfect, thank you. :D

Image
Post Reply