Back in October right before I came back to SRL I was making this game based off Runescape/Soulsplit.
Example of code
I had nub standards back then)
Code:
// death
if healthpoint < 1 {
if global.soulsplit = 1 global.healthpoints += 5
instance_destroy();
instance_create(x,y,obj_dragon_bones);
if random(50)<=1{
instance_create(x,y,obj_gold_bar);
}
if random(3)<=1{
instance_create(x,y,obj_range_xp);
}
{ if healthpoint < 1
if random(1)<=1{
instance_create(x,y,obj_trout); }
}
}
// attack
if (instance_exists(obj_player)) {
target = instance_nearest(x, y, obj_player);
target_dist = point_distance(x, y, target.x, target.y);
target_angle = point_direction(x, y, target.x, target.y);
if target_dist < 150 then
if random(95)<=1{
instance_create(x,y,obj_bullet); }
if random(150)<=1{
instance_create(x,y,obj_fire); }
else if target_dist > 150
if (timer <= 0) {
timer += 60
npcdamage = (random(50))/random(global.defense/2)
if global.soulsplit = 1 then global.healthpoints += npcdamage/10
if npcdamage < 1
global.healthpoints -= npcdamage
} else {
timer -= 1;
}
}
// defense
if place_meeting(x,y,obj_sword) {
hit_on_npc = random(300-(global.attack+(global.strength/20)))
//show_message(" Hit On : "+string( hit_on_npc) )
if ( hit_on_npc < 60+global.attack/9)
npcdamage = random(global.strength/7)+.5
if global.soulsplit = 1 then global.healthpoints += npcdamage/10
else
npcdamage = 0;
//show_message(" Damge: "+string( npcdamage) );
if !(npcdamage < 1)
healthpoint -= npcdamage;
if global.style = 1 then global.attackxp += npcdamage * 35;
if global.style = 2 then global.strengthxp += npcdamage * 35;
if global.style = 3 then global.defensexp += npcdamage * 35;
}
//range defense
if place_meeting(x,y,obj_bullet_player) {
hit_on_npc = random(300-(global.range*1.2+(global.range/5)))
//show_message(" Hit On : "+string( hit_on_npc) )
if ( hit_on_npc < 60+global.range/8)
npcdamage = random(global.range);
else
npcdamage = 0;
//show_message(" Damge: "+string( npcdamage) );
if !(npcdamage < 1)
healthpoint -= npcdamage;
global.rangexp += npcdamage * 30;
}
You need to Gamemaker 8.0 to run this, I don't plan on developing it any further though, it had working stats, working soulsplit (yes I know the icons were on the ground I was working on getting them into a interface)
Levels are broken because I tried to fix them using arrays:
Code:
var exp_need;
exp_need[1] = 5;
exp_need[2] = 84
exp_need[3] = 174
exp_need[4] = 276
exp_need[5] = 388
exp_need[6] = 512
exp_need[7] = 650
exp_need[8] = 801
exp_need[9] = 969
exp_need[10] = 1154
exp_need[11] = 1358
exp_need[12] = 1584
//more
exp_need[13] = 1833
exp_need[14] = 2107
exp_need[15] = 2411
exp_need[16] = 2746
exp_need[17] = 3115
exp_need[18] = 3523
exp_need[19] = 3973
exp_need[20] = 4470
exp_need[21] = 5018
// more
exp_need[22] = 5624
exp_need[23] = 6291
exp_need[24] = 7028
exp_need[25] = 7842
exp_need[26] = 8740
exp_need[27] = 9730
exp_need[28] = 10824
exp_need[29] = 12031
exp_need[30] = 13363
// more
exp_need[31] = 14833
exp_need[32] = 16456
exp_need[33] = 18247
exp_need[34] = 20224
exp_need[35] = 22406
exp_need[36] = 24815
exp_need[37] = 27473
exp_need[38] = 30408
exp_need[39] = 33648
//more
exp_need[40] = 37224
exp_need[41] = 41171
exp_need[42] = 45529
exp_need[43] = 50339
exp_need[44] = 55649
exp_need[45] = 61512
exp_need[46] = 67983
exp_need[47] = 75127
exp_need[48] = 83014
exp_need[49] = 91721
exp_need[50] = 101333
exp_need[51] = 111945
exp_need[52] = 123660
exp_need[53] = 136594
exp_need[54] = 150872
exp_need[55] = 166636
exp_need[56] = 184040
exp_need[57] = 203254
exp_need[58] = 224466
exp_need[59] = 247886
exp_need[60] = 273742
exp_need[61] = 302288
exp_need[62] = 333804
exp_need[63] = 368599
exp_need[64] = 407015
exp_need[65] = 449428
exp_need[66] = 496254
exp_need[67] = 547953
exp_need[68] = 605032
exp_need[69] = 668051
exp_need[70] = 737627
exp_need[71] = 814445
exp_need[72] = 899257
exp_need[73] = 992895
exp_need[74] = 1096278
exp_need[75] = 1210421
exp_need[76] = 1336443
exp_need[77] = 1475581
exp_need[78] = 1629200
exp_need[79] = 1798808
exp_need[80] = 1986068
//more
exp_need[81] = 2951373
exp_need[82] = 3258594
exp_need[83] = 3597792
exp_need[84] = 3972294
exp_need[85] = 4385776
exp_need[86] = 4842295
exp_need[87] = 5346332
exp_need[88] = 5902831
exp_need[89] = 6517253
exp_need[90] = 7195629
exp_need[91] = 7944614
exp_need[92] = 8771558
exp_need[93] = 9684577
exp_need[94] = 10692629
exp_need[95] = 11805606
exp_need[96] = 13034431
exp_need[97] = 14391160
if global.attack < 99 if global.attackxp > exp_need[global.attack-2] global.attack += 1;
if global.strength < 99 if global.strengthxp > exp_need[global.strength-2] global.strength += 1;
if global.defense < 99 if global.defensexp > exp_need[global.defense-2] global.defense += 1;
if global.pray < 99 if global.prayxp > exp_need[global.pray-2] global.pray += 1;
I think gamemaker 8 language is based off Delphi, I could include a dl link if you want too (.gmk) need this
http://www.yoyogames.com/gamemaker/studio
SOURCE
Can I get a mod to Vouch for safeness (has a .exe in there incase you don't have gamemaker)
@
Hobbit
@
Daniel
@
YoHoJo
SoulsplitRPGPack