Jump to content
  • 0

Custom Drop Rate in Certain map


Question

Posted

can i use this script for auto respawning monster and custom drop? is this the right one?

- script rates -1,{

monster .Map$,0,0,"Coin",1002,1,strnpcinfo(0)+"::OnItemGet";
}
OnItemGet:
if( rand(100) < .Rate ){
getitem 674,1;
} else {
if( rand(100) < .Rate ){
getitem 512,1;
}
end;
OnInit:
// What Map for Event to take Place ?
set .Map$,"dic_dun02";
// How many % in order to get Item upon killed Monster ?
set .Rate,15;
.Map$,0,0,0,0 monster A 2068,5,100000,0,0
setmapflag .Map$,mf_noskill;
setmapflag .Map$,mf_nomobloot;
setmapflag .Map$,mf_nomvploot;
end;
}

4 answers to this question

Recommended Posts

Posted

That won't do.

Try this:

http://upaste.me/0a56429e3138a5a

I removed the mapflags from the script loop because considering you don't add and remove the mapflag it makes little sense to use setmapflag, might as well just use the old method.

Also, rand(100) will only do 0-99, not including 100, so rand(101) will do 0-100.

I don't know if noloot doesn't exist anymore because I couldn't see it right now in const.txt but it should.. which is basically a combined version of nomobloot and nomvploot, if it errors just remove the noloot and make it nomvploot and nomobloot.

Posted

monster .Map$,0,0,"Coin",1002,1,strnpcinfo(0)+"::OnItemGet";

this line should be inside the OnItemGet label if you want it to respawn again and again.

didnt notice the doevent...

anyway the method i suggest will reduce the usage of label within the script

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