Jump to content

  •  

simh

Member Since 24 Jan 2016
Offline Last Active Nov 23 2016 03:04 PM
-----

Posts I've Made

In Topic: Automatic Bloody Branch Spawn

23 November 2016 - 02:59 PM

No problem :)

 

By the way here is a little gift, give a try to this: http://pastebin.com/WLVXSjRe

 

You'll need to change the constant to number if you didn't update your emulator yet :)

 

NPC_NAME = 0

NPC_NAME_HIDDEN = 2

NPC_MAP = 4

PC_NAME = 0

 

Thanks again :D I guess you saved me hours of time. I will try it and give you feedback as soon as possible (I'm currently on a business trip).


In Topic: Automatic Bloody Branch Spawn

22 November 2016 - 05:03 PM

You just need to write your npc as a normal npc, then you disable it with *disablenpc, and you can enable it with *enablenpc :)

You can also look for Dastgir duplicate-npc plugins

 

Ahh thank you, so i can only enable and disable it :/

 

I think i will better try to change the monster command in the source-file. Because my 'extended' requirement was to be able to spawn a random MVP on a random map. If i do this with the enablenpc and disablenpc commands i'd have to write a duplicate-npc for every map (though only one npc is active at the same time) and move that npc to the coordinates of the defeated mvp. That would make my script way more complicated..

 

Thank you so much for your help!


In Topic: Automatic Bloody Branch Spawn

21 November 2016 - 06:56 PM

Daaaaaamn, never tough about spawning tomb npc xD Don't know why ^^'

 

So yeah you can do this, i checked in src and it appears that you can use MOB_TOMB as sprite id for your npc :)

So you can build and customize your own tomb :)

 

No problem :D Thanks again! I'm still at the beginning of learning how to create some custom scripts, so i just threw some random ideas in :D

 

Do you know the commands for spawning and removing a npc from the map?


In Topic: Automatic Bloody Branch Spawn

21 November 2016 - 02:12 PM

You should update your emulator, if using constant like NPC_MAP throw a "no character is attached" it may be because they are not defined (because you don't have an updated version of the emulator :) ) and so it tries to get a player variable with the name NPC_MAP (and so it throw an error).

Thanks, i think that will fix it! (I can't try it though, because i have merge conflicts and don't know how to solve them yet without losing most of my changes)

You can't have a tomb with a monster spawn with the *monster command, because of they way its coded in the emulator. You need to make a permanent monster spawn using boss_monster, unless you specify this boss_monster, you won't have your tomb.

Yes.. I feared that :/

I looked to see if you could spawn it with a permanent monster spawn, but here the problem would be to spawn a "Bloody Dead Branch" mob since you can't put a "-3"
 id for a permanent monster spawn.

I thought about that, but came to the same solution :(

So the only thing i could do is to customize the *monster-command so that i can choose to summon a monster as boss_monster. Or to spawn tomb-npcs by hand (if this is possible).

Thank you very much for your help! :)

In Topic: Automatic Bloody Branch Spawn

21 November 2016 - 10:12 AM

You should go back to NPC_MAP and NPC_NAME_UNIQUE, this is recommended way of scripting.

 

Your error is just because of your main npc, the one which is duplicate. He also hit the OnInit label, so as you didn't set a map for this one you're getting your error :)

 

Just put something like this:

if(strnpcinfo(NPC_MAP) == "") end;

Just after the OnInit label.

 

Thank you :) Now i put the following line in my OnInit-Event and it works.

if(strnpcinfo(3) == "" || strnpcinfo(4) == "") end;

If i put one of the values NPC_MAP, NPC_NAME_UNIQUE or "NPC_MAP" and "NPC_NAME_UNIQUE" it throws the error that no character is attached.

 

Do you know a way to spawn a tomb? I couldn't find a different "monster" command to spawn an MvP. (Since permanent mvp spawns are marked as bossmonsters, i think this is the reason why no tomb is spawned upon death of my spawned mvp)