![]() |
Money cheque system - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Requests (/Forum-Script-Requests) +--- Thread: Money cheque system (/Thread-Money-cheque-system) |
Money cheque system - Kapa - 12-23-2014 07:23 AM Hi, has anyone got money cheque system so you can transfer gold in big amounts easy. RE: Money cheque system - AIM4FUN - 12-24-2014 02:21 AM (12-23-2014 07:23 AM)Kapa Wrote: Hi, has anyone got money cheque system so you can transfer gold in big amounts easy. Code: [FUNCTION cheque] Im noob scripter but this is my idea... test it. Is only idea for help u, no is a good script. (Srry for my english) RE: Money cheque system - Kapa - 12-24-2014 08:46 PM Thanks it works no it doesnt if i make 500000 cheque when i dbl click it it gives me only 41248 and allways the same amount 41248 I think we need to use src.newgold but not sure how to set the amount RE: Money cheque system - Gandalfs - 12-25-2014 01:54 AM //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // //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] RE: Money cheque system - mrkarlo - 01-05-2015 04:54 AM thnx! very useful scp! Its possible to set - so when you sell something to a vendor, he gave many piles of gold not more than 50000? RE: Money cheque system - Extreme - 01-05-2015 06:51 AM You really don't need this big script... Just use gold += amount and -= in the right place... RE: Money cheque system - mrkarlo - 01-07-2015 12:38 AM thanx for respond! Need some help! Where this place is correctly located? I use 56b, very good and stable. |