HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS. ocPortal 9 is superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Anyone running OCWorld?

Login / Search

 [ Join | More ]
 Add topic 
Posted
Item has a rating of 5 (Liked by Jean)  
Rating:
#84039
Avatar

Community saint

Sorry Nighthawk to be slow getting back but I decided to do some more modding to it first.

Now in addition to the earlier mentioned options I have added some extra functionality to the "USE ITEM" function.

Now when a person "uses" a healthy item I check to see if that item has a cost (a cost which was set only by admins and superusers) I also check to see what is the most expensive healthy item existing (once again only ones set by admins) and extract the items value as a percentage of the most expensive healthy item. I then take that percentage and get the total current health of the person and figure out what percentage of that health is the ceiling for possible heal points based on the item value. I use that item value percentage also for the bottom end of the random calculation so their possible heal value will be between the  percent of total heal possibility ( which is the percent of their health) and the percent of their health.

For example lets suppose these numbers:

Persons Current health is 100 points
Person uses a healthy item (apple) that costs 300 points
The maximum costing item (a banana lets say) is 400 points

This means the person can earn a random value of points to be added to their  between 75 points (apple is 75% of cost of banana and 75% of persons points is 75) and 56 points (75% of 75 = 56) so they will gain that random value between 56 - 75 points to be added to their health.

If health or item values are less than 10 (for instance an item that has no cost) than the minimum a person will earn in health is a random value between 1 - 10 points.

Another thing to note is inside the "DEHURT" function (which adds the health) I have created a variable called "ceil_health" which is the ceiling a person can be healed to. I set as default of 1000 points so a person can not be healed (whether using an item or being healed by admin) above that amount. So if an admin wants to raise that ceiling they will have to edit that variable inside that function and file:

File is: sources_custom/ocworld.php

Function is "dehurt" on line 541 of that file.

I still have a little more testing to do and some code clean up but it should be ready some time tomorrow (Well today for me since it is 12:30 am Monday).
Back to the top
 
Posted
Rating:
#84109
Avatar

Community saint

Sorry this will have to wait til next week. Refer to this post http://ocportal.com/forum/topicview/findpost/84107.htm for explanation
Back to the top
 
Posted
Rating:
#84493
Avatar

Fan in action

Duck said

Sorry this will have to wait til next week. Refer to this post http://ocportal.com/forum/topicview/findpost/84107.htm for explanation

When you have time.. :-)  :thumbs:
Back to the top
 
Posted
Item has a rating of 5 (Liked by BobSLiked by Jean)  
Rating:
#84668
Avatar

Community saint

Ok I have packaged it up ASIS for now so you can test it out. There are no Database changes it is simply a matter of copy and replace files. Of course I recommend backing up your originals but even if you don't and something goes wrong you should be able to just re-install the original.

Those who want to test run it please do so and report back your experiences. Things are a little busy for me right now so I won't being making the official release with commit for probably a couple weeks till I have satisfied I am done with changes for now. (plus I'll have to wait for that access)

I also want to refine the RN importer I was working on when the time permits and of course upgrade the theme I just released to be better prepared for v8 and I think I will be giving those both a higher priority for the moment.

Here are the files:

Attachment
ocWorld addon with Attacking and healing modifications
» Download: ocworld2.zip (253 Kb, 113 downloads so far)
Back to the top
 
Posted
Rating:
#84828
Avatar

Fan in action

I get the error

A language entry is missing: W_ATTACK

errm what did I misss...?  lol
Back to the top
 
Posted
Rating:
#84841
Avatar

Community saint

hmm I looked and that language definition is in the file can you double check in lang_custom/EN/ocworld.ini for it in your install. It sould be near the bottom of the file. If it is not let me know'=
Back to the top
 
Posted
Item has a rating of 5 (Liked by Fletch)  
Rating:
#84847
Avatar

Fan in action

Duck said

hmm I looked and that language definition is in the file can you double check in lang_custom/EN/ocworld.ini for it in your install. It sould be near the bottom of the file. If it is not let me know'=


Sorted… my bad uploaded to wrong theme for ocworld Doh…
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:
 Add topic 

Quick reply   Contract

Your name:
Your message: