The basics:
Surround your text with the following tags to add language-specific syntax-highlighting (as well as a "Download"-link for easy access to the script itself)
Code: Select all
[Codebox=language file=Untitled.languageExtension]Text goes here[/Codebox]function onUseChecked( pUser, iUsed )
{
if( iUsed.container && iUsed.container != pUser.pack )
pUser.SysMessage( "This item needs to be in your backpack before you can use it!" );
else
pUser.CustomTarget( 0, "Select target to inflict with pie-to-the-face:" );
return false;
}
function onCallback0( socket, myTarget )
{
var pUser = socket.currentChar;
var iUsed = socket.tempObj;
if( !socket.GetWord( 1 ) && myTarget.isChar )
{
//Throw pie in target face here
}
else
pUser.SysMessage( "The target is not a character!" );
}
{
if( iUsed.container && iUsed.container != pUser.pack )
pUser.SysMessage( "This item needs to be in your backpack before you can use it!" );
else
pUser.CustomTarget( 0, "Select target to inflict with pie-to-the-face:" );
return false;
}
function onCallback0( socket, myTarget )
{
var pUser = socket.currentChar;
var iUsed = socket.tempObj;
if( !socket.GetWord( 1 ) && myTarget.isChar )
{
//Throw pie in target face here
}
else
pUser.SysMessage( "The target is not a character!" );
}
[base_book]
{
get=base_item
name=book
id=0x0fef
value=18 9
weight=100
restock=20
movable=1
decay=1
type=11
morex=666
morey=32
good=32
}
[0x0fef]
{
get=base_book
name=book
id=0x0fef
}
[0x0ff0]
{ green/beige
get=base_book
name=a book
id=0x0ff0
}
{
get=base_item
name=book
id=0x0fef
value=18 9
weight=100
restock=20
movable=1
decay=1
type=11
morex=666
morey=32
good=32
}
[0x0fef]
{
get=base_book
name=book
id=0x0fef
}
[0x0ff0]
{ green/beige
get=base_book
name=a book
id=0x0ff0
}