Jump to content

  •  

Khazou

Member Since 16 May 2013
Offline Last Active May 16 2017 06:01 AM
-----

#82042 - Map Water -

Posted by Khazou on 27 April 2017 - 06:46 AM

You just forget to disable Renewal mechanics in src/config/renewal.h

Just comment the line to disable it, recompile, and it will change your novice map to a correct one




#81986 getmapusers - More options

Posted by Khazou on 25 April 2017 - 07:37 AM

You can use this :)

 


*getunits(<type>, <variable>, <limit>, "<map>"{, <x1>, <y1>, <x2>, <y2>})

This function searches a whole map or area for units and adds their GID to
the provided <variable> array. It filters units by <type> and stops searching
after <limit> units have been found. Set <limit> to false (0) if you wish to
disable the limit altogether.

Type is the type of unit to search for:

	BL_PC    - Character object
	BL_MOB   - Monster object
	BL_PET   - Pet object
	BL_HOM   - Homunculus object
	BL_MER   - Mercenary object
	BL_IEM   - Item object (item drops)
	BL_SKILL - Skill object (skill fx & sfx)
	BL_NPC   - NPC object
	BL_CHAT  - Chat object
	BL_ELEM  - Elemental object
	BL_CHAR  - Shorthand for (BL_PC|BL_MOB|BL_HOM|BL_MER|BL_ELEM)
	BL_ALL   - Any kind of object

** Do NOT use UNITTYPE_ constants here, they have different values.

Example:

	.@count = getunits((BL_PC | BL_NPC), .@units, false, "prontera");

The above example would search the map "prontera" for all PC and NPC units and
add them to the .@units array, while setting .@count to the amount of units
added to the array (useful in for() loops).




#78543 Problem with script_rid2sd: fatal error ! player not attached!

Posted by Khazou on 28 November 2016 - 06:07 AM

Just change all the "close" at the end of all your label by "end".

 

Close is use to close a conversation box, so it need a player attached.

 

http://pastebin.com/fnG8UL7j

 

Just keep the close from the OnMyMobDeath label since it has a "mes" command.

 

Also, you shouldn't use a variable named such as $monster, that's too common, you may end having the same variable in an other script.




#78391 Automatic Bloody Branch Spawn

Posted by Khazou on 22 November 2016 - 06:25 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




#78342 Automatic Bloody Branch Spawn

Posted by Khazou on 21 November 2016 - 11:59 AM

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).

 

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.

 

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.




#78335 Automatic Bloody Branch Spawn

Posted by Khazou on 21 November 2016 - 01:09 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.




#78328 Automatic Bloody Branch Spawn

Posted by Khazou on 20 November 2016 - 12:18 PM

You just forget to put some " :)

--ja--, is suppose to be a string, here you're trying to access the --ja-- player variable. That's why it throw you a "no player is attached" :)

Juste change --ja-- to "--ja--" and it will be ok




#58346 [Showcase] Poring ball map 2015-version

Posted by Khazou on 12 June 2015 - 09:46 AM

Wow, gg :)