Need some work done? Post a Project Today
Attention Scriptlance users, Scriptlance has been acquired by Freelancer.com! Find out more
WHAT WE NEED IN SHORT DESCRIPTION:
You must create a script which create a list in the database.
The list contain 1,000,000 (one million) winnings ($). Example:
How often a winning appear in the list can I set with probability factors. Example: If I set the probability to %0.0003 for a $5 winning, than the $5 winning will appear 3 times in the 1,000,000-list.
The admin area (where I can insert the factors) are already created, you only need to create the list-creator.
WHAT WE ALREADY HAVE:
At our site publishers earn/win random amounts for visitors they send.
At the admin panel I have jet differente "packs", each pack represents a country group (USA, Europe, ...).
For each pack I can set 20 factors (10 probability(%) factors and 10 $ factors) jet. These factors exactly calculate how often different prizes are won.
WHAT WE NEED IN DETAIL:
The system must create a list which contain the next 1,000,000 winnings. The list is created with the 20 probability factors.
Example: If the probability to win $5 is %0.0005 , than the sytem must calculate (1,000,000*0.0005) : 100 = 5
So for this example the $5 winning will appear 5 times in the list.
Next to the probability factors fields you must create a “cost per 1k field“. This is a number gernerated from the list by add all winnings together and devide this number by 1000. This is the number that will be shown at the field “cost per 1k“. This number must be calculated/updated everytime I press the edit button under the 20 factors.
-A new list will be created if only 500,000 winnings left, so we have 1,500,000 winnings at the moment of the next list creation; than if again only 500,000 winnings left a new list will be created...
-Each pack has its own list with it own 20 factors.
-The order of the prizes in the list must be random.
If the winning e.g. 19,898 in “Pack 2“ in the list is e.g. $2:
Than if a publisher send the visitor 19,898 in “Pack 2“ he will earn $2 for that single visitor.
-Each Publisher win a price for EVERY unique visitor he send.
-How often a prize appear in the list is exactly pased on the 20 factors (% and $).
-Each list creation should take
-A new list will be created each time I press the edit button under the 20 factors. The old lists will be overwritten (deleted) if the new list is created.
-A list creation should take not longer than 10min, but much faster is better.
-I can add as many packs I want (like now), each pack has its own list/factors.
-This is already done: We have a already running fraud-protection system. If the visits don't pass our security system than the user must earn nothing per visitor.
-This is already done: At the moment, if no ad is aviable for the country of the visitor , a placeholder ad is shown and the user earn only exact 1LP per unique visitor. He don't win prizes for that.
Please change that to $0.0001
I have attached 3 files:
the_20_factors.png , this are the 20 factor fields in the admin panel (ten $(value) fields and ten %(probability) fields). We don't use the ten LotusPoints fields, so please make them unwritabel, so we cant inser values in the 10 LotusPoints fields
cost_per_1000_value.png , this is the "cost per 1k field" that you should add (I have explained this already in the description)
screenshot_packs.png , this are a screenshot of the actual packs
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)