Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Is it possible to script a npc?


Lollipopz
 Share

Recommended Posts

Well I fully understand the event system and I'm good with it, already created some quests.
But the problem is that I want to make quests where you have to kill a certain amount of mobs.
I can't figure out how to make npcs modify a variable.
So would it be possible to make a npc modify a variable once you kill it?
And if yes, how?
Link to comment
Share on other sites

Find the player attack npc sub in the server, find where in the sub it handles the npc dying and then you can insert some if, thens like..

```
If Npcnum = mobnum then
    player(attacker).variables(varnumber) = player(attacker).variables(varnumber) + 1
end if

```
^^That is not REAL code. It might be close but I just typed that up as a slight example on how you WOULD do it.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...