PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
account.createcharacter(Struct { })

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    PenUltima Online Forum Index -> Feature Suggestions
Display posts from previous:   

Author Message
GEEK



Joined: 22 Jul 2006
Posts: 29
Location: Italy

PostPosted: Sat Aug 05, 2006 1:22 pm    Post subject: account.createcharacter(Struct { }) Reply with quote

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

Author Message
Marilla



Joined: 02 Feb 2006
Posts: 329

PostPosted: Sat Aug 05, 2006 2:05 pm    Post subject: Reply with quote

Yes, yes... I would love to be able to create PCs in script! Smile

Author Message
Austin
POL Developer


Joined: 30 Jan 2006
Posts: 355
Location: San Diego, California

PostPosted: Thu Sep 28, 2006 6:36 am    Post subject: Reply with quote

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:

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.

Author Message
innominabile



Joined: 30 Aug 2006
Posts: 81
Location: Italy

PostPosted: Thu Sep 28, 2006 8:00 am    Post subject: Reply with quote

Good Smile

Author Message
Marilla



Joined: 02 Feb 2006
Posts: 329

PostPosted: Thu Sep 28, 2006 9:46 pm    Post subject: Reply with quote

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?)

Author Message
Austin
POL Developer


Joined: 30 Jan 2006
Posts: 355
Location: San Diego, California

PostPosted: Thu Sep 28, 2006 10:30 pm    Post subject: Reply with quote

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 Razz

Post new topic   This topic is locked: you cannot edit posts or make replies.    PenUltima Online Forum Index -> Feature Suggestions All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty