Custom races

Need help with your JScripts? Got questions concerning the DFNs? Come forward, step inside :)
Post Reply
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

Custom races

Post by dragon slayer »

if i wanted to say make a custom race how do i turn that person into that ID of that race?
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

Post by dragon slayer »

so say i wanted my char to change into this id

[RACE 1]
{
NAME=Orc
ID=0x0001
PLAYERRACE=1
SKINMIN=0x0490
SKINMAX=0x0491
RACIALAID=2
RACIALENEMY=3
}

when he selected that race.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Two ways.

Either set the player's properties in the javascript file, like so:

Code: Select all

pUser.race = #;
pUser.id = #;
...Or you can place out some "race gates" they need to go through to join whichever race they want to join.

Create a new .dfn file (custom.dfn or whatnot) under DFNDATA\ITEMS\ and put in some new items using the following setup:

[<race>_racegate]
{
NAME=<race> Racegate
// name of the gate
ID=0x0dda // moongate ID
COLOR=0x0015 // color of moongate
TYPE=83 // MUST be type 83, otherwise it won't work
MOREX=# // Race ID to convert to
MOREY=# // 0 means it's not reusable by the same player, 1 means it is
}

Example:

Code: Select all

[orcish_racegate]
{
NAME=Orcish Racegate
ID=0x0dda
COLOR=0x0015
TYPE=83
MOREX=1
MOREY=0
}

[ratman_racegate]
{
NAME=Ratman Racegate
ID=0x0dda
COLOR=0x0015
TYPE=83
MOREX=2
MOREY=0
}
Then spawn those gates at the location your players end up at after they select their startup location, while making sure that their only way out of there is through these gates.
-= Ho Eyo He Hum =-
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

Post by dragon slayer »

Aw never thought about they js script i was creating to setting id.

thanks xuri ill do that hopefully get this all wrapped up soon
Post Reply