//////////////////////////////////////////////////////////////////////////////////////// //Luck System v0.7 by Mordaunt // // Designed to make use of "existing" luck items scripted by ClouD_BR // To add new "luck" items set value on them in TAG.LUCK // and add the event t_luck_item. // // Features: Lucky loot drops // Lucky Lotto on Login (10k default prize 1 in 10k (minus luck) chance // Luck enhanced resource gathering (Double resources) // Luck affected Crafting (Add your own bonuses, only basics are included with this script) //////////////////////////////////////////////////////////////////////////////////////// [DEFNAME Luck_toggles] //1=on 0=off login_lotto 1 loot_drop 1 resource 1 crafting 1 //Player event [EVENTS e_luck] ON=@LOGIN IF IF !() TIMERF 5, f_luck_lotto SRC.TAG0.LUCKLOTTO = ELIF (-/10> > 86400) TIMERF 5, f_luck_lotto SRC.TAG0.LUCKLOTTO = ELSE RETURN 0 ENDIF ENDIF ON=@KILL IF LOCAL.LUCK=1500 +- IF () IF !(RAND(>)) f_lucky_draw //Edit the loot pool at the bottom of the script NEW.CONT ENDIF RETURN 0 ENDIF ENDIF ON=@Regionresourcefound IF LOCAL.LUCK=1500 +- IF !(RAND(>)) ARGO.AMOUNT=*2> ENDIF ENDIF //Basic crafting modifications, want something more complex? Add it, I can't give all my stuff away ;) ON=@SKILLMAKEITEM IF LOCAL.LUCK=1500 +- IF !(RAND(>)) IF () ACT.MODAR=*10)/100> ACT.EVENTS +t_modar ENDIF IF () DORAND 4 ACT.TAG.MODDAM=10 ACT.TAG.MODDAM=20 ACT.TAG.MODDAM=25 ACT.TAG.MODDAM=50 ENDDO ACT.EVENTS +t_moddam ENDIF IF (==t_clothing) ACT.MODAR=> ACT.EVENTS +t_modar ENDIF IF (==t_weapon_bow) || (==t_weapon_xbow) DORAND 4 ACT.HITPOINTS += 10 ACT.HITPOINTS += 20 ACT.HITPOINTS += 30 ACT.HITPOINTS += 40 ENDDO ENDIF ENDIF ENDIF //Item event [TYPEDEF t_luck_item] ON=@EQUIP SRC.LUCK += ON=@UNEQUIP SRC.LUCK -= ON=@CLIENTTOOLTIP SRC.ADDCLILOC 1060436, > //Damage increase typedef [TYPEDEF t_moddam] ON=@CLIENTTOOLTIP SRC.ADDCLILOC 1074325, > ON=@EQUIP SRC.EVENTS +e_dam_event ON=@UNEQUIP SRC.EVENTS +e_dam_event //Damage Increase event --> Put on an all players & NPC's event [EVENTS e_dam_event] ON=@GETHIT IF () ARGN1=*>/100> + > ENDIF [FUNCTION f_lucky_draw] DORAND 2 //edit this to match the # of lines //insert lucky loot here SERV.NEWITEM={ i_gloves_alchemist 1 i_robe_alchemist 1 i_ring_alchemist 1 i_bracelet_alchemist 1 i_glasses_alchemist 1} SERV.NEWITEM={ i_enchant_ring_gold 1 i_enchant_bracelet_gold 1 i_enchant_necklace_gold 1 i_enchant_earrings_gold 1 } ENDDO [FUNCTION f_luck_lotto] //Basic 10k prize, alter this to change or add ransom item template. LOCAL.LUCK=10000 +- IF !(RAND(>)) SRC.SYSMESSAGE @07a1 Congratulations you won the Luck Lotto! SERV.NEWITEM i_gold NEW.AMOUNT 10000 NEW.CONT ENDIF [EOF]