The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
T_SHRINE update
Author Message
Khaos
Master
**

Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11



Post: #1
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. Smile 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
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
T_SHRINE update - Khaos - 02-23-2016 05:00 AM
RE: T_SHRINE update - Khaos - 03-14-2016, 03:21 AM
RE: T_SHRINE update - Khaos - 03-15-2016, 08:21 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)