|
||
|
|||||||
| Script Support Get support for modifying RunUO Scripts, or writing your own! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Lurker
Join Date: Oct 2006
Age: 23
Posts: 2
|
Hello, I try modifing the default script, to use this spell on all slayer, or all monsters. But the script is not working.
Code:
public static bool IsValidTarget( BaseCreature bc )
{
if ( bc == null || bc.IsParagon || ( bc.Controlled && !bc.Allured ) || bc.Summoned )
return false;
SlayerEntry slayer = ( SlayerGroup.GetEntryByName ( SlayerName.Repond ) ) || ( SlayerGroup.GetEntryByName( SlayerName.Silver ) );
if ( slayer != null && slayer.Slays( bc ) )
return true;
return false;
}
Code:
public static bool IsValidTarget( BaseCreature bc )
{
if ( bc == null || bc.IsParagon || ( bc.Controlled && !bc.Allured ) || bc.Summoned )
return false;
SlayerEntry slayer = SlayerGroup.GetEntryByName ( SlayerName.Repond );
SlayerEntry slayer = SlayerGroup.GetEntryByName ( SlayerName.Silver );
if ( slayer != null && slayer.Slays( bc ) )
return true;
return false;
}
Line 106: A local variable named "slayer" is already defined in this scope pls how can I make that? |
|
|
|
|
|
#2 (permalink) |
|
Forum Novice
|
Code:
SlayerEntry slayer = SlayerGroup.GetEntryByName ( SlayerName.Repond ); SlayerEntry slayer2 = SlayerGroup.GetEntryByName ( SlayerName.Silver ); if ( (slayer != null && slayer.Slays( bc )) || (slayer2 != null && slayer2.Slays( bc )) ) return true; Last edited by Soteric; 09-29-2008 at 09:18 AM. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|