OpenNos Case Problem.

09/03/2020 21:31 oBook#1
I have this Problem :


case 30014:
if (npc != null)

This is the case. Actually, i don't wanna show the code. It's for an NPC that gives an Random Item. (not my source, so i will not shown anything i don't own)

Now i have the Problem, i cannot make the NPC give me that item.

I did put "30014" into Dialog, into Effect, and made a Shop. Nothing works. Can someone explain me how this works? :D

Thank you haha
09/04/2020 01:23 redbull2905#2
If you want to make a pnj work in relation to the id that you put I suggest you put it in n_run 3000 which is dialog 18

Code:
case 3000:
                    switch (packet.Type)
                    {
                        case 0:
                            switch (packet.Value)
                            {
                                    case 2:
                                    switch (packet.NpcId)
                                    {//dialog 18
                                            case 30014:
                                            if (packet.Type >= 0 && Session.Character.Gold >= 500000 * (1 + packet.Type)) 
                                            {
                                                Session.Character.Gold -= 500000 * (1 + packet.Type);
                                                Session.SendPacket(Session.Character.GenerateGold());
                                                int Random = ServerManager.RandomNumber(0, 100);
                                                int rnd = ServerManager.RandomNumber(0, 1000);
                                                if (rnd < 970)
                                                {
                                                    if (Random < 60)
                                                    {
                                                        short[] vnums =
                                                        {

                                                                   1332, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339

                                                        };
                                                        byte[] counts =
                                                        {
                                                                    5, 5, 5, 5, 5, 5, 5, 5, 5
                                                        };
                                                        int item = ServerManager.RandomNumber(0, 8);
                                                        Session.Character.GiftAdd(vnums[item], counts[item]);
                                                    }
                                                    else
                                                    {
                                                        short[] vnums =
                                                        {
                                                                    1249, 1286, 1904, 1244, 1218
                                                        };
                                                        byte[] counts =
                                                        {
                                                                    3, 1, 1, 20, 3
                                                        };
                                                        int item = ServerManager.RandomNumber(0, 4);
                                                        Session.Character.GiftAdd(vnums[item], counts[item]);
                                                    }

                                                }
                                                else
                                                {

                                                    short[] vnums =
                                                    {
                                                                 4464, 5432, 5431
                                                    };
                                                    byte[] counts =
                                                    {
                                                                 1, 1, 1
                                                    };
                                                    int item = ServerManager.RandomNumber(0, 2);
                                                    Session.Character.GiftAdd(vnums[item], counts[item]);
                                                    
                                               CommunicationServiceClient.Instance.SendMessageToCharacter(new SCSCharacterMessage
                                                    {
                                                        DestinationCharacterId = null,
                                                        SourceCharacterId = 0,
                                                        SourceWorldId = ServerManager.Instance.WorldId,
                                                        Message = $"Player {Session.Character.Name} Obtain Big Reward!",
                                                        Type = MessageType.Shout
                                                    });
                                                }
                                            }
                                            else
                                            {
                                                Session.SendPacket(Session.Character.GenerateSay(Language.Instance.GetMessageFromKey("NOT_ENOUGH_MONEY"), 10));
                                            }
                                            break;
                                    }
                            }
09/04/2020 07:10 oBook#3
:feelsbadman:

Dialog 18 gives me "Get quest" and that's it. It's not working so far.

//EDIT

Okay, it's working i changed something :D

But there is still "Get quest" and not "Get Items" or whatever. Can you tell me how to change that aswell? :)
09/04/2020 08:28 PenguinXD#4
Quote:
Originally Posted by oBook View Post
:feelsbadman:

Dialog 18 gives me "Get quest" and that's it. It's not working so far.

//EDIT

Okay, it's working i changed something :D

But there is still "Get quest" and not "Get Items" or whatever. Can you tell me how to change that aswell? :)
Instead of asking me cause i'm online ehh.

Simple : Clientmodding
09/04/2020 11:58 redbull2905#5
Quote:
Originally Posted by oBook View Post
:feelsbadman:

Dialog 18 gives me "Get quest" and that's it. It's not working so far.

//EDIT

Okay, it's working i changed something :D

But there is still "Get quest" and not "Get Items" or whatever. Can you tell me how to change that aswell? :)
change Get quest -> Get Item in onex explorer. You open Nslangdata.NOS and you export _code_LANG_npctalk.txt
09/04/2020 15:56 XV50#6
Quote:
Originally Posted by redbull2905 View Post
change Get quest -> Get Item in onex explorer. You open Nslangdata.NOS and you export _code_LANG_npctalk.txt
Yeah sure, a highly recommended example of modern solution.

