Code: Select all
use uo;
use os;
include ":magery:spells";
include "include/sounds";
program textcmd_xf( staff )
if ( staff.concealed < 1 )
PrintTextAbove( staff, "Farewell!", font := 3, color := 73 );
PrintTextAbove( staff, "Never let your fire die!", font := 3, color := 73 );
sleepms(250);
PerformAction(staff,17);
PlaySoundEffect(staff, SFX_EXPLOSION_7);
PlayFlameStrikeEffect(staff);
staff.concealed := 1;
endif
endprogram
When I go to compile it, it tells me there is a problem with my If statement, and that PlayFlameStrikeEffect(staff); doesn't exist, I figured that part wouldn't exist, it was just a hope that it would. I took that part form another script that says PlayLightningBolteEffect(staff); so I was hoping it might work, but it doesn't, so I want to figure out how to make flame strikes in a specific location.
Any help is greatly appreciated
EDIT:
I got the flamestrike part done, so I just need to know whats wrong with my if statement
This is my updated script:
Code: Select all
use uo;
use os;
include ":magery:spells";
include "include/sounds";
program textcmd_xf( staff )
if ( staff.concealed < 1 )
PrintTextAbove( staff, "Farewell!", font := 3, color := 73 );
PrintTextAbove( staff, "Never let your fire die!", font := 3, color := 73 );
sleepms(250);
PerformAction(staff,17);
PlayStationaryEffect( who.x+5, who.y-5, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x-5, who.y+5, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x-5, who.y-5, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x+5, who.y+5, who.z, 0x3709, 0x0a, 0x1e, 0 );
sleepms(500);
PlayStationaryEffect( who.x+4, who.y-4, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x-4, who.y+4, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x-4, who.y-4, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x+4, who.y+4, who.z, 0x3709, 0x0a, 0x1e, 0 );
sleepms(500);
PlayStationaryEffect( who.x+3, who.y-3, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x-3, who.y+3, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x-3, who.y-3, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x+3, who.y+3, who.z, 0x3709, 0x0a, 0x1e, 0 );
sleepms(500);
PlayStationaryEffect( who.x+2, who.y-2, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x-2, who.y+2, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x-2, who.y-2, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x+2, who.y+2, who.z, 0x3709, 0x0a, 0x1e, 0 );
sleepms(500);
PlayStationaryEffect( who.x+1, who.y-1, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x-1, who.y+1, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x-1, who.y-1, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x+1, who.y+1, who.z, 0x3709, 0x0a, 0x1e, 0 );
sleepms(500);
PlayStationaryEffect( who.x, who.y, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlaySoundEffect(who,0xf8);
staff.concealed := 1;
endif
if ( staff.concealed > 0 )
sleepms(250);
PerformAction(staff,17);
PlayStationaryEffect( who.x+5, who.y-5, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x-5, who.y+5, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x-5, who.y-5, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x+5, who.y+5, who.z, 0x3709, 0x0a, 0x1e, 0 );
sleepms(500);
PlayStationaryEffect( who.x+4, who.y-4, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x-4, who.y+4, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x-4, who.y-4, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x+4, who.y+4, who.z, 0x3709, 0x0a, 0x1e, 0 );
sleepms(500);
PlayStationaryEffect( who.x+3, who.y-3, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x-3, who.y+3, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x-3, who.y-3, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x+3, who.y+3, who.z, 0x3709, 0x0a, 0x1e, 0 );
sleepms(500);
PlayStationaryEffect( who.x+2, who.y-2, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x-2, who.y+2, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x-2, who.y-2, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x+2, who.y+2, who.z, 0x3709, 0x0a, 0x1e, 0 );
sleepms(500);
PlayStationaryEffect( who.x+1, who.y-1, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x-1, who.y+1, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x-1, who.y-1, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlayStationaryEffect( who.x+1, who.y+1, who.z, 0x3709, 0x0a, 0x1e, 0 );
sleepms(500);
PlayStationaryEffect( who.x, who.y, who.z, 0x3709, 0x0a, 0x1e, 0 );
PlaySoundEffect(who,0xf8);
staff.concealed := 0;
PrintTextAbove( staff, "Greetings!", font := 3, color := 73 );
endif
endprogram