Jump to content
  • 0

I need treasure boxes to random maps


Question

Posted

I would want to put a script on my server which does spawn 2-2 treasure boxes to every field and some dungeons, and once a player kills a treasue box, it will drop some items. The box's respawn time should be 3 days. Please help me with this npc I have no idea how to write it.

Thanks

3 answers to this question

Recommended Posts

  • 0
Posted
16 hours ago, sader1992 said:

2-2 ?

I want to put 2 treasure boxes to every field so the player's have to find it, and the treasure boxes would refresh themselves ( if its found or not ) after 3 days.

  • 0
Posted

then no need to a script just add monster spawn in the fields you need

https://github.com/rathena/rathena/wiki/Permanent_Monster_Spawn

like that >>

  • map_name = Map Name ("this" is actual map)
  • X = X (horizontal) coordinates on map_name
  • Y = Y (vertical) coordinates on map_name
  • X2 = X2 (horizontal) rectangle
  • Y2 = Y2 (vertical) rectangle
  •  = Replace this with a tab
  • Name = Name that will show
  • mob_id = Monster ID(from mob_db)
  •  = Replace this with a tab
  • amount = Amount to be spawned
  • delay = Delay (in milliseconds)
  • variance = Delay variance (in milliseconds)
  • event = NPC event that will be called when the monster dies (Example: NPCName::Label)

prontera,0,0    monster    Treasure Box    1845,2,259200000,0,0

prontera = map

Treasure Box = the name of the monster no need to it real name you can use any name

1845 = monster id

2 = amount

259200000 = 3 days

you add the line like this

https://github.com/rathena/rathena/blob/master/npc/mobs/citycleaners.txt#L22

and choose the monster id you want and edit it from from mob_db.txt if you use txt and sql if you use sql

https://github.com/rathena/rathena/blob/master/doc/mob_db.txt#L186 << this is a doc for what to do in mob_db

 

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...