ID:272951
 
Hello, I am trying make a Bow Mastery system for my Bleach game. I have tried to make the code, but I have yet to succeed. I am ask if anyone can help me make a system for this.
Everything you've said here is meaningless; you haven't actually specified what you want, and how you want this 'system' to work and what it should do. Saying something like "Quincy Mastery like in Bleach" is meaningless because not everybody watches Bleach, and even those who do will still won't really be able to figure out what you want.
You need to describe in detail the specifics of how you want this to work. The best I can give you without guessing is this:
mob/verb/Quincy_Mastery()
src << "You became a Quincy Master!"

Ok, maybe not really the best I can give; but that's a common forum joke. =P
Bankai Naruto wrote:
Hello, I am trying make a Mastery system for my Bleach game. I have tried to make the code, but I have yet to succeed. I am ask if anyone can help me make a system for this.

Maybe something like this? Im still learning a bunch of coding stuff to, but see should work.
if(usr.Quincy&&usr.QuincyMastery==10)
usr<<"You have mastered the ways of the quincy!"
usr.Rei += 50,000
usr.verbs += new /mob/Quincy/(Put Quincy Attack u want them to have here)

Atleast without more information thats the best I can do. ud have to put in your own variables in place of mine, but u get the gist of it.
In response to Kaioken
I'm sorry what I ment was a Bow mastery. Like on Bleach games theres a Shikai Mastery. A percentage to show how much you mastered it. Like every 100 arrows you fire the percent goes up.
In response to Bankai Naruto
mob
player
var
bowmastery = 0
bowexp = 0
bowexpmax = 100
verb
shootArrow()
flick("shoot",usr)
var/hit = rand(0,1)
if(hit)
usr.bowexp+=1
bowmasterycheck()
usr << "You have hit the target!"
if(!hit)
usr << "You have missed!"
proc
bowmasterycheck()
if(src.bowexp >= src.bowexpmax)
src.bowexp = 0
bowexpmax += rand(2,10)
src.bowmastery += rand(2,6)
src << "You have gained bow mastery!"
In response to Ninjafro
That's an okay example, but it has some minor issues:
  • Even though they're normally the same in that instance, you should stick to using either src (a little more recommended) or usr in that verb, and not mix it with both (you're calling the proc on src).
  • You should just use else there to see if the attack should miss, instead of checking the same condition again.
  • You shouldn't reset the experience to 0 if it's greater than the max, since the player loses some experience that way! Instead, you should subtract the max exp from the exp, so they still have any leftover over the max they've had. You could then also change the last if() to a while() instead, to make it possible to level up multiple times in one go if you have enough exp, but that's only extra as normally it shouldn't happen.
  • (If you're adding or subtracting only 1, then it's a little bit better to just use the ++ and -- operators instead (unrelated, but they also have more advanced usages))
In response to Kaioken
Yeah, I'm pretty nubby at programming. My area of skill is pixel art, but I do what I can. o.o
In response to Kaioken
Another note about his "exp" system he has going there...

Instead of making two variables, he should only have one generic "exp" variable, and then a proc that calculates the "maximum" exp based on the player's level with a formula. Then another proc to determine whether or not the player's exp has gone over that threshold, and level them up accordingly it it's made for just that particular variable (i use a generic "level-up" proc that returns true or false in my game ^-^).