V15. Event LUA

Newbie Spellweaver
Joined
Sep 28, 2023
Messages
7
Reaction score
0
How can I set an evnet to drop items? For example: I have this in my event.lua

AddEvent( "Upgrade Event" )
--{
SetTime( "2007-06-08 00:00", "2099-02-25 23:59" ) )
SetItem( "II_GEN_MAT_ORICHALCUM01, 300000000, 2, 120 )
--}

It's obviously not working.

Edit: I got it working!
 
Last edited:
How did you do it?
How can I set an evnet to drop items? For example: I have this in my event.lua

AddEvent( "Upgrade Event" )
--{
SetTime( "2007-06-08 00:00", "2099-02-25 23:59" ) )
SetItem( "II_GEN_MAT_ORICHALCUM01, 300000000, 2, 120 )
--}

It's obviously not working.

Edit: I got it working!
 
Upvote 0
Here is an example:

--{
SetTime( "2007-06-08 00:00", "2099-02-25 23:59" ) )
SetItem( "II_GEN_MAT_ORICHALCUM01, 300000000, 2, 120 )
--}

SetTime( strStartTime, strEndTime )
strStartTime - Event start time. Format: "YYYY-MM-DD HH:MM"
strEndTime - Event end time. Format: "YYYY-MM-DD HH:MM"


SetItem( ItemId, nMax, nNum, nLevel )
ItemId - define ID of the item to drop (you can check defineitem.h) (e.g., "II_GEN_MAT_ORICHALCUM01")
nMax - Maximum number of this item to drop per day.
nNum - Maximum random amount dropped in a single drop roll (1 to nNum).
nLevel - Minimum monster level required to drop this item.
 
Upvote 0
Back