Does someone knows how to code NPCs in ConquerServer_v2??

06/08/2011 22:41 mujake#1
i downloaded conquerserver_v2 and i set it up,but i want to learn to code NPC in it and i need an example for it .Can someone help me?:(
06/08/2011 22:59 _Emme_#2
Noone knows how to code NPCs, we've been working on it for almost 14 years now. Will let you know when we finally figure out how to do.

No, seriously. If you want something done, learn how to do it yourself. There are (I think?) plenty of examples in the source itself, use them as references, or look at other sources available and use those as references.
06/08/2011 23:14 Kiyono#3
You must be blind or something if you can't find the scripts for NPCs to use as an example.
Here's one:
Code:
' By: Wolf
' Npc: 10050
' Name: Conductress

Imports System
Imports ConquerScriptLinker

Partial Public Class NpcEngine
    Public Shared Sub Teleport(ByRef dlg As String(), ByVal cmd As String)
        If Player.Money >= 100 Then
            Player.Money -= 100
            Command(cmd)
        Else
            ReDim dlg(1)
            dlg(0) = "TEXT You do not have 100 silvers, get rich bitch."
            dlg(1) = "OPTION-1 Well, fuck you, I'll walk."
        End If
    End Sub
    Public Shared Sub Conductress_MA()
        Dim dlg As String() = Nothing
        Select Case OptionID
            Case 0
                ReDim dlg(2)
                dlg(0) = "TEXT Would you like to leave the market?"
                dlg(1) = "OPTION1 Yes"
                dlg(2) = "OPTION-1 No thanks"
            Case 1
                Command("@mm " & Player.LastMapID.ToString() & " " & Player.LastX.ToString() & " " & Player.LastY.ToString())
        End Select
        If Not dlg Is Nothing Then
            Dialog(dlg)
        End If
    End Sub
    Public Shared Sub Conductress_TC()
        Dim dlg As String() = Nothing
        Select Case OptionID
            Case 0
                ReDim dlg(6)
                dlg(0) = "TEXT Where are you heading for? I can teleport you for the price of 100 silver."
                dlg(1) = "OPTION1 Phoenix Castle"
                dlg(2) = "OPTION2 Desert City"
                dlg(3) = "OPTION3 Ape Mountain"
                dlg(4) = "OPTION4 Bird Island"
                dlg(5) = "OPTION5 Mine Cave"
                dlg(6) = "OPTION6 Market"

            Case 1
                Teleport(dlg, "@mm 1002 958 555")
            Case 2
                Teleport(dlg, "@mm 1002 069 473")
            Case 3
                Teleport(dlg, "@mm 1002 555 957")
            Case 4
                Teleport(dlg, "@mm 1002 232 190")
            Case 5
                Teleport(dlg, "@mm 1002 053 399")
            Case 6
                Teleport(dlg, "@mm 1036 213 195")
        End Select

        If Not dlg Is Nothing Then
            Dialog(dlg)
        End If
    End Sub
End Class
06/08/2011 23:59 Bаne#4
I have been studying C# for 4 weeks and still have'nt looked at CO2's source.....mabey you should think about it...
06/09/2011 06:37 mujake#5
Kiyono, after the i posted the thread i-ve found the npcs,and i've read the reply from other people on that thread and i deleted the 100062.vb the NPC that was stopping all the others.thx don't be hard on me cuz i've only used C# on Conquer-Sx and is a big difference between sources.
06/09/2011 09:37 mujake#6
any ideea whay i get disconected when i try to use XP skills ?
06/09/2011 10:07 BaussHacker#7
Quote:
Originally Posted by mujake View Post
any ideea whay i get disconected when i try to use XP skills ?
They aren't coded I think. Not sure.