insure system - jexnico - 03-28-2014 02:16 AM
hello, someone would have a system insure?
wanted a system that would insure in deed and newbie, when I used to insure any item at the insure stay with the name [insured] upon his name, thank you
RE: insure system - Shidhun - 03-28-2014 04:47 AM
This is an old script from CloudBR.
Code:
//Basic stuff, the loot part is handled on e_player.scp
[DEFNAME insure_settings]
INSURANCE_PRICE 600
[FUNCTION INSURE]
TARGETF TARGET_INSURE
SYSMESSAGELOC -1,1060868
[FUNCTION TARGET_INSURE]
IF !(<ARGN>)
REF1=<ARGO.UID>
ELSE
REF1=<ARGN>
ENDIF
IF ((<REF1.TOPOBJ>!=<UID>) || (<REF1.UID> == <UID>))
sysmessageloc 04ec,1060871
ELIF (<REF1.ATTR>&ATTR_NEWBIE)
sysmessageloc 04ec,1060870
ELIF (<REF1.BASEID> == i_power_scroll) || (<REF1.BASEID> == i_stat_power_scroll) || (<REF1.TAG0.UNIQUEITEM>) || (<REF1.ATTR>&ATTR_CURSED)
sysmessageloc 04ec,1060869
ELIF (<SRC.GOLD> < <DEF.INSURANCE_PRICE>)
sysmessageloc 023,1061079
ELIF (<REF1.ISEVENT.T_ITEM_INSURED>)
sysmessageloc 036,1060874
addgold <DEF.INSURANCE_PRICE> <FINDLAYER.layer_bankbox>
sysmessageloc -1,1060397,<dDEF.INSURANCE_PRICE>
REF1.EVENTS -T_ITEM_INSURED
REF1.UPDATE 1
ELSE
REF1.EVENTS +T_ITEM_INSURED
GOLD -= <DEF.INSURANCE_PRICE>
sysmessageloc 04ec,1060873
sysmessageloc -1,1060398,<dDEF.INSURANCE_PRICE>
REF1.UPDATE 1
IF (!(<FLAGS>&STATF_DEAD))
UPDATE
ENDIF
ENDIF
IF (!<ARGN>)
INSURE
ENDIF
[TYPEDEF T_ITEM_INSURED]
ON=@ClientToolTip
SRC.ADDCLILOC 1061682
[EOF]
And this has to be on an event, every player has.
Code:
ON=@DeathCorpse
ARGO.TAG.LOOTRIGHTLIST=<TAG.LOOTRIGHTLIST>
TAG.LOOTRIGHTLIST
LOCAL.INSUREGOLDGIVE=0
FORCONT <ARGO.UID> 9999
IF (<ISEVENT.T_ITEM_INSURED>)
LOCAL.INSUREGOLDGIVE += <EVAL (<DEF.INSURANCE_PRICE>*70)/100>
EVENTS -T_ITEM_INSURED
CONT=<SRC.FINDLAYER.21>
IF (<SRC.TAG0.AUTORENEWINSURANCE>)
SRC.TARGET_INSURE <UID>
ENDIF
ENDIF
ENDFOR
ARGO.UPDATE
IF (<LOCAL.INSUREGOLDGIVE>)
REF1=<ATTACKER.LAST>
IF (<REF1.ISPLAYER>)
REF1.GOLD += <LOCAL.INSUREGOLDGIVE>
REF1.SYSMESSAGELOC -1,1042763,<dLOCAL.INSUREGOLDGIVE>
ENDIF
ENDIF
SRC.FLAGS &= ~statf_war
RE: insure system - jexnico - 03-28-2014 05:34 AM
thanks man, I will test the script when I get home because I'm at work: D
|