SphereCommunity
[FUNCTION] Achievements - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Submissions (/Forum-Script-Submissions)
+--- Thread: [FUNCTION] Achievements (/Thread-FUNCTION-Achievements)



[FUNCTION] Achievements - pointhz - 08-16-2015 12:46 AM

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.


RE: [FUNCTION] Achievements - chrono - 01-18-2022 07:04 PM

sounds good.