The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[ITEM/FUNCTION] Account Banks
Author Message
pointhz
Journeyman
*

Posts: 148
Likes Given: 1
Likes Received: 55 in 28 posts
Joined: Oct 2013
Reputation: 1



Post: #7
RE: [ITEM/FUNCTION] Account Banks
This should do it I guess. It will transfer any items found in the bankbox of the char being deleted to the first char it encounters that its not the char being deleted.

This can be useful for everyone, so players don't accidentally delete a char with items in its bankbox and lose them.

[FUNCTION f_onchar_delete]
IF (<SRC.ACCOUNT.CHARS> > 1)
IF (<SRC.FINDLAYER.layer_bankbox.UID>)
FOR <SRC.ACCOUNT.CHARS>
IF !(<SRC.ACCOUNT.CHAR.<EVAL (<LOCAL._FOR>-1)>.UID>==<SRC.UID>)
LOCAL.UID1=<SRC.FINDLAYER.layer_bankbox.UID>
IF !(<SRC.ACCOUNT.CHAR.<EVAL (<LOCAL._FOR>-1)>.FINDLAYER.layer_bankbox.UID>)
SERV.NEWITEM i_bankbox
TRY UID.<SRC.ACCOUNT.CHAR.<EVAL (<LOCAL._FOR>-1)>.UID>.EQUIP <NEW.UID>
ENDIF
LOCAL.UID2=<SRC.ACCOUNT.CHAR.<EVAL (<LOCAL._FOR>-1)>.FINDLAYER.layer_bankbox.UID>
FORCONT <LOCAL.UID1> 0
LOCAL.CONTP=<CONTP>
CONT=<LOCAL.UID2>
CONTP=<LOCAL.CONTP>
ENDFOR
ENDIF
ENDFOR
ENDIF
ENDIF
RETURN 0

Easier to read: http://pastebin.com/XSe9ngPi
(This post was last modified: 09-18-2015 09:47 PM by pointhz.)
09-17-2015 04:20 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
[ITEM/FUNCTION] Account Banks - pointhz - 09-12-2015, 12:41 PM
RE: [ITEM/FUNCTION] Account Banks - dafty - 09-13-2015, 04:49 AM
RE: [ITEM/FUNCTION] Account Banks - XuN - 09-15-2015, 06:24 PM
RE: [ITEM/FUNCTION] Account Banks - dafty - 09-17-2015, 02:37 AM
RE: [ITEM/FUNCTION] Account Banks - pointhz - 09-17-2015 04:20 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)