[Question] SkillCode and ItemCheck

08/01/2018 00:56 ImTheReal#1
Hey folks,
normally im not the guy to ask for help. Usually i help others but now im stuck in a circle.

Since 3 Month now i try'na figure out how to implement a code into a Skill. For example: The Skill from the Berseker "Life and Death, Buff" is not working. I thought about implementing a code using a case (Which would be AddBuff(ID)) but i cannot find either the section or the right spot. So this would be my first question. Although knowing this is kinda good because u can modify skills with it, which i find really cool and intresting!

The other question is, how can i check if the Character has the ITEM XY with the AMOUNT XY? For example: Theres a Ice Flower Quest you can do every day, but you need to give at least 5 Ice Flowers. How can i do a check like that?
If Character has 5 Ice Flowers then give BONUS XY.

EDIT: The Quest itself works for me because i implemented a quest system myself but i need to add a check for that. (Doing this is easy and you can use the NRunHandler for it)

I really would appreciate logically and fluent answers, and hope to get some nice ones.

Greetings, ImTheReal!
08/01/2018 09:40 szymek111#2
I don't know how opennos is structured since i never used it but you could iterate through item array and check if any of those items have a ice flower vnum if it has then check if amount is the same.
08/01/2018 10:28 Blowa#3
Quote:
Originally Posted by ImTheReal View Post
Hey folks,
normally im not the guy to ask for help. Usually i help others but now im stuck in a circle.

Since 3 Month now i try'na figure out how to implement a code into a Skill. For example: The Skill from the Berseker "Life and Death, Buff" is not working. I thought about implementing a code using a case (Which would be AddBuff(ID)) but i cannot find either the section or the right spot. So this would be my first question. Although knowing this is kinda good because u can modify skills with it, which i find really cool and intresting!

The other question is, how can i check if the Character has the ITEM XY with the AMOUNT XY? For example: Theres a Ice Flower Quest you can do every day, but you need to give at least 5 Ice Flowers. How can i do a check like that?
If Character has 5 Ice Flowers then give BONUS XY.

EDIT: The Quest itself works for me because i implemented a quest system myself but i need to add a check for that. (Doing this is easy and you can use the NRunHandler for it)

I really would appreciate logically and fluent answers, and hope to get some nice ones.

Greetings, ImTheReal!
The solution : Learn how to program.

[Only registered and activated users can see links. Click Here To Register...]

Funny part, you said you "implemented a quest system yourself" but you are not able to simply check into a Container of ItemInstances ? cmon


Code:
if (myItemInstancesContainer.Count(s => s.Vnum == floweritemvnum) < 5)
{
   // error not enough flowers
   return;
}
08/01/2018 14:20 ImTheReal#4
Quote:
Originally Posted by val77 View Post
The solution : Learn how to program.

[Only registered and activated users can see links. Click Here To Register...]

Funny part, you said you "implemented a quest system yourself" but you are not able to simply check into a Container of ItemInstances ? cmon


Code:
if (myItemInstancesContainer.Count(s => s.Vnum == floweritemvnum) < 5)
{
   // error not enough flowers
   return;
}
Thank you for your answer! Ye, i know how to code but i didnt figure that out yet.
08/01/2018 19:39 ImTheReal#5
The Question about the ItemCheck has been answered by @[Only registered and activated users can see links. Click Here To Register...]

The question how to implement a code inside a skill (Via case or something i really dunno) is still opened
08/01/2018 19:49 Blowa#6
Quote:
Originally Posted by ImTheReal View Post
The Question about the ItemCheck has been answered by @[Only registered and activated users can see links. Click Here To Register...]

The question how to implement a code inside a skill (Via case or something i really dunno) is still opened
BCards
08/01/2018 20:32 Zanouu#7
Life and death does not have Bcards ,
but you can added buff in BattleHandler

Code:
                            if (ski.Skill.SkillVNum == 909)
                            {
                                // ur code
                            }
Ski = CharacterSkill = xxxx ;
Or directly in your Database

Subtype = 1
Type = 25
FirsData = YourProbality
SecondData = YourBuffVnum
SkillVnum = YourSKill :kappa:

Etc Etc .

You have Write , '' i know how to code "

But you dont know added one " if statement " ? :wat:
08/02/2018 00:54 ImTheReal#8
Quote:
Originally Posted by Zanouu View Post
Life and death does not have Bcards ,
but you can added buff in BattleHandler

Code:
                            if (ski.Skill.SkillVNum == 909)
                            {
                                // ur code
                            }
Ski = CharacterSkill = xxxx ;
Or directly in your Database

Subtype = 1
Type = 25
FirsData = YourProbality
SecondData = YourBuffVnum
SkillVnum = YourSKill :kappa:

Etc Etc .

You have Write , '' i know how to code "

But you dont know added one " if statement " ? :wat:
First of all: thanks alot m8 but why are u that unfriendly? I just wanted to know one thing. Calm tf down