It is currently Fri Nov 21, 2008 12:58 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: A "CreateItemInBackpack" question
PostPosted: Tue Mar 28, 2006 11:12 pm 
Offline
Certified POL Expert
User avatar

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1207
Location: Southern Central USA
I want to be able to create items in a players backpack when they are offline. I can do it in their bank boxes but when I try in the backpack the item isn't created. Anyone have any idea how to do this for orffline characters?

TIA

TTFN

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 29, 2006 2:38 am 
Offline

Joined: Thu Feb 23, 2006 8:33 pm
Posts: 22
been looking for this aswell, just wondering how i can move a item into a backpack without recreating it.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 29, 2006 2:40 am 
Offline

Joined: Mon Feb 06, 2006 6:12 am
Posts: 93
MoveItemToContainer( item, container, x := -1, y := -1 );

read your uo.em people :P


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 29, 2006 4:14 am 
Offline
User avatar

Joined: Sat Feb 04, 2006 8:17 am
Posts: 147
Location: Illinois, USA
I have not had any luck with this myself. So what I do is use a added function to the login scripts to create the item when they log on instead. Once the item is created I remove the account property that gets placed when I want to create items for offline characters.

_________________
2nd place is the 1st loser.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 29, 2006 10:09 pm 
Offline
Certified POL Expert
User avatar

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1207
Location: Southern Central USA
I will try that DevGIB. Your example doesn't answer my question exactly but if it works it will be a workaround at least.

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 01, 2006 9:02 am 
Offline

Joined: Fri Feb 03, 2006 6:32 am
Posts: 104
Location: Austria
Yukiko wrote:
I will try that DevGIB. Your example doesn't answer my question exactly but if it works it will be a workaround at least.


Hmm not tested it, but have you tried that:

account:=FindAccount(<account_name>);
character:=account.getcharacter(<number>);
//... or do a foreach loop through all of these each and compare
// with serial or playername or whatever you got to identify the
// desired char or you have the accountname anyway, then it's easier.

==> so in the end you get the offline character you want to work with.

ok... so you got the char
=> container:=character.backpack;
now if createitemincontainer() doesn't work.... how about creating the item elsewhere, and do a moveitemtocontainer()?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 01, 2006 9:08 am 
Offline

Joined: Tue Feb 07, 2006 3:32 pm
Posts: 97
Location: Pittsburgh, Pennsylvania
Might want to try adding:

Code:
Set_Script_Option(SCRIPTOPT_CAN_ACCESS_OFFLINE_MOBILES, 1);



...to the script.

_________________
Image
Image <-- 50% off setup fees! Use PromoCode "NIGHTSCAPE"


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 01, 2006 11:19 pm 
Offline
Certified POL Expert
User avatar

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1207
Location: Southern Central USA
Oh my goodness! That might just do it.

Is that a POL 95 option Danielle? If so I must have missed it.

I will try that.

I know DevGIB's solution didn't work.

Firedancer, I already have the character reference through the SystemFindObjectBySerial function call. I use serials to reference the characters. I know the script is working because it works for online characters but not for offline characters.

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 01, 2006 11:24 pm 
Offline
Certified POL Expert
User avatar

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1207
Location: Southern Central USA
*smiles and does a happy dance*

Thanks Danielle! That worked!

I owe you one.

I never knew that was an option. I suppose I should reread the POL docs again.

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 02, 2006 6:55 am 
Offline

Joined: Tue Feb 07, 2006 3:32 pm
Posts: 97
Location: Pittsburgh, Pennsylvania
You're welcome.

The docs aren't that great, which is why I've started working on the Wiki again. Eventually we'll have good documentation.. I hope. :)

_________________
Image
Image <-- 50% off setup fees! Use PromoCode "NIGHTSCAPE"


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 02, 2006 7:12 am 
Offline

Joined: Mon Feb 06, 2006 6:12 am
Posts: 93
sorry i didnt realise you didnt have that option enabled :P otherwise i would have mentioned it... come to think of it i really should have just said it anyway
meh aslong as its all working now :)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 02, 2006 9:18 pm 
Offline
Certified POL Expert
User avatar

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1207
Location: Southern Central USA
NP DevGIB. Always so many things to think about and overlook in script development. I have been scripting POL/eScript for 3 maybe 4 years now and I was not even aware of that option. I just assumed characters were accessible on or offline. Never had a need before to gain access to an offline players pack in a script before.

To quote Montgomery (Scotty) Scott, "The more they overtake the plumbing, the easier it is to stop up the drain."

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl