Adding NPCs

From VbGORE Visual Basic Online RPG Engine

Adding a NPC

To add, edit or remove an NPC first you need to connect to your database. In the Database click on NPCs and then on Table Data.

Npc1.gif

Once you have finished editing dont forget to save the database by clicking the save button(Floppy disk).

Notice: to see the effects of your changes you have to restart the server if it was running before you started editing.

Table Information

ID: The id of the NPC, you can only have 1 of each ID.

Name: The name of your NPC.

descr: This is the NPC's description. It is shown in your ingame chatbox when you right click on the NPC.

ai: This decides what your NPC does. To add your own type of AI or see the available ones you need to open GameServer.vbp in vbGORE folder and find

    Public Sub NPC_AI(ByVal NPCIndex As Integer)

located in the NPCS module. The number you put in the database will correspond to the Case found in that method.

chat: What the NPC says. This can be found in

    vbGore folder >> Data >> NPC chat >> 'yourgamelanguage'.ini

respawnwait: This is the amount of time it takes for the NPC to respawn after it has died. The amount is in milliseconds.

    1 Second = 1,000 
    10 Seconds = 10,000. 

The formula is second*1000.

attackable: Decides whether its possible to attack the NPC or not. 1 = Yes, 0 = No

attackgrh: What attack GRH to show whenever the NPC attacks something.

attacksfx: Which sound affect to play when the NPC attacks. The sound affects can be found in the Sfx folder of vbGORE.

projectilerotatespeed: If the NPC's attack is ranged then this will decide at what speed it will rotate.

hostile: Decides whether the NPC is hostile or not (If it attacks players or not). 1 = Yes, 0 = No.

quest: The ID of the quest that the NPC gives, 0 = No quest. Quests can be found in the Database under Quest Table.

drops: What items the NPC will drop. The format is as followed

    ITEMID AMOUNTTODROP %CHANCEOFDROPPING

Example

    5 10 98

The NPC can drop 10, ID 5 items with a 98% chance.

give_exp: The amount of XP the player will receive when the NPC is killed.

give_gold: The amount of gold the player will receive when the NPC is killed.

objs_shop: This decides whether the NPC is a shop or not. Leaving it empty means its not a shop. The format is as followed

    ITEMID PRICE

Example

    1 500

The NPC sells the ID 1 item for 500 gold.

char_hair: What hair ID the NPC will have. This can be found in

   vbGORE folder >> Data >> Hair.dat

char_head: What head ID the NPC will have. This can be found in

   vbGORE folder >> Data >> Head.dat

char_body: What body ID the NPC will have. This can be found in

   vbGORE folder >> Data >> Body.dat

char_weapon: What weapon ID the NPC will have. This can be found in

   vbGORE folder >> Data >> Weapon.dat

char_wings: What wing ID the NPC will have. This can be found in

   vbGORE folder >> Data >> Wing.dat

char_heading: Decides what direction the NPC is turned when it spawns.

    1 = North 
    2 = East 
    3 = South 
    4 = West
    5 = NorthEast
    6 = SouthEast
    7 = SouthWest
    8 = NorthWest

char_headheading: The heading of the NPCs head when it spawns.

stat_hitrate: The attack speed of the NPC.

stat_mag: The magic stat of the NPC.

stat_def: The defence stat of the NPC.

stat_speed: The speed stat of the NPC.

stat_hitmin: The minimum damage the NPC can hit.

stat_hitmax: The maximum damage the NPC can hit.

stat_hp: The amount of HP the NPC spawns with.

stat_mp: The amount of MP the NPC spawns with.

stat_sp: The amount of SP the NPC spawns with.

Personal tools