Jump to content
  • 0

How to Change Getitem to Dropitem


Question

Posted
Quote

-    script    GetRed    -1,{
    OnNPCKillEvent:
    if (killedrid) > 0 {
        set #KILLED_MONSTERS, #KILLED_MONSTERS + 1;
        if (#KILLED_MONSTERS % 100 == 0) {
            getitem 501, 1;
            dispbottom "[ระบบ] : ยินดีด้วย คุณได้รับดรอปไอเทม Red Potion จากการกำจัดมอนเตอร์";
        }
    }
    end;
}

This Script When kill monter then get item in inventory.
I need to drop item on then groud.
Thank you.

5 answers to this question

Recommended Posts

  • 1
Posted (edited)
-   script  GetRed  FAKE_NPC,{
    OnNPCKillEvent:
        #KILLED_MONSTERS += 1;
 
        if (#KILLED_MONSTERS % .mobsPerDrop != 0) end;
 
        getunitdata(killedgid, .@mobData);
        makeitem(.itemDropId, .itemDropAmt, mapid2name(.@mobData[UMOB_MAPID]), .@mobData[UMOB_X], .@mobData[UMOB_Y]);
        dispbottom "[ระบบ] : ยินดีด้วย คุณได้รับดรอปไอเทม " + getitemname(.itemDropId) + " จากการกำจัดมอนเตอร์";
    end;
 
    OnInit:
        .itemDropId = 501;
        .itemDropAmt = 1;
        .mobsPerDrop = 100;
}
Edited by Winterfox
  • 0
Posted
7 hours ago, Winterfox said:
-   script  GetRed  FAKE_NPC,{
    OnNPCKillEvent:
        #KILLED_MONSTERS += 1;
 
        if (#KILLED_MONSTERS % .mobsPerDrop != 0) end;
 
        getunitdata(killedgid, .@mobData);
        makeitem(.itemDropId, .itemDropAmt, mapid2name(.@mobData[UMOB_MAPID]), .@mobData[UMOB_X], .@mobData[UMOB_Y]);
        dispbottom "[ระบบ] : ยินดีด้วย คุณได้รับดรอปไอเทม " + getitemname(.itemDropId) + " จากการกำจัดมอนเตอร์";
    end;
 
    OnInit:
        .itemDropId = 501;
        .itemDropAmt = 1;
        .mobsPerDrop = 100;
}

Thank you very much.It work.

  • 0
Posted
20 hours ago, ooGubAoo said:

Thank you very much.It work.

Please put some vote if someone help and it works like what you ask so they will also appreciate and keep helping other

  • 0
Posted
On 6/28/2023 at 5:53 AM, Poring King said:

Please put some vote if someone help and it works like what you ask so they will also appreciate and keep helping other

How to vote?

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