PenUltima Online

It is currently Sat Oct 11, 2008 5:38 pm

All times are UTC - 8 hours




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: account.createcharacter(Struct { })
PostPosted: Sat Aug 05, 2006 9:22 am 
Offline

Joined: Sat Jul 22, 2006 8:25 am
Posts: 29
Location: Italy
a method for acocunt to create a blank character by script.

_________________
--------------------------
ZuluHotelItalia Admin


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 05, 2006 10:05 am 
Yes, yes... I would love to be able to create PCs in script! :)


Top
  
 
 Post subject:
PostPosted: Thu Sep 28, 2006 2:36 am 
Offline
POL Developer
User avatar

Joined: Wed Jan 25, 2006 2:30 am
Posts: 420
Location: San Diego, California
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.

_________________
-Austin


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 28, 2006 4:00 am 
Offline

Joined: Wed Aug 30, 2006 5:24 pm
Posts: 82
Location: Italy
Good :-)

_________________
Admin/Scripter Innominabile
ZuluHotelItalia shard on m4d


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 28, 2006 5:46 pm 
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?)


Top
  
 
 Post subject:
PostPosted: Thu Sep 28, 2006 6:30 pm 
Offline
POL Developer
User avatar

Joined: Wed Jan 25, 2006 2:30 am
Posts: 420
Location: San Diego, California
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

_________________
-Austin


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl