How do I add PrizeNPC?

01/29/2010 16:24 WHITELIONX#1
Ok well I am not really expecting an answer to this but I want my PrizeNPC to send the chars to my website, I am using 5165 and this is all I have for my NPCDialog.cs for now
Code:
#region PrizeNPC
                            case 47:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("I am PrizeNPC and if you want to buy DragonBalls you can donate to my masters site"));
                                        GC.AddSend(Packets.NPCLink("Okie dokie send me to the site plox.", 1));
                                        GC.AddSend(Packets.NPCLink("Nah. Fuck him.", 255));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 1)
                                    {
                                        if (GC.MyChar.VipLevel == 0)
                                            
                                    }
                                    break;
                                }
                            #endregion
01/29/2010 17:20 ~*NewDuuDe*~#2
Process.Start("IExplore.exe", "http://ursitehere.com");

This is just an example. It can be done in many different ways.
PS: use ie, some ppl dont have firefox.
01/29/2010 17:21 ramix#3
you wanna is a code when player click there open your website rigth?

try and this

if (GC.MyChar.VipLevel == 0)
System.Diagnostics.Process.Start("iexplore.exe", "your website");

i think will work... i get that in vote npc :)
01/29/2010 19:57 Nullable#4
Just a comment(not a flame) to the two members that have posted above me, starting a process, in a server base means that you're starting the process on the same machine, not the other way around(to client?)
i remember a packet that calls websites when i was messing around with a packetlogger, but i don't remember its structure, sorry :S.
01/29/2010 23:27 Korvacs#5
Quote:
Originally Posted by ~*NewDuuDe*~ View Post
Process.Start("IExplore.exe", "http://ursitehere.com");

This is just an example. It can be done in many different ways.
PS: use ie, some ppl dont have firefox.
Its not that your not correct or anything, you definately answered the "how to open a webpage" part of it, however if you code that into a server so that it performs that whenever someone visits and npc, then all you will do is open the website on the SERVER, not the client.

There is a packet you can send which will open a weblink client side, but i dont know it, and im not sure which version it was added in.

Edit: Wow i just reposted what nullable said, so essentially /agree lol
01/30/2010 14:35 tanelipe#6
It's a chat packet. You can log it when clicking the HelpDesk NPC at TwinCity. I'm not sure what the type was, you could always loop through all 0x800 to 0x900 possibilities and see which one opens it.
01/30/2010 16:35 Kiyono#7
Where is this HelpDesk NPC then?
I've never heard of it before.
01/30/2010 17:34 Arcо#8
Quote:
Originally Posted by Kiyono View Post
Where is this HelpDesk NPC then?
I've never heard of it before.
Correct me if I'm wrong but it is in the middle of TC in real co.
01/30/2010 18:58 tanelipe#9
That's correct. I'm not sure if the NPC was actually named HelpDesk.
01/31/2010 00:02 WHITELIONX#10
Sorry tanelipe I really appreciate the help but I don`t understand what you mean? Ok so a quick look in the client and I found this?
Code:
[NpcType154]
Name=HelpDesk
SimpleObjID=1
StandByMotion=999001100
BlazeMotion=999001190
RestMotion=999001101
Effect=none
ASB=5
ADB=6
FixDir=0