Jump to content
  • 0

How to Change Getitem to Dropitem


ooGubAoo

Question


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.06
  • Content Count:  43
  • Reputation:   1
  • Joined:  06/08/23
  • Last Seen:  

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.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  232
  • Reputation:   86
  • Joined:  06/30/18
  • Last Seen:  

-   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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.06
  • Content Count:  43
  • Reputation:   1
  • Joined:  06/08/23
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.02
  • Content Count:  911
  • Reputation:   166
  • Joined:  11/27/14
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.06
  • Content Count:  43
  • Reputation:   1
  • Joined:  06/08/23
  • Last Seen:  

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?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.02
  • Content Count:  911
  • Reputation:   166
  • Joined:  11/27/14
  • Last Seen:  

2 hours ago, ooGubAoo said:

How to vote?

Beside of your profile when you reply or someone reply to your post there is Arrow up and down

Link to comment
Share on other sites

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.

×
×
  • Create New...