Scarecrow v1.0

Got any custom JavaScript additions/tweaks you think other people would like to see? Post 'em here!
Post Reply
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

Scarecrow v1.0

Post by dragon slayer »

Okay this just a fun script. figured you all might like it :)

carve.dfn

Code: Select all

// scarecrow
[CARVE 97]
{
ADDITEM=0x1EBD,3
}
scarecrowitems.dfn

Code: Select all

[scarecrow]
{
get=base_item
NAME=a Scarecrow
ID=0x1e34
script=5058
}

[0x1EBD]
{
get=base_item
ID=0x1EBD
pileable=1
amount=1
decay=1
}
scarecrow.dfn

Code: Select all

[scarecrow]
{
name=a scarecrow
id=0x0003
skin=0x0488
direction=N
backpack
gold=50 75
str=110 140
dex=86 105
int=140 165
hp=140
hpmax=110 140
karma=-4000
fame=4000
parrying=550 650
magicresistance=500 650
tactics=500 700
wrestling=500 700
damage=4 20
def=22
spattack=4095
spadelay=10
magery=600 850
npcwander=4
fx1=-1
fy1=-1
fz1=-1
fx2=20
npcai=2
TOTAME=1100
CARVE=97
}
finaly the scarecrow.js
function onUseChecked( pUser, iUsed )
{
    var socket = pUser.socket;
    if( socket && iUsed && iUsed.isItem )
    {
           var nSpawned = SpawnNPC( "scarecrow", pUser.x, pUser.y, pUser.z, pUser.worldnumber );
           pUser.SysMessage( "Scarecrow comes to life." );
           iUsed.Delete();
           return false;
    }
        return false;
}
I know its not much of a script but its cool to just place in fields.

I was going to make this work with function inrange. but seems i can't get that function to work with items at all.
Last edited by dragon slayer on Sun Dec 25, 2011 7:23 am, edited 2 times in total.
Post Reply