Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[skill ball]
Author Message
amonvangrell
Banned

Posts: 338
Likes Given: 17
Likes Received: 32 in 20 posts
Joined: Aug 2012

britannia shard

Post: #1
[skill ball]
Just made this to my shard, was really annoying, so I've decided to share it in order to prevent another one, to go to the same stress that i went...

I didn't look to see if there was another scp with the same function...

skill ball download
(This post was last modified: 05-12-2014 12:52 PM by amonvangrell.)
05-12-2014 12:51 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes amonvangrell's post
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: [skill ball]
Why so long?


Code:
[DIALOG d_Skill_ball BUTTON]
on=0
RETURN 1
//
ON=1 58
src.<serv.skill.<argn1>.key> = 100.0

Also what is TARG?
Under DClick the ball is default, and really should be stored in a local or something to prevent it getting messed up somwhere along the way.

[Image: 2nis46r.jpg]
(This post was last modified: 05-13-2014 04:32 AM by Mordaunt.)
05-13-2014 04:31 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Mordaunt's post
amonvangrell
Banned

Posts: 338
Likes Given: 17
Likes Received: 32 in 20 posts
Joined: Aug 2012

britannia shard

Post: #3
RE: [skill ball]
omg that's why I'll be forever a nb and you a master.... lol
thanks!

Script updated!
Thanks to Mordaunt!
(This post was last modified: 05-13-2014 07:22 AM by amonvangrell.)
05-13-2014 07:18 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes amonvangrell's post
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #4
RE: [skill ball]
I neglected to mention that you can also do the same with the skill listing on your gump if you wish, just use a FOR loop to loop around the skills making sure your button is using the same local counter so that the skill matches the button.

[Image: 2nis46r.jpg]
05-13-2014 05:20 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
amonvangrell
Banned

Posts: 338
Likes Given: 17
Likes Received: 32 in 20 posts
Joined: Aug 2012

britannia shard

Post: #5
RE: [skill ball]
hmmm let me try....
05-14-2014 06:01 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Shidhun
Journeyman
*

Posts: 59
Likes Given: 5
Likes Received: 3 in 3 posts
Joined: Jul 2012
Reputation: 1



Post: #6
RE: [skill ball]
Code:
[itemdef i_skill_ball]
id=023d
Name=Skill Ball
type=t_normal

ON=@CREATE
    color = 0800

ON=@DCLICK
    IF (<CONT> != <SRC.FINDLAYER.layer_pack.UID>)
        src.sysmessageua 0800,0,0,enu The <name> must be in your backpack.
        RETURN 1
    ENDIF
    TRY SRC.DIALOGCLOSE d_Skill_ball
    sdialog d_Skill_ball
RETURN 1

[dialog d_Skill_ball]
50,50
nodispose
noclose
page 0
resizepic 50 50 9200 558 475//grey
resizepic 55 55 9200 545 25//grey
button 568 495 4017 4018 1 1 0
dcroppedtext 230 58 1000 200 0800 Choose ONE skill to improve to 100.0

local.offx=56
local.offy=90
for 1 58
    gumppictiled <dlocal.offx> (<dlocal.offy>+1) 170 20 3004
    dcroppedtext (<dlocal.offx>+4) (<dlocal.offy>+2) 1000 200 0800 <serv.skill.<eval <local._for>-1>.key>
    button (<dlocal.offx>+144) <dlocal.offy> 4023 4025 1 0 <dlocal._for>
    if (<dlocal._for> == 20)
        local.offx = 240
        local.offy = 90
    elif (<dlocal._for> == 39)
        local.offx = 424
        local.offy = 90
    else
        local.offy += 21
    endif
endfor

[DIALOG d_Skill_ball BUTTON]
on=0
RETURN 1

ON=1 58
    src.<serv.skill.<eval <argn1>-1>.key> = 100.0
    src.sysmessageua 0800,0,0,enu The magic of the <name> raises your wisdom.
    remove
(This post was last modified: 05-15-2014 01:53 AM by Shidhun.)
05-15-2014 01:47 AM
Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #7
RE: [skill ball]
2 forcycles would be even nicer. You don't need the 10 lines long if,elif,else,endif block

Code:
for i 0 2
    for j 0 57
       dtext
       button      
    endfor
endfor

After that, the script should be shrinked to minimum. Btw. there are 2 skillpoints i think. One from me (but it sux, you can't change it easily, only inspire or use it as it is...) and some other pretty long as your first version.
(This post was last modified: 05-15-2014 02:27 AM by Alaric.)
05-15-2014 02:21 AM
Find all posts by this user Like Post Quote this message in a reply
amonvangrell
Banned

Posts: 338
Likes Given: 17
Likes Received: 32 in 20 posts
Joined: Aug 2012

britannia shard

Post: #8
RE: [skill ball]
Oh lord.... thanks guys....
Look what knowledge has made of this gigantic script... tine and smoother. Big Grin
05-15-2014 08:33 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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