DO NOT do this.
09/04/2020 16:26 redbull2905#7
Quote:
Originally Posted by XV50 View Post
Yeah sure, a highly recommended example of modern solution.

DO NOT do this.
suggest a solution i want to laugh a little:lul:
09/04/2020 17:14 Zanouu#8
1 If ( packet.Type == 0 && packet.Value == 2 && packet.Npc == 30014 ) Instead your USELESS 3 SWITCH ?

your if (packet.Type >= 0 ) Is uselles => you'r checking the Type in the switch ( case 0: )

same here Session.Character.Gold -= 500000 * (1 + packet.Type);

Typical OpenNos tier's trash code :heyguys:
09/04/2020 20:02 oBook#9
I mean, i'm pretty new into this so i used OpenNos. I used it before so yeah, i like that. It's fun to play via Hamachi with Friends. (The reason i wanted that)

And yeah, i have to ask my little helper to do this for me because i don't know what to Change lol

Quote:
Originally Posted by Zanouu View Post
1 If ( packet.Type == 0 && packet.Value == 2 && packet.Npc == 30014 ) Instead your USELESS 3 SWITCH ?

your if (packet.Type >= 0 ) Is uselles => you'r checking the Type in the switch ( case 0: )

same here Session.Character.Gold -= 500000 * (1 + packet.Type);

Typical OpenNos tier's trash code :heyguys:
Okay, i made it

Code:
case 3005:
                    if (packet.Type == 0 && packet.Value == 2 && packet.NpcId == 30014);
Now it doesn't give me the Item. Before it was fine.
09/06/2020 12:37 PenguinXD#10
Quote:
Originally Posted by redbull2905 View Post
As if you were a developer don't make me laugh you are a random that comes out of nowhere. You don't know more than another. Modding has nothing to do with development Except in some cases like this where you just have to add the nrun but that's it, you are stupid you are a kikoo and you don't have to be a developer to put a nrun. Which proves that you don't know anything about it.
I don't even know why I'm answering you. You're a 15 year old kid.
You talk about development when all your functionalities come from zanou
Unlike you, I admit that there are things that I do not master in development. I don't know everything to show that I am the "strongest". I am not a developer and neither are you. But you insist on showing that you are, except that no one takes you seriously. You're a desperate shit noswings that's probably still a virgin. Your ego prevents you from seeing that you are just a jester.

Noswings shit and it will stay that way.

Please u should be as well quiet. "Speak about virginity but yeah.." What a useless shit going on real life.

You are the most trashtalker here..
09/06/2020 12:43 redbull2905#11
Yes I'm a trashtalker against people like that it's normal
09/06/2020 20:11 Vain#8420#12
You guys forgotten he just asked gently how to do X functionality, he's trying to run NosTale in localhost and the poor guy didn't want to bother PenguinXD, as a result he just get lynched, this thread isn't for blaming to each other.

If you just can't give him a real solution just dont write here as an 13 years old kid "Ninini, u trash, u never dev noob, learn ("CHashtag") bla bla bla"

Peace.
09/06/2020 21:49 oBook#13
PenguinXD already explained that to me and we found a solution for this so.. Yeah, can i get a #closerequest ? :)
09/08/2020 00:03 XV50#14
Quote:
Originally Posted by redbull2905 View Post
As if you were a developer don't make me laugh you are a random that comes out of nowhere. You don't know more than another. Modding has nothing to do with development Except in some cases like this where you just have to add the nrun but that's it, you are stupid you are a kikoo and you don't have to be a developer to put a nrun. Which proves that you don't know anything about it.
I don't even know why I'm answering you. You're a 15 year old kid.
You talk about development when all your functionalities come from zanou
Unlike you, I admit that there are things that I do not master in development. I don't know everything to show that I am the "strongest". I am not a developer and neither are you. But you insist on showing that you are, except that no one takes you seriously. You're a desperate shit noswings that's probably still a virgin. Your ego prevents you from seeing that you are just a jester.

Noswings shit and it will stay that way.
And now everything without Google Translator XD

Well, i AM a Developer. There's no need to proof. Thing is, you claim yourself to be a Developer in private, but in public you are telling people you aint a Dev? Bro, how pathetic and weird is that.

NosWings is the only Server at the moment, who could or i'd rather say will be the same like official. Their team is mixed with the best Devs in this Scene. And compared to them, you are not even dirt under their shoes. Stop hating them just cuz you got trolled and banned for a very given reason.

Greetings,
the Virgin.
09/10/2020 15:10 IceTrailer#15
Learn the board rules or stay away.
/c