≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
My game ccb !
Posted by:
(you are not logged in)
Enter the missing letter in: "Inter?ational"
(you are not logged in)
Text:
[quote][b]carlosm[/b] wrote: - CopperCube people. Well, two months I am developing a game with a ccb. well the platform game is mixed with rpg. The character is a druid I am thinking of changing characters. [img]https://bayimg.com/6a84e620cf7eac9b43fde1f313d87f6db275b3d0.jpg[/img] I am making a random drops code available. [code]var drop_aleatorio = function() { var key_drop_aleatorio = ccbGetCopperCubeVariable('key_drop'); if(key_drop_aleatorio == 1){ var maximo = 14; var resultados = 7; var i, arr = []; for (i = 0; i < maximo; i++) { arr[i] = i + 1; } var p, n, tmp; for (p = arr.length; p;) { n = Math.random() * p-- | 0; tmp = arr[n]; arr[n] = arr[p]; arr[p] = tmp; } for (var i = 0; i < resultados; i++) { var nome_mob = 'Mob_' + arr[i] + 'N'; var nome_item = 'item_' + arr[i]; ccbSetCopperCubeVariable(nome_mob, nome_item ); } ccbSetCopperCubeVariable('key_drop', 0); } }; ccbRegisterOnFrameEvent(drop_aleatorio); [/code] This code above generates without repeating numbers randomly according to the number generated by mobs (enemies) that are selected and received an item![/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact