account.createcharacter(Struct { })

Archive of the older Feature Request Forum Posts

Moderator: POL Developer

Locked
GEEK
New User
Posts: 29
Joined: Sat Jul 22, 2006 8:25 am

account.createcharacter(Struct { })

Post by GEEK »

a method for acocunt to create a blank character by script.
Marilla

Post by Marilla »

Yes, yes... I would love to be able to create PCs in script! :)
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Post by Austin »

Working on a method for the account object:

account.AddCharacter(index)

* If you use .AddCharacter() you get an error saying you need to assign an index.
* If Index is 0 (.AddCharacter(0)), it will find the next available slot on the account. (Otherwise pass 1-5)
* If no slots are available, you get an error.
* If the slot passed is taken, you get an error.

Otherwise it makes a blank character named "new character"
Its graphic 400 (naked male) colored 0, no items etc. Kinda looks like Neo when he got flushed out of that matrix pod.
Its placed at x1, y1, z1 of the britannia realm.

You gotta equip it, color it, etc. yourself in the script that makes it.
It does not run scripts/misc/oncreate.ecl (may change..)

Return value is the character idx slot that it was assigned to.
So to access the newly created character you would do..

Code: Select all

var result := account.AddCharacter(0);
if ( result.errortext )
    Print("Something went wrong ->"+result.errortext);
    return 0;
endif

var character := account.GetCharacter(result);
//Character setup code here.
innominabile
Adept Poster
Posts: 85
Joined: Wed Aug 30, 2006 5:24 pm

Post by innominabile »

Good :-)
Marilla

Post by Marilla »

Austin! Will you marry me!? My wedding gift to you will be BEER! Lots of it!

(Disclaimer: this offer of marriage is conditional on implementation of above-noted POL features. Not valid outside the Continental United States, or where prohibited, taxed or where Beer is not a legal wedding gift. Offer not good with any other promotions or discounts. Employees of Marilla, Incorporated, their families or anyone who has ever walked by them on the street are not eligible. This offer has a cash value of .01 Hundredth of a cent, but is not redeemable for cash, or actual Beer. Must present coupon at time of purchase. All Rights Reserved. Where's the Beef?)
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Post by Austin »

How about instead of marrying me and giving me beer, you get your shard on darkmyst with an irc channel.. so that Ryan will get me that 18 year old nymphomaniac who doesnt speak english that I have wanted for a wife :-P
Locked