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-nmm7 (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-nmm7 (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-nmm7 (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-nmm7 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cursed Items
Author Message
Deviling
Apprentice
*

Posts: 1
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Sep 2020
Reputation: 0



Post: #1
Cursed Items
Hi, guys! I have a very simple script for an item that lowers the character's skills when the item equipped and then returns them.

Code:
ONTRIGGER=EQUIP
if (<src.action>!=-1)
   src.sysmessage You must wait to perform another action.
   return 1
endif
if (<hitpoints>>50)&&(<morez>==0)
    hitpoints=50
endif
if (<hitpoints> < 2)
    src.sysmessage=Your <name> may have been destroer
    remove
    return 1
endif
if (<ATTR>&04)
   ATTR=0
elseif (<ATTR>&04008)
   ATTR=0
endif
if (rand(80)=6)
    more=<more>+-1
    if (<hitpoints> < 2)
        src.sysmessage=Your <name> may have been destroer
        remove
        return 1
    endif
endif
src.tactics=<src.tactics>+250
src.archery=<src.archery>+-100
src.fencing=<src.fencing>+-100
src.swordsmanship=<src.swordsmanship>+-100
src.macefighting=<src.macefighting>+-100
RETURN 0

ONTRIGGER=UNEQUIP
src.tactics=<src.tactics>+-250
src.archery=<src.archery>+100
src.fencing=<src.fencing>+100
src.swordsmanship=<src.swordsmanship>+100
src.macefighting=<src.macefighting>+100

RETURN 0

ONTRIGGER=SPELL
RETURN 1

ONTRIGGER=PICKUP_PACK
if (<hitpoints> < 2)
    src.sysmessage=Your <name> may have been destroer
    remove
    return 1
endif

My question is this: when the item is equipped and the character's skill is lowered, the server allows it to be re-pumped. How can I stop this process and prevent players from pumping a reduced skill?
(This post was last modified: 09-09-2020 01:47 AM by Deviling.)
09-09-2020 01:43 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Cursed Items - Deviling - 09-09-2020 01:43 AM
RE: Cursed Items - jdchixin - 12-09-2020, 09:06 AM
RE: Cursed Items - amonvangrell - 12-28-2020, 03:57 PM

Forum Jump:


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