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






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ONBUTTON
Author Message
Snaigel
Journeyman
*

Posts: 75
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jan 2017
Reputation: 0



Post: #1
ONBUTTON
So I have wrote it like this:

Quote:ONBUTTON=1
SRC.STR=(<SRC.str>+10)
RETURN 1

But it doesn't work, the str is set to 0 when I press the button on the dialog of the item instead of giving +10
02-03-2017 11:47 PM
Find all posts by this user Like Post Quote this message in a reply
zottolo
Journeyman
*

Posts: 87
Likes Given: 8
Likes Received: 12 in 11 posts
Joined: Dec 2015
Reputation: 0



Post: #2
RE: ONBUTTON
ON=1
SRC.STR+=10
RETURN 1
02-04-2017 12:42 AM
Find all posts by this user Like Post Quote this message in a reply
Snaigel
Journeyman
*

Posts: 75
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jan 2017
Reputation: 0



Post: #3
RE: ONBUTTON
Thank you very much. And do you know how should it be if I want it to max the skillcap of the player on an aditional +100.0 for example?

So if my server has a base skillcap of 850.0, that player who pressed the button can have 900.0, is there a simple command or do I need some event or something.
02-04-2017 02:02 AM
Find all posts by this user Like Post Quote this message in a reply
xwerswoodx
Journeyman
*

Posts: 86
Likes Given: 4
Likes Received: 7 in 4 posts
Joined: Jun 2012
Reputation: 0

UoMMO

Post: #4
RE: ONBUTTON
Your skillcup is depends on your skillclass, if you increase it for one player, it directly increase for everyone. (There can be a command to do it for one person but I don't know if there is one.) Command: [SKILLCLASS.SKILLSUM +=100.0]

There is a second way to do this.
Create new skillclass, like [SkillClass 1] and set skillcup to 950.0, when player click the button; SRC.SKILLCLASS=1 can solve your problem, you can copy skillclass 0 from sphere_skills.scp.
(This post was last modified: 02-04-2017 02:08 AM by xwerswoodx.)
02-04-2017 02:07 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #5
RE: ONBUTTON
TAG.OVERRIDE.SKILLCAP_$skillid Overrides skill settings from the character's SKILLCLASS. $skillid is the numeric ID of the skill.

Example: tag.override.skillcap_0 will override the skillcap for alchemy
02-04-2017 02:53 AM
Find all posts by this user Like Post Quote this message in a reply
Snaigel
Journeyman
*

Posts: 75
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jan 2017
Reputation: 0



Post: #6
RE: ONBUTTON
Hmm but that is for one skill only?, I want general skillcap
02-04-2017 03:20 AM
Find all posts by this user Like Post Quote this message in a reply
Snaigel
Journeyman
*

Posts: 75
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jan 2017
Reputation: 0



Post: #7
RE: ONBUTTON
If the max in my server is an amount of 850.0 distributed in all skills, I want to set that max for one character to 900.0 when he clicks the button.
02-05-2017 03:16 AM
Find all posts by this user Like Post Quote this message in a reply
zottolo
Journeyman
*

Posts: 87
Likes Given: 8
Likes Received: 12 in 11 posts
Joined: Dec 2015
Reputation: 0



Post: #8
RE: ONBUTTON
[SKILLCLASS 0]
// undeclared class.
// max skills for players of this skill class.
// might want this to be all 50.0 to make people declare a class?
DEFNAME=Class_undeclared
NAME=undeclared
// EVENTS=e_ClassUndeclared
STATSUM=300
SKILLSUM=10000.0
STR=100
INT=100
DEX=100
Alchemy=100.0
Anatomy=100.0
AnimalLore=100.0
ItemId=100.0
ArmsLore=100.0
Parrying=100.0
Begging=100.0
Blacksmithing=100.0
Bowcraft=100.0
Peacemaking=100.0
Camping=100.0
Carpentry=100.0
Cartography=100.0
Cooking=100.0
DetectingHidden=100.0
Provocation=100.0
EvaluatingIntel=100.0
Healing=100.0
Fishing=100.0
Forensics=100.0
Herding=100.0
Hiding=100.0
Provocation=100.0
Inscription=100.0
LockPicking=100.0
Magery=100.0
MagicResistance=100.0
Tactics=100.0
Snooping=100.0
Musicianship=100.0
Poisoning=100.0
Archery=100.0
SpiritSpeak=100.0
Stealing=100.0
Tailoring=100.0
Taming=100.0
TasteId=100.0
Tinkering=100.0
Tracking=100.0
Veterinary=100.0
Swordsmanship=100.0
Macefighting=100.0
Fencing=100.0
Wrestling=100.0
Lumberjacking=100.0
Mining=100.0
Meditation=100.0
Stealth=100.0
RemoveTrap=100.0
Necromancy=100.0
Focus=100.0
Chivalry=100.0
Bushido=100.0
Ninjitsu=100.0
Spellweaving=100.0

here you can take care of your skillclass behaviour creating more skillclass like this or using this one for every class adding custom events for different classes.
Btw i don't want to be impolite but i'd like to help you because i'm a newbie as you are and i know how does it feels when you install your sphere and pretend everything works fine but then you find out that a lot of things are not as you like or they don't work at all for a reason or another one.
I suggest you to start from the lower level creating basic objects or npc just to take familiarity with the language and then follow your creativity. In every fase take with you your instruments:
-sphere wiki
-something to browse inside your scripts (i use agent ransack)
-forum when you cannot find out a solution

as i said before i don't want to be impolite and it's a pleasure to help you as well as all this community helped me before.
(This post was last modified: 02-05-2017 04:02 AM by zottolo.)
02-05-2017 03:40 AM
Find all posts by this user Like Post Quote this message in a reply
Snaigel
Journeyman
*

Posts: 75
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jan 2017
Reputation: 0



Post: #9
RE: ONBUTTON
Yeah I know where to configure the skillcap and statcap of my server, but that's not what I'm asking xd
02-05-2017 03:55 AM
Find all posts by this user Like Post Quote this message in a reply
zottolo
Journeyman
*

Posts: 87
Likes Given: 8
Likes Received: 12 in 11 posts
Joined: Dec 2015
Reputation: 0



Post: #10
RE: ONBUTTON
(02-05-2017 03:55 AM)Snaigel Wrote:  Yeah I know where to configure the skillcap and statcap of my server, but that's not what I'm asking xd

okok you want to modify your cap for just one player clicking the button...

(02-04-2017 02:07 AM)xwerswoodx Wrote:  There is a second way to do this.
Create new skillclass, like [SkillClass 1] and set skillcup to 950.0, when player click the button; SRC.SKILLCLASS=1 can solve your problem, you can copy skillclass 0 from sphere_skills.scp.

i consider this one the best and easyer solution...
(This post was last modified: 02-05-2017 04:11 AM by zottolo.)
02-05-2017 04:05 AM
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)