Jump to content
  • 0

Custom Drop Rate in Certain map


isaw4sal3

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  40
  • Reputation:   0
  • Joined:  12/10/11
  • Last Seen:  

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;
}

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  351
  • Reputation:   52
  • Joined:  11/15/11
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  40
  • Reputation:   0
  • Joined:  12/10/11
  • Last Seen:  

Thanks sir Emistry and Nameless2you it helped a lot /no1

ahh sir, is this monster is autorespawn?

Edited by isaw4sal3
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  351
  • Reputation:   52
  • Joined:  11/15/11
  • Last Seen:  

My script should autorespawn it on kill..

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