SphereCommunity
Change the settings of the bank - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Change the settings of the bank (/Thread-Change-the-settings-of-the-bank)



Change the settings of the bank - gunnar - 10-22-2012 08:36 PM

Hello, I'm trying to create a function cghe enable you to open your own bank only in your own city ... for example, one that is only the British can open his bank to British and other cities ..... you can create a similar system? thanks


RE: Change the settings of the bank - Shaklaban - 10-22-2012 09:14 PM

just search for bank and bankself keywords in scripts, then you can customize them like:

Code:
[speech jobbanker]
on=bank
src.openbankbox
return 1//block hardcoded behaviour

[function openbankbox]
if <region.tag0.city> = <tag0.city>
    bankself
endif

and you need to replace all bankself functions with openbankbox.


RE: Change the settings of the bank - gunnar - 10-24-2012 05:33 AM

tnx Smile


RE: Change the settings of the bank - victorstelzer - 10-24-2012 07:26 AM

How has this function, do the only bank to open in the house ??


RE: Change the settings of the bank - Mordaunt - 10-24-2012 08:17 AM

speech events for banking only work when close to a banker npc, and in houses if you have added a speech event to the actual house region.


RE: Change the settings of the bank - gunnar - 10-25-2012 01:41 AM

But with this function a citizen of Trinsic can open the bank BRIT interests me that the inhabitant of Trinsic can not open the bank brit and vice versa .. control on race


RE: Change the settings of the bank - Mordaunt - 10-25-2012 11:01 PM

However you are defining the player's "home town" you need to add

src.tag0.origin=<src.region.name>

Which will give you the home town name, then....


in jobbanker.scp
Code:
ON=*bank*
    if !(strcmpi(*<src.tag0.origin>*,*<src.region.name>*)
        bankself
    else
        src.sysmessage You may only access your bank in your home town
        return 1
    endif



RE: Change the settings of the bank - gunnar - 10-26-2012 03:29 AM

thank .... for the resurrection of the same thing,
changing the command