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-nmm8 (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-nmm8 (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-nmm8 (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
Money cheque system
Author Message
Gandalfs
Apprentice
*

Posts: 1
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Nov 2014
Reputation: 0



Post: #4
RE: Money cheque system
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
//Check system Created by Spliff for sphere version 55i
//Feel free to edit as nessessary
//Thanks to Kell for the consumebank function
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[PLEVEL 1]
CHEQUE

[FUNCTION CHEQUE]
IF (<ARGN> <= 0)
SRC.SYSMESSAGE Debes especificar una cantidad. ej: cheque 50000
RETURN 1
ELSEIF (<ARGN> <= 50000)
SRC.SYSMESSAGE Para sumas menores de 50.000gp usa oro.
RETURN 1
ELSEIF (<SRC.BANKBALANCE> >= <ARGN>)
VAR.AMNX=<ARGN>
CONSUMEBANK <ARGN>
SRC.NEWITEM=i_cashiers_check
SRC.ACT.MORE=<ARGN>
SRC.ACT.CONT=<SRC.FINDLAYER.29.UID>
SRC.SYSMESSAGE Un cheque por <ARGN> gp ha sido depositado en tu banco.
SRC.SOUND=04f
RETURN 1
ELSE
SRC.SYSMESSAGE No tienes suficiente oro en tu banco para escribir el cheque!
RETURN 1
ENDIF

//#####################################################

[FUNCTION consumebank]
IF (<VAR.AMNX> >= 50000)
act=<SRC.FINDLAYER(layer_bankbox).uid>
act.layer=layer_pack
act.type=t_container
act.equip
src.consume 50000 i_gold
VAR.AMNX=(<VAR.AMNX>+-50000)
act.layer=layer_bankbox
act.type=t_eq_bank_box
act.equip
consumebank <VAR.AMNX>
RETURN 1
ELSEIF (<VAR.AMNX> <= 0)
VAR.AMNX=
RETURN 1
ELSE
act=<SRC.FINDLAYER(layer_bankbox).uid>
act.layer=layer_pack
act.type=t_container
act.equip
src.consume <VAR.AMNX> i_gold
VAR.AMNX=
act.layer=layer_bankbox
act.type=t_eq_bank_box
act.equip
RETURN 1
ENDIF

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[ITEMDEF i_cashiers_check]
ID=i_deed
Name=Cheque
TYPE=t_normal

CATEGORY=Custom
SUBSECTION=Misc
DESCRIPTION=Cheque (en blanco)

ON=@CREATE
ATTR=04
COLOR=0798

ON=@CLICK
MESSAGE <NAME> por: <MORE> gp
RETURN 1

ON=@DCLICK
IF (<MORE> <= 0)
REMOVE
RETURN 1
ELSE
VAR.AMNT=<MORE>
GIVEGOLD
SRC.SOUND=037
SRC.SYSMESSAGE <MORE> monedas de oro han sido depositadas en tu banco.
REMOVE
RETURN 1
ENDIF


[FUNCTION Givegold]
IF (<VAR.AMNT> >= 50000)
SRC.NEWITEM=i_gold
SRC.ACT.AMOUNT=50000
SRC.ACT.CONT=<SRC.FINDLAYER.29.UID>
VAR.AMNT=(<VAR.AMNT>+-50000)
GIVEGOLD
RETURN 1
ELSEIF (<VAR.AMNT> <= 0)
VAR.AMNT=
RETURN 1
ELSE
SRC.NEWITEM=i_gold
SRC.ACT.AMOUNT=<VAR.AMNT>
SRC.ACT.CONT=<SRC.FINDLAYER.29.UID>
VAR.AMNT=
RETURN 1
ENDIF


[EOF]
(This post was last modified: 12-25-2014 01:54 AM by Gandalfs.)
12-25-2014 01:54 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Money cheque system - Kapa - 12-23-2014, 07:23 AM
RE: Money cheque system - AIM4FUN - 12-24-2014, 02:21 AM
RE: Money cheque system - Kapa - 12-24-2014, 08:46 PM
RE: Money cheque system - Gandalfs - 12-25-2014 01:54 AM
RE: Money cheque system - mrkarlo - 01-05-2015, 04:54 AM
RE: Money cheque system - Extreme - 01-05-2015, 06:51 AM
RE: Money cheque system - mrkarlo - 01-07-2015, 12:38 AM

Forum Jump:


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