Custom drops code (prequel to custom events)

If you want to help us or give some corrections / codes, put it here ;)

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

Re: Custom drops code (prequel to custom events)

Postby PurpleYouko on Wed Jul 08, 2009 8:09 pm

post up your PYDrops code so i can take a look.
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

Re: Custom drops code (prequel to custom events)

Postby renzo17 on Thu Jul 09, 2009 3:10 pm

So you mean ServerFunctions.cpp? Well here it is
Attachments
ServerFunctions.cpp
(21.66 KiB) Downloaded 777 times
renzo17
Jelly Bean
Jelly Bean
 
Posts: 27
Joined: Sat Jul 04, 2009 8:52 am

Re: Custom drops code (prequel to custom events)

Postby PurpleYouko on Thu Jul 09, 2009 3:52 pm

Well that's not exactly what i had in mind. i meant to put the code for the function in a code box on the forums rather than as an attachment.
I'll take a look

OK well for one thing this code is out of osProse as far as i can tell. It is using all kinds of data structures that are unavailable in rev 80 to start with.
like this for example
int dropchance = thismon->thisnpc->item + thismon->thisnpc->money + thisclient->Stats->itemdroprate + thisclient->Stats->zulydroprate;
thismon->thisnpc->item and thismon->thisnpc->money are read directly from LIST_NPC.STB so you have no access to them in rev 80 at all.

If this code that you posted came from a rev 80 server then the number of apples getting dropped is the least of your worries. I bet most of teh data structures used here are either empty, NULL or just contain some meaningless value.
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

Re: Custom drops code (prequel to custom events)

Postby renzo17 on Thu Jul 09, 2009 4:07 pm

Oww, Sorry, didn't knew that.

I have Irose, But are those NULL thingy's in Navicat and can I change it there? or what do u mean?
renzo17
Jelly Bean
Jelly Bean
 
Posts: 27
Joined: Sat Jul 04, 2009 8:52 am

Re: Custom drops code (prequel to custom events)

Postby lmame on Fri Jul 10, 2009 7:34 am

What do you mean "iRose"??
Are you using osiRose or osRose??
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: Custom drops code (prequel to custom events)

Postby renzo17 on Fri Jul 10, 2009 9:33 am

I think osiRose, but I'm not really sure :?
renzo17
Jelly Bean
Jelly Bean
 
Posts: 27
Joined: Sat Jul 04, 2009 8:52 am

Re: Custom drops code (prequel to custom events)

Postby lmame on Fri Jul 10, 2009 9:39 am

Not sure??
Which SVN did you use? :lol: Which client are you using?? Where did you get your files??
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: Custom drops code (prequel to custom events)

Postby renzo17 on Fri Jul 10, 2009 3:06 pm

Well, ok I'm about sure that I have osiRose. But what's the problem now?
renzo17
Jelly Bean
Jelly Bean
 
Posts: 27
Joined: Sat Jul 04, 2009 8:52 am

Re: Custom drops code (prequel to custom events)

Postby lmame on Fri Jul 10, 2009 3:10 pm

In the get drop function (getpydrop or getdroppy or something) you can check the level difference between the monster and your player and decide to return the function if the gap is more than "100" for example.
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Previous

Return to Submit Code

Who is online

Users browsing this forum: No registered users and 6 guests