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






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[FUNCTION] Achievements
Author Message
pointhz
Journeyman
*

Posts: 148
Likes Given: 1
Likes Received: 55 in 28 posts
Joined: Oct 2013
Reputation: 1



Post: #1
[FUNCTION] Achievements
Hello everyone,

I'm going to share some scripts that although have been made for a very peculiar kind of server, some of you may find them interesting and useful and could adapt them to your own servers.

_______________________________________________________________

This script, although being a very basic one, can be used as the "First Event" of a server.

It basically rewards a player for being the first one to achieve 100.0 in a certain skill.

All a player needs to do is type .achievements and select the skill he wants to be rewarded for. As long as no one has claimed that achievement already and the player has 100.0 in that skill, the player will be rewarded, a sysmessage will be sent to the whole server and the achievement will become unavailable for everyone else to claim.

[Image: Sem_T_tulo.jpg]

The current reward is a renamed item to "World's First Grand Master <Skill Title>" and it's up to you which kind of item players will get, you just need to change its ID in the DEFNAME's. You can easily change this if you want to give a different reward.

One player can be rewarded for being the first to achieve 100.0 in more than one skill, but only one player can be rewarded for a single skill. I.E: I can be the first GM Hiding, Mining and Blacksmith, and get 3 rewards for myself, but no one else will be rewarded for those skills.

I've chosen the skills to place in the dialog according to the most important and most used ones, but you are free to add or replace skills of your choice. Just make sure that the "Button ID" in the dialog is the SKILL KEY +1. For example: Skill Key for Alchemy is "0", so its "Button ID" must be 1 for the script to work properly.

I left room for "Mystery Achievements", which are achievements that, as the name suggests, are a mystery and will be automatically unlocked once someone achieves them.

It's up to you to pick which those achievements will be, if you choose to keep them. All you need to do is place a check somewhere in your scripts, similar to the skills ones, to reward the first to achieve them. I used to have the first murderer (So I had a check @kill), first house (So I had a check on @Dclick the house sign), first guild (So I had a check on @Dclick the stone), first total skill cap (So I had a check on raising stats), first total stat cap (So I had a check on raising skills), etc.

I guess I'm not forgetting anything, if you have any doubt just ask. The script should be easy to understand and adapt to your needs.

Just make sure that you change the DEFNAME in the script to another UID (The UID of the Item where the TAGS will be stored at a.k.a. whether an achievements has already been claimed or not; This can be a gravestone placed at star chamber for example) and it should be ready to go.


Attached File(s)
.scp  p_achievements.scp (Size: 8.07 KB / Downloads: 48)
(This post was last modified: 08-16-2015 02:39 AM by pointhz.)
08-16-2015 12:46 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 4 users Like pointhz's post
chrono
Apprentice
*

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



Post: #2
RE: [FUNCTION] Achievements
sounds good.
01-18-2022 07:04 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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