Jump to content
  • 0

How to make this work with rA?


HristDead

Question


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

I used a script in eAthena, it was as followed:

-[TAB]script[TAB]-1,{
OnNPCKillEvent:
set .@a,rand(1,100);
if (.@a==1){set .@b,rand(1,2); if (.@b==1){getitem 677,1;}}
end;
}

This is an universal item drop. Means that all monsters in the game is able to drop ID 677 at a 0.5% rate.

weirdly enough it doesn't work in rAthena. Anybody know why?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Really? Because I recently used something like this and it worked for me. In fact it set 8 different variables until they didn't match each other. I know this sounds dumb, but you did replace [tab] with actual tabs right?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

It should work. o.o

You could rewrite it as a single statement,

if (!rand(200)) getitem 677,1;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

Really? Because I recently used something like this and it worked for me. In fact it set 8 different variables until they didn't match each other. I know this sounds dumb, but you did replace [tab] with actual tabs right?

Yes, I did. And it really doesn't seem to work, I even copy/pasted it from one custom .txt script into another to make it was really reading it. Rebooted too.

I'll try Euphy's solution and report back later.

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