Khaos
Master
Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11
|
T_SHRINE update
Tithing code added to the silly t_shrine in sphere base scripts Checks for the 100,000 limit. Let me know if there are any issues. This was done on the fly this morning out of boredom. It is EA accurate. Minus the smsg [system] code I added.
Code:
[Comment t_Shrine]
Author: Khaos
Version: 1.1.1.1
Description: EA replica of t_Shrine; albeit the Lock Karma code (Adding when we make a standardization).
Changelog:
-Fixed: ConsumeGold just parses Gold Prop (ConsumeGold was one of my old functions. Sorry!)
-Updated: 5% stats are now using MulDiv for more control over mathematics.
-Updated: 10% karma loss is now using MulDiv for more control as well.
-Fixed: Added in Src. to stat checks.
[Function Tithe_Gold]
// You didn't enter a numeric argument.
If (!<ArgN>)
Src.SMsgL -1,1061093 // You have decided to tithe no gold to the shrine.
Return 1
EndIf
// You entered 0
If (<ArgN> == 0)
Src.SMsgL -1,1061093 // You have decided to tithe no gold to the shrine.
Return 1
EndIf
// Your tithing points are over 100,000.
If (<Src.Tithing> > 100000)
Src.SMsgL -1,1060840 // You have reached the maximum amount of Tithing Points available.
Return 1
EndIf
// You don't have enough gold.
If (!<ResTest <ArgN> i_Gold>)
Src.SMsgL -1,1061094 // You do not have enough gold to tithe that amount!
Return 1
EndIf
Local.Tithe=<Qval (<ArgN> < <EVal (100000 - <Src.Tithing>)>) ? <ArgN>:<Eval (<ArgN>-(<ArgN>-(100000 - <Src.Tithing>)))>
Src.Gold -= <Local.Tithe>
Src.SMsgL -1,1060195 // You tithe gold to the shrine as a sign of devotion.
Src.Tithing += <Local.Tithe>
Src.SMsgL -1,1061685 // Your Tithing Points have been adjusted.
Src.SMsg [System]: <Local.Tithe> gold has been removed.
Src.SMsg [System]: Tithing Points: <Src.Tithing>
Return 1
[TypeDef t_Shrine]
On=@DClick
Src.Resurrect 1
Src.Hits=<MulDiv <Src.MaxHits>,5,100>
Src.Stam=<MulDiv <Src.MaxStam>,5,100>
Src.Mana=<MulDiv <Src.MaxMana>,5,100>
Src.Fame -= <MulDiv <Src.Fame>,10,100>
Return 1
On=@ContextMenuRequest
Src.AddContextEntry 101,3006195,<QVal (<Src.Flags> & StatF_Dead)? 0:1> //resurrect
Src.AddContextEntry 102,3006198,<QVal (<Src.Chivalry> > 0) && (!<Src.Flags> & StatF_Dead) ? 0:1> // Tithe Gold
Return 1
On=@ContextMenuSelect
If (<ArgN>==101) && (<Src.Flags> & StatF_Dead)
Src.Resurrect 1
Src.Hits=<MulDiv <Src.MaxHits>,5,100>
Src.Stam=<MulDiv <Src.MaxStam>,5,100>
Src.Mana=<MulDiv <Src.MaxMana>,5,100>
Src.Fame -= <MulDiv <Src.Fame>,10,100>
Return 1
EndIf
If (<ArgN>==102)
Src.PromptConsole Tithe_Gold, How much gold would you like to tithe?
EndIf
[EOF]
(This post was last modified: 03-15-2016 08:20 PM by Khaos.)
|
|
02-23-2016 05:00 AM |
|
|
Khaos
Master
Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11
|
RE: T_SHRINE update
http://forum.spherecommunity.net/sshare....wnload=310
Updated:
- Fame loss on Resurrection (10%).
- HitPoints, Mana, and Stamina are at 5% on resurrection too. .
- Parsed in everything to work in @DClick as well, albeit the context entry code for tithing. That has to be done via the Context Menu.
x Still needs Karma locking.
Updated in Post and in Downloads:
-Fixed: Src. not being added in Max* checks.
-Updated: MulDiv now being used for more refined mathematics in parsing the karma loss and stat sets on resurrection.
(This post was last modified: 03-14-2016 03:34 AM by Khaos.)
|
|
03-14-2016 03:21 AM |
|
|