account.createcharacter(Struct { })
Moderator: POL Developer
account.createcharacter(Struct { })
a method for acocunt to create a blank character by script.
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..
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.
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?)
(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?)